@ancleto/spec 0.6.5 → 0.6.7

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 (40) hide show
  1. package/README.md +26 -1
  2. package/agents/context-resolver.md +1 -1
  3. package/agents/documenter.md +3 -1
  4. package/agents/memory-keeper.md +1 -1
  5. package/agents/spec-writer.md +2 -1
  6. package/agents/technical-discovery.md +1 -1
  7. package/agents/tester.md +1 -1
  8. package/commands/cleto-apply.md +2 -154
  9. package/commands/cleto-archive.md +2 -164
  10. package/commands/cleto-bulk-archive.md +2 -248
  11. package/commands/cleto-continue.md +2 -126
  12. package/commands/cleto-explore.md +2 -174
  13. package/commands/cleto-ff.md +2 -120
  14. package/commands/cleto-new.md +2 -108
  15. package/commands/cleto-onboard.md +2 -550
  16. package/commands/cleto-propose.md +2 -130
  17. package/commands/cleto-recall.md +4 -52
  18. package/commands/cleto-sync.md +2 -137
  19. package/commands/cleto-verify.md +2 -169
  20. package/package.json +1 -1
  21. package/skills/ancleto-apply/SKILL.md +15 -38
  22. package/skills/ancleto-archive/SKILL.md +22 -24
  23. package/skills/ancleto-bulk-archive/SKILL.md +45 -55
  24. package/skills/ancleto-commit/SKILL.md +10 -29
  25. package/skills/ancleto-continue/SKILL.md +18 -24
  26. package/skills/ancleto-explore/SKILL.md +40 -67
  27. package/skills/ancleto-ff/SKILL.md +20 -28
  28. package/skills/ancleto-new/SKILL.md +20 -39
  29. package/skills/ancleto-onboard/SKILL.md +35 -38
  30. package/skills/ancleto-pr/SKILL.md +12 -26
  31. package/skills/ancleto-propose/SKILL.md +22 -69
  32. package/skills/ancleto-recall/SKILL.md +21 -25
  33. package/skills/ancleto-sync-specs/SKILL.md +27 -62
  34. package/skills/ancleto-upgrade/SKILL.md +132 -223
  35. package/skills/ancleto-upgrade/references/templates.md +138 -171
  36. package/skills/ancleto-verify/SKILL.md +36 -66
  37. package/skills/ancleto-workflow/SKILL.md +17 -17
  38. package/src/cli/index.js +76 -49
  39. package/src/core/tier-models.js +48 -0
  40. package/templates/AGENTS.md +3 -0
@@ -2,254 +2,8 @@
2
2
  description: Archive multiple completed changes at once
3
3
  ---
4
4
 
5
- Archive multiple completed changes in a single operation.
6
-
7
- This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
5
+ Invoke the `ancleto-bulk-archive` skill with the Skill tool and follow it exactly; do not improvise steps.
8
6
 
9
7
  **Input**: None required (prompts for selection)
10
8
 
11
- **Steps**
12
-
13
- 1. **Get active changes**
14
-
15
- Run `aspec list --json` to get all active changes.
16
-
17
- If no active changes exist, inform user and stop.
18
-
19
- 2. **Prompt for change selection**
20
-
21
- Use **AskUserQuestion tool** with multi-select to let user choose changes:
22
-
23
- - Show each change with its schema
24
- - Include an option for "All changes"
25
- - Allow any number of selections (1+ works, 2+ is the typical use case)
26
-
27
- **IMPORTANT**: Do NOT auto-select. Always let the user choose.
28
-
29
- 3. **Batch validation - gather status for all selected changes**
30
-
31
- For each selected change, collect:
32
-
33
- a. **Artifact status** - Run `aspec status --change "<name>" --json`
34
-
35
- - Parse `schemaName` and `artifacts` list
36
- - Note which artifacts are `done` vs other states
37
-
38
- b. **Task completion** - Read `aspec/changes/<name>/tasks.md`
39
-
40
- - Count `- [ ]` (incomplete) vs `- [x]` (complete)
41
- - If no tasks file exists, note as "No tasks"
42
-
43
- c. **Delta specs** - Check `aspec/changes/<name>/specs/` directory
44
-
45
- - List which capability specs exist
46
- - For each, extract requirement names (lines matching `### Requirement: <name>`)
47
-
48
- 4. **Detect spec conflicts**
49
-
50
- Build a map of `capability -> [changes that touch it]`:
51
-
52
- ```
53
- auth -> [change-a, change-b] <- CONFLICT (2+ changes)
54
- api -> [change-c] <- OK (only 1 change)
55
- ```
56
-
57
- A conflict exists when 2+ selected changes have delta specs for the same capability.
58
-
59
- 5. **Resolve conflicts agentically**
60
-
61
- **For each conflict**, investigate the codebase:
62
-
63
- a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
64
-
65
- b. **Search the codebase** for implementation evidence:
66
-
67
- - Look for code implementing requirements from each delta spec
68
- - Check for related files, functions, or tests
69
-
70
- c. **Determine resolution**:
71
-
72
- - If only one change is actually implemented -> sync that one's specs
73
- - If both implemented -> apply in chronological order (older first, newer overwrites)
74
- - If neither implemented -> skip spec sync, warn user
75
-
76
- d. **Record resolution** for each conflict:
77
-
78
- - Which change's specs to apply
79
- - In what order (if both)
80
- - Rationale (what was found in codebase)
81
-
82
- 6. **Show consolidated status table**
83
-
84
- Display a table summarizing all changes:
85
-
86
- ```
87
- | Change | Artifacts | Tasks | Specs | Conflicts | Status |
88
- |---------------------|-----------|-------|---------|-----------|--------|
89
- | schema-management | Done | 5/5 | 2 delta | None | Ready |
90
- | project-config | Done | 3/3 | 1 delta | None | Ready |
91
- | add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
92
- | add-verify-skill | 1 left | 2/5 | None | None | Warn |
93
- ```
94
-
95
- For conflicts, show the resolution:
96
-
97
- ```
98
- * Conflict resolution:
99
- - auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
100
- ```
101
-
102
- For incomplete changes, show warnings:
103
-
104
- ```
105
- Warnings:
106
- - add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
107
- ```
108
-
109
- 7. **Confirm batch operation**
110
-
111
- Use **AskUserQuestion tool** with a single confirmation:
112
-
113
- - "Archive N changes?" with options based on status
114
- - Options might include:
115
- - "Archive all N changes"
116
- - "Archive only N ready changes (skip incomplete)"
117
- - "Cancel"
118
-
119
- If there are incomplete changes, make clear they'll be archived with warnings.
120
-
121
- 8. **Execute archive for each confirmed change**
122
-
123
- Process changes in the determined order (respecting conflict resolution):
124
-
125
- a. **Sync specs** if delta specs exist:
126
-
127
- - Use the ancleto-sync-specs approach (agent-driven intelligent merge)
128
- - For conflicts, apply in resolved order
129
- - Track if sync was done
130
-
131
- b. **Perform the archive**:
132
-
133
- ```bash
134
- mkdir -p aspec/changes/archive
135
- mv aspec/changes/<name> aspec/changes/archive/YYYY-MM-DD-<name>
136
- ```
137
-
138
- c. **Track outcome** for each change:
139
-
140
- - Success: archived successfully
141
- - Failed: error during archive (record error)
142
- - Skipped: user chose not to archive (if applicable)
143
-
144
- 9. **Display summary**
145
-
146
- Show final results:
147
-
148
- ```
149
- ## Bulk Archive Complete
150
-
151
- Archived 3 changes:
152
- - schema-management-cli -> archive/2026-01-19-schema-management-cli/
153
- - project-config -> archive/2026-01-19-project-config/
154
- - add-oauth -> archive/2026-01-19-add-oauth/
155
-
156
- Skipped 1 change:
157
- - add-verify-skill (user chose not to archive incomplete)
158
-
159
- Spec sync summary:
160
- - 4 delta specs synced to main specs
161
- - 1 conflict resolved (auth: applied both in chronological order)
162
- ```
163
-
164
- If any failures:
165
-
166
- ```
167
- Failed 1 change:
168
- - some-change: Archive directory already exists
169
- ```
170
-
171
- **Conflict Resolution Examples**
172
-
173
- Example 1: Only one implemented
174
-
175
- ```
176
- Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
177
-
178
- Checking add-oauth:
179
- - Delta adds "OAuth Provider Integration" requirement
180
- - Searching codebase... found src/auth/oauth.ts implementing OAuth flow
181
-
182
- Checking add-jwt:
183
- - Delta adds "JWT Token Handling" requirement
184
- - Searching codebase... no JWT implementation found
185
-
186
- Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
187
- ```
188
-
189
- Example 2: Both implemented
190
-
191
- ```
192
- Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
193
-
194
- Checking add-rest-api (created 2026-01-10):
195
- - Delta adds "REST Endpoints" requirement
196
- - Searching codebase... found src/api/rest.ts
197
-
198
- Checking add-graphql (created 2026-01-15):
199
- - Delta adds "GraphQL Schema" requirement
200
- - Searching codebase... found src/api/graphql.ts
201
-
202
- Resolution: Both implemented. Will apply add-rest-api specs first,
203
- then add-graphql specs (chronological order, newer takes precedence).
204
- ```
205
-
206
- **Output On Success**
207
-
208
- ```
209
- ## Bulk Archive Complete
210
-
211
- Archived N changes:
212
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
213
- - <change-2> -> archive/YYYY-MM-DD-<change-2>/
214
-
215
- Spec sync summary:
216
- - N delta specs synced to main specs
217
- - No conflicts (or: M conflicts resolved)
218
- ```
219
-
220
- **Output On Partial Success**
221
-
222
- ```
223
- ## Bulk Archive Complete (partial)
224
-
225
- Archived N changes:
226
- - <change-1> -> archive/YYYY-MM-DD-<change-1>/
227
-
228
- Skipped M changes:
229
- - <change-2> (user chose not to archive incomplete)
230
-
231
- Failed K changes:
232
- - <change-3>: Archive directory already exists
233
- ```
234
-
235
- **Output When No Changes**
236
-
237
- ```
238
- ## No Changes to Archive
239
-
240
- No active changes found. Create a new change to get started.
241
- ```
242
-
243
- **Guardrails**
244
-
245
- - Allow any number of changes (1+ is fine, 2+ is the typical use case)
246
- - Always prompt for selection, never auto-select
247
- - Detect spec conflicts early and resolve by checking codebase
248
- - When both changes are implemented, apply specs in chronological order
249
- - Skip spec sync only when implementation is missing (warn user)
250
- - Show clear per-change status before confirming
251
- - Use single confirmation for entire batch
252
- - Track and report all outcomes (success/skip/fail)
253
- - Preserve .aspec.yaml when moving to archive
254
- - Archive directory target uses current date: YYYY-MM-DD-<name>
255
- - If archive target exists, fail that change but continue with others
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
@@ -2,132 +2,8 @@
2
2
  description: Continue working on a change - create the next artifact (Experimental)
3
3
  ---
4
4
 
5
- Continue working on a change by creating the next artifact.
5
+ Invoke the `ancleto-continue` skill with the Skill tool and follow it exactly; do not improvise steps.
6
6
 
7
7
  **Input**: Optionally specify a change name after `/cleto-continue` (e.g., `/cleto-continue add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
8
8
 
9
- **Steps**
10
-
11
- 1. **If no change name provided, prompt for selection**
12
-
13
- Run `aspec list --json` to get available changes sorted by most recently modified. Then use the **AskUserQuestion tool** to let the user select which change to work on.
14
-
15
- Present the top 3-4 most recently modified changes as options, showing:
16
-
17
- - Change name
18
- - Schema (from `schema` field if present, otherwise "spec-driven")
19
- - Status (e.g., "0/5 tasks", "complete", "no tasks")
20
- - How recently it was modified (from `lastModified` field)
21
-
22
- Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
23
-
24
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
25
-
26
- 2. **Check current status**
27
-
28
- ```bash
29
- aspec status --change "<name>" --json
30
- ```
31
-
32
- Parse the JSON to understand current state. The response includes:
33
-
34
- - `schemaName`: The workflow schema being used (e.g., "spec-driven")
35
- - `artifacts`: Array of artifacts with their status ("done", "ready", "blocked")
36
- - `isComplete`: Boolean indicating if all artifacts are complete
37
-
38
- 3. **Load scaffold context files** (if not already loaded this session)
39
-
40
- If `context.md` for this change was already read earlier in the current session, skip this step — it is already in context.
41
-
42
- Otherwise, read it as background context — it is NOT an artifact and must NOT be included in output files, but its contents inform what you write:
43
-
44
- - `aspec/changes/<name>/context.md` — Work Item context (title, description, acceptance criteria)
45
-
46
- If either file is missing, skip silently.
47
-
48
- 4. **Act based on status**:
49
-
50
- ***
51
-
52
- **If all artifacts are complete (`isComplete: true`)**:
53
-
54
- - Congratulate the user
55
- - Show final status including the schema used
56
- - Suggest: "All artifacts created! You can now implement this change with `/cleto-apply` or archive it with `/cleto-archive`."
57
- - STOP
58
-
59
- ***
60
-
61
- **If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
62
-
63
- - Pick the FIRST artifact with `status: "ready"` from the status output
64
- - Get its instructions:
65
- ```bash
66
- aspec instructions <artifact-id> --change "<name>" --json
67
- ```
68
- - Parse the JSON. The key fields are:
69
- - `context`: Project background (constraints for you - do NOT include in output)
70
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
71
- - `template`: The structure to use for your output file
72
- - `instruction`: Schema-specific guidance
73
- - `outputPath`: Where to write the artifact
74
- - `dependencies`: Completed artifacts to read for context
75
- - **Create the artifact file**:
76
- - Read any completed dependency files for context
77
- - If creating the **first artifact** (proposal):
78
- - If `context.md` was loaded with WI data (step 3): use the WI title/description as the problem statement, acceptance criteria as the requirements basis, and include a `## Related Work Item` section: `**#{id}** — {System.Title} ({WorkItemType}) · Project: {System.TeamProject}`
79
- - Use `template` as the structure - fill in its sections
80
- - Apply `context` and `rules` as constraints when writing - but do NOT copy them into the file
81
- - Write to the output path specified in instructions
82
- - Show what was created and what's now unlocked
83
- - STOP after creating ONE artifact
84
-
85
- ***
86
-
87
- **If no artifacts are ready (all blocked)**:
88
-
89
- - This shouldn't happen with a valid schema
90
- - Show status and suggest checking for issues
91
-
92
- 5. **After creating an artifact, show progress**
93
- ```bash
94
- aspec status --change "<name>"
95
- ```
96
-
97
- **Output**
98
-
99
- After each invocation, show:
100
-
101
- - Which artifact was created
102
- - Schema workflow being used
103
- - Current progress (N/M complete)
104
- - What artifacts are now unlocked
105
- - Prompt: "Run `/cleto-continue` to create the next artifact"
106
-
107
- **Artifact Creation Guidelines**
108
-
109
- The artifact types and their purpose depend on the schema. Use the `instruction` field from the instructions output to understand what to create.
110
-
111
- Common artifact patterns:
112
-
113
- **spec-driven schema** (proposal → specs → design → tasks):
114
-
115
- - **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
116
- - The Capabilities section is critical - each capability listed will need a spec file.
117
- - **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
118
- - **design.md**: Document technical decisions, architecture, and implementation approach.
119
- - **tasks.md**: Break down implementation into checkboxed tasks.
120
-
121
- For other schemas, follow the `instruction` field from the CLI output.
122
-
123
- **Guardrails**
124
-
125
- - Create ONE artifact per invocation
126
- - Always read dependency artifacts before creating a new one
127
- - Never skip artifacts or create out of order
128
- - If context is unclear, ask the user before creating
129
- - Verify the artifact file exists after writing before marking progress
130
- - Use the schema's artifact sequence, don't assume specific artifact names
131
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
132
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
133
- - These guide what you write, but should never appear in the output
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
@@ -2,180 +2,8 @@
2
2
  description: Enter explore mode - think through ideas, investigate problems, clarify requirements
3
3
  ---
4
4
 
5
- Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
6
-
7
- **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create aspec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
8
-
9
- **This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
5
+ Invoke the `ancleto-explore` skill with the Skill tool and follow it exactly; do not improvise steps.
10
6
 
11
7
  **Input**: The argument after `/cleto-explore` is whatever the user wants to think about. Could be:
12
8
 
13
- - A vague idea: "real-time collaboration"
14
- - A specific problem: "the auth system is getting unwieldy"
15
- - A change name: "add-dark-mode" (to explore in context of that change)
16
- - A comparison: "postgres vs sqlite for this"
17
- - Nothing (just enter explore mode)
18
-
19
- ---
20
-
21
- ## The Stance
22
-
23
- - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
24
- - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
25
- - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
26
- - **Adaptive** - Follow interesting threads, pivot when new information emerges
27
- - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
28
- - **Grounded** - Explore the actual codebase when relevant, don't just theorize
29
-
30
- ---
31
-
32
- ## What You Might Do
33
-
34
- Depending on what the user brings, you might:
35
-
36
- **Explore the problem space**
37
-
38
- - Ask clarifying questions that emerge from what they said
39
- - Challenge assumptions
40
- - Reframe the problem
41
- - Find analogies
42
-
43
- **Investigate the codebase**
44
-
45
- - Map existing architecture relevant to the discussion
46
- - Find integration points
47
- - Identify patterns already in use
48
- - Surface hidden complexity
49
-
50
- **Compare options**
51
-
52
- - Brainstorm multiple approaches
53
- - Build comparison tables
54
- - Sketch tradeoffs
55
- - Recommend a path (if asked)
56
-
57
- **Visualize**
58
-
59
- ```
60
- ┌─────────────────────────────────────────┐
61
- │ Use ASCII diagrams liberally │
62
- ├─────────────────────────────────────────┤
63
- │ │
64
- │ ┌────────┐ ┌────────┐ │
65
- │ │ State │────────▶│ State │ │
66
- │ │ A │ │ B │ │
67
- │ └────────┘ └────────┘ │
68
- │ │
69
- │ System diagrams, state machines, │
70
- │ data flows, architecture sketches, │
71
- │ dependency graphs, comparison tables │
72
- │ │
73
- └─────────────────────────────────────────┘
74
- ```
75
-
76
- **Surface risks and unknowns**
77
-
78
- - Identify what could go wrong
79
- - Find gaps in understanding
80
- - Suggest spikes or investigations
81
-
82
- ---
83
-
84
- ## aspec Awareness
85
-
86
- You have full context of the aspec system. Use it naturally, don't force it.
87
-
88
- ### Check for context
89
-
90
- At the start, quickly check what exists:
91
-
92
- ```bash
93
- aspec list --json
94
- ```
95
-
96
- This tells you:
97
-
98
- - If there are active changes
99
- - Their names, schemas, and status
100
- - What the user might be working on
101
-
102
- If the user mentioned a specific change name, read its artifacts for context.
103
-
104
- ### When no change exists
105
-
106
- Think freely. When insights crystallize, you might offer:
107
-
108
- - "This feels solid enough to start a change. Want me to create a proposal?"
109
- - Or keep exploring - no pressure to formalize
110
-
111
- ### When a change exists
112
-
113
- If the user mentions a change or you detect one is relevant:
114
-
115
- 1. **Read existing artifacts for context**
116
-
117
- - `aspec/changes/<name>/proposal.md`
118
- - `aspec/changes/<name>/design.md`
119
- - `aspec/changes/<name>/tasks.md`
120
- - etc.
121
-
122
- 2. **Reference them naturally in conversation**
123
-
124
- - "Your design mentions using Redis, but we just realized SQLite fits better..."
125
- - "The proposal scopes this to premium users, but we're now thinking everyone..."
126
-
127
- 3. **Offer to capture when decisions are made**
128
-
129
- | Insight Type | Where to Capture |
130
- | -------------------------- | ---------------------------- |
131
- | New requirement discovered | `specs/<capability>/spec.md` |
132
- | Requirement changed | `specs/<capability>/spec.md` |
133
- | Design decision made | `design.md` |
134
- | Scope changed | `proposal.md` |
135
- | New work identified | `tasks.md` |
136
- | Assumption invalidated | Relevant artifact |
137
-
138
- Example offers:
139
-
140
- - "That's a design decision. Capture it in design.md?"
141
- - "This is a new requirement. Add it to specs?"
142
- - "This changes scope. Update the proposal?"
143
-
144
- 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
145
-
146
- ---
147
-
148
- ## What You Don't Have To Do
149
-
150
- - Follow a script
151
- - Ask the same questions every time
152
- - Produce a specific artifact
153
- - Reach a conclusion
154
- - Stay on topic if a tangent is valuable
155
- - Be brief (this is thinking time)
156
-
157
- ---
158
-
159
- ## Ending Discovery
160
-
161
- There's no required ending. Discovery might:
162
-
163
- - **Flow into a proposal**: "Ready to start? I can create a change proposal."
164
- - **Result in artifact updates**: "Updated design.md with these decisions"
165
- - **Just provide clarity**: User has what they need, moves on
166
- - **Continue later**: "We can pick this up anytime"
167
-
168
- When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
169
-
170
- ---
171
-
172
- ## Guardrails
173
-
174
- - **Don't implement** - Never write code or implement features. Creating aspec artifacts is fine, writing application code is not.
175
- - **Don't fake understanding** - If something is unclear, dig deeper
176
- - **Don't rush** - Discovery is thinking time, not task time
177
- - **Don't force structure** - Let patterns emerge naturally
178
- - **Don't auto-capture** - Offer to save insights, don't just do it
179
- - **Do visualize** - A good diagram is worth many paragraphs
180
- - **Do explore the codebase** - Ground discussions in reality
181
- - **Do question assumptions** - Including the user's and your own
9
+ Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.