Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinmind",
"version": "0.10.1",
"version": "0.11.0",
"description": "Adaptive RU/EN task controller with deterministic routing, outcome contracts, and verified evidence.",
"author": {
"name": "Pinmind Project"
Expand Down
2 changes: 1 addition & 1 deletion .grok-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinmind",
"version": "0.10.1",
"version": "0.11.0",
"description": "Adaptive RU/EN task controller with deterministic routing, outcome contracts, and verified evidence.",
"author": {
"name": "Pinmind Project"
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.19.0
24.20.0
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/2.0.0/), and

## [Unreleased]

## [0.11.0] - 2026-09-01

### Added

- A single `UserPromptSubmit` orchestration hook that keeps Pinmind as the sole
controller and selects passive Skillstate checkpoints only for durable work.
- Regression coverage for short-task exclusion, durable-task admission,
confirmation boundaries, and Ponytail's code-only role.

### Changed

- Document the fixed hierarchy: Pinmind controls, Skillstate records bounded
checkpoints, and Ponytail simplifies code.
- Advance the pinned release runtime to Node `24.20.0`.

## [0.10.1] - 2026-08-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion LANGUAGE_ROUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Language routing and activation evaluation

Status: Phase A is included in the stable `0.6` line, following its experimental introduction in `0.5.0-experimental`. The current `0.10.1` source has a **457-case deterministic routing regression corpus**, **64 closed-schema language-evaluation cases** (32 development and 32 frozen release-gate cases), **28 host-activation fixtures**, and a separate phased-transfer regression for `CONTEXT_READY`. The local evaluator and release gate are implemented; fresh-host selection and end-task utility remain separate, unproven layers. The release split is a fixed regression gate, not a statistically independent benchmark. This document does not claim that ChatGPT, Codex, or Grok will activate Pinmind for every possible phrase.
Status: Phase A is included in the stable `0.6` line, following its experimental introduction in `0.5.0-experimental`. The current `0.11.0` source has a **457-case deterministic routing regression corpus**, **64 closed-schema language-evaluation cases** (32 development and 32 frozen release-gate cases), **28 host-activation fixtures**, and a separate phased-transfer regression for `CONTEXT_READY`. The local evaluator and release gate are implemented; fresh-host selection and end-task utility remain separate, unproven layers. The release split is a fixed regression gate, not a statistically independent benchmark. This document does not claim that ChatGPT, Codex, or Grok will activate Pinmind for every possible phrase.

## Decision

Expand Down
2 changes: 1 addition & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Privacy

Pinmind `0.10.1` is a skills-only plugin. It provides local instructions, a bundled kernel, and offline AEP, language-routing, and A/B/C evaluation inputs; it has no account system, connector, MCP server, telemetry service, or project-operated network endpoint.
Pinmind `0.11.0` is a local skill and prompt-routing hook. It provides local instructions, a bundled kernel, and offline AEP, language-routing, and A/B/C evaluation inputs; it has no account system, connector, MCP server, telemetry service, or project-operated network endpoint. The hook returns routing context only and does not persist the submitted prompt.

Pinmind processes only the task context and files made available by the active ChatGPT or Codex host. Data handling by that host and by any separately enabled tool is governed by the corresponding provider and user configuration.

Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Pinmind is a Russian-and-English workflow controller packaged as a Grok skill and a Codex App plugin. It classifies non-trivial work, including colloquial and lightly misspelled Russian, applies a process proportional to risk, composes specialist skills, and requires current evidence before calling a task complete.

Current stable version: `0.10.1`.
Current stable version: `0.11.0`.

- GitHub repository marketplace: included in this repository.
- Universal Plugins Directory: **not listed yet**. ChatGPT catalog steps apply only after OpenAI approval and a live listing check.
Expand All @@ -16,18 +16,18 @@ Current stable version: `0.10.1`.
1. Add the pinned stable repository marketplace:

```bash
codex plugin marketplace add iammedved/Pinmind --ref v0.10.1
codex plugin marketplace add iammedved/Pinmind --ref v0.11.0
```

2. Start Codex, run `/plugins`, select **Pinmind Project**, and install **Pinmind**.
3. Start a new Codex session.
4. Run `/skills` and confirm that `pinmind` is available.

The repository marketplace is separate from OpenAI's universal Plugins Directory. Pinning `v0.10.1` selects this exact stable release; omit `--ref` only when you intentionally want the reviewed latest repository state.
The repository marketplace is separate from OpenAI's universal Plugins Directory. Pinning `v0.11.0` selects this exact stable release; omit `--ref` only when you intentionally want the reviewed latest repository state.

### Recommended design-enabled installation order

Pinmind `0.10.1` can deterministically select two maintained external design
Pinmind `0.11.0` can deterministically select two maintained external design
skills. They are not bundled with Pinmind and must be installed separately.
For a fresh project, use this order:

Expand Down Expand Up @@ -57,7 +57,7 @@ For a fresh project, use this order:
3. Install the reviewed Pinmind release:

```bash
codex plugin marketplace add iammedved/Pinmind --ref v0.10.1
codex plugin marketplace add iammedved/Pinmind --ref v0.11.0
```

Open `/plugins`, install **Pinmind** from **Pinmind Project**, and start a
Expand All @@ -67,7 +67,7 @@ For a fresh project, use this order:
`ui-ux-pro-max` are available.

The historical `frontend-skill` is deprecated upstream and is not part of
Pinmind `0.10.1` design routing. Do not install it for this workflow.
Pinmind `0.11.0` design routing. Do not install it for this workflow.

### Codex CLI: upgrade or reinstall a reviewed revision

Expand All @@ -93,7 +93,7 @@ recovery path; it is not the supported public upgrade path.
4. If Pinmind does not appear immediately, restart Codex.
5. Run `/skills` and confirm that `pinmind` is available.

No extra setup is required. Pinmind is currently skills-only: it needs no connector, external account, API key, or MCP server.
Pinmind needs no connector, external account, API key, or MCP server. The bundled local hook only classifies the submitted prompt and adds routing context; it performs no task action itself.

### Grok Build CLI: install for every new chat

Expand Down Expand Up @@ -130,7 +130,7 @@ Pinmind is not currently available in the public Plugins Directory. After the li
4. Start a new chat.
5. Send: `@Pinmind Audit this repository without changing files. Determine the route first and report only verified findings.`

No connector, external account, API key, or additional configuration is required for the current skills-only package.
No connector, external account, API key, or additional configuration is required for the current local skill-and-hook package.

Official OpenAI guidance: [install and use plugins](https://learn.chatgpt.com/docs/plugins), [package plugins and repository marketplaces](https://developers.openai.com/plugins/build/plugins), and [build or install skills](https://learn.chatgpt.com/docs/build-skills).

Expand All @@ -146,11 +146,11 @@ Official OpenAI guidance: [install and use plugins](https://learn.chatgpt.com/do

Implicit selection is probabilistic. Explicit invocation is the reliable choice for critical work.

### Design-skill routing in 0.10.1
### Design-skill routing in 0.11.0

Earlier Pinmind releases could compose specialist skills only through general
instructions. That left the choice between overlapping design skills to the
host or the current prompt. Version `0.10.1` adds a deterministic post-route
host or the current prompt. Version `0.11.0` includes a deterministic post-route
decision:

- **Impeccable only** for an explicit Impeccable command or an end-to-end
Expand All @@ -167,10 +167,9 @@ Pinmind makes this choice with `design route` after its main process route.
The specialist result never grants permission to edit, publish, deploy, use
network services, or change Figma. Those boundaries still come from the user.

`0.10.1` is a patch release because the existing main route, contracts,
lifecycle, and authority model remain backward compatible. The release fixes
ambiguous design-skill composition, documents the external installation
requirements, and excludes the deprecated `frontend-skill`.
`0.11.0` is a minor release because Pinmind now owns automatic orchestration.
It decides whether a task needs passive Skillstate checkpoints while keeping
Ponytail limited to code simplification.

Pinmind `0.10.0` added journaled `abandon`, non-destructive `archive`, proportional debugging/TDD/architecture/review guidance, and a compact readability profile. Superpowers and dyslex.ai remain research inputs: they are not installed, imported, or made runtime dependencies.

Expand Down Expand Up @@ -264,7 +263,7 @@ publish or display Codex cachebuster build metadata.

The stable public line starts at `0.6.0`. Backward-compatible fixes use patch
versions such as `0.6.1`, `0.6.2`, `0.6.3`, `0.8.1`, `0.8.2`, `0.9.1`, and `0.10.1`; backward-compatible feature releases use a
new minor such as `0.7.0`, `0.8.0`, `0.9.0`, or `0.10.0`. Existing experimental tags are immutable history and
new minor such as `0.7.0`, `0.8.0`, `0.9.0`, `0.10.0`, or `0.11.0`. Existing experimental tags are immutable history and
are never moved to newer commits.

## Validation
Expand All @@ -288,8 +287,8 @@ this is a review-visible tamper-evidence boundary, not a cryptographically
independent benchmark.

For an auditable inventory, Pinmind counts top-level `test(` declarations rather
than quoting Node's runtime summary. The current manifest records 121 declarations
across ten test files, plus fixture-case counts for routes, activation, AEP,
than quoting Node's runtime summary. The current manifest records 124 declarations
across eleven test files, plus fixture-case counts for routes, activation, AEP,
parallel admission, and language evaluation. These are separate dimensions and
are not presented as one inflated "test count."

Expand Down
10 changes: 5 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Verified baseline

The current stable baseline is `0.10.1`, published as tag `v0.10.1`. See
[CHANGELOG.md](CHANGELOG.md). The `0.10.1` release
The current stable baseline is `0.11.0`, published as tag `v0.11.0`. See
[CHANGELOG.md](CHANGELOG.md). The `0.11.0` release
provides deterministic post-activation routing, local run-state containment and
recovery diagnostics, baseline/freshness evidence, read-only `final check`, and
explicit `finalize`. It also includes the reviewed P0 routing contrasts, required
Expand Down Expand Up @@ -47,15 +47,15 @@ only unfinished, measurable work; it is not implementation authority.

## Now

The `0.10.1` release keeps speech-act routing, a compact `SKILL.md`, and a split
The `0.11.0` release keeps speech-act routing, a compact `SKILL.md`, and a split
kernel. AEP, A/B/C experiments, and P2 stay out of chat-time runtime. Remaining
work is comparable host-run A/B/C evidence, fresh-host activation evidence, and
independent release-corpus governance, not another workflow controller.

### Remaining boundaries after the 0.10.1 release
### Remaining boundaries after the 0.11.0 release

- Re-run two fresh implicit and two fresh explicit Codex CLI sessions from the
immutable installed `v0.10.1` tag. Record the host version, package tree hash,
immutable installed `v0.11.0` tag. Record the host version, package tree hash,
selected cache path, first route, and whether routing preceded task tools.
- Directly inspect the Pinmind card and composer entry in a fresh Codex App
session. The manifest and cache can prove which tracked image is configured;
Expand Down
19 changes: 18 additions & 1 deletion evals/release-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"schemaVersion": 1,
"algorithm": "sha256",
"nodeVersion": "24.19.0",
"nodeVersion": "24.20.0",
"frozenInputs": [
{
"role": "router",
"path": "skills/pinmind/scripts/lib/route.mjs",
"sha256": "808643bbb66cf8458a239a7be66bce9ef2f91a2e75901520fcaeae5dcec0b79c"
},
{
"role": "orchestration-hook",
"path": "hooks/pinmind-orchestrator.mjs",
"sha256": "c6d0806d6d94d719b41b0e1e923f66670396fa820ac24becdefe16b8d721479a"
},
{
"role": "design-specialist-router",
"path": "skills/pinmind/scripts/lib/design-skills.mjs",
Expand Down Expand Up @@ -70,6 +75,14 @@
}
],
"commands": [
{
"id": "orchestration-hook-tests",
"argv": [
"node",
"--test",
"tests/orchestration-hook.test.mjs"
]
},
{
"id": "kernel-tests",
"argv": [
Expand Down Expand Up @@ -282,6 +295,10 @@
],
"inventory": {
"testFiles": [
{
"path": "tests/orchestration-hook.test.mjs",
"topLevelDeclarations": 3
},
{
"path": "tests/kernel.test.mjs",
"topLevelDeclarations": 63
Expand Down
16 changes: 16 additions & 0 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/hooks/pinmind-orchestrator.mjs\"",
"timeout": 2,
"statusMessage": "Pinmind is routing the task"
}
]
}
]
}
}
49 changes: 49 additions & 0 deletions hooks/pinmind-orchestrator.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env node
import { fileURLToPath } from 'node:url';

import { routeTask } from '../skills/pinmind/scripts/lib/route.mjs';

// Persistent Pinmind runs currently exist only for software changes.
const DURABLE_ROUTE = new Set(['software-change']);

export function needsSkillstate(prompt, route) {
if (!DURABLE_ROUTE.has(route.route) || route.needsHumanConfirmation) return false;
const text = String(prompt).trim();
const stages = [...text.matchAll(/\b(?:audit|analy[sz]e|inspect|implement|fix|test|verify|refactor|review|document|build|update|migrate|debug)\b|(?:аудит|проанализ|проверь|исправ|реализ|добав|протест|рефактор|подготов|настрой|обнов|внедр|мигрир|исслед)/giu)].length;
return text.length >= 600 || stages >= 3 || route.executionSpan !== 'local' || route.risk === 'high' || /(?:многоэтап|долг(?:ая|ий|ую)|нескольк(?:о|их) этап|interruption|resume|сначала.+(?:потом|затем))/iu.test(text);
}

export function hookOutputForPrompt(prompt) {
if (typeof prompt !== 'string' || !prompt.trim()) return {};
const route = routeTask({ text: prompt });
if (route.route === 'simple' || route.route === 'operational') return {};
const durable = needsSkillstate(prompt, route);
const statePolicy = durable
? 'This task needs durable state. After Pinmind initializes its run, use $skillstate-runtime only for passive `skillstate checkpoint` records at clean phase boundaries. Never run `skillstate run` or start another controller.'
: 'This task does not need Skillstate. Do not start or invoke it.';
return {
hookSpecificOutput: {
hookEventName: 'UserPromptSubmit',
additionalContext: `origin=pinmind. Pinmind is the sole workflow controller for this turn; load and follow $pinmind before task tools. ${statePolicy} Ponytail may simplify code, but it never controls routing, state, authority, or phase order.`,
},
};
}

function startHook() {
let input = '';
let finished = false;
function finish() {
if (finished) return;
finished = true;
try { process.stdout.write(JSON.stringify(hookOutputForPrompt(JSON.parse(input.replace(/^\uFEFF/, '')).prompt))); }
catch { process.stdout.write('{}'); }
}
process.stdin.on('data', chunk => { input += chunk; });
process.stdin.on('end', finish);
process.stdin.on('error', finish);
process.stdin.resume();
const timeout = setTimeout(finish, 1000);
process.stdin.once('end', () => clearTimeout(timeout));
}

if (process.argv[1] === fileURLToPath(import.meta.url)) startHook();
3 changes: 3 additions & 0 deletions scripts/verify-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const TEST_FILE_KEYS = new Set(['path', 'topLevelDeclarations']);

export const EXPECTED_FROZEN_INPUTS = Object.freeze([
['router', 'skills/pinmind/scripts/lib/route.mjs'],
['orchestration-hook', 'hooks/pinmind-orchestrator.mjs'],
['design-specialist-router', 'skills/pinmind/scripts/lib/design-skills.mjs'],
['mixed-decomposition', 'skills/pinmind/scripts/lib/decomposition.mjs'],
['goal-context', 'skills/pinmind/scripts/lib/goal-context.mjs'],
Expand All @@ -63,6 +64,7 @@ export const EXPECTED_FROZEN_INPUTS = Object.freeze([
]);

export const EXPECTED_COMMANDS = Object.freeze([
Object.freeze({ id: 'orchestration-hook-tests', argv: Object.freeze(['node', '--test', 'tests/orchestration-hook.test.mjs']) }),
Object.freeze({ id: 'kernel-tests', argv: Object.freeze(['node', '--test', 'tests/kernel.test.mjs']) }),
Object.freeze({ id: 'terminal-lifecycle-tests', argv: Object.freeze(['node', '--test', 'tests/terminal-lifecycle.test.mjs']) }),
Object.freeze({ id: 'goal-context-tests', argv: Object.freeze(['node', '--test', 'tests/goal-context.test.mjs']) }),
Expand Down Expand Up @@ -93,6 +95,7 @@ export const EXPECTED_COMMANDS = Object.freeze([
]);

const EXPECTED_TEST_FILES = Object.freeze([
'tests/orchestration-hook.test.mjs',
'tests/kernel.test.mjs',
'tests/terminal-lifecycle.test.mjs',
'tests/goal-context.test.mjs',
Expand Down
13 changes: 13 additions & 0 deletions skills/pinmind/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ Check `.pinmind/active.json` before a new persistent run. Reconcile it read-only

Keep specialist skills (PDF, Superpowers, `/design`, `/execute-plan`). Pinmind wraps them; it does not replace them.

## Durable state and code simplicity

Pinmind is the only workflow controller. The bundled `UserPromptSubmit` hook may mark a non-trivial request with `origin=pinmind` and decide whether it is durable enough for Skillstate. Never let Skillstate route the task, choose actions, or start its `run` controller beneath Pinmind.

When the hook selects durable state, keep `.pinmind` as the source of truth. After `init` and at clean contract, execution, verification, and final phase boundaries, run:

```bash
skillstate doctor --workspace <path>
skillstate checkpoint --workspace <path> --pinmind-run <run-id>
```

If either command fails, continue under Pinmind and report that durable checkpoints are unavailable; do not start a second controller. Skip Skillstate for short or one-step work. Ponytail may select the smallest code change and review over-engineering, but it never changes routing, authority, state, or phase order.

## UI design specialists

After the main route, if the request may design, change, review, or fix a visual interface, run the deterministic specialist router before loading a UI skill:
Expand Down
4 changes: 2 additions & 2 deletions tests/kernel.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,15 @@ test('public release documentation, license, metadata, evaluation guides, and he
const escapedBaseVersion = baseVersion.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');

assert.match(manifest.version, /^\d+\.\d+\.\d+$/);
assert.equal(baseVersion, '0.10.1');
assert.equal(baseVersion, '0.11.0');
assert.equal(grokPlugin.name, manifest.name);
assert.equal(grokPlugin.version, baseVersion);
assert.match(manifest.description, /^Adaptive RU\/EN task controller/);
assert.match(description, /^"Default RU\/EN controller/);
assert.match(agent, /short_description:\s*"Adaptive verified RU\/EN task controller"/);
for (const section of ['## Install, configure, and run', '## What Pinmind does', '## Kernel CLI', '## Versioning', '## Limitations']) assert.match(readme, new RegExp(section));
assert.match(readme, new RegExp(`Current stable version:\\s*\`${escapedBaseVersion}\``));
assert.match(readme, /codex plugin marketplace add iammedved\/Pinmind --ref v0\.10\.1/);
assert.match(readme, /codex plugin marketplace add iammedved\/Pinmind --ref v0\.11\.0/);
assert.doesNotMatch(readme, /--ref v0\.9\.1/);
assert.doesNotMatch(readme, /Current (?:source|stable) version:[^\n]*unreleased/i);
assert.match(readme, /Universal Plugins Directory:\s*\*\*not listed yet\*\*/);
Expand Down
Loading