feat: knowledge page seed taxonomy + capability degrade - #565
Conversation
Idempotently seed the five-page coding knowledge taxonomy on coding project template apply and via hindsight_knowledge seed_taxonomy. Degrade cleanly when knowledge-base APIs are unavailable instead of failing setup. Closes #559
There was a problem hiding this comment.
🟡 Not ready to approve
It introduces a mutating helper that currently defaults to dryRun: false and documentation that doesn’t match the actual degradation reason returned when the client lacks the create-page wrapper.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds an idempotent “knowledge page taxonomy seeding” path so coding banks can be initialized with a fixed five-page knowledge-page structure, while degrading cleanly when the Hindsight server/client lacks knowledge-page support.
Changes:
- Introduces
seedKnowledgePageshelper + tests to seed the fixed five-page taxonomy and gracefully handle missing capabilities. - Adds
hindsight_knowledgeactionseed_taxonomyand wires seeding intopi-coding-projecttemplate apply. - Updates surface-reference docs (both repo docs and docs-site) and memory-behavior docs to describe the new action and behavior.
File summaries
| File | Description |
|---|---|
| tests/knowledge-page-seed.test.ts | Adds unit tests covering seeding, dry-run behavior, idempotency (skip existing), and capability degradation. |
| extensions/operations/operation-catalog.ts | Exposes seed_taxonomy under hindsight_knowledge and treats it as mutating (dryRun defaults to true). |
| extensions/operations/memory-control-operations.ts | Implements the new seed_taxonomy action via seedKnowledgePages with project/user base tag defaults. |
| extensions/operations/memory-bank-template-operations.ts | Seeds taxonomy when applying pi-coding-project bank template (best-effort, respects dryRun). |
| extensions/banks/knowledge-page-seed.ts | New idempotent seeding helper with capability detection and best-effort creation loop. |
| docs/surface-reference.md | Documents seed_taxonomy in the CLI/tool surface reference. |
| docs/memory-behavior.md | Documents taxonomy seeding behavior and degradation. |
| docs-site/src/content/docs/reference/surface-reference.md | Mirrors seed_taxonomy docs for the published docs site. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| export async function seedKnowledgePages( | ||
| args: SeedKnowledgePagesArgs, | ||
| ): Promise<SeedKnowledgePagesResult> { | ||
| const dryRun = args.dryRun ?? false; |
|
|
||
| Live session retains set the named bank strategy `conversation` (coding project templates define multi-strategy maps: `git`, `gitlog`, `conversation`, `document`, `survey`, plus knowledge `entity_labels` for page routing). Default bank mission text prefers final-state-wins extraction when a conversation amends itself. | ||
|
|
||
| Applying the `pi-coding-project` bank template (or `hindsight_knowledge` action `seed_taxonomy`) idempotently seeds a fixed five-page knowledge taxonomy tagged `knowledge:component|concept|convention|decision|feature-work`. When the client/server lacks knowledge-base APIs, seeding returns `knowledge_pages_unavailable` and does not fail template apply. |
Summary
Idempotent five-page knowledge taxonomy seed on coding project template apply and via
hindsight_knowledgeactionseed_taxonomy. Degrades cleanly when knowledge-base APIs are unavailable.Linked issue
Scope
seedKnowledgePageswith capability probe /knowledge_pages_unavailablepi-coding-projectseed_taxonomy(dryRun default true)Verification
npm run checknpm run check:coverage(source, tests, critical paths, orci:coverage)npm run typecheck:tsc(source/critical paths or full CI)ci:full)ci:package)npm run pack:verify(release/package changes)npm run smoke:hindsightor configuredHindsight Integrationpass (memory-path behavior changes orci:live-smoke; document unavailable live proof)Unit tests cover seed, skip-existing, and unavailable paths. Live seed requires server knowledge-base routes.
Release impact
Template apply may create knowledge pages; new
seed_taxonomyaction.Risk and rollback
Follow-ups
Memory invariants
Guidance sync
AGENTS.mdandCONTRIBUTING.mdwere updated together.Agent checklist
AGENTS.mdandCONTRIBUTING.md.Notes
Pages remain tool-driven; not auto-injected into context.