Repository navigation
feat(prompts): unify the CLI contract across every prompt surface - #40
Merged
Merged
Conversation
Three invocation forms coexisted after the retrieval-gate work: hooks and the operating skill used `npx -y`, the four workflow skills and both agents used a bare `npx` (which prompts interactively when the package is missing, hanging a subagent), and the generated Codex surface still carried 15 `npx --no-install` calls that fail outright — the opposite of the external-tooling contract. Everything now runs as `npx -y @tokenroll/llmdoc <cmd>`, declared once per surface so command references stay short. The Retrieval Gate reached only the operating skill. `investigator` and `recorder` still opened with fixed command sequences, contradicting the gate's "choose one entry point by intent, not a sequence" rule. Both now apply the gate, and `investigator` states explicitly where native tools take over. `recorder` also taught `validate` plus `fingerprint --update` as its finalizer, which the workflow skills and llmdoc/workflows/init-and-update.mdx already replaced with the one-shot `commit`. It now validates, leaves finalization to the calling workflow, and only fingerprints when asked. Also: put the intent routing table at the top of the operating skill ahead of the invocation constraints, sharpen its description for discovery-shaped tasks, note in prune/upgrade that the CLI reports rather than rewrites, and give upgrade the init-state/commit finalizer the other workflows have. Codex surfaces under .agents/ and .codex/ were synced by hand, replacement style, and still need an acplugin regeneration pass; the npx-resolved acplugin is 1.1.0, below the 1.6.1 the packaging doc requires.
Second review pass over the unified skills:
- upgrade: the finalize step ran `validate` before `init-state`, but validate
requires the ledger to exist and mirror the tree — a migration that lost
meta.json could never pass. Seed the ledger first, then validate, then
`commit --all`.
- update: the report contract still asked for "the fingerprint result or why
it was skipped" from before `commit` absorbed fingerprinting; it now asks
for the commit result. Step 4 retitled Finalize accordingly.
- init/prune/upgrade report contracts name both `validate` and `commit`
results, matching what their workflows actually run.
- operating skill: drop the markdown anchor link (useless in a prompt),
straighten the gate sentence.
Version: 3.1.1 → 3.2.0 across package.json, cli/package.json, both
lockfiles, .claude-plugin/{plugin,marketplace}.json, .codex-plugin/plugin.json
(the full set the release workflow gates on), plus the README pin examples.
Member
Author
|
Second pass (faa61ca), after re-reviewing the unified skills:
Codex surfaces re-synced; all checks re-run green ( |
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The retrieval-gate work (#38) and the external-tooling decision (#39) landed on the operating skill and hooks, but never reached the four workflow skills, the two agent contracts, or the generated Codex surface. This PR closes that gap and fixes three contradictions it exposed.
1. One invocation contract
Three forms coexisted:
hooks/hooks.json,skills/llmdocnpx -y @tokenroll/llmdocskills/{init,update,prune,upgrade},agents/*npx @tokenroll/llmdoc.agents/skills/*,.codex/agents/*npx --no-install(15 call sites)The bare form prompts interactively when the package is missing, which hangs a subagent;
--no-installfails outright, the opposite of the "external tooling, fetched into the npm cache, never a project dependency" contract. Everything is nownpx -y @tokenroll/llmdoc <cmd>, declared once per surface so individual command references stay short.2. The Retrieval Gate now reaches both agents
investigatoropened with a fixedtree → index → context → search → showsequence andrecorderwith a seven-command list — both contradicting the gate's "choose one entry point by intent, these are alternatives, not a sequence" rule. Both now apply the gate, andinvestigatorstates explicitly where native tools take over for exact facts (source text, line numbers, tests, counts, git state).3.
recorderno longer conflicts withcommitrecordertaughtvalidate+fingerprint --updateas its finalizer. The workflow skills andllmdoc/workflows/init-and-update.mdxalready replaced that with the one-shotcommit("never hand-roll this sequence").recordernow validates, leaves finalization to the calling workflow, and only fingerprints when the workflow explicitly asks for revisions without a commit.Smaller fixes
descriptionsharpened toward discovery-shaped tasksprune/upgrade: state that the CLI reports and diagnoses rather than rewriting, matchingllmdoc/workflows/prune-and-upgrade.mdxupgrade: gained theinit-state/commit --allfinalizer the other three workflows already hadcommitnamed as the finalizer alongsidefingerprint/new/mvValidation
npm test— 36 passednpm run check:prompts— all five skills within budget (llmdoc1171/1600, was 989)node scripts/check-codex-surface.mjs— oknpm run validate:dogfood— ok.codex/agents/*.tomlparse and contain no--no-installFollow-ups, deliberately not in this PR
.agents/and.codex/were synced by hand, replacement style, preserving the ACPlugin front-matter style. The npx-resolvedacpluginis 1.1.0, below the 1.6.1 thatllmdoc/plugin-packaging/claude-and-codex.mdxrequires (older versions regressmodel: inheritand downgrade hooks), so a regeneration pass should confirm this output rather than being run blind now.deltareports 5 impacted docs andmode: deepfor this change. Running/llmdoc:updateafter merge is the intended path; leaving the decision to the maintainer follows this repo's own convention.