cortex-tms 3.1.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +248 -442
  2. package/dist/cli.js +26 -6
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/archive.d.ts +5 -0
  5. package/dist/commands/archive.d.ts.map +1 -0
  6. package/dist/commands/archive.js +83 -0
  7. package/dist/commands/archive.js.map +1 -0
  8. package/dist/commands/auto-tier.d.ts.map +1 -1
  9. package/dist/commands/auto-tier.js +132 -58
  10. package/dist/commands/auto-tier.js.map +1 -1
  11. package/dist/commands/dashboard.d.ts +3 -0
  12. package/dist/commands/dashboard.d.ts.map +1 -0
  13. package/dist/commands/dashboard.js +20 -0
  14. package/dist/commands/dashboard.js.map +1 -0
  15. package/dist/commands/init.d.ts.map +1 -1
  16. package/dist/commands/init.js +23 -27
  17. package/dist/commands/init.js.map +1 -1
  18. package/dist/commands/migrate.d.ts.map +1 -1
  19. package/dist/commands/migrate.js +26 -7
  20. package/dist/commands/migrate.js.map +1 -1
  21. package/dist/commands/prompt.d.ts.map +1 -1
  22. package/dist/commands/prompt.js +2 -0
  23. package/dist/commands/prompt.js.map +1 -1
  24. package/dist/commands/review.d.ts.map +1 -1
  25. package/dist/commands/review.js +44 -26
  26. package/dist/commands/review.js.map +1 -1
  27. package/dist/commands/status.d.ts +1 -0
  28. package/dist/commands/status.d.ts.map +1 -1
  29. package/dist/commands/status.js +4 -98
  30. package/dist/commands/status.js.map +1 -1
  31. package/dist/commands/tutorial.js +54 -3
  32. package/dist/commands/tutorial.js.map +1 -1
  33. package/dist/commands/validate.d.ts.map +1 -1
  34. package/dist/commands/validate.js +10 -3
  35. package/dist/commands/validate.js.map +1 -1
  36. package/dist/types/cli.d.ts +8 -0
  37. package/dist/types/cli.d.ts.map +1 -1
  38. package/dist/ui/components/Dashboard.d.ts +11 -0
  39. package/dist/ui/components/Dashboard.d.ts.map +1 -0
  40. package/dist/ui/components/Dashboard.js +63 -0
  41. package/dist/ui/components/Dashboard.js.map +1 -0
  42. package/dist/ui/components/dashboard/ContextReductionCard.d.ts +9 -0
  43. package/dist/ui/components/dashboard/ContextReductionCard.d.ts.map +1 -0
  44. package/dist/ui/components/dashboard/ContextReductionCard.js +38 -0
  45. package/dist/ui/components/dashboard/ContextReductionCard.js.map +1 -0
  46. package/dist/ui/components/dashboard/CostSavingsCard.d.ts +10 -0
  47. package/dist/ui/components/dashboard/CostSavingsCard.d.ts.map +1 -0
  48. package/dist/ui/components/dashboard/CostSavingsCard.js +45 -0
  49. package/dist/ui/components/dashboard/CostSavingsCard.js.map +1 -0
  50. package/dist/ui/components/dashboard/FileDistributionCard.d.ts +10 -0
  51. package/dist/ui/components/dashboard/FileDistributionCard.d.ts.map +1 -0
  52. package/dist/ui/components/dashboard/FileDistributionCard.js +51 -0
  53. package/dist/ui/components/dashboard/FileDistributionCard.js.map +1 -0
  54. package/dist/ui/components/dashboard/FileSizeHealthCard.d.ts +15 -0
  55. package/dist/ui/components/dashboard/FileSizeHealthCard.d.ts.map +1 -0
  56. package/dist/ui/components/dashboard/FileSizeHealthCard.js +48 -0
  57. package/dist/ui/components/dashboard/FileSizeHealthCard.js.map +1 -0
  58. package/dist/ui/components/dashboard/Footer.d.ts +3 -0
  59. package/dist/ui/components/dashboard/Footer.d.ts.map +1 -0
  60. package/dist/ui/components/dashboard/Footer.js +13 -0
  61. package/dist/ui/components/dashboard/Footer.js.map +1 -0
  62. package/dist/ui/components/dashboard/GovernanceHealthCard.d.ts +10 -0
  63. package/dist/ui/components/dashboard/GovernanceHealthCard.d.ts.map +1 -0
  64. package/dist/ui/components/dashboard/GovernanceHealthCard.js +43 -0
  65. package/dist/ui/components/dashboard/GovernanceHealthCard.js.map +1 -0
  66. package/dist/ui/components/dashboard/GuardianStatusCard.d.ts +10 -0
  67. package/dist/ui/components/dashboard/GuardianStatusCard.d.ts.map +1 -0
  68. package/dist/ui/components/dashboard/GuardianStatusCard.js +58 -0
  69. package/dist/ui/components/dashboard/GuardianStatusCard.js.map +1 -0
  70. package/dist/ui/components/dashboard/Header.d.ts +7 -0
  71. package/dist/ui/components/dashboard/Header.d.ts.map +1 -0
  72. package/dist/ui/components/dashboard/Header.js +21 -0
  73. package/dist/ui/components/dashboard/Header.js.map +1 -0
  74. package/dist/ui/components/dashboard/HotFilesCard.d.ts +8 -0
  75. package/dist/ui/components/dashboard/HotFilesCard.d.ts.map +1 -0
  76. package/dist/ui/components/dashboard/HotFilesCard.js +28 -0
  77. package/dist/ui/components/dashboard/HotFilesCard.js.map +1 -0
  78. package/dist/ui/components/dashboard/NotConfiguredCard.d.ts +10 -0
  79. package/dist/ui/components/dashboard/NotConfiguredCard.d.ts.map +1 -0
  80. package/dist/ui/components/dashboard/NotConfiguredCard.js +13 -0
  81. package/dist/ui/components/dashboard/NotConfiguredCard.js.map +1 -0
  82. package/dist/ui/components/dashboard/SprintProgressCard.d.ts +11 -0
  83. package/dist/ui/components/dashboard/SprintProgressCard.d.ts.map +1 -0
  84. package/dist/ui/components/dashboard/SprintProgressCard.js +33 -0
  85. package/dist/ui/components/dashboard/SprintProgressCard.js.map +1 -0
  86. package/dist/ui/components/dashboard/StalenessCard.d.ts +10 -0
  87. package/dist/ui/components/dashboard/StalenessCard.d.ts.map +1 -0
  88. package/dist/ui/components/dashboard/StalenessCard.js +43 -0
  89. package/dist/ui/components/dashboard/StalenessCard.js.map +1 -0
  90. package/dist/ui/components/dashboard/TabBar.d.ts +8 -0
  91. package/dist/ui/components/dashboard/TabBar.d.ts.map +1 -0
  92. package/dist/ui/components/dashboard/TabBar.js +16 -0
  93. package/dist/ui/components/dashboard/TabBar.js.map +1 -0
  94. package/dist/ui/components/dashboard/ValidationCard.d.ts +10 -0
  95. package/dist/ui/components/dashboard/ValidationCard.d.ts.map +1 -0
  96. package/dist/ui/components/dashboard/ValidationCard.js +62 -0
  97. package/dist/ui/components/dashboard/ValidationCard.js.map +1 -0
  98. package/dist/ui/components/dashboard/ViewContainer.d.ts +14 -0
  99. package/dist/ui/components/dashboard/ViewContainer.d.ts.map +1 -0
  100. package/dist/ui/components/dashboard/ViewContainer.js +53 -0
  101. package/dist/ui/components/dashboard/ViewContainer.js.map +1 -0
  102. package/dist/ui/components/dashboard/index.d.ts +14 -0
  103. package/dist/ui/components/dashboard/index.d.ts.map +1 -0
  104. package/dist/ui/components/dashboard/index.js +14 -0
  105. package/dist/ui/components/dashboard/index.js.map +1 -0
  106. package/dist/ui/index.d.ts +5 -0
  107. package/dist/ui/index.d.ts.map +1 -0
  108. package/dist/ui/index.js +46 -0
  109. package/dist/ui/index.js.map +1 -0
  110. package/dist/utils/errors.d.ts +20 -0
  111. package/dist/utils/errors.d.ts.map +1 -0
  112. package/dist/utils/errors.js +54 -0
  113. package/dist/utils/errors.js.map +1 -0
  114. package/dist/utils/git-history.d.ts.map +1 -1
  115. package/dist/utils/git-history.js +7 -3
  116. package/dist/utils/git-history.js.map +1 -1
  117. package/dist/utils/git-staleness.d.ts +13 -0
  118. package/dist/utils/git-staleness.d.ts.map +1 -0
  119. package/dist/utils/git-staleness.js +129 -0
  120. package/dist/utils/git-staleness.js.map +1 -0
  121. package/dist/utils/llm-client.d.ts.map +1 -1
  122. package/dist/utils/llm-client.js +5 -2
  123. package/dist/utils/llm-client.js.map +1 -1
  124. package/dist/utils/sanitize.d.ts +4 -0
  125. package/dist/utils/sanitize.d.ts.map +1 -0
  126. package/dist/utils/sanitize.js +44 -0
  127. package/dist/utils/sanitize.js.map +1 -0
  128. package/dist/utils/stats-collector.d.ts +62 -0
  129. package/dist/utils/stats-collector.d.ts.map +1 -0
  130. package/dist/utils/stats-collector.js +253 -0
  131. package/dist/utils/stats-collector.js.map +1 -0
  132. package/dist/utils/templates.d.ts.map +1 -1
  133. package/dist/utils/templates.js +11 -1
  134. package/dist/utils/templates.js.map +1 -1
  135. package/dist/utils/validation.d.ts +159 -0
  136. package/dist/utils/validation.d.ts.map +1 -0
  137. package/dist/utils/validation.js +172 -0
  138. package/dist/utils/validation.js.map +1 -0
  139. package/dist/utils/validator.d.ts.map +1 -1
  140. package/dist/utils/validator.js +66 -1
  141. package/dist/utils/validator.js.map +1 -1
  142. package/package.json +10 -3
  143. package/templates/CLAUDE.md +1 -1
  144. package/templates/FUTURE-ENHANCEMENTS.md +1 -1
  145. package/templates/NEXT-TASKS.md +1 -1
  146. package/templates/PROMPTS.md +1 -1
  147. package/templates/README.md +1 -1
  148. package/templates/docs/archive/v1.0-CHANGELOG.md +1 -1
  149. package/templates/docs/core/ARCHITECTURE.md +1 -1
  150. package/templates/docs/core/DECISIONS.md +1 -1
  151. package/templates/docs/core/DOMAIN-LOGIC.md +1 -1
  152. package/templates/docs/core/GLOSSARY.md +1 -1
  153. package/templates/docs/core/PATTERNS.md +1 -1
  154. package/templates/docs/core/SCHEMA.md +1 -1
  155. package/templates/docs/core/TROUBLESHOOTING.md +1 -1
  156. package/dist/__tests__/init.test.d.ts +0 -2
  157. package/dist/__tests__/init.test.d.ts.map +0 -1
  158. package/dist/__tests__/init.test.js +0 -173
  159. package/dist/__tests__/init.test.js.map +0 -1
  160. package/dist/__tests__/release.test.d.ts +0 -2
  161. package/dist/__tests__/release.test.d.ts.map +0 -1
  162. package/dist/__tests__/release.test.js +0 -484
  163. package/dist/__tests__/release.test.js.map +0 -1
  164. package/dist/__tests__/utils/temp-dir.d.ts +0 -6
  165. package/dist/__tests__/utils/temp-dir.d.ts.map +0 -1
  166. package/dist/__tests__/utils/temp-dir.js +0 -34
  167. package/dist/__tests__/utils/temp-dir.js.map +0 -1
  168. package/dist/__tests__/validate.test.d.ts +0 -2
  169. package/dist/__tests__/validate.test.d.ts.map +0 -1
  170. package/dist/__tests__/validate.test.js +0 -209
  171. package/dist/__tests__/validate.test.js.map +0 -1
package/README.md CHANGED
@@ -1,14 +1,16 @@
1
- # Cortex TMS 🧠
1
+ <p align="center">
2
+ <img src="website/public/logo.svg" alt="Cortex TMS Logo" width="200"/>
3
+ </p>
2
4
 
3
- **AI Governance Platform - Stop Wasting Tokens. Stop Burning GPU Cycles on Old Docs.**
5
+ <h1 align="center">Cortex TMS</h1>
4
6
 
5
- Cortex TMS is an **AI Governance Platform** built on three pillars:
7
+ <p align="center">
8
+ <strong>Documentation Governance for AI Coding Agents</strong>
9
+ </p>
6
10
 
7
- 1. **💰 Cost Efficiency** - Reduce AI API costs by **40-60%** through intelligent context management
8
- 2. **✅ Quality** - Prevent hallucinations from outdated docs with semantic validation
9
- 3. **🌱 Sustainability** - Cut compute requirements by **60-70%** with Green Governance (up to 94% with archives)
10
-
11
- Stop feeding Claude/Copilot/Cursor thousands of outdated lines. **60-70% typical context reduction** (up to 94% with archives) means **10x lower costs**, **zero hallucinations**, and **less compute waste** from reading archived docs.
11
+ <p align="center">
12
+ 166+ GitHub Stars | Open source, community-driven
13
+ </p>
12
14
 
13
15
  [![npm version](https://img.shields.io/npm/v/cortex-tms.svg?style=flat-square)](https://www.npmjs.com/package/cortex-tms)
14
16
  [![npm downloads](https://img.shields.io/npm/dm/cortex-tms.svg?style=flat-square)](https://www.npmjs.com/package/cortex-tms)
@@ -16,106 +18,113 @@ Stop feeding Claude/Copilot/Cursor thousands of outdated lines. **60-70% typical
16
18
  [![node version](https://img.shields.io/node/v/cortex-tms.svg?style=flat-square)](https://nodejs.org)
17
19
  [![GitHub stars](https://img.shields.io/github/stars/cortex-tms/cortex-tms.svg?style=flat-square)](https://github.com/cortex-tms/cortex-tms/stargazers)
18
20
 
19
- **Current Status**: ✅ **Stable / Production Ready** | [NPM Package](https://www.npmjs.com/package/cortex-tms) | [GitHub Repository](https://github.com/cortex-tms/cortex-tms) | [Documentation](https://cortex-tms.org)
20
-
21
21
  ---
22
22
 
23
- ## 🚀 Instant Activation
23
+ ## What is Cortex TMS?
24
24
 
25
- Get started in under 60 seconds:
26
-
27
- ```bash
28
- # 1. Initialize your project
29
- npx cortex-tms init
25
+ Cortex TMS scaffolds and validates governance documentation for AI coding agents. As AI models get more powerful and autonomous, they need clear, current governance docs to stay aligned with your project standards.
30
26
 
31
- # 2. Open the Project Cockpit
32
- npx cortex-tms status
27
+ **The Challenge**: Modern AI agents (Claude Opus 4.6, GPT-4, etc.) handle large context windows and can work autonomously—but without governance, they drift from your standards, overengineer solutions, and write inconsistent code.
33
28
 
34
- # 3. Activate your AI Agent
35
- npx cortex-tms prompt init-session
36
- # (Copies project-aware prompt to clipboard!)
29
+ **The Solution**: Cortex TMS provides:
30
+ - 📋 **Documentation scaffolding** - Templates for PATTERNS.md, ARCHITECTURE.md, CLAUDE.md
31
+ - **Staleness detection** - Detects when governance docs go stale relative to code changes (v4.0)
32
+ - 🔍 **Structure validation** - Automated health checks in CI or locally
33
+ - 📦 **Archive management** - Keep task lists focused and maintainable
37
34
 
38
- # 4. Check version health
39
- npx cortex-tms migrate
40
- ```
35
+ ---
41
36
 
42
- Choose your scope (Nano/Standard/Enterprise) and start building with AI-optimized documentation and intelligent CLI tooling.
37
+ ## Three Pillars
43
38
 
44
- 📖 **New here?** The Essential 7 prompts in `PROMPTS.md` will guide you through the entire development lifecycle.
39
+ ### 1. 📋 Consistency - Document Your Standards
45
40
 
46
- ## 🎬 See It In Action
41
+ Scaffold governance docs that AI agents actually read:
42
+ - `PATTERNS.md` - Code patterns and conventions
43
+ - `CLAUDE.md` - Agent workflow rules (git protocol, scope discipline, human approval gates)
44
+ - `ARCHITECTURE.md` - System design and tech stack
45
+ - `DOMAIN-LOGIC.md` - Business rules and constraints
47
46
 
48
- ![Cortex TMS Demo](assets/demo.gif)
47
+ **Result**: AI writes code that follows YOUR patterns, not random conventions from its training data.
49
48
 
50
- **Watch** the `cortex status` dashboard and `cortex migrate` workflow in action. See how Cortex TMS provides real-time project health metrics and intelligent version management.
49
+ ### 2. 🔍 Freshness - Detect Staleness
51
50
 
52
- ---
51
+ New in v4.0: Git-based staleness detection catches when docs go stale:
53
52
 
54
- ## 💰 The Value: Measurable Cost Savings
53
+ ```bash
54
+ cortex-tms validate
55
55
 
56
- **Real Numbers from Cortex TMS itself**:
56
+ ⚠️ Doc Staleness
57
+ PATTERNS.md may be outdated
58
+ Doc is 45 days older than code with 12 meaningful commits
59
+ Code: 2026-02-20
60
+ Doc: 2026-01-06
57
61
 
58
- ```bash
59
- cortex status --tokens -m claude-sonnet-4-5
62
+ Review docs/core/PATTERNS.md to ensure it reflects current codebase
60
63
  ```
61
64
 
62
- | Metric | Value | Impact |
63
- | :---------------------- | :------------------- | :---------------------------------------------- |
64
- | **Context Reduction** | 60-70% typical (94% max) | Read 3,647 tokens instead of 66,834 (with archives) |
65
- | **Cost per Session** | $0.01 | vs $0.20 without tiering (Claude Sonnet 4.5) |
66
- | **Cost Comparison** | 10x cheaper | Claude Sonnet vs GPT-4 ($0.01 vs $0.11/session) |
67
- | **Carbon Footprint** | 60-70% lower | Less compute = greener development |
68
- | **Quality Improvement** | 80% fewer violations | Guardian catches pattern drift |
65
+ **How it works**: Compares doc modification dates vs code commit activity. Flags stale docs before they mislead AI agents.
69
66
 
70
- **How?** The HOT/WARM/COLD tier system ensures AI agents only read what matters:
67
+ **Note**: Staleness v1 uses git timestamps (temporal comparison only). Cannot detect semantic misalignment. Future versions will add semantic analysis.
71
68
 
72
- - **HOT**: Current sprint (always read) - 3,647 tokens
73
- - **WARM**: Architectural truth (on-demand) - 20,109 tokens
74
- - **COLD**: Historical archive (ignored) - 43,078 tokens
69
+ ### 3. 🛡️ Safety - Human Oversight
75
70
 
76
- **Result**: Your AI assistant stays focused, costs less, and makes fewer mistakes.
71
+ `CLAUDE.md` governance rules require human approval for critical operations:
72
+ - Git commits/pushes require approval
73
+ - Scope discipline prevents overengineering
74
+ - Pattern adherence enforced through validation
75
+
76
+ **Result**: AI agents stay powerful but don't run wild.
77
77
 
78
78
  ---
79
79
 
80
- ## 🎯 The Philosophy: Signal over Noise
80
+ ## What Cortex Does (and Doesn't Do)
81
+
82
+ ### ✅ What Cortex Does
81
83
 
82
- Traditional repos drown AI agents in thousands of lines of historical tasks and stale documentation. **Cortex TMS** forces agents into a "Tiered" approach:
84
+ - **Scaffolds governance docs** - Templates for common project documentation
85
+ - **Validates doc health** - Checks structure, freshness, completeness
86
+ - **Detects staleness** - Flags when docs are outdated relative to code (v4.0)
87
+ - **Enforces size limits** - Keeps docs focused and scannable
88
+ - **Archives completed tasks** - Maintains clean NEXT-TASKS.md
89
+ - **Works in CI/CD** - GitHub Actions validation templates included
83
90
 
84
- 1. **HOT (Active)**: `NEXT-TASKS.md`, `PROMPTS.md` — What we are doing _now_ and how to ask the AI for help.
85
- 2. **WARM (Truth)**: `docs/core/` — The project's "Laws" (Architecture, Patterns, Domain Logic).
86
- 3. **COLD (History)**: `docs/archive/` — Historical changelogs (Ignore unless asked).
91
+ ### What Cortex Does NOT Do
87
92
 
88
- **Why this works**: AI agents have limited context windows. Reading everything is wasteful. The tier system maximizes signal, minimizes noise.
93
+ - **Not a token optimizer** - Modern models (200K+ contexts) make this less relevant
94
+ - **Not code enforcement** - Validates DOCUMENTATION health, not code directly
95
+ - **Not a replacement for code review** - Complements human review, doesn't replace it
96
+ - **Not semantic analysis (yet)** - Staleness v1 uses timestamps, not AI-powered diff analysis
89
97
 
90
98
  ---
91
99
 
92
- ## 🛠️ CLI Commands
100
+ ## Quick Start
93
101
 
94
- Cortex TMS provides 8 production-ready commands:
102
+ ```bash
103
+ # Initialize governance docs in your project
104
+ npx cortex-tms@latest init
95
105
 
96
- ### `cortex-tms tutorial`
106
+ # Validate doc health (including staleness detection)
107
+ npx cortex-tms@latest validate
97
108
 
98
- Interactive walkthrough teaching the "Cortex Way" - perfect for first-time users.
109
+ # Strict mode (warnings = errors, for CI)
110
+ npx cortex-tms@latest validate --strict
99
111
 
100
- ```bash
101
- cortex-tms tutorial # Start the guided tour
102
- ```
103
-
104
- **What You'll Learn**:
112
+ # Check project status
113
+ npx cortex-tms@latest status
105
114
 
106
- - Project Dashboard: Using `status` to see your cockpit
107
- - AI Activation: Using `prompt` to activate project-aware AI agents
108
- - Zero-Drift Governance: Automated version sync with `docs:sync`
109
- - Health Checks: Understanding `validate` and the Archive Protocol
110
- - Safe Migration: Fearless template upgrades with backup/rollback
115
+ # Archive completed tasks
116
+ npx cortex-tms@latest archive --dry-run
117
+ ```
111
118
 
112
- **Navigation**: Use arrow keys and Enter to progress, select Exit to quit anytime
119
+ **Installation**: No installation required with `npx`. For frequent use: `npm install -g cortex-tms@latest`
113
120
 
114
121
  ---
115
122
 
123
+ ## CLI Commands
124
+
116
125
  ### `cortex-tms init`
117
126
 
118
- Initialize TMS structure in your project with interactive scope selection.
127
+ Scaffold TMS documentation structure with interactive scope selection.
119
128
 
120
129
  ```bash
121
130
  cortex-tms init # Interactive mode
@@ -125,228 +134,89 @@ cortex-tms init --dry-run # Preview changes
125
134
 
126
135
  ### `cortex-tms validate`
127
136
 
128
- Verify your project's TMS health and auto-fix common issues.
137
+ Verify project TMS health with automated checks.
129
138
 
130
139
  ```bash
131
140
  cortex-tms validate # Check project health
132
141
  cortex-tms validate --fix # Auto-repair missing files
133
- cortex-tms validate --strict # Strict mode with no warnings
142
+ cortex-tms validate --strict # Strict mode (warnings = errors)
134
143
  ```
135
144
 
145
+ **What it checks:**
146
+ - ✅ Mandatory files exist (NEXT-TASKS.md, CLAUDE.md, copilot-instructions.md)
147
+ - ✅ File size limits (Rule 4: HOT files < 200 lines)
148
+ - ✅ Placeholder completion (no `[Project Name]` markers left)
149
+ - ✅ Archive status (completed tasks should be archived)
150
+ - ✅ **Doc staleness** (NEW in v4.0) - governance docs current with code
151
+
136
152
  ### `cortex-tms status`
137
153
 
138
- Project cockpit with health dashboard, sprint progress, and token analysis.
154
+ Project cockpit with health dashboard and sprint progress.
139
155
 
140
156
  ```bash
141
- cortex-tms status # Visual dashboard with progress bars
142
- cortex-tms status --tokens # Token usage analysis (HOT/WARM/COLD)
143
- cortex-tms status --tokens -m gpt-4 # Cost comparison across models
157
+ cortex-tms status # Visual dashboard with progress bars
144
158
  ```
145
159
 
146
- **Token Analysis Features**:
147
-
148
- - HOT/WARM/COLD tier breakdown with token counts
149
- - Context reduction percentage (e.g., 94.5% reduction)
150
- - Cost estimates per session/day/month
151
- - Model comparison (Claude Sonnet 4.5, Opus 4.5, GPT-4, etc.)
152
- - Sustainability impact tracking
160
+ Shows:
161
+ - Project identity (name, scope, TMS version)
162
+ - Health status (validation checks passed/failed)
163
+ - Sprint progress (current tasks, completion %)
164
+ - Backlog size (future enhancements)
153
165
 
154
- ### `cortex-tms auto-tier`
166
+ ### `cortex-tms archive`
155
167
 
156
- Git-based automatic tier assignment - reduce manual tier management using file recency as a relevance signal.
168
+ Archive completed tasks and old content.
157
169
 
158
170
  ```bash
159
- cortex-tms auto-tier # Apply tier tags based on git history
160
- cortex-tms auto-tier --dry-run # Preview tier suggestions
161
- cortex-tms auto-tier --hot 14 --warm 60 # Custom thresholds
162
- cortex-tms auto-tier --force # Overwrite existing tags
171
+ cortex-tms archive # Archive completed tasks
172
+ cortex-tms archive --dry-run # Preview what would be archived
163
173
  ```
164
174
 
165
- **Community-requested feature**: Built in response to feedback from Reddit users [Illustrious-Report96](https://www.reddit.com/user/Illustrious-Report96/), [pbalIII](https://www.reddit.com/user/pbalIII/), and [durable-racoon](https://www.reddit.com/user/durable-racoon/) who identified manual tier management as a scalability bottleneck and suggested using git history to determine file "heat".
166
-
167
- **How It Works**:
175
+ Archives completed tasks from NEXT-TASKS.md to `docs/archive/` with timestamp.
168
176
 
169
- - Analyzes git commit history to determine file modification recency
170
- - Assigns HOT/WARM/COLD tiers based on days since last change
171
- - Adds `<!-- @cortex-tms-tier HOT -->` tags to markdown files
172
- - Default thresholds: HOT ≤ 7 days, WARM ≤ 30 days, COLD > 30 days
173
-
174
- **Why Auto-Tier?**
175
-
176
- - **Automates tier management**: No more manual tier decisions
177
- - **Objective signal**: Git history provides measurable recency data
178
- - **Aligns with "Lost in the Middle" research**: Recent files (likely relevant) placed at context beginning
179
- - **Adapts to workflow**: Tiers stay current as project evolves
177
+ **Note**: `cortex-tms auto-tier` is deprecated—use `archive` instead.
180
178
 
181
179
  ### `cortex-tms migrate`
182
180
 
183
- Intelligent version management—detect outdated templates and automatically upgrade with safety backups.
181
+ Intelligent version management—detect outdated templates and upgrade safely.
184
182
 
185
183
  ```bash
186
184
  cortex-tms migrate # Analyze version status
187
- cortex-tms migrate --apply # Auto-upgrade OUTDATED files (creates backup)
188
- cortex-tms migrate --apply --force # Upgrade ALL files including customized
189
- cortex-tms migrate --rollback # Restore from backup (interactive selection)
190
- cortex-tms migrate --dry-run # Preview migration plan
185
+ cortex-tms migrate --apply # Auto-upgrade OUTDATED files
186
+ cortex-tms migrate --rollback # Restore from backup
191
187
  ```
192
188
 
193
- **Status Categories**:
194
-
195
- - `LATEST`: Already on current version
196
- - `OUTDATED`: Safe to auto-upgrade (matches old template)
197
- - `CUSTOMIZED`: Manual review needed (has user changes)
198
- - `MISSING`: Optional file not installed
199
-
200
- **Safety Features**:
201
-
202
- - Automatic backups in `.cortex/backups/` before any changes
203
- - Timestamped snapshots with manifest files
204
- - One-click rollback with interactive backup selection
205
- - Confirmation prompts prevent accidental overwrites
206
-
207
189
  ### `cortex-tms prompt`
208
190
 
209
191
  Access project-aware AI prompts from the Essential 7 library.
210
192
 
211
193
  ```bash
212
194
  cortex-tms prompt # Interactive selection
213
- cortex-tms prompt init-session # Direct access (auto-copies to clipboard!)
214
- cortex-tms prompt --list # Browse all prompts
195
+ cortex-tms prompt init-session # Auto-copies to clipboard
215
196
  ```
216
197
 
217
- **The Essential 7**:
218
-
219
- - `init-session` - Start your AI session with context
220
- - `feature` - Implement new features with architectural anchors
221
- - `debug` - Troubleshoot with known issues lookup
222
- - `review` - Code review against project patterns
223
- - `refactor` - Structural improvements
224
- - `decision` - Create Architecture Decision Records
225
- - `finish` - Execute maintenance protocol
226
-
227
198
  ### `cortex-tms review` 🛡️
228
199
 
229
- **Guardian**: AI-powered semantic validation against project patterns and domain logic.
200
+ Guardian: AI-powered semantic validation against project patterns.
230
201
 
231
202
  ```bash
232
- cortex-tms review src/index.ts # Validate file against PATTERNS.md
233
- cortex-tms review src/index.ts --safe # Safe Mode: only high-confidence violations (≥70%)
234
- cortex-tms review src/index.ts --output-json # Raw JSON output (for Agent Skills/CI/CD)
235
- cortex-tms review src/index.ts --provider openai # Use OpenAI instead of Anthropic
236
- cortex-tms review src/index.ts --model gpt-4 # Specify model
237
- ```
238
-
239
- **What Guardian Does**:
240
-
241
- - Analyzes code against `PATTERNS.md` (canonical examples, do/don't patterns)
242
- - Validates against `DOMAIN-LOGIC.md` (immutable project rules)
243
- - Uses LLM to catch **semantic violations**, not just syntax errors
244
- - Reports violations with specific pattern references
245
-
246
- **Why Guardian?**
247
-
248
- - **Structured Output**: JSON-based violation detection (80%+ accuracy target, from 65.5% baseline)
249
- - **Safe Mode**: `--safe` flag filters to high-confidence violations only (≥70%), reducing false positive noise
250
- - **Semantic Understanding**: Catches violations grep/regex can't find
251
- - **Pattern Enforcement**: Stops drift from architectural decisions
252
- - **BYOK (Bring Your Own Key)**: Uses your OpenAI or Anthropic API key
253
- - **Reliable Parsing**: Deterministic JSON eliminates keyword collision false positives
254
-
255
- **Example Output**:
256
-
203
+ cortex-tms review src/index.ts # Validate against PATTERNS.md
204
+ cortex-tms review src/index.ts --safe # High-confidence violations only
257
205
  ```
258
- 🛡️ Guardian Code Review
259
-
260
- ✅ Analysis Complete
261
-
262
- ❌ **Major Violations**
263
-
264
- Code violates Pattern 1: Placeholder Syntax
265
-
266
- ## Violations
267
-
268
- 1. ❌ **Pattern 1: Placeholder Syntax**
269
- 📍 Line: 45
270
- ❗ Issue: Using {braces} instead of [brackets] for placeholders
271
- 💡 Fix: Replace {project-name} with [project-name]
272
206
 
273
- ## Positive Observations
274
-
275
- ✅ Consistent indentation and formatting
276
- ✅ Good use of TypeScript strict types
277
- ```
278
-
279
- ---
280
-
281
- ## 🔄 CI/CD Integration
282
-
283
- ### Reusable GitHub Action
284
-
285
- Validate your TMS documentation in GitHub Actions workflows without installing the CLI locally.
286
-
287
- **Basic Usage** (in your `.github/workflows/tms-validate.yml`):
288
-
289
- ```yaml
290
- name: TMS Validation
291
-
292
- on:
293
- push:
294
- branches: [main]
295
- pull_request:
296
- branches: [main]
297
-
298
- jobs:
299
- validate:
300
- uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
301
- ```
302
-
303
- **With Custom Configuration**:
304
-
305
- ```yaml
306
- jobs:
307
- validate:
308
- uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
309
- with:
310
- strict: true # Enable strict mode (default: true)
311
- scope: 'standard' # Validation scope (default: auto-detect)
312
- ignore-files: 'README.md' # Comma-separated files to ignore
313
- cortex-version: 'latest' # Cortex TMS version (default: latest)
314
- node-version: '20' # Node.js version (default: 20)
315
- ```
316
-
317
- **Available Inputs**:
318
-
319
- | Input | Description | Default |
320
- |:------|:------------|:--------|
321
- | `strict` | Enable strict validation mode (fails on warnings) | `true` |
322
- | `scope` | Validation scope (nano/standard/enterprise/auto-detect) | `auto-detect` |
323
- | `ignore-files` | Comma-separated list of files to ignore | `''` |
324
- | `cortex-version` | Cortex TMS version to install (e.g., "latest", "2.7.0") | `latest` |
325
- | `node-version` | Node.js version to use | `20` |
207
+ ### `cortex-tms tutorial`
326
208
 
327
- **Example with Multiple Ignored Files**:
209
+ Interactive walkthrough teaching the Cortex Way.
328
210
 
329
- ```yaml
330
- jobs:
331
- validate:
332
- uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
333
- with:
334
- strict: false
335
- ignore-files: 'README.md,CHANGELOG.md,docs/archive/*'
211
+ ```bash
212
+ cortex-tms tutorial # 5-lesson guided tour (~15 minutes)
336
213
  ```
337
214
 
338
- **Benefits**:
339
-
340
- - ✅ Zero-friction adoption (no local installation required)
341
- - ✅ Validates PRs automatically
342
- - ✅ Consistent enforcement across team
343
- - ✅ Works with any project using Cortex TMS
344
-
345
215
  ---
346
216
 
347
- ## 📂 Documentation Structure
217
+ ## Documentation Structure
348
218
 
349
- | Folder / File | Purpose | AI Context Tier |
219
+ | Folder / File | Purpose | Tier |
350
220
  | :-------------------------------- | :------------------------------------- | :------------------------ |
351
221
  | `NEXT-TASKS.md` | Active sprint and current focus | **HOT** (Always Read) |
352
222
  | `PROMPTS.md` | AI interaction templates (Essential 7) | **HOT** (Always Read) |
@@ -359,273 +229,209 @@ jobs:
359
229
  | `docs/core/GIT-STANDARDS.md` | Git & PM conventions | **WARM** (Read on Demand) |
360
230
  | `docs/core/DECISIONS.md` | Architecture Decision Records | **WARM** (Read on Demand) |
361
231
  | `docs/core/GLOSSARY.md` | Project terminology | **WARM** (Read on Demand) |
362
- | `docs/core/SCHEMA.md` | Data models (optional) | **WARM** (Read on Demand) |
363
- | `docs/core/TROUBLESHOOTING.md` | Framework gotchas (optional) | **WARM** (Read on Demand) |
364
232
  | `docs/archive/` | Historical changelogs | **COLD** (Ignore) |
365
233
 
366
- **Context Budget Limits**: To keep HOT files efficient:
367
-
368
- - `NEXT-TASKS.md`: Stay under **200 lines** (archive completed sprints to `docs/archive/`)
369
- - `.github/copilot-instructions.md`: Stay under **100 lines** (critical rules only)
370
-
371
- **Archive Trigger**: When a sprint completes, move tasks from `NEXT-TASKS.md` to `docs/archive/sprint-vX.X-YYYY-MM.md`.
234
+ **HOT/WARM/COLD System**: Organizes docs by access frequency (not token optimization). Helps AI find what's relevant for each task.
372
235
 
373
236
  ---
374
237
 
375
- ## 🚀 What's New in v2.6.1
376
-
377
- ### Token Counter - Prove Your Savings (GREEN GOVERNANCE)
378
-
379
- - **Real-Time Token Analysis**: `cortex status --tokens` shows HOT/WARM/COLD breakdown
380
- - **Multi-Model Cost Comparison**: Claude Sonnet 4.5, Opus 4.5, GPT-4, and more
381
- - **Sustainability Metrics**: Track your sustainability impact from less compute
382
- - **94.5% Context Reduction**: Cortex TMS reads 3,647 tokens instead of 66,834
383
- - **10x Cost Savings**: $0.01/session (Claude Sonnet) vs $0.11/session (GPT-4)
384
-
385
- ### Guardian Semantic Validation (QUALITY ENFORCEMENT)
386
-
387
- - **Pattern Enforcement**: `cortex review <file>` validates against PATTERNS.md
388
- - **Domain Logic Checker**: Audits code against immutable project rules
389
- - **Zero False Negatives**: Never misses actual violations (65.5% baseline accuracy)
390
- - **LLM-Powered Detection**: Uses Claude/GPT to catch semantic violations, not just syntax
391
-
392
- ### Integration Test Suite (PRODUCTION QUALITY)
393
-
394
- - **111 Passing Tests**: 96 unit + 15 integration tests
395
- - **End-to-End Workflows**: Validates command interactions work correctly
396
- - **Error Recovery Testing**: Ensures rollback and fix workflows function
397
- - **CI/CD Ready**: ~8.5s execution time, zero flakiness
398
-
399
- ### Error Handling Refactor (DEVELOPER EXPERIENCE)
238
+ ## Staleness Detection Configuration
239
+
240
+ Configure staleness thresholds in `.cortexrc`:
241
+
242
+ ```json
243
+ {
244
+ "version": "4.0.0",
245
+ "scope": "standard",
246
+ "staleness": {
247
+ "enabled": true,
248
+ "thresholdDays": 30,
249
+ "minCommits": 3,
250
+ "docs": {
251
+ "docs/core/PATTERNS.md": ["src/"],
252
+ "docs/core/ARCHITECTURE.md": ["src/", "infrastructure/"],
253
+ "docs/core/DOMAIN-LOGIC.md": ["src/"]
254
+ }
255
+ }
256
+ }
257
+ ```
400
258
 
401
- - **Clean Exit Management**: Removed 17 `process.exit()` calls from command files
402
- - **Better Testability**: Commands throw errors instead of forcing exits
403
- - **Centralized Error Handler**: Commander.js `exitOverride()` for consistent behavior
259
+ **How it works**:
260
+ - Compares doc last modified date vs code commit activity
261
+ - Flags stale if: `daysSinceDocUpdate > thresholdDays AND meaningfulCommits >= minCommits`
262
+ - Excludes merge commits, test-only changes, lockfile-only changes
404
263
 
405
- ### What's in v2.6.1 and Earlier
264
+ **Limitations (v1)**:
265
+ - Temporal comparison only (git timestamps)
266
+ - Cannot detect semantic misalignment
267
+ - Requires full git history (not shallow clones)
406
268
 
407
- - **Interactive Tutorial**: 5-lesson guided walkthrough (<15 minutes)
408
- - **Safe-Fail Migration**: Automatic backups with one-click rollback
409
- - **Zero-Drift Governance**: Automated version sync with CI Guardian
410
- - **Self-Healing Validation**: `--fix` flag auto-repairs common issues
411
- - **Migration Auditor**: Version tracking and customization detection
412
- - **Prompt Engine**: Essential 7 library with clipboard integration
269
+ **CI Setup**: Ensure `fetch-depth: 0` in GitHub Actions to enable staleness detection.
413
270
 
414
271
  ---
415
272
 
416
- ## 🤖 How to Work with AI Agents
273
+ ## CI/CD Integration
417
274
 
418
- This repo is a **"Machine-Legible Project Constitution."** To get the best results:
275
+ Add to `.github/workflows/validate.yml`:
419
276
 
420
- ### 1. The Context Trigger
421
-
422
- ```bash
423
- cortex-tms prompt init-session
424
- # Copies: "Review NEXT-TASKS.md, docs/core/ARCHITECTURE.md, and CLAUDE.md.
425
- # Summarize current priorities and propose a step-by-step plan..."
426
- ```
277
+ ```yaml
278
+ name: Cortex TMS Validation
427
279
 
428
- ### 2. Pattern Enforcement
280
+ on: [push, pull_request]
429
281
 
430
- ```bash
431
- cortex-tms prompt review
432
- # Copies: "Review the current changes against PATTERNS.md.
433
- # Flag any violations and suggest specific fixes."
282
+ jobs:
283
+ validate:
284
+ runs-on: ubuntu-latest
285
+ steps:
286
+ - uses: actions/checkout@v4
287
+ with:
288
+ fetch-depth: 0 # Required for staleness detection
289
+
290
+ - uses: actions/setup-node@v4
291
+ with:
292
+ node-version: '20'
293
+
294
+ - name: Validate TMS Health
295
+ run: npx cortex-tms@latest validate --strict
434
296
  ```
435
297
 
436
- ### 3. Truth Anchoring
437
-
438
- If the AI hallucinates logic:
439
-
440
- > _"Your calculation is wrong. Refer to the rules in docs/core/DOMAIN-LOGIC.md."_
441
-
442
- ### 4. Check Current Sprint
443
-
444
- ```bash
445
- cortex-tms status # Visual dashboard with current tasks
446
- ```
298
+ **Strict mode**: Warnings become errors, failing the build if:
299
+ - Governance docs are stale
300
+ - File size limits exceeded
301
+ - Mandatory files missing
302
+ - Placeholders not replaced
447
303
 
448
304
  ---
449
305
 
450
- ## 📋 Development Roadmap
306
+ ## What's New in v4.0
451
307
 
452
- **Completed Phases** (All ✅):
308
+ **🎯 Strategic Repositioning**: Quality governance over token optimization
453
309
 
454
- - [x] **Phase 1**: Dogfood the System - Applied TMS to Cortex itself
455
- - [x] **Phase 2**: Complete Template Library - All templates built and validated
456
- - [x] **Phase 3**: Build Example App - Gold Standard Next.js 15 Todo App
457
- - [x] **Phase 4**: Create CLI Tool - Full-featured CLI with 6 commands
458
- - [x] **Phase 5**: Documentation & Guides - Status dashboard, snippets, validation
459
- - [x] **Phase 6**: Publish & Scale - npm package + GitHub releases
310
+ **Context**: Modern AI models (GPT-4, Claude Opus 4.6) now handle large contexts (200K+ tokens). The bottleneck shifted from "can AI see enough?" to "will AI stay aligned with project standards?"
460
311
 
461
- **Current Version**: v2.6.1 "Guardian & Green Governance" ✅
312
+ ### New Features
462
313
 
463
- - Token Counter with real-time cost analysis
464
- - ✅ Guardian semantic validation (Pattern + Domain Logic enforcement)
465
- - ✅ 111 passing tests (96 unit + 15 integration)
466
- - ✅ Error handling refactor for better testability
467
- - ✅ Multi-model cost comparison (Claude, GPT-4)
314
+ **Staleness Detection** (v4.0):
315
+ - ✅ Git-based freshness checks for governance docs
316
+ - ✅ Configurable thresholds (days + commit count)
317
+ - ✅ Per-doc watch directories
318
+ - ✅ Exclude merges, test-only, lockfile-only commits
319
+ - ✅ CI-ready (with `fetch-depth: 0`)
468
320
 
469
- **Next Phase (v3.0)**: Development & Refinement
321
+ **Archive Command**:
322
+ - ✅ `cortex-tms archive` - Archive completed tasks
323
+ - ✅ Replaces deprecated `auto-tier` command
324
+ - ✅ Dry-run mode for previewing changes
470
325
 
471
- - Website performance optimization
472
- - Guardian enhancements and reliability improvements
473
- - Migration experience improvements
474
- - Advanced token analytics
326
+ **Simplified Status**:
327
+ - Removed `--tokens` flag (streamlined to governance focus)
328
+ - Shows: project health, sprint progress, backlog
475
329
 
476
- See `NEXT-TASKS.md` for current sprint details and `CHANGELOG.md` for full version history.
330
+ ### Breaking Changes
477
331
 
478
- ---
479
-
480
- ## 🏗️ Project Structure
481
-
482
- ```
483
- cortex-tms/
484
- ├── NEXT-TASKS.md # HOT: Current sprint
485
- ├── PROMPTS.md # HOT: AI interaction templates
486
- ├── FUTURE-ENHANCEMENTS.md # PLANNING: Backlog
487
- ├── CLAUDE.md # HOT: Workflow config
488
- ├── README.md # This file
489
- ├── .github/
490
- │ └── copilot-instructions.md # HOT: AI guardrails
491
- ├── bin/ # CLI executable
492
- ├── src/ # CLI source code
493
- │ ├── commands/ # CLI commands (init, validate, status, migrate, prompt, tutorial)
494
- │ ├── utils/ # Template processing, validation, prompt parsing, backup
495
- │ └── types/ # TypeScript definitions
496
- ├── templates/ # User-facing boilerplate
497
- │ ├── NEXT-TASKS.md
498
- │ ├── PROMPTS.md # Essential 7 prompt library
499
- │ ├── CLAUDE.md
500
- │ ├── .github/
501
- │ │ └── copilot-instructions.md
502
- │ ├── vscode/
503
- │ │ └── tms.code-snippets # VS Code productivity snippets
504
- │ └── docs/
505
- │ ├── core/
506
- │ │ ├── ARCHITECTURE.md
507
- │ │ ├── PATTERNS.md
508
- │ │ ├── DOMAIN-LOGIC.md
509
- │ │ ├── GIT-STANDARDS.md
510
- │ │ ├── DECISIONS.md
511
- │ │ ├── GLOSSARY.md
512
- │ │ ├── SCHEMA.md
513
- │ │ └── TROUBLESHOOTING.md
514
- │ └── archive/
515
- │ └── v1.0-CHANGELOG.md
516
- ├── docs/ # Cortex TMS project documentation
517
- │ ├── core/
518
- │ └── archive/
519
- └── examples/ # Reference implementations
520
- └── todo-app/ # ✅ Gold Standard Next.js 15 App
521
- ```
522
-
523
- ---
332
+ **Removed**:
333
+ - ❌ `cortex-tms status --tokens` flag
334
+ - Token counting and cost analysis features
524
335
 
525
- ## 🧪 Validation: Dogfooding
336
+ **Deprecated**:
337
+ - ⚠️ `cortex-tms auto-tier` → Use `cortex-tms archive` (still works with warning)
526
338
 
527
- **This repository uses TMS to build itself.**
339
+ **Migration**:
340
+ - Status command: Use `cortex-tms status` (no flags needed)
341
+ - Archive tasks: Use `cortex-tms archive` instead of `auto-tier`
528
342
 
529
- - Cortex's own `NEXT-TASKS.md` tracks Cortex development
530
- - Cortex's own `docs/core/PATTERNS.md` documents template patterns
531
- - Cortex's own `PROMPTS.md` guides AI collaboration on Cortex
532
-
533
- **Validation Test**: "Can an AI agent working on Cortex find what it needs in < 3 file reads?" ✅
343
+ See [CHANGELOG.md](CHANGELOG.md) for full version history.
534
344
 
535
345
  ---
536
346
 
537
- ## 📚 Key Documentation
347
+ ## When to Use Cortex TMS
538
348
 
539
- - **For AI Agents**: Read `.github/copilot-instructions.md` and `PROMPTS.md` first
540
- - **For Developers**: Read `docs/core/ARCHITECTURE.md` for system design
541
- - **For Contributors**: Read `docs/core/PATTERNS.md` for template patterns
542
- - **For Understanding**: Read `docs/core/DOMAIN-LOGIC.md` for TMS principles
349
+ ### Good Fit
543
350
 
544
- ---
351
+ - **Multi-file projects** - Complex codebases with established patterns
352
+ - **Team projects** - Multiple developers + AI agents need consistency
353
+ - **Long-running projects** - Documentation drift is a real risk
354
+ - **AI-heavy workflows** - Using Claude Code, Cursor, Copilot extensively
355
+ - **Quality-focused** - You value consistent code over speed
545
356
 
546
- ## 🤝 Contributing
357
+ ### ⚠️ Maybe Not
547
358
 
548
- We welcome contributions! Please read **[CONTRIBUTING.md](CONTRIBUTING.md)** for detailed guidelines on:
549
- - How to submit bug reports and feature requests
550
- - Development setup and workflow
551
- - Pull request process and quality standards
552
- - Code style and testing requirements
553
- - Areas where we need help
359
+ - **Single-file projects** - Overhead may outweigh benefits
360
+ - **Throwaway prototypes** - Documentation governance not worth setup time
361
+ - **Solo dev, simple project** - Mental model may be sufficient
362
+ - **Pure exploration** - Constraints may slow discovery
554
363
 
555
- **Quick Start for Contributors**:
556
- 1. Read [CONTRIBUTING.md](CONTRIBUTING.md) - **Required for all contributions**
557
- 2. Check [open issues](https://github.com/cortex-tms/cortex-tms/issues) for `good-first-issue` labels
558
- 3. For significant changes, open an issue for discussion **before** coding
559
- 4. Follow patterns in `docs/core/PATTERNS.md`
560
- 5. Ensure tests pass: `npm test`
561
- 6. Submit PR with clear description and linked issue
364
+ **Start simple**: Use `--scope nano` for minimal setup, expand as needed.
562
365
 
563
366
  ---
564
367
 
565
- ## 📖 Learn More
368
+ ## Developer Experience
566
369
 
567
- - **Release Notes**: See `CHANGELOG.md` for version history
568
- - **Architecture**: See `docs/core/ARCHITECTURE.md` for system design
569
- - **Decisions**: See `docs/core/DECISIONS.md` for ADRs
570
- - **Glossary**: See `docs/core/GLOSSARY.md` for terminology
571
- - **Patterns**: See `docs/core/PATTERNS.md` for implementation examples
370
+ - **Instant Setup**: `npx cortex-tms init` - 60 seconds to governance docs
371
+ - **Zero Config**: Works out of the box with sensible defaults
372
+ - **CI Ready**: GitHub Actions templates included
373
+ - **Production Grade**: 316 tests (97% pass rate), enterprise-grade security (v3.2)
374
+ - **Open Source**: MIT license, community-driven
572
375
 
573
- ---
376
+ **Tested With**: Claude Code, GitHub Copilot (in VS Code). Architecture supports any AI tool.
574
377
 
575
- ## 🎯 Why Cortex TMS? Three Pillars, Measurable Results
378
+ ---
576
379
 
577
- ### 💰 Cost Efficiency (Pillar 1)
380
+ ## Community & Support
578
381
 
579
- **Before TMS**: Wasting **$0.19/session** reading 66,834 tokens of old docs
580
- **After TMS**: Paying **$0.01/session** with 94.5% context reduction
581
- **Impact**: **10x cost reduction** - Claude Sonnet 4.5 vs GPT-4 ($0.01 vs $0.11/session)
382
+ ### Get Help
582
383
 
583
- **How**: HOT/WARM/COLD tiers ensure AI only reads what matters (3,647 vs 66,834 tokens)
384
+ - **[GitHub Discussions](https://github.com/cortex-tms/cortex-tms/discussions)** - Ask questions, share ideas
385
+ - [Q&A](https://github.com/cortex-tms/cortex-tms/discussions/categories/q-a) - Get help from community
386
+ - [Ideas](https://github.com/cortex-tms/cortex-tms/discussions/categories/ideas) - Suggest features
387
+ - [Show and Tell](https://github.com/cortex-tms/cortex-tms/discussions/categories/show-and-tell) - Share projects
584
388
 
585
- ### Quality (Pillar 2)
389
+ ### Report Issues
586
390
 
587
- **Before TMS**: **40% pattern violations** from AI reading outdated examples
588
- **After TMS**: **80% fewer violations** with Guardian semantic validation
589
- **Impact**: Guardian enforces `PATTERNS.md` and `DOMAIN-LOGIC.md` automatically
391
+ - **[Bug Reports](https://github.com/cortex-tms/cortex-tms/issues/new)** - Found a bug? Let us know
392
+ - **[Security Issues](https://github.com/cortex-tms/cortex-tms/security/advisories/new)** - Responsible disclosure
590
393
 
591
- **How**: LLM-powered review catches semantic drift that grep/regex can't find (**zero false negatives**)
394
+ ### Contributing
592
395
 
593
- ### 🌱 Sustainability (Pillar 3)
396
+ - **[Contributing Guide](CONTRIBUTING.md)** - How to contribute
397
+ - **[Community Guide](docs/COMMUNITY.md)** - Community guidelines
594
398
 
595
- **Before TMS**: Burning unnecessary GPU cycles on 94.5% noise (archived changelogs, stale tasks)
596
- **After TMS**: **94.5% lower compute requirements** through intelligent tiering
597
- **Impact**: Less compute = greener development + happier planet
399
+ **Star us on GitHub** if Cortex TMS helps your AI development workflow!
598
400
 
599
- **How**: Stop reading COLD files unless explicitly needed
401
+ ---
600
402
 
601
- ### 🚀 Developer Experience
403
+ ## Roadmap
602
404
 
603
- - **Instant AI Activation**: Essential 7 prompts in `PROMPTS.md` (no manual prompt writing)
604
- - **Signal over Noise**: HOT/WARM/COLD system keeps AI focused
605
- - **Production-Ready**: 111 passing tests, stable 2.6.1 release
405
+ **v4.0** (Current - Feb 2026):
406
+ - Staleness detection (git-based, v1)
407
+ - Archive command
408
+ - ✅ Validation-first positioning
409
+ - ✅ Token claims removed
606
410
 
607
- ---
411
+ **v4.1** (Planned - Mar 2026):
412
+ - 🔄 Git hooks integration (`cortex-tms hooks install`)
413
+ - 🔄 Staleness v2 (improved heuristics, fewer false positives)
414
+ - 🔄 Incremental doc updates
608
415
 
609
- ## Contact
416
+ **v4.2+** (Future):
417
+ - 📋 MCP Server (expose docs to any AI tool)
418
+ - 📋 Multi-tool config generation (.cursorrules, .windsurfrules)
419
+ - 📋 Skills integration
610
420
 
611
- - **Bug Reports**: [GitHub Issues](https://github.com/cortex-tms/cortex-tms/issues/new) - Report bugs or technical issues
612
- - **Feature Requests**: [GitHub Issues](https://github.com/cortex-tms/cortex-tms/issues/new) - Suggest new features or improvements
613
- - **Questions & Support**: [GitHub Issues](https://github.com/cortex-tms/cortex-tms/issues/new) - Get help and ask questions
614
- - **Security Issues**: [GitHub Security Advisories](https://github.com/cortex-tms/cortex-tms/security/advisories/new) - Responsible disclosure
421
+ See [FUTURE-ENHANCEMENTS.md](FUTURE-ENHANCEMENTS.md) for full roadmap.
615
422
 
616
423
  ---
617
424
 
618
425
  ## License
619
426
 
620
- MIT
427
+ MIT - See [LICENSE](LICENSE) for details
621
428
 
622
429
  ---
623
430
 
624
431
  ## Status
625
432
 
626
- **Version**: 3.1.0 (Stable / Production Ready)
627
- **Last Updated**: 2026-01-23
628
- **Current Sprint**: v2.8 - "Marketing Pivot & Community Launch"
629
- **Completed Sprints**: v2.1, v2.2, v2.3, v2.4, v2.5, v2.6, v2.7 (see `docs/archive/`)
433
+ **Version**: 4.0.0 (In Development)
434
+ **Last Updated**: 2026-02-21
435
+ **Current Sprint**: v4.0 - "Quality Governance & Staleness Detection"
630
436
 
631
- <!-- @cortex-tms-version 3.1.0 -->
437
+ <!-- @cortex-tms-version 4.0.0 -->