ctx-cc 1.0.0 → 2.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 +105 -80
- package/agents/ctx-debugger.md +257 -0
- package/agents/ctx-executor.md +96 -71
- package/agents/ctx-planner.md +70 -62
- package/agents/ctx-researcher.md +26 -19
- package/agents/ctx-verifier.md +86 -68
- package/bin/ctx.js +3 -2
- package/commands/ctx.md +116 -0
- package/commands/help.md +123 -90
- package/commands/init.md +55 -106
- package/commands/pause.md +68 -69
- package/commands/quick.md +68 -0
- package/package.json +2 -2
- package/src/install.js +3 -3
- package/templates/STATE.md +47 -0
- package/commands/do.md +0 -130
- package/commands/forget.md +0 -58
- package/commands/phase-add.md +0 -53
- package/commands/phase-list.md +0 -46
- package/commands/phase-next.md +0 -67
- package/commands/plan.md +0 -139
- package/commands/recall.md +0 -72
- package/commands/remember.md +0 -68
- package/commands/resume.md +0 -108
- package/commands/ship.md +0 -119
- package/commands/status.md +0 -95
- package/commands/update.md +0 -117
- package/commands/verify.md +0 -151
package/commands/phase-add.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:phase-add
|
|
3
|
-
description: Add a new phase to the roadmap
|
|
4
|
-
args: "<name>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Add a new phase to the project roadmap.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<process>
|
|
12
|
-
|
|
13
|
-
<step name="validate">
|
|
14
|
-
Check `.ctx/ROADMAP.md` exists. If not:
|
|
15
|
-
```
|
|
16
|
-
CTX not initialized. Run `/ctx:init` first.
|
|
17
|
-
```
|
|
18
|
-
</step>
|
|
19
|
-
|
|
20
|
-
<step name="get_details">
|
|
21
|
-
Ask user for phase details:
|
|
22
|
-
|
|
23
|
-
1. **Goal**: What should this phase achieve?
|
|
24
|
-
2. **Priority**: Where in the roadmap? (next, end, after phase X)
|
|
25
|
-
</step>
|
|
26
|
-
|
|
27
|
-
<step name="create_phase">
|
|
28
|
-
1. Generate phase ID from name (slugified)
|
|
29
|
-
2. Create phase directory: `.ctx/phases/{phase-id}/`
|
|
30
|
-
3. Add to ROADMAP.md in specified position
|
|
31
|
-
4. Set status to "pending"
|
|
32
|
-
</step>
|
|
33
|
-
|
|
34
|
-
<step name="output">
|
|
35
|
-
```
|
|
36
|
-
## Phase Added
|
|
37
|
-
|
|
38
|
-
**Name:** {name}
|
|
39
|
-
**ID:** {phase-id}
|
|
40
|
-
**Position:** #{position} in roadmap
|
|
41
|
-
**Status:** pending
|
|
42
|
-
|
|
43
|
-
**Next:** Run `/ctx:plan {name}` to create the plan.
|
|
44
|
-
```
|
|
45
|
-
</step>
|
|
46
|
-
|
|
47
|
-
</process>
|
|
48
|
-
|
|
49
|
-
<success_criteria>
|
|
50
|
-
- [ ] Phase added to ROADMAP.md
|
|
51
|
-
- [ ] Phase directory created
|
|
52
|
-
- [ ] Position correct in roadmap
|
|
53
|
-
</success_criteria>
|
package/commands/phase-list.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:phase-list
|
|
3
|
-
description: Show all phases with status
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Display all phases in the roadmap with their current status.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<process>
|
|
11
|
-
|
|
12
|
-
<step name="load_roadmap">
|
|
13
|
-
Read `.ctx/ROADMAP.md` and parse phases.
|
|
14
|
-
|
|
15
|
-
If not found:
|
|
16
|
-
```
|
|
17
|
-
CTX not initialized. Run `/ctx:init` first.
|
|
18
|
-
```
|
|
19
|
-
</step>
|
|
20
|
-
|
|
21
|
-
<step name="display_phases">
|
|
22
|
-
```
|
|
23
|
-
## Project Phases
|
|
24
|
-
|
|
25
|
-
| # | Phase | Status | Progress | Verified |
|
|
26
|
-
|---|-------|--------|----------|----------|
|
|
27
|
-
| 1 | {name} | complete | 100% | ✓ |
|
|
28
|
-
| 2 | {name} | in_progress | 60% | - |
|
|
29
|
-
| 3 | {name} | pending | 0% | - |
|
|
30
|
-
|
|
31
|
-
**Current:** Phase 2 - {name}
|
|
32
|
-
**Remaining:** {count} phases
|
|
33
|
-
|
|
34
|
-
**Next action:**
|
|
35
|
-
- If current incomplete: `/ctx:do`
|
|
36
|
-
- If current done: `/ctx:verify` then `/ctx:phase next`
|
|
37
|
-
```
|
|
38
|
-
</step>
|
|
39
|
-
|
|
40
|
-
</process>
|
|
41
|
-
|
|
42
|
-
<success_criteria>
|
|
43
|
-
- [ ] All phases listed with accurate status
|
|
44
|
-
- [ ] Current phase highlighted
|
|
45
|
-
- [ ] Next action suggested
|
|
46
|
-
</success_criteria>
|
package/commands/phase-next.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:phase-next
|
|
3
|
-
description: Move to the next phase in the roadmap
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Complete current phase and move to the next one.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<process>
|
|
11
|
-
|
|
12
|
-
<step name="check_current">
|
|
13
|
-
Load current phase from `.ctx/ROADMAP.md`.
|
|
14
|
-
|
|
15
|
-
If current phase not verified:
|
|
16
|
-
```
|
|
17
|
-
⚠ Current phase not verified.
|
|
18
|
-
Run `/ctx:verify` first to ensure phase is complete.
|
|
19
|
-
```
|
|
20
|
-
</step>
|
|
21
|
-
|
|
22
|
-
<step name="complete_current">
|
|
23
|
-
1. Mark current phase as "complete" in ROADMAP.md
|
|
24
|
-
2. Update completion timestamp
|
|
25
|
-
3. Archive phase state to memory
|
|
26
|
-
</step>
|
|
27
|
-
|
|
28
|
-
<step name="activate_next">
|
|
29
|
-
1. Find next "pending" phase
|
|
30
|
-
2. Mark it as "in_progress"
|
|
31
|
-
3. Load phase details
|
|
32
|
-
|
|
33
|
-
If no next phase:
|
|
34
|
-
```
|
|
35
|
-
## All Phases Complete!
|
|
36
|
-
|
|
37
|
-
No more phases in the roadmap.
|
|
38
|
-
|
|
39
|
-
**Options:**
|
|
40
|
-
- `/ctx:ship` - Run final audit
|
|
41
|
-
- `/ctx:phase add <name>` - Add more phases
|
|
42
|
-
```
|
|
43
|
-
</step>
|
|
44
|
-
|
|
45
|
-
<step name="output">
|
|
46
|
-
```
|
|
47
|
-
## Phase Transition
|
|
48
|
-
|
|
49
|
-
**Completed:** {previous phase}
|
|
50
|
-
**Now Active:** {next phase}
|
|
51
|
-
|
|
52
|
-
**Phase Goal:** {goal}
|
|
53
|
-
**Tasks:** {count from PLAN.md or "Not planned yet"}
|
|
54
|
-
|
|
55
|
-
**Next:**
|
|
56
|
-
- If not planned: `/ctx:plan {goal}`
|
|
57
|
-
- If planned: `/ctx:do`
|
|
58
|
-
```
|
|
59
|
-
</step>
|
|
60
|
-
|
|
61
|
-
</process>
|
|
62
|
-
|
|
63
|
-
<success_criteria>
|
|
64
|
-
- [ ] Previous phase marked complete
|
|
65
|
-
- [ ] Next phase activated
|
|
66
|
-
- [ ] Clear guidance on next steps
|
|
67
|
-
</success_criteria>
|
package/commands/plan.md
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:plan
|
|
3
|
-
description: Research + Plan a phase automatically with ArguSeek and ChunkHound
|
|
4
|
-
args: "<goal>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Research and plan a phase for the given goal. Automatically uses ArguSeek for web research and ChunkHound for semantic code search.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<process>
|
|
12
|
-
|
|
13
|
-
<step name="validate_init">
|
|
14
|
-
Check `.ctx/` exists. If not:
|
|
15
|
-
```
|
|
16
|
-
CTX not initialized. Run `/ctx:init` first.
|
|
17
|
-
```
|
|
18
|
-
</step>
|
|
19
|
-
|
|
20
|
-
<step name="create_phase">
|
|
21
|
-
Create phase directory:
|
|
22
|
-
```
|
|
23
|
-
.ctx/phases/{phase-id}/
|
|
24
|
-
├── RESEARCH.md
|
|
25
|
-
├── PLAN.md
|
|
26
|
-
├── PROGRESS.md
|
|
27
|
-
└── VERIFY.md
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Generate phase-id from goal (slugified, e.g., "add-user-auth").
|
|
31
|
-
</step>
|
|
32
|
-
|
|
33
|
-
<step name="research_arguseek">
|
|
34
|
-
Generate ArguSeek research queries based on goal and tech stack:
|
|
35
|
-
|
|
36
|
-
1. Best practices for {goal} in {techStack}
|
|
37
|
-
2. Security considerations for {goal}
|
|
38
|
-
3. Common pitfalls when implementing {goal}
|
|
39
|
-
4. Performance optimization for {goal}
|
|
40
|
-
|
|
41
|
-
Execute via MCP:
|
|
42
|
-
```
|
|
43
|
-
Use mcp__arguseek__research_iteratively with each query
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Format results into RESEARCH.md.
|
|
47
|
-
</step>
|
|
48
|
-
|
|
49
|
-
<step name="research_chunkhound">
|
|
50
|
-
If ChunkHound is available, search for relevant existing code:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
chunkhound search "{goal keywords}"
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Find:
|
|
57
|
-
- Existing implementations to reuse
|
|
58
|
-
- Related code patterns
|
|
59
|
-
- Entry points to modify
|
|
60
|
-
- Files that will be affected
|
|
61
|
-
|
|
62
|
-
Add to RESEARCH.md under "## Codebase Analysis".
|
|
63
|
-
</step>
|
|
64
|
-
|
|
65
|
-
<step name="generate_plan">
|
|
66
|
-
Based on research, create PLAN.md:
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
# Phase: {goal}
|
|
70
|
-
|
|
71
|
-
## Research Summary
|
|
72
|
-
{key findings from ArguSeek + ChunkHound}
|
|
73
|
-
|
|
74
|
-
## Tasks
|
|
75
|
-
|
|
76
|
-
### Task 1: {title}
|
|
77
|
-
- **Files:** {files to create/modify}
|
|
78
|
-
- **Context estimate:** {small/medium/large}
|
|
79
|
-
- **Dependencies:** {other tasks}
|
|
80
|
-
|
|
81
|
-
### Task 2: {title}
|
|
82
|
-
...
|
|
83
|
-
|
|
84
|
-
## Verification Criteria
|
|
85
|
-
- [ ] {criterion 1}
|
|
86
|
-
- [ ] {criterion 2}
|
|
87
|
-
|
|
88
|
-
## Context Budget
|
|
89
|
-
- Estimated total: {percentage}%
|
|
90
|
-
- Split point: After Task {n} if needed
|
|
91
|
-
```
|
|
92
|
-
</step>
|
|
93
|
-
|
|
94
|
-
<step name="verify_plan">
|
|
95
|
-
Goal-backward verification:
|
|
96
|
-
- "Will these tasks achieve the goal?"
|
|
97
|
-
- Check for missing steps
|
|
98
|
-
- Validate dependencies
|
|
99
|
-
- Ensure verification criteria are testable
|
|
100
|
-
</step>
|
|
101
|
-
|
|
102
|
-
<step name="present_plan">
|
|
103
|
-
Show the plan to user:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
## Phase Plan: {goal}
|
|
107
|
-
|
|
108
|
-
**Tasks:** {count}
|
|
109
|
-
**Context estimate:** {percentage}%
|
|
110
|
-
**Split recommended:** {yes/no, after task N}
|
|
111
|
-
|
|
112
|
-
### Tasks:
|
|
113
|
-
1. {task 1} ({small/medium/large})
|
|
114
|
-
2. {task 2} ({small/medium/large})
|
|
115
|
-
...
|
|
116
|
-
|
|
117
|
-
### Verification:
|
|
118
|
-
- {criterion 1}
|
|
119
|
-
- {criterion 2}
|
|
120
|
-
|
|
121
|
-
Proceed with `/ctx:do` to execute.
|
|
122
|
-
```
|
|
123
|
-
</step>
|
|
124
|
-
|
|
125
|
-
</process>
|
|
126
|
-
|
|
127
|
-
<output>
|
|
128
|
-
Summary of research findings and generated plan with task breakdown.
|
|
129
|
-
</output>
|
|
130
|
-
|
|
131
|
-
<success_criteria>
|
|
132
|
-
- [ ] Phase directory created
|
|
133
|
-
- [ ] ArguSeek research executed (if available)
|
|
134
|
-
- [ ] ChunkHound search executed (if available)
|
|
135
|
-
- [ ] RESEARCH.md written with findings
|
|
136
|
-
- [ ] PLAN.md written with tasks
|
|
137
|
-
- [ ] Context budget estimated
|
|
138
|
-
- [ ] Verification criteria defined
|
|
139
|
-
</success_criteria>
|
package/commands/recall.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:recall
|
|
3
|
-
description: Query memory for relevant facts
|
|
4
|
-
args: "<query>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Search CTX memory for facts matching the query. Returns relevant information from all memory tiers.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<process>
|
|
12
|
-
|
|
13
|
-
<step name="search_memory">
|
|
14
|
-
Search across all memory tiers:
|
|
15
|
-
|
|
16
|
-
1. **Working memory** - Current session facts
|
|
17
|
-
2. **Episodic memory** - Cross-session facts
|
|
18
|
-
3. **Semantic memory** - Permanent knowledge
|
|
19
|
-
|
|
20
|
-
Match by:
|
|
21
|
-
- Keyword matching
|
|
22
|
-
- Category filtering
|
|
23
|
-
- Relevance scoring
|
|
24
|
-
</step>
|
|
25
|
-
|
|
26
|
-
<step name="rank_results">
|
|
27
|
-
Rank results by:
|
|
28
|
-
1. Recency (newer facts first)
|
|
29
|
-
2. Relevance to query
|
|
30
|
-
3. Importance (manual > auto-extracted)
|
|
31
|
-
</step>
|
|
32
|
-
|
|
33
|
-
<step name="display">
|
|
34
|
-
```
|
|
35
|
-
## Memory Recall: "{query}"
|
|
36
|
-
|
|
37
|
-
### Results ({count} found)
|
|
38
|
-
|
|
39
|
-
**From Episodic Memory:**
|
|
40
|
-
1. [{id}] {fact} ({timestamp})
|
|
41
|
-
2. [{id}] {fact} ({timestamp})
|
|
42
|
-
|
|
43
|
-
**From Semantic Memory:**
|
|
44
|
-
3. [{id}] {fact} (permanent)
|
|
45
|
-
|
|
46
|
-
**From Working Memory:**
|
|
47
|
-
4. [{id}] {fact} (current session)
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
To forget a fact: `/ctx:forget {id}`
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
If no results:
|
|
54
|
-
```
|
|
55
|
-
## Memory Recall: "{query}"
|
|
56
|
-
|
|
57
|
-
No matching facts found.
|
|
58
|
-
|
|
59
|
-
**Tips:**
|
|
60
|
-
- Try broader keywords
|
|
61
|
-
- Check `/ctx:status` for memory stats
|
|
62
|
-
- Use `/ctx:remember` to add facts
|
|
63
|
-
```
|
|
64
|
-
</step>
|
|
65
|
-
|
|
66
|
-
</process>
|
|
67
|
-
|
|
68
|
-
<success_criteria>
|
|
69
|
-
- [ ] All memory tiers searched
|
|
70
|
-
- [ ] Results ranked by relevance
|
|
71
|
-
- [ ] IDs provided for management
|
|
72
|
-
</success_criteria>
|
package/commands/remember.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:remember
|
|
3
|
-
description: Force-remember an important fact
|
|
4
|
-
args: "<fact>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Manually add a fact to CTX memory. Use for important information that should persist across sessions.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<process>
|
|
12
|
-
|
|
13
|
-
<step name="validate">
|
|
14
|
-
Check `.ctx/memory/` exists. Create if not.
|
|
15
|
-
</step>
|
|
16
|
-
|
|
17
|
-
<step name="categorize">
|
|
18
|
-
Determine fact category:
|
|
19
|
-
- **decision**: Architectural or design decisions
|
|
20
|
-
- **pattern**: Code patterns to follow
|
|
21
|
-
- **constraint**: Limitations or requirements
|
|
22
|
-
- **context**: Project-specific context
|
|
23
|
-
- **preference**: User preferences
|
|
24
|
-
</step>
|
|
25
|
-
|
|
26
|
-
<step name="store">
|
|
27
|
-
Add to appropriate memory tier:
|
|
28
|
-
|
|
29
|
-
1. **Working memory** (current session): `.ctx/memory/working/`
|
|
30
|
-
2. **Episodic memory** (cross-session): `.ctx/memory/episodic/`
|
|
31
|
-
3. **Semantic memory** (permanent): `.ctx/memory/semantic/`
|
|
32
|
-
|
|
33
|
-
For manual `/ctx:remember`, store in **episodic** by default.
|
|
34
|
-
|
|
35
|
-
Format:
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"id": "{uuid}",
|
|
39
|
-
"content": "{fact}",
|
|
40
|
-
"category": "{category}",
|
|
41
|
-
"timestamp": "{iso-8601}",
|
|
42
|
-
"source": "manual"
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
</step>
|
|
46
|
-
|
|
47
|
-
<step name="confirm">
|
|
48
|
-
```
|
|
49
|
-
## Fact Remembered
|
|
50
|
-
|
|
51
|
-
**ID:** {short-id}
|
|
52
|
-
**Category:** {category}
|
|
53
|
-
**Content:** {fact}
|
|
54
|
-
**Stored in:** Episodic memory
|
|
55
|
-
|
|
56
|
-
This fact will be available in future sessions.
|
|
57
|
-
To query: `/ctx:recall {keywords}`
|
|
58
|
-
To remove: `/ctx:forget {id}`
|
|
59
|
-
```
|
|
60
|
-
</step>
|
|
61
|
-
|
|
62
|
-
</process>
|
|
63
|
-
|
|
64
|
-
<success_criteria>
|
|
65
|
-
- [ ] Fact stored in memory
|
|
66
|
-
- [ ] ID assigned for retrieval
|
|
67
|
-
- [ ] Category determined
|
|
68
|
-
</success_criteria>
|
package/commands/resume.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:resume
|
|
3
|
-
description: Resume from last checkpoint
|
|
4
|
-
args: "[checkpoint-id]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Resume work from a checkpoint. Restores context efficiently (~2-3k tokens instead of full reload).
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<process>
|
|
12
|
-
|
|
13
|
-
<step name="find_checkpoint">
|
|
14
|
-
If checkpoint-id provided:
|
|
15
|
-
Load `.ctx/checkpoints/{checkpoint-id}/`
|
|
16
|
-
|
|
17
|
-
If no checkpoint-id:
|
|
18
|
-
Load most recent checkpoint from `.ctx/checkpoints/`
|
|
19
|
-
|
|
20
|
-
If no checkpoints exist:
|
|
21
|
-
```
|
|
22
|
-
No checkpoints found.
|
|
23
|
-
|
|
24
|
-
**Options:**
|
|
25
|
-
- Start fresh with `/ctx:init`
|
|
26
|
-
- Check `.ctx/` exists
|
|
27
|
-
```
|
|
28
|
-
</step>
|
|
29
|
-
|
|
30
|
-
<step name="load_state">
|
|
31
|
-
Load checkpoint state:
|
|
32
|
-
|
|
33
|
-
1. **HANDOFF.md** - Read for context
|
|
34
|
-
2. **state.json** - Parse current state
|
|
35
|
-
3. **working-memory.json** - Load recent facts
|
|
36
|
-
4. **file-index.json** - Know relevant files
|
|
37
|
-
</step>
|
|
38
|
-
|
|
39
|
-
<step name="restore_context">
|
|
40
|
-
Build minimal context:
|
|
41
|
-
|
|
42
|
-
1. Load semantic memory (permanent facts)
|
|
43
|
-
2. Load recent episodic memory (relevant to phase)
|
|
44
|
-
3. Load working memory from checkpoint
|
|
45
|
-
4. Identify files to read (from file-index)
|
|
46
|
-
|
|
47
|
-
Target: ~2-3k tokens for full context restoration.
|
|
48
|
-
</step>
|
|
49
|
-
|
|
50
|
-
<step name="verify_sync">
|
|
51
|
-
Check for changes since checkpoint:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
git status
|
|
55
|
-
git log --oneline {checkpoint-commit}..HEAD
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
If changes found:
|
|
59
|
-
```
|
|
60
|
-
⚠ Changes detected since checkpoint:
|
|
61
|
-
- {files changed}
|
|
62
|
-
|
|
63
|
-
These will be incorporated into current state.
|
|
64
|
-
```
|
|
65
|
-
</step>
|
|
66
|
-
|
|
67
|
-
<step name="output">
|
|
68
|
-
```
|
|
69
|
-
## Session Resumed
|
|
70
|
-
|
|
71
|
-
**Checkpoint:** {id}
|
|
72
|
-
**Created:** {timestamp}
|
|
73
|
-
**Phase:** {phase name}
|
|
74
|
-
**Progress:** {percentage}%
|
|
75
|
-
|
|
76
|
-
**Context Restored:** ~{token count} tokens
|
|
77
|
-
|
|
78
|
-
**Where We Left Off:**
|
|
79
|
-
{handoff summary}
|
|
80
|
-
|
|
81
|
-
**Next Task:**
|
|
82
|
-
{next task from plan}
|
|
83
|
-
|
|
84
|
-
**Ready to continue.** Run `/ctx:do` to proceed.
|
|
85
|
-
```
|
|
86
|
-
</step>
|
|
87
|
-
|
|
88
|
-
</process>
|
|
89
|
-
|
|
90
|
-
<context_budget>
|
|
91
|
-
| Component | Tokens |
|
|
92
|
-
|-----------|--------|
|
|
93
|
-
| Semantic facts | ~1,000 |
|
|
94
|
-
| Recent decisions | ~500 |
|
|
95
|
-
| Patterns | ~300 |
|
|
96
|
-
| Task state | ~200 |
|
|
97
|
-
| File identifiers | ~500 |
|
|
98
|
-
| **Total** | **~2,500** |
|
|
99
|
-
|
|
100
|
-
vs. Naive reload: 50,000+ tokens
|
|
101
|
-
</context_budget>
|
|
102
|
-
|
|
103
|
-
<success_criteria>
|
|
104
|
-
- [ ] Checkpoint loaded correctly
|
|
105
|
-
- [ ] Context restored efficiently
|
|
106
|
-
- [ ] Sync with git verified
|
|
107
|
-
- [ ] Clear next steps provided
|
|
108
|
-
</success_criteria>
|
package/commands/ship.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ctx:ship
|
|
3
|
-
description: Final audit before shipping
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Run final audit to ensure project is ready to ship. Checks all phases, todos, and verification status.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<process>
|
|
11
|
-
|
|
12
|
-
<step name="check_phases">
|
|
13
|
-
Load `.ctx/ROADMAP.md` and check all phases:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
## Phase Status
|
|
17
|
-
|
|
18
|
-
| Phase | Status | Verified |
|
|
19
|
-
|-------|--------|----------|
|
|
20
|
-
| {name} | {complete/incomplete} | {yes/no} |
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
If any phase is incomplete:
|
|
24
|
-
```
|
|
25
|
-
⚠ Phase "{name}" is not complete.
|
|
26
|
-
Run `/ctx:do` to finish, then `/ctx:verify`.
|
|
27
|
-
```
|
|
28
|
-
</step>
|
|
29
|
-
|
|
30
|
-
<step name="check_todos">
|
|
31
|
-
Load `.ctx/todos/` and check for pending items:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
## Pending Todos
|
|
35
|
-
|
|
36
|
-
{count} todos remaining:
|
|
37
|
-
- [ ] {todo 1}
|
|
38
|
-
- [ ] {todo 2}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If todos exist:
|
|
42
|
-
```
|
|
43
|
-
⚠ {count} pending todos found.
|
|
44
|
-
Complete them or explicitly defer with rationale.
|
|
45
|
-
```
|
|
46
|
-
</step>
|
|
47
|
-
|
|
48
|
-
<step name="run_final_verification">
|
|
49
|
-
Run `/ctx:verify` on each completed phase:
|
|
50
|
-
|
|
51
|
-
For each phase, check:
|
|
52
|
-
- Three-level verification passes
|
|
53
|
-
- No anti-patterns (or documented exceptions)
|
|
54
|
-
- Goal gaps resolved
|
|
55
|
-
</step>
|
|
56
|
-
|
|
57
|
-
<step name="check_integrations">
|
|
58
|
-
Verify integration points:
|
|
59
|
-
|
|
60
|
-
1. **Dependencies** - All imports resolve
|
|
61
|
-
2. **Tests** - Test suite passes (if exists)
|
|
62
|
-
3. **Build** - Project builds without errors
|
|
63
|
-
4. **Lint** - No linting errors
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Attempt to run common checks
|
|
67
|
-
npm test 2>/dev/null || echo "No npm test"
|
|
68
|
-
npm run build 2>/dev/null || echo "No build script"
|
|
69
|
-
npm run lint 2>/dev/null || echo "No lint script"
|
|
70
|
-
```
|
|
71
|
-
</step>
|
|
72
|
-
|
|
73
|
-
<step name="generate_ship_report">
|
|
74
|
-
Create summary:
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
## Ship Readiness Report
|
|
78
|
-
|
|
79
|
-
### Phases
|
|
80
|
-
| Phase | Complete | Verified |
|
|
81
|
-
|-------|----------|----------|
|
|
82
|
-
{table}
|
|
83
|
-
|
|
84
|
-
### Todos
|
|
85
|
-
- Pending: {count}
|
|
86
|
-
- Completed: {count}
|
|
87
|
-
|
|
88
|
-
### Checks
|
|
89
|
-
- [ ] All phases complete: {yes/no}
|
|
90
|
-
- [ ] All verifications pass: {yes/no}
|
|
91
|
-
- [ ] No pending todos: {yes/no}
|
|
92
|
-
- [ ] Build passes: {yes/no}
|
|
93
|
-
- [ ] Tests pass: {yes/no}
|
|
94
|
-
|
|
95
|
-
### Overall: {READY TO SHIP ✓ / NOT READY ✗}
|
|
96
|
-
|
|
97
|
-
{If not ready:}
|
|
98
|
-
**Blockers:**
|
|
99
|
-
1. {blocker}
|
|
100
|
-
2. {blocker}
|
|
101
|
-
|
|
102
|
-
{If ready:}
|
|
103
|
-
**Recommendation:** Safe to deploy.
|
|
104
|
-
```
|
|
105
|
-
</step>
|
|
106
|
-
|
|
107
|
-
</process>
|
|
108
|
-
|
|
109
|
-
<output>
|
|
110
|
-
Ship readiness report with clear pass/fail and any blockers.
|
|
111
|
-
</output>
|
|
112
|
-
|
|
113
|
-
<success_criteria>
|
|
114
|
-
- [ ] All phases checked
|
|
115
|
-
- [ ] All todos reviewed
|
|
116
|
-
- [ ] Final verification run
|
|
117
|
-
- [ ] Build/test status checked
|
|
118
|
-
- [ ] Clear ship/no-ship recommendation
|
|
119
|
-
</success_criteria>
|