cortex-tms 3.2.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.
- package/README.md +238 -529
- package/dist/cli.js +14 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/archive.d.ts +5 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +83 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +20 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/review.js +19 -1
- package/dist/commands/review.js.map +1 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +4 -100
- package/dist/commands/status.js.map +1 -1
- package/dist/types/cli.d.ts +8 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/ui/components/Dashboard.d.ts +11 -0
- package/dist/ui/components/Dashboard.d.ts.map +1 -0
- package/dist/ui/components/Dashboard.js +63 -0
- package/dist/ui/components/Dashboard.js.map +1 -0
- package/dist/ui/components/dashboard/ContextReductionCard.d.ts +9 -0
- package/dist/ui/components/dashboard/ContextReductionCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/ContextReductionCard.js +38 -0
- package/dist/ui/components/dashboard/ContextReductionCard.js.map +1 -0
- package/dist/ui/components/dashboard/CostSavingsCard.d.ts +10 -0
- package/dist/ui/components/dashboard/CostSavingsCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/CostSavingsCard.js +45 -0
- package/dist/ui/components/dashboard/CostSavingsCard.js.map +1 -0
- package/dist/ui/components/dashboard/FileDistributionCard.d.ts +10 -0
- package/dist/ui/components/dashboard/FileDistributionCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/FileDistributionCard.js +51 -0
- package/dist/ui/components/dashboard/FileDistributionCard.js.map +1 -0
- package/dist/ui/components/dashboard/FileSizeHealthCard.d.ts +15 -0
- package/dist/ui/components/dashboard/FileSizeHealthCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/FileSizeHealthCard.js +48 -0
- package/dist/ui/components/dashboard/FileSizeHealthCard.js.map +1 -0
- package/dist/ui/components/dashboard/Footer.d.ts +3 -0
- package/dist/ui/components/dashboard/Footer.d.ts.map +1 -0
- package/dist/ui/components/dashboard/Footer.js +13 -0
- package/dist/ui/components/dashboard/Footer.js.map +1 -0
- package/dist/ui/components/dashboard/GovernanceHealthCard.d.ts +10 -0
- package/dist/ui/components/dashboard/GovernanceHealthCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/GovernanceHealthCard.js +43 -0
- package/dist/ui/components/dashboard/GovernanceHealthCard.js.map +1 -0
- package/dist/ui/components/dashboard/GuardianStatusCard.d.ts +10 -0
- package/dist/ui/components/dashboard/GuardianStatusCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/GuardianStatusCard.js +58 -0
- package/dist/ui/components/dashboard/GuardianStatusCard.js.map +1 -0
- package/dist/ui/components/dashboard/Header.d.ts +7 -0
- package/dist/ui/components/dashboard/Header.d.ts.map +1 -0
- package/dist/ui/components/dashboard/Header.js +21 -0
- package/dist/ui/components/dashboard/Header.js.map +1 -0
- package/dist/ui/components/dashboard/HotFilesCard.d.ts +8 -0
- package/dist/ui/components/dashboard/HotFilesCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/HotFilesCard.js +28 -0
- package/dist/ui/components/dashboard/HotFilesCard.js.map +1 -0
- package/dist/ui/components/dashboard/NotConfiguredCard.d.ts +10 -0
- package/dist/ui/components/dashboard/NotConfiguredCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/NotConfiguredCard.js +13 -0
- package/dist/ui/components/dashboard/NotConfiguredCard.js.map +1 -0
- package/dist/ui/components/dashboard/SprintProgressCard.d.ts +11 -0
- package/dist/ui/components/dashboard/SprintProgressCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/SprintProgressCard.js +33 -0
- package/dist/ui/components/dashboard/SprintProgressCard.js.map +1 -0
- package/dist/ui/components/dashboard/StalenessCard.d.ts +10 -0
- package/dist/ui/components/dashboard/StalenessCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/StalenessCard.js +43 -0
- package/dist/ui/components/dashboard/StalenessCard.js.map +1 -0
- package/dist/ui/components/dashboard/TabBar.d.ts +8 -0
- package/dist/ui/components/dashboard/TabBar.d.ts.map +1 -0
- package/dist/ui/components/dashboard/TabBar.js +16 -0
- package/dist/ui/components/dashboard/TabBar.js.map +1 -0
- package/dist/ui/components/dashboard/ValidationCard.d.ts +10 -0
- package/dist/ui/components/dashboard/ValidationCard.d.ts.map +1 -0
- package/dist/ui/components/dashboard/ValidationCard.js +62 -0
- package/dist/ui/components/dashboard/ValidationCard.js.map +1 -0
- package/dist/ui/components/dashboard/ViewContainer.d.ts +14 -0
- package/dist/ui/components/dashboard/ViewContainer.d.ts.map +1 -0
- package/dist/ui/components/dashboard/ViewContainer.js +53 -0
- package/dist/ui/components/dashboard/ViewContainer.js.map +1 -0
- package/dist/ui/components/dashboard/index.d.ts +14 -0
- package/dist/ui/components/dashboard/index.d.ts.map +1 -0
- package/dist/ui/components/dashboard/index.js +14 -0
- package/dist/ui/components/dashboard/index.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +46 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/git-staleness.d.ts +13 -0
- package/dist/utils/git-staleness.d.ts.map +1 -0
- package/dist/utils/git-staleness.js +129 -0
- package/dist/utils/git-staleness.js.map +1 -0
- package/dist/utils/stats-collector.d.ts +62 -0
- package/dist/utils/stats-collector.d.ts.map +1 -0
- package/dist/utils/stats-collector.js +253 -0
- package/dist/utils/stats-collector.js.map +1 -0
- package/dist/utils/validation.d.ts +1 -10
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +1 -15
- package/dist/utils/validation.js.map +1 -1
- package/dist/utils/validator.d.ts.map +1 -1
- package/dist/utils/validator.js +66 -1
- package/dist/utils/validator.js.map +1 -1
- package/package.json +6 -2
- package/templates/CLAUDE.md +1 -1
- package/templates/FUTURE-ENHANCEMENTS.md +1 -1
- package/templates/NEXT-TASKS.md +1 -1
- package/templates/PROMPTS.md +1 -1
- package/templates/README.md +1 -1
- package/templates/docs/archive/v1.0-CHANGELOG.md +1 -1
- package/templates/docs/core/ARCHITECTURE.md +1 -1
- package/templates/docs/core/DECISIONS.md +1 -1
- package/templates/docs/core/DOMAIN-LOGIC.md +1 -1
- package/templates/docs/core/GLOSSARY.md +1 -1
- package/templates/docs/core/PATTERNS.md +1 -1
- package/templates/docs/core/SCHEMA.md +1 -1
- package/templates/docs/core/TROUBLESHOOTING.md +1 -1
package/README.md
CHANGED
|
@@ -5,20 +5,12 @@
|
|
|
5
5
|
<h1 align="center">Cortex TMS</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>
|
|
8
|
+
<strong>Documentation Governance for AI Coding Agents</strong>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
1. **π° Cost Efficiency** - Reduce input tokens by **60-70%** through intelligent context management (works with ANY model)
|
|
16
|
-
2. **β
Quality** - Reduce hallucinations from outdated docs with semantic validation and focused context
|
|
17
|
-
3. **π± Sustainability** - Cut compute requirements by **60-70%** with Green Governanceβless energy, greener development
|
|
18
|
-
|
|
19
|
-
Stop feeding your AI coding tool thousands of outdated lines. **60-70% input token reduction** (measured across 47 sessions on Cortex TMS itself) means **lower costs for paid models**, **less compute for free models**, and **fewer hallucinations** from irrelevant context.
|
|
20
|
-
|
|
21
|
-
**Works with any AI coding tool** - Claude Code, Copilot, Cursor, Warp, Augment, you name it. The architecture is model-agnostic. Input token reduction is universal.
|
|
11
|
+
<p align="center">
|
|
12
|
+
β 166+ GitHub Stars | Open source, community-driven
|
|
13
|
+
</p>
|
|
22
14
|
|
|
23
15
|
[](https://www.npmjs.com/package/cortex-tms)
|
|
24
16
|
[](https://www.npmjs.com/package/cortex-tms)
|
|
@@ -26,152 +18,113 @@ Stop feeding your AI coding tool thousands of outdated lines. **60-70% input tok
|
|
|
26
18
|
[](https://nodejs.org)
|
|
27
19
|
[](https://github.com/cortex-tms/cortex-tms/stargazers)
|
|
28
20
|
|
|
29
|
-
**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)
|
|
30
|
-
|
|
31
21
|
---
|
|
32
22
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
Get started in under 60 seconds (no installation required):
|
|
23
|
+
## What is Cortex TMS?
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
# 1. Initialize your project
|
|
39
|
-
npx cortex-tms@latest 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.
|
|
40
26
|
|
|
41
|
-
|
|
42
|
-
npx cortex-tms@latest 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.
|
|
43
28
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
npx cortex-tms@latest migrate
|
|
50
|
-
```
|
|
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
|
|
51
34
|
|
|
52
|
-
|
|
35
|
+
---
|
|
53
36
|
|
|
54
|
-
|
|
37
|
+
## Three Pillars
|
|
55
38
|
|
|
56
|
-
|
|
39
|
+
### 1. π Consistency - Document Your Standards
|
|
57
40
|
|
|
58
|
-
|
|
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
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
**Result**: AI writes code that follows YOUR patterns, not random conventions from its training data.
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
### 2. π Freshness - Detect Staleness
|
|
63
50
|
|
|
64
|
-
|
|
51
|
+
New in v4.0: Git-based staleness detection catches when docs go stale:
|
|
65
52
|
|
|
66
|
-
|
|
53
|
+
```bash
|
|
54
|
+
cortex-tms validate
|
|
67
55
|
|
|
68
|
-
|
|
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
|
|
69
61
|
|
|
70
|
-
|
|
71
|
-
cortex status --tokens -m claude-sonnet-4-5
|
|
62
|
+
Review docs/core/PATTERNS.md to ensure it reflects current codebase
|
|
72
63
|
```
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
| :---------------------- | :------------------- | :---------------------------------------------- |
|
|
76
|
-
| **Input Token Reduction** | 60-70% typical | Read 3,647 tokens instead of 66,834 (measured on our project) |
|
|
77
|
-
| **Cost Savings (Paid Models)** | ~60-70% lower costs | Example: Claude Sonnet $0.20 β $0.06/session |
|
|
78
|
-
| **Compute Savings (Free Models)** | ~60-70% less processing | Less GPU cycles = lower electricity + greener development |
|
|
79
|
-
| **Quality Improvement** | Fewer hallucinations | AI reads focused context, not thousands of irrelevant lines |
|
|
65
|
+
**How it works**: Compares doc modification dates vs code commit activity. Flags stale docs before they mislead AI agents.
|
|
80
66
|
|
|
81
|
-
**
|
|
67
|
+
**Note**: Staleness v1 uses git timestamps (temporal comparison only). Cannot detect semantic misalignment. Future versions will add semantic analysis.
|
|
82
68
|
|
|
83
|
-
|
|
84
|
-
- **WARM**: Architectural truth (on-demand) - 20,109 tokens
|
|
85
|
-
- **COLD**: Historical archive (ignored) - 43,078 tokens
|
|
69
|
+
### 3. π‘οΈ Safety - Human Oversight
|
|
86
70
|
|
|
87
|
-
|
|
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
|
|
88
75
|
|
|
89
|
-
**
|
|
76
|
+
**Result**: AI agents stay powerful but don't run wild.
|
|
90
77
|
|
|
91
78
|
---
|
|
92
79
|
|
|
93
|
-
##
|
|
80
|
+
## What Cortex Does (and Doesn't Do)
|
|
94
81
|
|
|
95
|
-
|
|
82
|
+
### β
What Cortex Does
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
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
|
|
101
90
|
|
|
102
|
-
|
|
103
|
-
- Sample: 47 sessions over 24 days (Jan 2026)
|
|
104
|
-
- Project type: TypeScript monorepo (Cortex TMS dogfooding itself)
|
|
105
|
-
- Tools tested: Claude Code, GitHub Copilot (in VS Code)
|
|
106
|
-
- Models tested: Claude Sonnet/Opus, GPT-4, and other Copilot models
|
|
107
|
-
- Your results may vary based on project size, structure, usage patterns, and model choice
|
|
108
|
-
- Read our measurement methodology: [Measuring Context Optimization](website/src/content/blog/measuring-context-optimization.mdx)
|
|
91
|
+
### β What Cortex Does NOT Do
|
|
109
92
|
|
|
110
|
-
**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
**
|
|
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
|
|
114
97
|
|
|
115
98
|
---
|
|
116
99
|
|
|
117
|
-
##
|
|
118
|
-
|
|
119
|
-
Traditional repos drown AI agents in thousands of lines of historical tasks and stale documentation. **Cortex TMS** forces agents into a "Tiered" approach:
|
|
120
|
-
|
|
121
|
-
1. **HOT (Active)**: `NEXT-TASKS.md`, `PROMPTS.md` β What we are doing _now_ and how to ask the AI for help.
|
|
122
|
-
2. **WARM (Truth)**: `docs/core/` β The project's "Laws" (Architecture, Patterns, Domain Logic).
|
|
123
|
-
3. **COLD (History)**: `docs/archive/` β Historical changelogs (Ignore unless asked).
|
|
124
|
-
|
|
125
|
-
**Why this works**: AI agents have limited context windows. Reading everything is wasteful. The tier system maximizes signal, minimizes noise.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## π What's New in v3.2 (Upcoming)
|
|
130
|
-
|
|
131
|
-
**Security & Production Readiness** - Making Cortex TMS enterprise-grade:
|
|
132
|
-
|
|
133
|
-
- π‘οΈ **Centralized Error Handling** β No more process crashes. All commands use consistent `CLIError` patterns with proper cleanup
|
|
134
|
-
- β
**Zod-Based Input Validation** β Runtime type safety for all CLI commands with clear, actionable error messages
|
|
135
|
-
- π§ͺ **Comprehensive E2E Tests** β 61 E2E tests covering full CLI workflows (init, validate, migrate, review, auto-tier)
|
|
136
|
-
- π **Path Traversal Protection** β Template operations secured against `../../etc/passwd` attacks with `validateSafePath()`
|
|
137
|
-
- π **API Key Sanitization** β Guardian automatically redacts Anthropic/OpenAI keys in all error messages and logs
|
|
138
|
-
- π **Automated Security Scanning** β CI pipeline runs `pnpm audit` on every PR to catch dependency vulnerabilities
|
|
100
|
+
## Quick Start
|
|
139
101
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
**Full Details**: [CHANGELOG.md](CHANGELOG.md#320---unreleased)
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## π οΈ CLI Commands
|
|
102
|
+
```bash
|
|
103
|
+
# Initialize governance docs in your project
|
|
104
|
+
npx cortex-tms@latest init
|
|
149
105
|
|
|
150
|
-
|
|
106
|
+
# Validate doc health (including staleness detection)
|
|
107
|
+
npx cortex-tms@latest validate
|
|
151
108
|
|
|
152
|
-
|
|
109
|
+
# Strict mode (warnings = errors, for CI)
|
|
110
|
+
npx cortex-tms@latest validate --strict
|
|
153
111
|
|
|
154
|
-
|
|
112
|
+
# Check project status
|
|
113
|
+
npx cortex-tms@latest status
|
|
155
114
|
|
|
156
|
-
|
|
157
|
-
cortex-tms
|
|
115
|
+
# Archive completed tasks
|
|
116
|
+
npx cortex-tms@latest archive --dry-run
|
|
158
117
|
```
|
|
159
118
|
|
|
160
|
-
**
|
|
161
|
-
|
|
162
|
-
- Project Dashboard: Using `status` to see your cockpit
|
|
163
|
-
- AI Activation: Using `prompt` to activate project-aware AI agents
|
|
164
|
-
- Zero-Drift Governance: Automated version sync with `docs:sync`
|
|
165
|
-
- Health Checks: Understanding `validate` and the Archive Protocol
|
|
166
|
-
- Safe Migration: Fearless template upgrades with backup/rollback
|
|
167
|
-
|
|
168
|
-
**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`
|
|
169
120
|
|
|
170
121
|
---
|
|
171
122
|
|
|
123
|
+
## CLI Commands
|
|
124
|
+
|
|
172
125
|
### `cortex-tms init`
|
|
173
126
|
|
|
174
|
-
|
|
127
|
+
Scaffold TMS documentation structure with interactive scope selection.
|
|
175
128
|
|
|
176
129
|
```bash
|
|
177
130
|
cortex-tms init # Interactive mode
|
|
@@ -181,230 +134,89 @@ cortex-tms init --dry-run # Preview changes
|
|
|
181
134
|
|
|
182
135
|
### `cortex-tms validate`
|
|
183
136
|
|
|
184
|
-
Verify
|
|
137
|
+
Verify project TMS health with automated checks.
|
|
185
138
|
|
|
186
139
|
```bash
|
|
187
140
|
cortex-tms validate # Check project health
|
|
188
141
|
cortex-tms validate --fix # Auto-repair missing files
|
|
189
|
-
cortex-tms validate --strict # Strict mode
|
|
142
|
+
cortex-tms validate --strict # Strict mode (warnings = errors)
|
|
190
143
|
```
|
|
191
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
|
+
|
|
192
152
|
### `cortex-tms status`
|
|
193
153
|
|
|
194
|
-
Project cockpit with health dashboard
|
|
154
|
+
Project cockpit with health dashboard and sprint progress.
|
|
195
155
|
|
|
196
156
|
```bash
|
|
197
|
-
cortex-tms status
|
|
198
|
-
cortex-tms status --tokens # Token usage analysis (HOT/WARM/COLD)
|
|
199
|
-
cortex-tms status --tokens -m gpt-4 # Cost comparison across models
|
|
157
|
+
cortex-tms status # Visual dashboard with progress bars
|
|
200
158
|
```
|
|
201
159
|
|
|
202
|
-
|
|
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)
|
|
203
165
|
|
|
204
|
-
-
|
|
205
|
-
- Context reduction percentage (typically 60-70%)
|
|
206
|
-
- Cost estimates per session/day/month (for paid models)
|
|
207
|
-
- Model comparison (Claude Sonnet 4.5, Opus 4.5, GPT-4, etc.)
|
|
208
|
-
- Sustainability impact tracking (compute savings for all models)
|
|
166
|
+
### `cortex-tms archive`
|
|
209
167
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
Git-based automatic tier assignment - reduce manual tier management using file recency as a relevance signal.
|
|
168
|
+
Archive completed tasks and old content.
|
|
213
169
|
|
|
214
170
|
```bash
|
|
215
|
-
cortex-tms
|
|
216
|
-
cortex-tms
|
|
217
|
-
cortex-tms auto-tier --hot 14 --warm 60 # Custom thresholds
|
|
218
|
-
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
|
|
219
173
|
```
|
|
220
174
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
**How It Works**:
|
|
224
|
-
|
|
225
|
-
- Analyzes git commit history and file paths to calculate priority scores
|
|
226
|
-
- **Scoring system**: Canonical files (100 pts) > docs/ (40 pts) + recency (15 pts)
|
|
227
|
-
- **Strict cap**: Maximum 10 HOT files (prevents context bloat)
|
|
228
|
-
- **Smart defaults**: `docs/archive/` β COLD, `docs/guides/` β WARM, canonical files always HOT
|
|
229
|
-
- Adds `<!-- @cortex-tms-tier HOT -->` tags to markdown files
|
|
230
|
-
- Respects explicit tier tags unless `--force` is used
|
|
231
|
-
|
|
232
|
-
**Why Auto-Tier?**
|
|
175
|
+
Archives completed tasks from NEXT-TASKS.md to `docs/archive/` with timestamp.
|
|
233
176
|
|
|
234
|
-
-
|
|
235
|
-
- **Objective signal**: Git history provides measurable recency data
|
|
236
|
-
- **Aligns with "Lost in the Middle" research**: Recent files (likely relevant) placed at context beginning
|
|
237
|
-
- **Adapts to workflow**: Tiers stay current as project evolves
|
|
177
|
+
**Note**: `cortex-tms auto-tier` is deprecatedβuse `archive` instead.
|
|
238
178
|
|
|
239
179
|
### `cortex-tms migrate`
|
|
240
180
|
|
|
241
|
-
Intelligent version managementβdetect outdated templates and
|
|
181
|
+
Intelligent version managementβdetect outdated templates and upgrade safely.
|
|
242
182
|
|
|
243
183
|
```bash
|
|
244
184
|
cortex-tms migrate # Analyze version status
|
|
245
|
-
cortex-tms migrate --apply # Auto-upgrade OUTDATED files
|
|
246
|
-
cortex-tms migrate --
|
|
247
|
-
cortex-tms migrate --rollback # Restore from backup (interactive selection)
|
|
248
|
-
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
|
|
249
187
|
```
|
|
250
188
|
|
|
251
|
-
**Status Categories**:
|
|
252
|
-
|
|
253
|
-
- `LATEST`: Already on current version
|
|
254
|
-
- `OUTDATED`: Safe to auto-upgrade (matches old template)
|
|
255
|
-
- `CUSTOMIZED`: Manual review needed (has user changes)
|
|
256
|
-
- `MISSING`: Optional file not installed
|
|
257
|
-
|
|
258
|
-
**Safety Features**:
|
|
259
|
-
|
|
260
|
-
- Automatic backups in `.cortex/backups/` before any changes
|
|
261
|
-
- Timestamped snapshots with manifest files
|
|
262
|
-
- One-click rollback with interactive backup selection
|
|
263
|
-
- Confirmation prompts prevent accidental overwrites
|
|
264
|
-
|
|
265
189
|
### `cortex-tms prompt`
|
|
266
190
|
|
|
267
191
|
Access project-aware AI prompts from the Essential 7 library.
|
|
268
192
|
|
|
269
193
|
```bash
|
|
270
194
|
cortex-tms prompt # Interactive selection
|
|
271
|
-
cortex-tms prompt init-session #
|
|
272
|
-
cortex-tms prompt --list # Browse all prompts
|
|
195
|
+
cortex-tms prompt init-session # Auto-copies to clipboard
|
|
273
196
|
```
|
|
274
197
|
|
|
275
|
-
**The Essential 7**:
|
|
276
|
-
|
|
277
|
-
- `init-session` - Start your AI session with context
|
|
278
|
-
- `feature` - Implement new features with architectural anchors
|
|
279
|
-
- `debug` - Troubleshoot with known issues lookup
|
|
280
|
-
- `review` - Code review against project patterns
|
|
281
|
-
- `refactor` - Structural improvements
|
|
282
|
-
- `decision` - Create Architecture Decision Records
|
|
283
|
-
- `finish` - Execute maintenance protocol
|
|
284
|
-
|
|
285
198
|
### `cortex-tms review` π‘οΈ
|
|
286
199
|
|
|
287
|
-
|
|
200
|
+
Guardian: AI-powered semantic validation against project patterns.
|
|
288
201
|
|
|
289
202
|
```bash
|
|
290
|
-
cortex-tms review src/index.ts # Validate
|
|
291
|
-
cortex-tms review src/index.ts --safe #
|
|
292
|
-
cortex-tms review src/index.ts --output-json # Raw JSON output (for Agent Skills/CI/CD)
|
|
293
|
-
cortex-tms review src/index.ts --provider openai # Use OpenAI instead of Anthropic
|
|
294
|
-
cortex-tms review src/index.ts --model gpt-4 # Specify model
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
**What Guardian Does**:
|
|
298
|
-
|
|
299
|
-
- Analyzes code against `PATTERNS.md` (canonical examples, do/don't patterns)
|
|
300
|
-
- Validates against `DOMAIN-LOGIC.md` (immutable project rules)
|
|
301
|
-
- Uses LLM to catch **semantic violations**, not just syntax errors
|
|
302
|
-
- Reports violations with specific pattern references
|
|
303
|
-
|
|
304
|
-
**Why Guardian?**
|
|
305
|
-
|
|
306
|
-
- **Structured Output**: JSON-based violation detection (80%+ accuracy target, from 65.5% baseline)
|
|
307
|
-
- **Safe Mode**: `--safe` flag filters to high-confidence violations only (β₯70%), reducing false positive noise
|
|
308
|
-
- **Semantic Understanding**: Catches violations grep/regex can't find
|
|
309
|
-
- **Pattern Enforcement**: Stops drift from architectural decisions
|
|
310
|
-
- **BYOK (Bring Your Own Key)**: Uses your OpenAI or Anthropic API key
|
|
311
|
-
- **Reliable Parsing**: Deterministic JSON eliminates keyword collision false positives
|
|
312
|
-
|
|
313
|
-
**Example Output**:
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
π‘οΈ Guardian Code Review
|
|
317
|
-
|
|
318
|
-
β
Analysis Complete
|
|
319
|
-
|
|
320
|
-
β **Major Violations**
|
|
321
|
-
|
|
322
|
-
Code violates Pattern 1: Placeholder Syntax
|
|
323
|
-
|
|
324
|
-
## Violations
|
|
325
|
-
|
|
326
|
-
1. β **Pattern 1: Placeholder Syntax**
|
|
327
|
-
π Line: 45
|
|
328
|
-
β Issue: Using {braces} instead of [brackets] for placeholders
|
|
329
|
-
π‘ Fix: Replace {project-name} with [project-name]
|
|
330
|
-
|
|
331
|
-
## Positive Observations
|
|
332
|
-
|
|
333
|
-
β
Consistent indentation and formatting
|
|
334
|
-
β
Good use of TypeScript strict types
|
|
203
|
+
cortex-tms review src/index.ts # Validate against PATTERNS.md
|
|
204
|
+
cortex-tms review src/index.ts --safe # High-confidence violations only
|
|
335
205
|
```
|
|
336
206
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
## π CI/CD Integration
|
|
340
|
-
|
|
341
|
-
### Reusable GitHub Action
|
|
342
|
-
|
|
343
|
-
Validate your TMS documentation in GitHub Actions workflows without installing the CLI locally.
|
|
344
|
-
|
|
345
|
-
**Basic Usage** (in your `.github/workflows/tms-validate.yml`):
|
|
346
|
-
|
|
347
|
-
```yaml
|
|
348
|
-
name: TMS Validation
|
|
349
|
-
|
|
350
|
-
on:
|
|
351
|
-
push:
|
|
352
|
-
branches: [main]
|
|
353
|
-
pull_request:
|
|
354
|
-
branches: [main]
|
|
355
|
-
|
|
356
|
-
jobs:
|
|
357
|
-
validate:
|
|
358
|
-
uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
**With Custom Configuration**:
|
|
362
|
-
|
|
363
|
-
```yaml
|
|
364
|
-
jobs:
|
|
365
|
-
validate:
|
|
366
|
-
uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
|
|
367
|
-
with:
|
|
368
|
-
strict: true # Enable strict mode (default: true)
|
|
369
|
-
scope: 'standard' # Validation scope (default: auto-detect)
|
|
370
|
-
ignore-files: 'README.md' # Comma-separated files to ignore
|
|
371
|
-
cortex-version: 'latest' # Cortex TMS version (default: latest)
|
|
372
|
-
node-version: '20' # Node.js version (default: 20)
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
**Available Inputs**:
|
|
376
|
-
|
|
377
|
-
| Input | Description | Default |
|
|
378
|
-
|:------|:------------|:--------|
|
|
379
|
-
| `strict` | Enable strict validation mode (fails on warnings) | `true` |
|
|
380
|
-
| `scope` | Validation scope (nano/standard/enterprise/auto-detect) | `auto-detect` |
|
|
381
|
-
| `ignore-files` | Comma-separated list of files to ignore | `''` |
|
|
382
|
-
| `cortex-version` | Cortex TMS version to install (e.g., "latest", "2.7.0") | `latest` |
|
|
383
|
-
| `node-version` | Node.js version to use | `20` |
|
|
207
|
+
### `cortex-tms tutorial`
|
|
384
208
|
|
|
385
|
-
|
|
209
|
+
Interactive walkthrough teaching the Cortex Way.
|
|
386
210
|
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
validate:
|
|
390
|
-
uses: cortex-tms/cortex-tms/.github/workflows/validate-reusable.yml@main
|
|
391
|
-
with:
|
|
392
|
-
strict: false
|
|
393
|
-
ignore-files: 'README.md,CHANGELOG.md,docs/archive/*'
|
|
211
|
+
```bash
|
|
212
|
+
cortex-tms tutorial # 5-lesson guided tour (~15 minutes)
|
|
394
213
|
```
|
|
395
214
|
|
|
396
|
-
**Benefits**:
|
|
397
|
-
|
|
398
|
-
- β
Zero-friction adoption (no local installation required)
|
|
399
|
-
- β
Validates PRs automatically
|
|
400
|
-
- β
Consistent enforcement across team
|
|
401
|
-
- β
Works with any project using Cortex TMS
|
|
402
|
-
|
|
403
215
|
---
|
|
404
216
|
|
|
405
|
-
##
|
|
217
|
+
## Documentation Structure
|
|
406
218
|
|
|
407
|
-
| Folder / File | Purpose |
|
|
219
|
+
| Folder / File | Purpose | Tier |
|
|
408
220
|
| :-------------------------------- | :------------------------------------- | :------------------------ |
|
|
409
221
|
| `NEXT-TASKS.md` | Active sprint and current focus | **HOT** (Always Read) |
|
|
410
222
|
| `PROMPTS.md` | AI interaction templates (Essential 7) | **HOT** (Always Read) |
|
|
@@ -417,312 +229,209 @@ jobs:
|
|
|
417
229
|
| `docs/core/GIT-STANDARDS.md` | Git & PM conventions | **WARM** (Read on Demand) |
|
|
418
230
|
| `docs/core/DECISIONS.md` | Architecture Decision Records | **WARM** (Read on Demand) |
|
|
419
231
|
| `docs/core/GLOSSARY.md` | Project terminology | **WARM** (Read on Demand) |
|
|
420
|
-
| `docs/core/SCHEMA.md` | Data models (optional) | **WARM** (Read on Demand) |
|
|
421
|
-
| `docs/core/TROUBLESHOOTING.md` | Framework gotchas (optional) | **WARM** (Read on Demand) |
|
|
422
232
|
| `docs/archive/` | Historical changelogs | **COLD** (Ignore) |
|
|
423
233
|
|
|
424
|
-
**
|
|
425
|
-
|
|
426
|
-
- `NEXT-TASKS.md`: Stay under **200 lines** (archive completed sprints to `docs/archive/`)
|
|
427
|
-
- `.github/copilot-instructions.md`: Stay under **100 lines** (critical rules only)
|
|
428
|
-
|
|
429
|
-
**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.
|
|
430
235
|
|
|
431
236
|
---
|
|
432
237
|
|
|
433
|
-
##
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
- **End-to-End Workflows**: Validates command interactions work correctly
|
|
454
|
-
- **Error Recovery Testing**: Ensures rollback and fix workflows function
|
|
455
|
-
- **CI/CD Ready**: ~8.5s execution time, zero flakiness
|
|
456
|
-
|
|
457
|
-
### 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
|
+
```
|
|
458
258
|
|
|
459
|
-
|
|
460
|
-
-
|
|
461
|
-
-
|
|
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
|
|
462
263
|
|
|
463
|
-
|
|
264
|
+
**Limitations (v1)**:
|
|
265
|
+
- Temporal comparison only (git timestamps)
|
|
266
|
+
- Cannot detect semantic misalignment
|
|
267
|
+
- Requires full git history (not shallow clones)
|
|
464
268
|
|
|
465
|
-
|
|
466
|
-
- **Safe-Fail Migration**: Automatic backups with one-click rollback
|
|
467
|
-
- **Zero-Drift Governance**: Automated version sync with CI Guardian
|
|
468
|
-
- **Self-Healing Validation**: `--fix` flag auto-repairs common issues
|
|
469
|
-
- **Migration Auditor**: Version tracking and customization detection
|
|
470
|
-
- **Prompt Engine**: Essential 7 library with clipboard integration
|
|
269
|
+
**CI Setup**: Ensure `fetch-depth: 0` in GitHub Actions to enable staleness detection.
|
|
471
270
|
|
|
472
271
|
---
|
|
473
272
|
|
|
474
|
-
##
|
|
475
|
-
|
|
476
|
-
This repo is a **"Machine-Legible Project Constitution."** To get the best results:
|
|
273
|
+
## CI/CD Integration
|
|
477
274
|
|
|
478
|
-
|
|
275
|
+
Add to `.github/workflows/validate.yml`:
|
|
479
276
|
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
# Copies: "Review NEXT-TASKS.md, docs/core/ARCHITECTURE.md, and CLAUDE.md.
|
|
483
|
-
# Summarize current priorities and propose a step-by-step plan..."
|
|
484
|
-
```
|
|
277
|
+
```yaml
|
|
278
|
+
name: Cortex TMS Validation
|
|
485
279
|
|
|
486
|
-
|
|
280
|
+
on: [push, pull_request]
|
|
487
281
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
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
|
|
492
296
|
```
|
|
493
297
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
### 4. Check Current Sprint
|
|
501
|
-
|
|
502
|
-
```bash
|
|
503
|
-
cortex-tms status # Visual dashboard with current tasks
|
|
504
|
-
```
|
|
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
|
|
505
303
|
|
|
506
304
|
---
|
|
507
305
|
|
|
508
|
-
##
|
|
509
|
-
|
|
510
|
-
**Completed Phases** (All β
):
|
|
306
|
+
## What's New in v4.0
|
|
511
307
|
|
|
512
|
-
|
|
513
|
-
- [x] **Phase 2**: Complete Template Library - All templates built and validated
|
|
514
|
-
- [x] **Phase 3**: Build Example App - Gold Standard Next.js 15 Todo App
|
|
515
|
-
- [x] **Phase 4**: Create CLI Tool - Full-featured CLI with 6 commands
|
|
516
|
-
- [x] **Phase 5**: Documentation & Guides - Status dashboard, snippets, validation
|
|
517
|
-
- [x] **Phase 6**: Publish & Scale - npm package + GitHub releases
|
|
308
|
+
**π― Strategic Repositioning**: Quality governance over token optimization
|
|
518
309
|
|
|
519
|
-
**
|
|
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?"
|
|
520
311
|
|
|
521
|
-
|
|
522
|
-
- β
Guardian semantic validation (Pattern + Domain Logic enforcement)
|
|
523
|
-
- β
111 passing tests (96 unit + 15 integration)
|
|
524
|
-
- β
Error handling refactor for better testability
|
|
525
|
-
- β
Multi-model cost comparison (Claude, GPT-4)
|
|
312
|
+
### New Features
|
|
526
313
|
|
|
527
|
-
**
|
|
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`)
|
|
528
320
|
|
|
529
|
-
|
|
530
|
-
-
|
|
531
|
-
-
|
|
532
|
-
-
|
|
321
|
+
**Archive Command**:
|
|
322
|
+
- β
`cortex-tms archive` - Archive completed tasks
|
|
323
|
+
- β
Replaces deprecated `auto-tier` command
|
|
324
|
+
- β
Dry-run mode for previewing changes
|
|
533
325
|
|
|
534
|
-
|
|
326
|
+
**Simplified Status**:
|
|
327
|
+
- β
Removed `--tokens` flag (streamlined to governance focus)
|
|
328
|
+
- β
Shows: project health, sprint progress, backlog
|
|
535
329
|
|
|
536
|
-
|
|
330
|
+
### Breaking Changes
|
|
537
331
|
|
|
538
|
-
|
|
332
|
+
**Removed**:
|
|
333
|
+
- β `cortex-tms status --tokens` flag
|
|
334
|
+
- β Token counting and cost analysis features
|
|
539
335
|
|
|
540
|
-
|
|
541
|
-
cortex-tms
|
|
542
|
-
βββ NEXT-TASKS.md # HOT: Current sprint
|
|
543
|
-
βββ PROMPTS.md # HOT: AI interaction templates
|
|
544
|
-
βββ FUTURE-ENHANCEMENTS.md # PLANNING: Backlog
|
|
545
|
-
βββ CLAUDE.md # HOT: Workflow config
|
|
546
|
-
βββ README.md # This file
|
|
547
|
-
βββ .github/
|
|
548
|
-
β βββ copilot-instructions.md # HOT: AI guardrails
|
|
549
|
-
βββ bin/ # CLI executable
|
|
550
|
-
βββ src/ # CLI source code
|
|
551
|
-
β βββ commands/ # CLI commands (init, validate, status, migrate, prompt, tutorial)
|
|
552
|
-
β βββ utils/ # Template processing, validation, prompt parsing, backup
|
|
553
|
-
β βββ types/ # TypeScript definitions
|
|
554
|
-
βββ templates/ # User-facing boilerplate
|
|
555
|
-
β βββ NEXT-TASKS.md
|
|
556
|
-
β βββ PROMPTS.md # Essential 7 prompt library
|
|
557
|
-
β βββ CLAUDE.md
|
|
558
|
-
β βββ .github/
|
|
559
|
-
β β βββ copilot-instructions.md
|
|
560
|
-
β βββ vscode/
|
|
561
|
-
β β βββ tms.code-snippets # VS Code productivity snippets
|
|
562
|
-
β βββ docs/
|
|
563
|
-
β βββ core/
|
|
564
|
-
β β βββ ARCHITECTURE.md
|
|
565
|
-
β β βββ PATTERNS.md
|
|
566
|
-
β β βββ DOMAIN-LOGIC.md
|
|
567
|
-
β β βββ GIT-STANDARDS.md
|
|
568
|
-
β β βββ DECISIONS.md
|
|
569
|
-
β β βββ GLOSSARY.md
|
|
570
|
-
β β βββ SCHEMA.md
|
|
571
|
-
β β βββ TROUBLESHOOTING.md
|
|
572
|
-
β βββ archive/
|
|
573
|
-
β βββ v1.0-CHANGELOG.md
|
|
574
|
-
βββ docs/ # Cortex TMS project documentation
|
|
575
|
-
β βββ core/
|
|
576
|
-
β βββ archive/
|
|
577
|
-
βββ examples/ # Reference implementations
|
|
578
|
-
βββ todo-app/ # β
Gold Standard Next.js 15 App
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
---
|
|
336
|
+
**Deprecated**:
|
|
337
|
+
- β οΈ `cortex-tms auto-tier` β Use `cortex-tms archive` (still works with warning)
|
|
582
338
|
|
|
583
|
-
|
|
339
|
+
**Migration**:
|
|
340
|
+
- Status command: Use `cortex-tms status` (no flags needed)
|
|
341
|
+
- Archive tasks: Use `cortex-tms archive` instead of `auto-tier`
|
|
584
342
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
- Cortex's own `NEXT-TASKS.md` tracks Cortex development
|
|
588
|
-
- Cortex's own `docs/core/PATTERNS.md` documents template patterns
|
|
589
|
-
- Cortex's own `PROMPTS.md` guides AI collaboration on Cortex
|
|
590
|
-
|
|
591
|
-
**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.
|
|
592
344
|
|
|
593
345
|
---
|
|
594
346
|
|
|
595
|
-
##
|
|
347
|
+
## When to Use Cortex TMS
|
|
596
348
|
|
|
597
|
-
|
|
598
|
-
- **For Developers**: Read `docs/core/ARCHITECTURE.md` for system design
|
|
599
|
-
- **For Contributors**: Read `docs/core/PATTERNS.md` for template patterns
|
|
600
|
-
- **For Understanding**: Read `docs/core/DOMAIN-LOGIC.md` for TMS principles
|
|
349
|
+
### β
Good Fit
|
|
601
350
|
|
|
602
|
-
|
|
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
|
|
603
356
|
|
|
604
|
-
|
|
357
|
+
### β οΈ Maybe Not
|
|
605
358
|
|
|
606
|
-
|
|
607
|
-
-
|
|
608
|
-
-
|
|
609
|
-
-
|
|
610
|
-
- Code style and testing requirements
|
|
611
|
-
- 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
|
|
612
363
|
|
|
613
|
-
**
|
|
614
|
-
1. Read [CONTRIBUTING.md](CONTRIBUTING.md) - **Required for all contributions**
|
|
615
|
-
2. Check [open issues](https://github.com/cortex-tms/cortex-tms/issues) for `good-first-issue` labels
|
|
616
|
-
3. For significant changes, open an issue for discussion **before** coding
|
|
617
|
-
4. Follow patterns in `docs/core/PATTERNS.md`
|
|
618
|
-
5. Ensure tests pass: `npm test`
|
|
619
|
-
6. Submit PR with clear description and linked issue
|
|
364
|
+
**Start simple**: Use `--scope nano` for minimal setup, expand as needed.
|
|
620
365
|
|
|
621
366
|
---
|
|
622
367
|
|
|
623
|
-
##
|
|
368
|
+
## Developer Experience
|
|
624
369
|
|
|
625
|
-
- **
|
|
626
|
-
- **
|
|
627
|
-
- **
|
|
628
|
-
- **
|
|
629
|
-
- **
|
|
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
|
|
630
375
|
|
|
631
|
-
|
|
376
|
+
**Tested With**: Claude Code, GitHub Copilot (in VS Code). Architecture supports any AI tool.
|
|
632
377
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
**Based on 47 development sessions on Cortex TMS itself (TypeScript monorepo) using Claude Code and GitHub Copilot with various models. Your results may vary.**
|
|
636
|
-
|
|
637
|
-
### π° Cost Efficiency (Pillar 1) - Input Token Reduction
|
|
638
|
-
|
|
639
|
-
**Before TMS**: AI reads entire repository (66,834 tokens in our case)
|
|
640
|
-
**After TMS**: AI reads focused context (3,647 tokensβ60-70% reduction)
|
|
641
|
-
**Impact**:
|
|
642
|
-
- **Paid models** (tested: Claude, GPT-4): ~60-70% lower API costs
|
|
643
|
-
- **Free/local models** (untested, but architecturally supported): Should see ~60-70% less compute/electricity
|
|
644
|
-
- **Universal benefit**: Input token reduction works with any AI tool
|
|
645
|
-
|
|
646
|
-
**How**: HOT/WARM/COLD tiers ensure AI only reads what matters (3,647 vs 66,834 tokens measured on our project with Claude/GPT)
|
|
647
|
-
|
|
648
|
-
### β
Quality (Pillar 2) - Focused Context Means Fewer Hallucinations
|
|
649
|
-
|
|
650
|
-
**Before TMS**: AI reads thousands of outdated lines, leading to pattern violations
|
|
651
|
-
**After TMS**: AI reads focused, current contextβfewer mistakes from irrelevant information
|
|
652
|
-
**Impact**: Guardian enforces `PATTERNS.md` and `DOMAIN-LOGIC.md` automatically
|
|
653
|
-
|
|
654
|
-
**How**: LLM-powered semantic review catches drift that grep/regex can't find
|
|
655
|
-
|
|
656
|
-
### π± Sustainability (Pillar 3) - Greener Development Through Efficiency
|
|
657
|
-
|
|
658
|
-
**Before TMS**: Burning GPU cycles on archived changelogs and stale tasks
|
|
659
|
-
**After TMS**: 60-70% lower compute requirements through intelligent tiering
|
|
660
|
-
**Impact**: Less compute = lower electricity costs + greener development
|
|
661
|
-
- Especially important for free/local models where YOU pay the electricity bill
|
|
662
|
-
|
|
663
|
-
**How**: Stop reading COLD files unless explicitly needed
|
|
378
|
+
---
|
|
664
379
|
|
|
665
|
-
|
|
380
|
+
## Community & Support
|
|
666
381
|
|
|
667
|
-
|
|
668
|
-
- **Signal over Noise**: HOT/WARM/COLD system keeps AI focused
|
|
669
|
-
- **Production-Ready**: 316 tests (97% pass rate), enterprise-grade security (v3.2)
|
|
670
|
-
- **Tested With**: Claude Code, GitHub Copilot (in VS Code). Architecture supports any AI tool (Cursor, etc.).
|
|
382
|
+
### Get Help
|
|
671
383
|
|
|
672
|
-
|
|
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
|
|
673
388
|
|
|
674
|
-
|
|
389
|
+
### Report Issues
|
|
675
390
|
|
|
676
|
-
|
|
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
|
|
677
393
|
|
|
678
|
-
|
|
679
|
-
- **Input Validation**: All CLI commands use Zod schemas for runtime type safety
|
|
680
|
-
- **Path Security**: Template operations protected against directory traversal attacks
|
|
681
|
-
- **Automated Scanning**: CI pipeline includes `pnpm audit` to catch dependency vulnerabilities
|
|
394
|
+
### Contributing
|
|
682
395
|
|
|
683
|
-
**
|
|
684
|
-
- [
|
|
685
|
-
- [Security Testing Guide](docs/guides/SECURITY-TESTING.md) β How to verify security patterns
|
|
686
|
-
- [Security Patterns](docs/core/PATTERNS.md) β Implementation patterns (Error Handling, Input Validation)
|
|
396
|
+
- **[Contributing Guide](CONTRIBUTING.md)** - How to contribute
|
|
397
|
+
- **[Community Guide](docs/COMMUNITY.md)** - Community guidelines
|
|
687
398
|
|
|
688
|
-
**
|
|
399
|
+
**Star us on GitHub** β if Cortex TMS helps your AI development workflow!
|
|
689
400
|
|
|
690
401
|
---
|
|
691
402
|
|
|
692
|
-
##
|
|
693
|
-
|
|
694
|
-
We have an active and growing community! β **146 stars** and counting.
|
|
403
|
+
## Roadmap
|
|
695
404
|
|
|
696
|
-
|
|
697
|
-
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
- [Announcements](https://github.com/cortex-tms/cortex-tms/discussions/categories/announcements) - Release notes and updates
|
|
405
|
+
**v4.0** (Current - Feb 2026):
|
|
406
|
+
- β
Staleness detection (git-based, v1)
|
|
407
|
+
- β
Archive command
|
|
408
|
+
- β
Validation-first positioning
|
|
409
|
+
- β
Token claims removed
|
|
702
410
|
|
|
703
|
-
|
|
704
|
-
-
|
|
705
|
-
-
|
|
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
|
|
706
415
|
|
|
707
|
-
|
|
708
|
-
-
|
|
709
|
-
-
|
|
416
|
+
**v4.2+** (Future):
|
|
417
|
+
- π MCP Server (expose docs to any AI tool)
|
|
418
|
+
- π Multi-tool config generation (.cursorrules, .windsurfrules)
|
|
419
|
+
- π Skills integration
|
|
710
420
|
|
|
711
|
-
|
|
421
|
+
See [FUTURE-ENHANCEMENTS.md](FUTURE-ENHANCEMENTS.md) for full roadmap.
|
|
712
422
|
|
|
713
423
|
---
|
|
714
424
|
|
|
715
425
|
## License
|
|
716
426
|
|
|
717
|
-
MIT
|
|
427
|
+
MIT - See [LICENSE](LICENSE) for details
|
|
718
428
|
|
|
719
429
|
---
|
|
720
430
|
|
|
721
431
|
## Status
|
|
722
432
|
|
|
723
|
-
**Version**:
|
|
724
|
-
**Last Updated**: 2026-
|
|
725
|
-
**Current Sprint**:
|
|
726
|
-
**Recent Sprints**: v3.1 (Git-Based Auto-Tiering), v3.0 (AI-Powered Onboarding) β see [docs/archive/](docs/archive/)
|
|
433
|
+
**Version**: 4.0.0 (In Development)
|
|
434
|
+
**Last Updated**: 2026-02-21
|
|
435
|
+
**Current Sprint**: v4.0 - "Quality Governance & Staleness Detection"
|
|
727
436
|
|
|
728
|
-
<!-- @cortex-tms-version
|
|
437
|
+
<!-- @cortex-tms-version 4.0.0 -->
|