@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.
Files changed (34) hide show
  1. package/agents/documenter.md +2 -0
  2. package/agents/spec-writer.md +2 -1
  3. package/commands/cleto-apply.md +2 -154
  4. package/commands/cleto-archive.md +2 -164
  5. package/commands/cleto-bulk-archive.md +2 -248
  6. package/commands/cleto-continue.md +2 -126
  7. package/commands/cleto-explore.md +2 -174
  8. package/commands/cleto-ff.md +2 -120
  9. package/commands/cleto-new.md +2 -108
  10. package/commands/cleto-onboard.md +2 -550
  11. package/commands/cleto-propose.md +2 -130
  12. package/commands/cleto-recall.md +4 -52
  13. package/commands/cleto-sync.md +2 -137
  14. package/commands/cleto-verify.md +2 -169
  15. package/package.json +1 -1
  16. package/skills/ancleto-apply/SKILL.md +15 -38
  17. package/skills/ancleto-archive/SKILL.md +22 -24
  18. package/skills/ancleto-bulk-archive/SKILL.md +45 -55
  19. package/skills/ancleto-commit/SKILL.md +10 -29
  20. package/skills/ancleto-continue/SKILL.md +18 -24
  21. package/skills/ancleto-explore/SKILL.md +40 -67
  22. package/skills/ancleto-ff/SKILL.md +20 -28
  23. package/skills/ancleto-new/SKILL.md +20 -39
  24. package/skills/ancleto-onboard/SKILL.md +35 -38
  25. package/skills/ancleto-pr/SKILL.md +12 -26
  26. package/skills/ancleto-propose/SKILL.md +22 -69
  27. package/skills/ancleto-recall/SKILL.md +21 -25
  28. package/skills/ancleto-sync-specs/SKILL.md +27 -62
  29. package/skills/ancleto-upgrade/SKILL.md +132 -223
  30. package/skills/ancleto-upgrade/references/templates.md +138 -171
  31. package/skills/ancleto-verify/SKILL.md +36 -66
  32. package/skills/ancleto-workflow/SKILL.md +17 -17
  33. package/src/cli/index.js +36 -31
  34. package/templates/AGENTS.md +3 -0
@@ -8,79 +8,58 @@ metadata:
8
8
  version: '1.0'
9
9
  ---
10
10
 
11
+ # aspec Sync
12
+
13
+ **Artifacts language**: write every artifact in English. Keywords (`Requirement`, `Scenario`, `SHALL`, `WHEN`/`THEN`, `ADDED/MODIFIED/REMOVED/RENAMED Requirements`) are literal and MUST NOT be translated. File and directory names stay English kebab-case.
14
+
11
15
  Sync delta specs from a change to main specs.
12
16
 
13
- This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
17
+ **Agent-driven**: read delta specs and directly edit main specs, enabling intelligent merging (add one scenario without copying the whole requirement). The delta is _intent_, not a wholesale replacement — apply partial updates. Must be idempotent (running twice gives the same result).
14
18
 
15
- **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
19
+ **Input**: Optionally a change name; if omitted, infer from context. If ambiguous you MUST prompt for available changes.
16
20
 
17
21
  **Steps**
18
22
 
19
23
  1. **If no change name provided, prompt for selection**
20
24
 
21
- Run `aspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
22
-
23
- Show changes that have delta specs (under `specs/` directory).
25
+ List `aspec/changes/` dirs (excluding `archive/`); ask the user to select (runtime question tool when available). Show changes that have delta specs (under `specs/`).
24
26
 
25
27
  **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
26
28
 
27
29
  2. **Find delta specs**
28
30
 
29
- Look for delta spec files in `aspec/changes/<name>/specs/*/spec.md`.
30
-
31
- Each delta spec file contains sections like:
31
+ Look for `aspec/changes/<name>/specs/*/spec.md`, whose sections are:
32
32
 
33
33
  - `## ADDED Requirements` - New requirements to add
34
34
  - `## MODIFIED Requirements` - Changes to existing requirements
35
35
  - `## REMOVED Requirements` - Requirements to remove
36
36
  - `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
37
37
 
38
- If no delta specs found, inform user and stop.
38
+ If none found, inform the user and stop.
39
39
 
40
- 3. **For each delta spec, apply changes to main specs**
40
+ 3. **Apply each delta spec to main specs**
41
41
 
42
- For each capability with a delta spec at `aspec/changes/<name>/specs/<capability>/spec.md`:
42
+ Per capability with a delta at `aspec/changes/<name>/specs/<capability>/spec.md`:
43
43
 
44
- a. **Read the delta spec** to understand the intended changes
44
+ a. **Read the delta spec** for the intended changes
45
45
 
46
46
  b. **Read the main spec** at `aspec/specs/<capability>/spec.md` (may not exist yet)
47
47
 
48
- c. **Apply changes intelligently**:
49
-
50
- **ADDED Requirements:**
51
-
52
- - If requirement doesn't exist in main spec → add it
53
- - If requirement already exists → update it to match (treat as implicit MODIFIED)
54
-
55
- **MODIFIED Requirements:**
56
-
57
- - Find the requirement in main spec
58
- - Apply the changes - this can be:
59
- - Adding new scenarios (don't need to copy existing ones)
60
- - Modifying existing scenarios
61
- - Changing the requirement description
62
- - Preserve scenarios/content not mentioned in the delta
48
+ c. **Apply changes**:
63
49
 
64
- **REMOVED Requirements:**
50
+ **ADDED Requirements:** absent → add; present → update to match (implicit MODIFIED).
65
51
 
66
- - Remove the entire requirement block from main spec
52
+ **MODIFIED Requirements:** find the requirement and apply — add new scenarios (don't copy existing ones), modify scenarios, or change the description. Preserve content not mentioned in the delta.
67
53
 
68
- **RENAMED Requirements:**
54
+ **REMOVED Requirements:** remove the entire requirement block.
69
55
 
70
- - Find the FROM requirement, rename to TO
56
+ **RENAMED Requirements:** rename the FROM requirement to TO.
71
57
 
72
- d. **Create new main spec** if capability doesn't exist yet:
73
-
74
- - Create `aspec/specs/<capability>/spec.md`
75
- - Add Purpose section (can be brief, mark as TBD)
76
- - Add Requirements section with the ADDED requirements
58
+ d. **Create the main spec** if the capability doesn't exist: `aspec/specs/<capability>/spec.md` with a brief Purpose (mark TBD if unknown) and the ADDED requirements.
77
59
 
78
60
  4. **Show summary**
79
61
 
80
- After applying all changes, summarize:
81
-
82
- - Which capabilities were updated
83
- - What changes were made (requirements added/modified/removed/renamed)
62
+ Summarize capabilities updated and changes made (added/modified/removed/renamed).
84
63
 
85
64
  **Delta Spec Format Reference**
86
65
 
@@ -115,36 +94,22 @@ The system SHALL do something new.
115
94
  - TO: `### Requirement: New Name`
116
95
  ```
117
96
 
118
- **Key Principle: Intelligent Merging**
119
-
120
- Unlike programmatic merging, you can apply **partial updates**:
121
-
122
- - To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
123
- - The delta represents _intent_, not a wholesale replacement
124
- - Use your judgment to merge changes sensibly
125
-
126
97
  **Output On Success**
127
98
 
128
99
  ```
129
100
  ## Specs Synced: <change-name>
130
101
 
131
102
  Updated main specs:
103
+ - **<capability-1>**: added "New Feature"; modified "Existing Feature" (1 scenario)
104
+ - **<capability-2>**: created new spec file; added "Another Feature"
132
105
 
133
- **<capability-1>**:
134
- - Added requirement: "New Feature"
135
- - Modified requirement: "Existing Feature" (added 1 scenario)
136
-
137
- **<capability-2>**:
138
- - Created new spec file
139
- - Added requirement: "Another Feature"
140
-
141
- Main specs are now updated. The change remains active - archive when implementation is complete.
106
+ The change remains active - archive when implementation is complete.
142
107
  ```
143
108
 
144
109
  **Guardrails**
145
110
 
146
- - Read both delta and main specs before making changes
147
- - Preserve existing content not mentioned in delta
148
- - If something is unclear, ask for clarification
149
- - Show what you're changing as you go
150
- - The operation should be idempotent - running twice should give same result
111
+ - Read both delta and main specs before editing
112
+ - Preserve content not mentioned in the delta
113
+ - If unclear, ask for clarification
114
+ - Show changes as you go
115
+ - Idempotent - running twice gives the same result