Add pluggable OKF type taxonomy per mode - #26
Conversation
Proposes making the OKF `type` taxonomy pluggable per run mode (code vs personal) while keeping the OKF carrier unchanged. Adds proposal, design, delta spec (okf-conformance), and tasks. Refs #22. Co-authored-by: Ayrton Fidelis <22180887+ayrtonvwf@users.noreply.github.com>
|
@claude /opsx:apply then update the PR title and description accordingly |
|
Claude finished @ayrtonvwf's task in 9m 14s —— View job Applying OpenSpec change:
|
Introduces DocTypeTaxonomy (CODE_DOC_TYPES / PERSONAL_DOC_TYPES) and getTaxonomyForMode, threaded through the OKF prompt contract and the stamping pass so personal-mode wikis get personal types (Overview, Source, Topic) instead of collapsing to the code Reference fallback. code-mode behavior is unchanged byte-for-byte. Co-authored-by: Ayrton Fidelis <22180887+ayrtonvwf@users.noreply.github.com>
|
@claude-opus review the change |
|
Claude finished @ayrtonvwf's task in 1m 56s —— View job Review:
|
|
@claude fix points 1, 2 and 3 |
|
Claude finished @ayrtonvwf's task in 1m 48s —— View job Fixing review points 1, 2, 3
Summary
Point 4 ( Verification
Branch · |
- Document that the CODE_DOC_TYPES default on stampPage/runOkfPass is a test-only convenience; production always threads the mode-derived taxonomy explicitly. - Drop the stale REPO_ prefix on DOC_TYPE_NAME_PATTERN/DOC_TYPE_DIRECTORY_PATTERN now that they validate any taxonomy, not just the code one. - Scope the personal-mode negative assertions in test/prompt.test.ts to the OKF contract section instead of the whole prompt, so unrelated prompt copy can't accidentally trip the test. Co-authored-by: Ayrton Fidelis <22180887+ayrtonvwf@users.noreply.github.com>
Adds and implements the OpenSpec change
pluggable-okf-taxonomy(proposal, design, delta spec, tasks) for making the OKFtypetaxonomy pluggable per run mode while keeping the OKF carrier unchanged.What changed
src/constants.ts: newDocTypeTaxonomytype;REPO_DOC_TYPES/REPO_DOC_TYPE_FALLBACK/getRepoDocTypeForDirectoryreplaced byCODE_DOC_TYPES,PERSONAL_DOC_TYPES,getDocTypeForDirectory, andgetTaxonomyForMode.codemode keeps today's exact type→directory entries and fallback (Reference); a new minimalpersonaltaxonomy maps""→Overview,sources→Source,topics→Topic, fallbackNote.src/agent/prompt.ts:createOkfContractSection()now takes aDocTypeTaxonomy, resolved fromoptions.outputModeviagetTaxonomyForModeincreateSystemPrompt, so the OKF directory contract advertises the right directories per mode.src/agent/okf.ts:stampPage()andrunOkfPass()now take aDocTypeTaxonomy(defaulting toCODE_DOC_TYPESto preserve existing call shapes), and infertypeviagetDocTypeForDirectory.src/agent/index.ts: therunOkfPasscall site passes the mode-derived taxonomy using theoutputModealready in scope.verifyOkfConformance(--okf-check) was intentionally left unchanged: it never callsstampPageor reads the taxonomy (it only checks thattypeis present and non-empty), and the proposal's own non-goals keep--okf-checkbehavior untouched, so no taxonomy parameter was added there.test/constants.test.ts,test/prompt.test.ts, andtest/okf.test.tsupdated/extended to cover the renamed constant,getDocTypeForDirectory,getTaxonomyForMode, and per-mode stamping/prompt behavior.Verified with
pnpm run typecheck(clean) andpnpm test(256/256 passing).code-mode stamped types are unchanged.Refs #22.
Generated with Claude Code