fix(cortex): align KNOWLEDGE_CATEGORIES with current schema.md#128
fix(cortex): align KNOWLEDGE_CATEGORIES with current schema.md#128TechNickAI wants to merge 1 commit into
Conversation
The hardcoded category list still used the old taxonomy (entities, concepts, summaries, how-to), but the live schema documented in skills/cortex/schema.md uses people/ventures/topics/synthesis/ decisions/learning/research. Result: status, rebuild-index, and setup all ignored the real store contents, reporting tiny page counts (e.g. 21) for stores with hundreds of valid pages because they only counted directories that no longer match the schema. Changes: - KNOWLEDGE_CATEGORIES now matches schema.md - MEMORY.md routing template links to people/ instead of entities/ - EXTRA_DIRECTORIES drops duplicate 'learning' (now in main list) Verified against a live store: 366 pages now counted correctly across all 7 schema categories. Co-Authored-By: Bosun <bosun@carmenta.ai>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5887505. Configure here.
| KNOWLEDGE_CATEGORIES = [ | ||
| "entities", "concepts", "summaries", "synthesis", "decisions", "how-to", | ||
| "people", "ventures", "topics", "synthesis", "decisions", | ||
| "learning", "research", |
There was a problem hiding this comment.
Setup dirs vs deployed schema
Medium Severity
Fresh cortex setup now creates people/, ventures/, and related directories from KNOWLEDGE_CATEGORIES, but _deploy_schema still copies schema-template.md, which instructs agents to use entities/, concepts/, summaries/, and how-to/. New stores get mismatched folders and operating rules.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5887505. Configure here.
| "## Quick Links\n" | ||
| "- [Knowledge Base Index](Knowledge Base/index.md)\n" | ||
| "- [All Entities](Knowledge Base/entities/index.md)\n" | ||
| "- [All People](Knowledge Base/people/index.md)\n" |
There was a problem hiding this comment.
Learning ops files counted
Low Severity
Adding learning to KNOWLEDGE_CATEGORIES makes cortex status count every .md in learning/ except index.md. Setup always creates learning/corrections.md and learning/patterns.md, so those operational logs inflate “Knowledge Pages” and the reported total even though they are not compiled knowledge pages.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5887505. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5887505428
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| KNOWLEDGE_CATEGORIES = [ | ||
| "entities", "concepts", "summaries", "synthesis", "decisions", "how-to", | ||
| "people", "ventures", "topics", "synthesis", "decisions", | ||
| "learning", "research", | ||
| ] |
There was a problem hiding this comment.
Synchronize category list with deployed schema template
Updating KNOWLEDGE_CATEGORIES to people/ventures/topics/... without updating the schema that cortex setup deploys introduces a behavioral mismatch: _deploy_schema() still copies skills/cortex/schema-template.md, which instructs agents to use entities/concepts/summaries/how-to. On fresh setups this can send new pages into directories the CLI no longer scans in status/rebuild-index, causing missing counts and stale indexes again. Please update the deployed schema template (store layout + page type table) in the same change.
Useful? React with 👍 / 👎.


Problem
The cortex CLI's hardcoded category list was from the old schema and no longer matches
skills/cortex/schema.md.Old (broken):
entities, concepts, summaries, synthesis, decisions, how-toSchema says:
people, ventures, topics, synthesis, decisions, learning, researchResult:
cortex status,cortex rebuild-index, and freshcortex setupall referenced directories that don't exist in stores built against the current schema. A store with 366 valid pages reported only 21 because the CLI only counted the obsolete category names.Fix
KNOWLEDGE_CATEGORIESnow matchesschema.mdexactlyMEMORY.mdrouting template links topeople/instead ofentities/EXTRA_DIRECTORIESdrops the duplicatelearningentry (now in main list)Verification
Ran
cortex statusagainst my live store after the patch:Pre-patch: 21 pages. Post-patch: 366 pages — matches actual filesystem contents.
Risk
Low. The change is data-only (a list literal + two string templates). No behavior change for stores already on the new schema — they were just invisible to the CLI before this.