@ancleto/spec 0.6.5 → 0.6.6
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/agents/documenter.md +2 -0
- package/agents/spec-writer.md +2 -1
- package/commands/cleto-apply.md +2 -154
- package/commands/cleto-archive.md +2 -164
- package/commands/cleto-bulk-archive.md +2 -248
- package/commands/cleto-continue.md +2 -126
- package/commands/cleto-explore.md +2 -174
- package/commands/cleto-ff.md +2 -120
- package/commands/cleto-new.md +2 -108
- package/commands/cleto-onboard.md +2 -550
- package/commands/cleto-propose.md +2 -130
- package/commands/cleto-recall.md +4 -52
- package/commands/cleto-sync.md +2 -137
- package/commands/cleto-verify.md +2 -169
- package/package.json +1 -1
- package/skills/ancleto-apply/SKILL.md +15 -38
- package/skills/ancleto-archive/SKILL.md +22 -24
- package/skills/ancleto-bulk-archive/SKILL.md +45 -55
- package/skills/ancleto-commit/SKILL.md +10 -29
- package/skills/ancleto-continue/SKILL.md +18 -24
- package/skills/ancleto-explore/SKILL.md +40 -67
- package/skills/ancleto-ff/SKILL.md +20 -28
- package/skills/ancleto-new/SKILL.md +20 -39
- package/skills/ancleto-onboard/SKILL.md +35 -38
- package/skills/ancleto-pr/SKILL.md +12 -26
- package/skills/ancleto-propose/SKILL.md +22 -69
- package/skills/ancleto-recall/SKILL.md +21 -25
- package/skills/ancleto-sync-specs/SKILL.md +27 -62
- package/skills/ancleto-upgrade/SKILL.md +132 -223
- package/skills/ancleto-upgrade/references/templates.md +138 -171
- package/skills/ancleto-verify/SKILL.md +36 -66
- package/skills/ancleto-workflow/SKILL.md +17 -17
- package/src/cli/index.js +36 -31
- package/templates/AGENTS.md +3 -0
package/agents/documenter.md
CHANGED
|
@@ -116,6 +116,8 @@ Do not treat archive as a blind file move.
|
|
|
116
116
|
|
|
117
117
|
When a completed change modifies behavior through aspec deltas, `aspec/specs/` must reflect that completed behavior before the change is archived.
|
|
118
118
|
|
|
119
|
+
**Language**: spec artifacts are written in English. The requirement/scenario keywords (`Requirement`, `Scenario`, `SHALL`, `WHEN`/`THEN`, `ADDED/MODIFIED/REMOVED/RENAMED Requirements`) are literal and MUST NOT be translated. Paths, file names, and identifiers stay unchanged.
|
|
120
|
+
|
|
119
121
|
Handle these delta sections carefully:
|
|
120
122
|
|
|
121
123
|
- `ADDED Requirements`
|
package/agents/spec-writer.md
CHANGED
|
@@ -19,7 +19,8 @@ Read `AGENTS.md` at the repo root for project-specific conventions, tech stack,
|
|
|
19
19
|
|
|
20
20
|
## Language Requirement
|
|
21
21
|
|
|
22
|
-
- All artifact content MUST be written in
|
|
22
|
+
- All artifact content MUST be written in English
|
|
23
|
+
- Keywords are literal and MUST NOT be translated: `Requirement`, `Scenario`, `SHALL`, `WHEN`/`THEN`, `ADDED Requirements`, `MODIFIED Requirements`, `REMOVED Requirements`, `RENAMED Requirements`
|
|
23
24
|
- File names and directory names MUST remain in English, following aspec conventions
|
|
24
25
|
|
|
25
26
|
## Primary Responsibility
|
package/commands/cleto-apply.md
CHANGED
|
@@ -2,160 +2,8 @@
|
|
|
2
2
|
description: Implement tasks from an aspec change (Experimental)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Invoke the `ancleto-apply` skill with the Skill tool and follow it exactly; do not improvise steps.
|
|
6
6
|
|
|
7
7
|
**Input**: Optionally specify a change name (e.g., `/cleto-apply 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
|
-
|
|
10
|
-
|
|
11
|
-
1. **Select the change**
|
|
12
|
-
|
|
13
|
-
If a name is provided, use it. Otherwise:
|
|
14
|
-
|
|
15
|
-
- Infer from conversation context if the user mentioned a change
|
|
16
|
-
- Auto-select if only one active change exists
|
|
17
|
-
- If ambiguous, run `aspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
|
|
18
|
-
|
|
19
|
-
Always announce: "Using change: <name>" and how to override (e.g., `/cleto-apply <other>`).
|
|
20
|
-
|
|
21
|
-
2. **Check status to understand the schema**
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
aspec status --change "<name>" --json
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Parse the JSON to understand:
|
|
28
|
-
|
|
29
|
-
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
30
|
-
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
31
|
-
|
|
32
|
-
3. **Get apply instructions**
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
aspec instructions apply --change "<name>" --json
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
This returns:
|
|
39
|
-
|
|
40
|
-
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema)
|
|
41
|
-
- Progress (total, complete, remaining)
|
|
42
|
-
- Task list with status
|
|
43
|
-
- Dynamic instruction based on current state
|
|
44
|
-
|
|
45
|
-
**Handle states:**
|
|
46
|
-
|
|
47
|
-
- If `state: "blocked"` (missing artifacts): show message, suggest using `/cleto-continue`
|
|
48
|
-
- If `state: "all_done"`: congratulate, suggest archive
|
|
49
|
-
- Otherwise: proceed to implementation
|
|
50
|
-
|
|
51
|
-
4. **Read context files**
|
|
52
|
-
|
|
53
|
-
Read every file path listed under `contextFiles` from the apply instructions output.
|
|
54
|
-
The files depend on the schema being used:
|
|
55
|
-
|
|
56
|
-
- **spec-driven**: proposal, specs, design, tasks
|
|
57
|
-
- Other schemas: follow the contextFiles from CLI output
|
|
58
|
-
|
|
59
|
-
5. **Show current progress**
|
|
60
|
-
|
|
61
|
-
Display:
|
|
62
|
-
|
|
63
|
-
- Schema being used
|
|
64
|
-
- Progress: "N/M tasks complete"
|
|
65
|
-
- Remaining tasks overview
|
|
66
|
-
- Dynamic instruction from CLI
|
|
67
|
-
|
|
68
|
-
6. **Implement tasks (loop until done or blocked)**
|
|
69
|
-
|
|
70
|
-
For each pending task:
|
|
71
|
-
|
|
72
|
-
- Show which task is being worked on
|
|
73
|
-
- Make the code changes required
|
|
74
|
-
- Keep changes minimal and focused
|
|
75
|
-
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
76
|
-
- Continue to next task
|
|
77
|
-
|
|
78
|
-
**Pause if:**
|
|
79
|
-
|
|
80
|
-
- Task is unclear → ask for clarification
|
|
81
|
-
- Implementation reveals a design issue → suggest updating artifacts
|
|
82
|
-
- Error or blocker encountered → report and wait for guidance
|
|
83
|
-
- User interrupts
|
|
84
|
-
|
|
85
|
-
7. **On completion or pause, show status**
|
|
86
|
-
|
|
87
|
-
Display:
|
|
88
|
-
|
|
89
|
-
- Tasks completed this session
|
|
90
|
-
- Overall progress: "N/M tasks complete"
|
|
91
|
-
- If all done: suggest archive
|
|
92
|
-
- If paused: explain why and wait for guidance
|
|
93
|
-
|
|
94
|
-
**Output During Implementation**
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
## Implementing: <change-name> (schema: <schema-name>)
|
|
98
|
-
|
|
99
|
-
Working on task 3/7: <task description>
|
|
100
|
-
[...implementation happening...]
|
|
101
|
-
✓ Task complete
|
|
102
|
-
|
|
103
|
-
Working on task 4/7: <task description>
|
|
104
|
-
[...implementation happening...]
|
|
105
|
-
✓ Task complete
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Output On Completion**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
## Implementation Complete
|
|
112
|
-
|
|
113
|
-
**Change:** <change-name>
|
|
114
|
-
**Schema:** <schema-name>
|
|
115
|
-
**Progress:** 7/7 tasks complete ✓
|
|
116
|
-
|
|
117
|
-
### Completed This Session
|
|
118
|
-
- [x] Task 1
|
|
119
|
-
- [x] Task 2
|
|
120
|
-
...
|
|
121
|
-
|
|
122
|
-
All tasks complete! You can archive this change with `/cleto-archive`.
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Output On Pause (Issue Encountered)**
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
## Implementation Paused
|
|
129
|
-
|
|
130
|
-
**Change:** <change-name>
|
|
131
|
-
**Schema:** <schema-name>
|
|
132
|
-
**Progress:** 4/7 tasks complete
|
|
133
|
-
|
|
134
|
-
### Issue Encountered
|
|
135
|
-
<description of the issue>
|
|
136
|
-
|
|
137
|
-
**Options:**
|
|
138
|
-
1. <option 1>
|
|
139
|
-
2. <option 2>
|
|
140
|
-
3. Other approach
|
|
141
|
-
|
|
142
|
-
What would you like to do?
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Guardrails**
|
|
146
|
-
|
|
147
|
-
- Keep going through tasks until done or blocked
|
|
148
|
-
- Always read context files before starting (from the apply instructions output)
|
|
149
|
-
- If task is ambiguous, pause and ask before implementing
|
|
150
|
-
- If implementation reveals issues, pause and suggest artifact updates
|
|
151
|
-
- Keep code changes minimal and scoped to each task
|
|
152
|
-
- Update task checkbox immediately after completing each task
|
|
153
|
-
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
154
|
-
- Use contextFiles from CLI output, don't assume specific file names
|
|
155
|
-
|
|
156
|
-
**Fluid Workflow Integration**
|
|
157
|
-
|
|
158
|
-
This skill supports the "actions on a change" model:
|
|
159
|
-
|
|
160
|
-
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
161
|
-
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|
|
9
|
+
Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
|
|
@@ -2,170 +2,8 @@
|
|
|
2
2
|
description: Archive a completed change in the experimental workflow
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Invoke the `ancleto-archive` 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-archive` (e.g., `/cleto-archive 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
|
-
|
|
10
|
-
|
|
11
|
-
1. **If no change name provided, prompt for selection**
|
|
12
|
-
|
|
13
|
-
Run `aspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
14
|
-
|
|
15
|
-
Show only active changes (not already archived).
|
|
16
|
-
Include the schema used for each change if available.
|
|
17
|
-
|
|
18
|
-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
19
|
-
|
|
20
|
-
2. **Check artifact completion status**
|
|
21
|
-
|
|
22
|
-
Run `aspec status --change "<name>" --json` to check artifact completion.
|
|
23
|
-
|
|
24
|
-
Parse the JSON to understand:
|
|
25
|
-
|
|
26
|
-
- `schemaName`: The workflow being used
|
|
27
|
-
- `artifacts`: List of artifacts with their status (`done` or other)
|
|
28
|
-
|
|
29
|
-
**If any artifacts are not `done`:**
|
|
30
|
-
|
|
31
|
-
- Display warning listing incomplete artifacts
|
|
32
|
-
- Prompt user for confirmation to continue
|
|
33
|
-
- Proceed if user confirms
|
|
34
|
-
|
|
35
|
-
3. **Check task completion status**
|
|
36
|
-
|
|
37
|
-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
38
|
-
|
|
39
|
-
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
40
|
-
|
|
41
|
-
**If incomplete tasks found:**
|
|
42
|
-
|
|
43
|
-
- Display warning showing count of incomplete tasks
|
|
44
|
-
- Prompt user for confirmation to continue
|
|
45
|
-
- Proceed if user confirms
|
|
46
|
-
|
|
47
|
-
**If no tasks file exists:** Proceed without task-related warning.
|
|
48
|
-
|
|
49
|
-
4. **Assess delta spec sync state**
|
|
50
|
-
|
|
51
|
-
Check for delta specs at `aspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
|
|
52
|
-
|
|
53
|
-
**If delta specs exist:**
|
|
54
|
-
|
|
55
|
-
- Compare each delta spec with its corresponding main spec at `aspec/specs/<capability>/spec.md`
|
|
56
|
-
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
57
|
-
- Show a combined summary before prompting
|
|
58
|
-
|
|
59
|
-
**Prompt options:**
|
|
60
|
-
|
|
61
|
-
- If changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
62
|
-
- If already synced: "Archive now", "Sync anyway", "Cancel"
|
|
63
|
-
|
|
64
|
-
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke ancleto-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
|
|
65
|
-
|
|
66
|
-
5. **Perform the archive**
|
|
67
|
-
|
|
68
|
-
Create the archive directory if it doesn't exist:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
mkdir -p aspec/changes/archive
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Generate target name using current date: `YYYY-MM-DD-<change-name>`
|
|
75
|
-
|
|
76
|
-
**Check if target already exists:**
|
|
77
|
-
|
|
78
|
-
- If yes: Fail with error, suggest renaming existing archive or using different date
|
|
79
|
-
- If no: Clean up scaffold files and move the change directory to archive
|
|
80
|
-
|
|
81
|
-
**Before moving**, delete scaffold-only files if present — they must not be preserved in the archive:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
rm -f aspec/changes/<name>/context.md
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Then move:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
mv aspec/changes/<name> aspec/changes/archive/YYYY-MM-DD-<name>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
6. **Display summary**
|
|
94
|
-
|
|
95
|
-
Show archive completion summary including:
|
|
96
|
-
|
|
97
|
-
- Change name
|
|
98
|
-
- Schema that was used
|
|
99
|
-
- Archive location
|
|
100
|
-
- Spec sync status (synced / sync skipped / no delta specs)
|
|
101
|
-
- Note about any warnings (incomplete artifacts/tasks)
|
|
102
|
-
|
|
103
|
-
**Output On Success**
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
## Archive Complete
|
|
107
|
-
|
|
108
|
-
**Change:** <change-name>
|
|
109
|
-
**Schema:** <schema-name>
|
|
110
|
-
**Archived to:** aspec/changes/archive/YYYY-MM-DD-<name>/
|
|
111
|
-
**Specs:** ✓ Synced to main specs
|
|
112
|
-
|
|
113
|
-
All artifacts complete. All tasks complete.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Output On Success (No Delta Specs)**
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
## Archive Complete
|
|
120
|
-
|
|
121
|
-
**Change:** <change-name>
|
|
122
|
-
**Schema:** <schema-name>
|
|
123
|
-
**Archived to:** aspec/changes/archive/YYYY-MM-DD-<name>/
|
|
124
|
-
**Specs:** No delta specs
|
|
125
|
-
|
|
126
|
-
All artifacts complete. All tasks complete.
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Output On Success With Warnings**
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
## Archive Complete (with warnings)
|
|
133
|
-
|
|
134
|
-
**Change:** <change-name>
|
|
135
|
-
**Schema:** <schema-name>
|
|
136
|
-
**Archived to:** aspec/changes/archive/YYYY-MM-DD-<name>/
|
|
137
|
-
**Specs:** Sync skipped (user chose to skip)
|
|
138
|
-
|
|
139
|
-
**Warnings:**
|
|
140
|
-
- Archived with 2 incomplete artifacts
|
|
141
|
-
- Archived with 3 incomplete tasks
|
|
142
|
-
- Delta spec sync was skipped (user chose to skip)
|
|
143
|
-
|
|
144
|
-
Review the archive if this was not intentional.
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**Output On Error (Archive Exists)**
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
## Archive Failed
|
|
151
|
-
|
|
152
|
-
**Change:** <change-name>
|
|
153
|
-
**Target:** aspec/changes/archive/YYYY-MM-DD-<name>/
|
|
154
|
-
|
|
155
|
-
Target archive directory already exists.
|
|
156
|
-
|
|
157
|
-
**Options:**
|
|
158
|
-
1. Rename the existing archive
|
|
159
|
-
2. Delete the existing archive if it's a duplicate
|
|
160
|
-
3. Wait until a different date to archive
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**Guardrails**
|
|
164
|
-
|
|
165
|
-
- Always prompt for change selection if not provided
|
|
166
|
-
- Use artifact graph (aspec status --json) for completion checking
|
|
167
|
-
- Don't block archive on warnings - just inform and confirm
|
|
168
|
-
- Preserve .aspec.yaml when moving to archive (it moves with the directory)
|
|
169
|
-
- Show clear summary of what happened
|
|
170
|
-
- If sync is requested, use the Skill tool to invoke `ancleto-sync-specs` (agent-driven)
|
|
171
|
-
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
|
|
9
|
+
Work Item grounding (when the request references a Work Item) is owned by `@context-resolver`.
|
|
@@ -2,254 +2,8 @@
|
|
|
2
2
|
description: Archive multiple completed changes at once
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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`.
|