docs(agent): generate compact capability map for #826#1195
Conversation
Replace the stale conflicting #826 implementation with a narrow build-time generator that emits a deterministic LLM-facing capability map from the current tool registry. Constraint: The artifact must work before dist/ exists, so the ts-node generator resolves source .js specifiers back to adjacent .ts files. Rejected: reviving PR #927 as-is | it conflicts across broad generated/code surfaces and is harder to review than a fresh narrow implementation. Confidence: high Scope-risk: narrow Directive: Run npm run docs:capability-map whenever tool registration descriptions or capabilities change. Tested: npm run docs:capability-map Tested: npm test -- tests/scripts/gen-capability-map.test.ts --runInBand Tested: npm run docs:capability-map:check Tested: npm run build Tested: npm run lint -- --quiet Tested: npm run lint:tier Tested: git diff --check Not-tested: full repository test suite Co-authored-by: OmX <omx@oh-my-codex.dev>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Apply the balanced admin-key JSON stdout parser to this current capability-map PR so noisy Jest worker console blocks cannot hide the CLI's emitted JSON array during the full CI suite. Constraint: The generator PR itself is valid, but full-matrix CI runs admin-key tests alongside noisy orchestration tests in shared workers. Rejected: Weak first-bracket/last-bracket parsing | bracketed log prefixes such as [WorkflowEngine] can precede the actual JSON array and make the parser reject valid output. Confidence: high Scope-risk: narrow Directive: Keep CLI JSON harnesses scanning balanced JSON payloads rather than assuming stdout is noise-free under Jest. Tested: npm run docs:capability-map; npm test -- --runTestsByPath tests/scripts/gen-capability-map.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run docs:capability-map:check; npm run build; npm run lint -- --quiet; npm run lint:tier; git diff --check Not-tested: Full GitHub Actions matrix before push Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: PR #1195 was blocked by conflicts after develop gained new CLI/task-run and admin-key test changes. Rejected: Regenerate capability docs without merging develop | would leave GitHub mergeability blocked. Confidence: high Scope-risk: moderate Directive: Keep docs/agent/capability-map.md generated via npm run docs:capability-map after future tool-surface changes. Tested: npm run docs:capability-map; npm run docs:capability-map:check; npm test -- tests/scripts/gen-capability-map.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint:tier; git diff --check Not-tested: full test suite. Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: develop advanced while PR #1195 was open, and the generated capability map branch needed to absorb current admin parser changes without altering the documented tool surface intent. Rejected: relying on stale 9/9 checks | they no longer covered the current develop integration surface or conflict resolution. Confidence: high Scope-risk: narrow Directive: keep generated capability map output deterministic and keep admin JSON parsing as a single balanced scanner. Tested: npm test -- --runTestsByPath tests/scripts/gen-capability-map.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check. Not-tested: full GitHub Actions matrix before push. Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: remote docs/826-capability-map-v2 had an earlier conflict-resolution commit, and this refresh needed to preserve that branch lineage while absorbing current develop. Rejected: force-pushing over the remote tip | that would discard prior review history and obscure the develop reconciliation. Confidence: high Scope-risk: narrow Directive: keep generated capability map output deterministic and keep admin JSON parsing as a single balanced scanner. Tested: npm test -- --runTestsByPath tests/scripts/gen-capability-map.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check. Not-tested: full GitHub Actions matrix before push. Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: develop advanced after PR #1192 and later merges, and PR #1195 needed to keep the generated capability map aligned with the current tool surface while absorbing admin parser changes. Rejected: relying on stale generated-doc checks | they no longer covered the refreshed develop integration surface. Confidence: high Scope-risk: moderate Directive: keep capability-map generation deterministic and keep admin JSON parsing as a single balanced scanner. Tested: npm test -- --runTestsByPath tests/scripts/gen-capability-map.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check. Not-tested: full GitHub Actions matrix before push. Co-authored-by: OmX <omx@oh-my-codex.dev>
|
Reviewed and validated for merge. This PR implements the intended #826 compact capability-map documentation generator and deterministic markdown output. The refresh kept the generated view aligned with the current tool registry after develop advanced. Validation evidence: GitHub reports all 9 required checks passing with a CLEAN merge state. The branch was locally verified with |
Summary
npm run docs:capability-mapandnpm run docs:capability-map:check.docs/agent/capability-map.mdfrom current tool registration/capability metadata.Closes #826
Supersedes #927
Verification
npm run docs:capability-mapnpm test -- tests/scripts/gen-capability-map.test.ts --runInBandnpm run docs:capability-map:checknpm run buildnpm run lint -- --quietnpm run lint:tiergit diff --check