Skip to content

fix(cortex): align KNOWLEDGE_CATEGORIES with current schema.md#128

Open
TechNickAI wants to merge 1 commit into
mainfrom
fix/cortex-schema-categories
Open

fix(cortex): align KNOWLEDGE_CATEGORIES with current schema.md#128
TechNickAI wants to merge 1 commit into
mainfrom
fix/cortex-schema-categories

Conversation

@TechNickAI

Copy link
Copy Markdown
Owner

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-to
Schema says: people, ventures, topics, synthesis, decisions, learning, research

Result: cortex status, cortex rebuild-index, and fresh cortex setup all 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_CATEGORIES now matches schema.md exactly
  • MEMORY.md routing template links to people/ instead of entities/
  • EXTRA_DIRECTORIES drops the duplicate learning entry (now in main list)

Verification

Ran cortex status against my live store after the patch:

Category     Pages
------------ -----
people         228
ventures        47
topics          60
synthesis        5
decisions       16
learning         3
research         7
------------ -----
Total          366

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.

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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread skills/cortex/cortex
KNOWLEDGE_CATEGORIES = [
"entities", "concepts", "summaries", "synthesis", "decisions", "how-to",
"people", "ventures", "topics", "synthesis", "decisions",
"learning", "research",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5887505. Configure here.

Comment thread skills/cortex/cortex
"## 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5887505. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread skills/cortex/cortex
Comment on lines 57 to 60
KNOWLEDGE_CATEGORIES = [
"entities", "concepts", "summaries", "synthesis", "decisions", "how-to",
"people", "ventures", "topics", "synthesis", "decisions",
"learning", "research",
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant