@ancleto/spec 0.6.4 → 0.6.5
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 +1 -1
- package/agents/coder.md +11 -11
- package/agents/documenter.md +27 -27
- package/agents/orchestrator.md +8 -8
- package/agents/reviewer.md +13 -13
- package/agents/spec-writer.md +9 -9
- package/agents/technical-discovery.md +5 -5
- package/agents/technical-seed-writer.md +1 -1
- package/agents/tester.md +9 -9
- package/commands/cleto-apply.md +5 -5
- package/commands/cleto-archive.md +13 -13
- package/commands/cleto-bulk-archive.md +7 -7
- package/commands/cleto-continue.md +5 -5
- package/commands/cleto-explore.md +8 -8
- package/commands/cleto-ff.md +8 -10
- package/commands/cleto-new.md +8 -10
- package/commands/cleto-onboard.md +24 -36
- package/commands/cleto-propose.md +8 -10
- package/commands/cleto-sync.md +5 -5
- package/commands/cleto-verify.md +4 -4
- package/package.json +2 -2
- package/skills/ancleto-apply/SKILL.md +4 -4
- package/skills/ancleto-archive/SKILL.md +9 -9
- package/skills/ancleto-bulk-archive/SKILL.md +7 -7
- package/skills/ancleto-continue/SKILL.md +3 -3
- package/skills/ancleto-explore/SKILL.md +5 -5
- package/skills/ancleto-ff/SKILL.md +2 -2
- package/skills/ancleto-new/SKILL.md +4 -4
- package/skills/ancleto-onboard/SKILL.md +9 -9
- package/skills/ancleto-propose/SKILL.md +2 -2
- package/skills/ancleto-sync-specs/SKILL.md +6 -6
- package/skills/ancleto-upgrade/SKILL.md +9 -11
- package/skills/ancleto-upgrade/references/templates.md +1 -1
- package/skills/ancleto-verify/SKILL.md +4 -4
- package/skills/ancleto-workflow/SKILL.md +2 -2
- package/src/cli/index.js +18 -8
- package/templates/AGENTS.md +4 -4
- package/templates/PRODUCT.md +1 -1
package/commands/cleto-verify.md
CHANGED
|
@@ -10,7 +10,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design
|
|
|
10
10
|
|
|
11
11
|
1. **If no change name provided, prompt for selection**
|
|
12
12
|
|
|
13
|
-
Run `
|
|
13
|
+
Run `aspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
14
14
|
|
|
15
15
|
Show changes that have implementation tasks (tasks artifact exists).
|
|
16
16
|
Include the schema used for each change if available.
|
|
@@ -21,7 +21,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design
|
|
|
21
21
|
2. **Check status to understand the schema**
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
aspec status --change "<name>" --json
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Parse the JSON to understand:
|
|
@@ -32,7 +32,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design
|
|
|
32
32
|
3. **Get the change directory and load artifacts**
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
aspec instructions apply --change "<name>" --json
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`.
|
|
@@ -60,7 +60,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design
|
|
|
60
60
|
|
|
61
61
|
**Spec Coverage**:
|
|
62
62
|
|
|
63
|
-
- If delta specs exist in `
|
|
63
|
+
- If delta specs exist in `aspec/changes/<name>/specs/`:
|
|
64
64
|
- Extract all requirements (marked with "### Requirement:")
|
|
65
65
|
- For each requirement:
|
|
66
66
|
- Search codebase for keywords related to the requirement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancleto/spec",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Orquestador SDD liviano con subagentes optimizados para costo/tokens",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"keywords": [
|
|
33
33
|
"opencode",
|
|
34
|
-
"
|
|
34
|
+
"aspec",
|
|
35
35
|
"sdd",
|
|
36
36
|
"ai",
|
|
37
37
|
"agents",
|
|
@@ -8,24 +8,24 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Apply
|
|
12
12
|
|
|
13
13
|
Implement the tasks of a change, working directly from its artifact files. No external binaries are invoked: task state lives in `tasks.md` checkboxes.
|
|
14
14
|
|
|
15
|
-
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `
|
|
15
|
+
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `aspec/changes/` and ask the user to select.
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
19
|
### 1. Select the change
|
|
20
20
|
|
|
21
21
|
- If a name is provided, use it. Announce: "Using change: `<name>`" and how to override.
|
|
22
|
-
- If omitted: infer from conversation context; auto-select if only one active change directory exists under `
|
|
22
|
+
- If omitted: infer from conversation context; auto-select if only one active change directory exists under `aspec/changes/`; otherwise list the directories and ask the user to choose.
|
|
23
23
|
|
|
24
24
|
**IMPORTANT**: Do NOT guess or auto-select when ambiguous. Always let the user choose.
|
|
25
25
|
|
|
26
26
|
### 2. Understand the change state
|
|
27
27
|
|
|
28
|
-
Read the change directory `
|
|
28
|
+
Read the change directory `aspec/changes/<name>/` and load:
|
|
29
29
|
|
|
30
30
|
- `proposal.md` — what & why (if present)
|
|
31
31
|
- `design.md` — approach and decisions (if present)
|
|
@@ -8,11 +8,11 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Archive
|
|
12
12
|
|
|
13
13
|
Archive a completed change by moving its directory, after checking completion and syncing delta specs. No external binaries are invoked: completion is read from files, archiving is a directory move.
|
|
14
14
|
|
|
15
|
-
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `
|
|
15
|
+
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `aspec/changes/` (excluding `archive/`) and ask the user to select.
|
|
16
16
|
|
|
17
17
|
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
18
18
|
|
|
@@ -20,21 +20,21 @@ Archive a completed change by moving its directory, after checking completion an
|
|
|
20
20
|
|
|
21
21
|
### 1. Check task completion status
|
|
22
22
|
|
|
23
|
-
Read `
|
|
23
|
+
Read `aspec/changes/<name>/tasks.md` (when it exists) and count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
|
|
24
24
|
|
|
25
25
|
- **If incomplete tasks found**: display a warning showing the count, prompt the user for confirmation to continue, and proceed only if confirmed.
|
|
26
26
|
- **If no tasks file exists**: proceed without a task-related warning.
|
|
27
27
|
|
|
28
28
|
### 2. Assess delta spec sync state
|
|
29
29
|
|
|
30
|
-
Check for delta specs at `
|
|
30
|
+
Check for delta specs at `aspec/changes/<name>/specs/`. If none exist, proceed without a sync prompt.
|
|
31
31
|
|
|
32
32
|
**If delta specs exist:**
|
|
33
33
|
|
|
34
|
-
- Compare each delta spec with its corresponding main spec at `
|
|
34
|
+
- Compare each delta spec with its corresponding main spec at `aspec/specs/<capability>/spec.md`.
|
|
35
35
|
- Determine what would change (adds, modifications, removals, renames) and show a combined summary.
|
|
36
36
|
- Prompt the user: "Sync now (recommended)" vs "Archive without syncing" (or "Archive now" / "Sync anyway" / "Cancel" when already synced).
|
|
37
|
-
- If the user chooses sync, apply the delta to the main spec directly, editing `
|
|
37
|
+
- If the user chooses sync, apply the delta to the main spec directly, editing `aspec/specs/<capability>/spec.md`:
|
|
38
38
|
- `## ADDED Requirements` → add the new requirement blocks (skip those already present).
|
|
39
39
|
- `## MODIFIED Requirements` → update the matching requirement, preserving scenarios not mentioned in the delta.
|
|
40
40
|
- `## REMOVED Requirements` → remove the entire requirement block.
|
|
@@ -43,12 +43,12 @@ Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, procee
|
|
|
43
43
|
|
|
44
44
|
### 3. Perform the archive
|
|
45
45
|
|
|
46
|
-
Create the archive directory if it does not exist: `
|
|
46
|
+
Create the archive directory if it does not exist: `aspec/changes/archive/`.
|
|
47
47
|
|
|
48
48
|
Generate the target name using the current date: `YYYY-MM-DD-<change-name>`.
|
|
49
49
|
|
|
50
50
|
- **If the target already exists**: fail with an error suggesting to rename the existing archive or pick a different date.
|
|
51
|
-
- **If not**: delete scaffold-only files (e.g., `
|
|
51
|
+
- **If not**: delete scaffold-only files (e.g., `aspec/changes/<name>/context.md` — they must not be preserved), then move the whole change directory to `aspec/changes/archive/YYYY-MM-DD-<name>/`.
|
|
52
52
|
|
|
53
53
|
### 4. Capture lessons into persistent memory
|
|
54
54
|
|
|
@@ -71,7 +71,7 @@ Record only durable lessons — decisions whose reasons are not visible in the r
|
|
|
71
71
|
## Archive Complete
|
|
72
72
|
|
|
73
73
|
**Change:** <change-name>
|
|
74
|
-
**Archived to:**
|
|
74
|
+
**Archived to:** aspec/changes/archive/YYYY-MM-DD-<name>/
|
|
75
75
|
**Specs:** ✓ Synced to main specs (or: No delta specs / Sync skipped)
|
|
76
76
|
|
|
77
77
|
**Memories recorded:** <list, or "None">
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Bulk Archive
|
|
12
12
|
|
|
13
13
|
Archive multiple completed changes in a single operation, handling spec conflicts by checking what is actually implemented. No external binaries are invoked: changes are listed from directories, status is read from files, archiving is a directory move.
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ Archive multiple completed changes in a single operation, handling spec conflict
|
|
|
18
18
|
|
|
19
19
|
### 1. Get active changes
|
|
20
20
|
|
|
21
|
-
List the directories directly under `
|
|
21
|
+
List the directories directly under `aspec/changes/` (excluding `archive/`). If none exist, inform the user and stop.
|
|
22
22
|
|
|
23
23
|
### 2. Prompt for change selection
|
|
24
24
|
|
|
@@ -34,11 +34,11 @@ Use the **AskUserQuestion tool** with multi-select to let the user choose:
|
|
|
34
34
|
|
|
35
35
|
For each selected change, collect by reading files:
|
|
36
36
|
|
|
37
|
-
a. **Artifact presence** — which of `proposal.md`, `design.md`, `tasks.md`, `specs/` exist under `
|
|
37
|
+
a. **Artifact presence** — which of `proposal.md`, `design.md`, `tasks.md`, `specs/` exist under `aspec/changes/<name>/`.
|
|
38
38
|
|
|
39
|
-
b. **Task completion** — read `
|
|
39
|
+
b. **Task completion** — read `aspec/changes/<name>/tasks.md` and count `- [ ]` (incomplete) vs `- [x]` (complete). If no tasks file exists, note "No tasks".
|
|
40
40
|
|
|
41
|
-
c. **Delta specs** — check `
|
|
41
|
+
c. **Delta specs** — check `aspec/changes/<name>/specs/` and list which capability specs exist, extracting requirement names (lines matching `### Requirement: <name>`).
|
|
42
42
|
|
|
43
43
|
### 4. Detect spec conflicts
|
|
44
44
|
|
|
@@ -89,9 +89,9 @@ If there are incomplete changes, make clear they will be archived with warnings.
|
|
|
89
89
|
|
|
90
90
|
Process changes in the determined order (respecting conflict resolution):
|
|
91
91
|
|
|
92
|
-
a. **Sync specs** if delta specs exist and the resolution says so: apply the delta directly to `
|
|
92
|
+
a. **Sync specs** if delta specs exist and the resolution says so: apply the delta directly to `aspec/specs/<capability>/spec.md` (ADDED adds, MODIFIED updates preserving unmentioned scenarios, REMOVED deletes, RENAMED renames via `FROM:`/`TO:`). Track whether sync was done.
|
|
93
93
|
|
|
94
|
-
b. **Perform the archive**: create `
|
|
94
|
+
b. **Perform the archive**: create `aspec/changes/archive/` if missing, delete scaffold-only files (`context.md`), then move the directory to `aspec/changes/archive/YYYY-MM-DD-<name>/`. If the target already exists, fail that change (record the error) but continue with the others.
|
|
95
95
|
|
|
96
96
|
c. **Track each outcome**: success, failed (with error), or skipped.
|
|
97
97
|
|
|
@@ -8,11 +8,11 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Continue
|
|
12
12
|
|
|
13
13
|
Continue working on a change by creating exactly ONE next artifact. No external binaries are invoked: change state is derived by reading which artifact files exist.
|
|
14
14
|
|
|
15
|
-
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `
|
|
15
|
+
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `aspec/changes/` (excluding `archive/`) and ask the user to select, marking the most recently modified one as "(Recommended)".
|
|
16
16
|
|
|
17
17
|
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Continue working on a change by creating exactly ONE next artifact. No external
|
|
|
20
20
|
|
|
21
21
|
### 1. Determine the next missing artifact
|
|
22
22
|
|
|
23
|
-
Read `
|
|
23
|
+
Read `aspec/changes/<name>/` and check for artifact files in this fixed dependency order:
|
|
24
24
|
|
|
25
25
|
1. `proposal.md` — what & why
|
|
26
26
|
2. `specs/` — delta requirements (at least one `spec.md` inside; skip only if the change specifies no behavior)
|
|
@@ -8,11 +8,11 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Explore
|
|
12
12
|
|
|
13
13
|
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
14
14
|
|
|
15
|
-
**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 draft
|
|
15
|
+
**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 draft aspec artifacts (proposals, designs, specs) if the user asks — that's capturing thinking, not implementing.
|
|
16
16
|
|
|
17
17
|
**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.
|
|
18
18
|
|
|
@@ -76,7 +76,7 @@ Depending on what the user brings, you might:
|
|
|
76
76
|
- Find gaps in understanding
|
|
77
77
|
- Suggest spikes or investigations
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## aspec Awareness
|
|
80
80
|
|
|
81
81
|
You have full context of the spec-driven system. Use it naturally, don't force it.
|
|
82
82
|
|
|
@@ -84,7 +84,7 @@ You have full context of the spec-driven system. Use it naturally, don't force i
|
|
|
84
84
|
|
|
85
85
|
At the start, quickly check what exists:
|
|
86
86
|
|
|
87
|
-
- List the directories under `
|
|
87
|
+
- List the directories under `aspec/changes/` (excluding `archive/`) to see active changes, and read `aspec/changes/<name>/` artifacts for anything relevant.
|
|
88
88
|
- If the user mentioned a specific change name, read its artifacts for context.
|
|
89
89
|
|
|
90
90
|
### When no change exists
|
|
@@ -109,7 +109,7 @@ There's no required ending. Discovery might flow into a proposal ("Ready to star
|
|
|
109
109
|
|
|
110
110
|
## Guardrails
|
|
111
111
|
|
|
112
|
-
- **Don't implement** — never write code or implement features. Drafting
|
|
112
|
+
- **Don't implement** — never write code or implement features. Drafting aspec artifacts is fine, writing application code is not.
|
|
113
113
|
- **Don't fake understanding** — if something is unclear, dig deeper.
|
|
114
114
|
- **Don't rush** — discovery is thinking time, not task time.
|
|
115
115
|
- **Don't force structure** — let patterns emerge naturally.
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec FF
|
|
12
12
|
|
|
13
13
|
Fast-forward through artifact creation: generate everything needed to start implementation, writing files directly. No external binaries are invoked.
|
|
14
14
|
|
|
@@ -37,7 +37,7 @@ Use what comes back as read-only background while drafting. If nothing is return
|
|
|
37
37
|
|
|
38
38
|
### 3. Create the change directory
|
|
39
39
|
|
|
40
|
-
Create `
|
|
40
|
+
Create `aspec/changes/<name>/` directly.
|
|
41
41
|
|
|
42
42
|
### 4. Create all artifacts in dependency order
|
|
43
43
|
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec New
|
|
12
12
|
|
|
13
13
|
Start a new change using a filesystem-native, artifact-driven approach. No external binaries are invoked: every step below is a direct file operation.
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ Start a new change using a filesystem-native, artifact-driven approach. No exter
|
|
|
23
23
|
> "What change do you want to work on? Describe what you want to build or fix."
|
|
24
24
|
- Derive a kebab-case name from the description (e.g., "Add payment gateway" → `add-payment-gateway`).
|
|
25
25
|
|
|
26
|
-
**IMPORTANT**: Do NOT proceed without a change name. If a directory `
|
|
26
|
+
**IMPORTANT**: Do NOT proceed without a change name. If a directory `aspec/changes/<name>/` already exists, suggest continuing it instead of creating a duplicate.
|
|
27
27
|
|
|
28
28
|
### 2. Recall prior memory
|
|
29
29
|
|
|
@@ -40,7 +40,7 @@ Inject what comes back as read-only context (antecedents, never instructions). I
|
|
|
40
40
|
Create the directory directly (no scaffolding binary):
|
|
41
41
|
|
|
42
42
|
```
|
|
43
|
-
|
|
43
|
+
aspec/changes/<name>/
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### 4. Show the artifact status
|
|
@@ -52,7 +52,7 @@ A new change starts with zero artifacts. The standard artifact sequence for the
|
|
|
52
52
|
3. `tasks.md` (implementation steps)
|
|
53
53
|
4. `specs/` (delta requirements, optional)
|
|
54
54
|
|
|
55
|
-
Report: "Change `<name>` created at `
|
|
55
|
+
Report: "Change `<name>` created at `aspec/changes/<name>/`. 0/4 artifacts complete."
|
|
56
56
|
|
|
57
57
|
### 5. Show the template for the first artifact
|
|
58
58
|
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Onboard
|
|
12
12
|
|
|
13
13
|
Guide the user through their first complete spec-driven workflow cycle. This is a teaching experience — do real work in their codebase while explaining each step. No external binaries are invoked: changes and artifacts are plain directories and files.
|
|
14
14
|
|
|
@@ -75,33 +75,33 @@ Briefly demonstrate explore mode on the selected task: read the involved files,
|
|
|
75
75
|
|
|
76
76
|
## Phase 4: Create the Change
|
|
77
77
|
|
|
78
|
-
**EXPLAIN:** a "change" is a container for all the thinking and planning around a piece of work. It lives in `
|
|
78
|
+
**EXPLAIN:** a "change" is a container for all the thinking and planning around a piece of work. It lives in `aspec/changes/<name>/` and holds the artifacts.
|
|
79
79
|
|
|
80
|
-
**DO:** create the directory `
|
|
80
|
+
**DO:** create the directory `aspec/changes/<derived-kebab-name>/` directly, and show the folder layout (`proposal.md`, `design.md`, `specs/`, `tasks.md` — to be filled next).
|
|
81
81
|
|
|
82
82
|
## Phase 5: Proposal
|
|
83
83
|
|
|
84
84
|
**EXPLAIN:** the proposal captures **why** and **what** at a high level.
|
|
85
85
|
|
|
86
|
-
**DO:** draft it from the task (Why / What Changes / Capabilities / Impact), show it, and **PAUSE** for approval. After approval, write it to `
|
|
86
|
+
**DO:** draft it from the task (Why / What Changes / Capabilities / Impact), show it, and **PAUSE** for approval. After approval, write it to `aspec/changes/<name>/proposal.md`.
|
|
87
87
|
|
|
88
88
|
## Phase 6: Specs
|
|
89
89
|
|
|
90
90
|
**EXPLAIN:** specs define **what** precisely, in testable WHEN/THEN form.
|
|
91
91
|
|
|
92
|
-
**DO:** create `
|
|
92
|
+
**DO:** create `aspec/changes/<name>/specs/<capability>/spec.md` with `## ADDED Requirements` / `#### Scenario:` blocks. Save the file.
|
|
93
93
|
|
|
94
94
|
## Phase 7: Design
|
|
95
95
|
|
|
96
96
|
**EXPLAIN:** the design captures **how** — decisions, tradeoffs, approach. For small changes this may be brief.
|
|
97
97
|
|
|
98
|
-
**DO:** draft Context / Goals-Non-Goals / Decisions and save to `
|
|
98
|
+
**DO:** draft Context / Goals-Non-Goals / Decisions and save to `aspec/changes/<name>/design.md`.
|
|
99
99
|
|
|
100
100
|
## Phase 8: Tasks
|
|
101
101
|
|
|
102
102
|
**EXPLAIN:** break the work into checkboxed implementation tasks.
|
|
103
103
|
|
|
104
|
-
**DO:** generate the phased checklist, show it, and **PAUSE** for confirmation. Save to `
|
|
104
|
+
**DO:** generate the phased checklist, show it, and **PAUSE** for confirmation. Save to `aspec/changes/<name>/tasks.md`.
|
|
105
105
|
|
|
106
106
|
## Phase 9: Apply (Implementation)
|
|
107
107
|
|
|
@@ -109,9 +109,9 @@ Briefly demonstrate explore mode on the selected task: read the involved files,
|
|
|
109
109
|
|
|
110
110
|
## Phase 10: Archive
|
|
111
111
|
|
|
112
|
-
**EXPLAIN:** archiving moves the change to `
|
|
112
|
+
**EXPLAIN:** archiving moves the change to `aspec/changes/archive/YYYY-MM-DD-<name>/`, preserving the decision record.
|
|
113
113
|
|
|
114
|
-
**DO:** create `
|
|
114
|
+
**DO:** create `aspec/changes/archive/` if missing, delete scaffold-only files (`context.md`), move the directory, and show the archive location.
|
|
115
115
|
|
|
116
116
|
## Phase 11: Recap & Next Steps
|
|
117
117
|
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Propose
|
|
12
12
|
|
|
13
13
|
Create a change and generate all its artifacts in one step, writing files directly. No external binaries are invoked.
|
|
14
14
|
|
|
@@ -34,7 +34,7 @@ Use what comes back as read-only background while drafting. If nothing is return
|
|
|
34
34
|
|
|
35
35
|
### 3. Create the change directory
|
|
36
36
|
|
|
37
|
-
Create `
|
|
37
|
+
Create `aspec/changes/<name>/` directly if it does not exist yet.
|
|
38
38
|
|
|
39
39
|
### 4. Create artifacts in dependency order
|
|
40
40
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ancleto-sync-specs
|
|
3
3
|
description: Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility:
|
|
5
|
+
compatibility: No external CLI required.
|
|
6
6
|
metadata:
|
|
7
7
|
author: ancleto
|
|
8
8
|
version: '1.0'
|
|
@@ -18,7 +18,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
|
|
|
18
18
|
|
|
19
19
|
1. **If no change name provided, prompt for selection**
|
|
20
20
|
|
|
21
|
-
Run `
|
|
21
|
+
Run `aspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
22
22
|
|
|
23
23
|
Show changes that have delta specs (under `specs/` directory).
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
|
|
|
26
26
|
|
|
27
27
|
2. **Find delta specs**
|
|
28
28
|
|
|
29
|
-
Look for delta spec files in `
|
|
29
|
+
Look for delta spec files in `aspec/changes/<name>/specs/*/spec.md`.
|
|
30
30
|
|
|
31
31
|
Each delta spec file contains sections like:
|
|
32
32
|
|
|
@@ -39,11 +39,11 @@ This is an **agent-driven** operation - you will read delta specs and directly e
|
|
|
39
39
|
|
|
40
40
|
3. **For each delta spec, apply changes to main specs**
|
|
41
41
|
|
|
42
|
-
For each capability with a delta spec at `
|
|
42
|
+
For each capability with a delta spec at `aspec/changes/<name>/specs/<capability>/spec.md`:
|
|
43
43
|
|
|
44
44
|
a. **Read the delta spec** to understand the intended changes
|
|
45
45
|
|
|
46
|
-
b. **Read the main spec** at `
|
|
46
|
+
b. **Read the main spec** at `aspec/specs/<capability>/spec.md` (may not exist yet)
|
|
47
47
|
|
|
48
48
|
c. **Apply changes intelligently**:
|
|
49
49
|
|
|
@@ -71,7 +71,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
|
|
|
71
71
|
|
|
72
72
|
d. **Create new main spec** if capability doesn't exist yet:
|
|
73
73
|
|
|
74
|
-
- Create `
|
|
74
|
+
- Create `aspec/specs/<capability>/spec.md`
|
|
75
75
|
- Add Purpose section (can be brief, mark as TBD)
|
|
76
76
|
- Add Requirements section with the ADDED requirements
|
|
77
77
|
|
|
@@ -7,10 +7,10 @@ description: >
|
|
|
7
7
|
like "migrar a", "upgrade a", "actualizar a", "mover a v", or any mention of
|
|
8
8
|
bumping a major version. Analyzes the full repository (TypeScript source, tests,
|
|
9
9
|
config, CI, Docker, CDK), fetches official migration docs, builds search patterns
|
|
10
|
-
dynamically from those docs, and generates a complete
|
|
10
|
+
dynamically from those docs, and generates a complete aspec change with phased
|
|
11
11
|
tasks — without touching any code.
|
|
12
12
|
license: MIT
|
|
13
|
-
compatibility: Requires
|
|
13
|
+
compatibility: Requires Node.js (no external CLI)
|
|
14
14
|
metadata:
|
|
15
15
|
author: ancleto
|
|
16
16
|
version: '4.0'
|
|
@@ -19,7 +19,7 @@ metadata:
|
|
|
19
19
|
|
|
20
20
|
# ancleto-upgrade
|
|
21
21
|
|
|
22
|
-
Analiza el repositorio completo y genera un
|
|
22
|
+
Analiza el repositorio completo y genera un aspec change para migrar cualquier
|
|
23
23
|
librería o runtime a una nueva versión mayor — de forma documentada, faseada y sin
|
|
24
24
|
romper el repo.
|
|
25
25
|
|
|
@@ -360,17 +360,15 @@ Con todos los matches del Paso 4, construir:
|
|
|
360
360
|
|
|
361
361
|
---
|
|
362
362
|
|
|
363
|
-
## Paso 6 — Crear el change
|
|
363
|
+
## Paso 6 — Crear el change aspec
|
|
364
364
|
|
|
365
|
-
|
|
366
|
-
openspec new change "${CHANGE_NAME}"
|
|
367
|
-
```
|
|
365
|
+
Crear el directorio del change en `aspec/changes/${CHANGE_NAME}/` (con `specs/` si aplica).
|
|
368
366
|
|
|
369
367
|
Si el nombre ya existe, preguntar al usuario: agregar sufijo `-v2` o eliminar el existente.
|
|
370
368
|
|
|
371
369
|
---
|
|
372
370
|
|
|
373
|
-
## Paso 7 — Escribir los artefactos
|
|
371
|
+
## Paso 7 — Escribir los artefactos aspec
|
|
374
372
|
|
|
375
373
|
Leer `references/templates.md` para obtener los templates exactos de cada archivo.
|
|
376
374
|
Escribir en este orden:
|
|
@@ -425,7 +423,7 @@ Reglas al completar los templates:
|
|
|
425
423
|
### Scripts de verificación
|
|
426
424
|
build: sí/no | lint: sí/no | test: sí/no | test:ci: sí/no | typecheck: sí/no
|
|
427
425
|
|
|
428
|
-
### Artefactos
|
|
426
|
+
### Artefactos aspec generados
|
|
429
427
|
- proposal.md ✅
|
|
430
428
|
- specs/{LIBRARY_SLUG}{TARGET_VERSION}.md ✅
|
|
431
429
|
- tasks.md ✅ ({N} tareas en 6 fases)
|
|
@@ -438,11 +436,11 @@ Para implementar: /cleto-apply {CHANGE_NAME}
|
|
|
438
436
|
|
|
439
437
|
## Guardrails
|
|
440
438
|
|
|
441
|
-
Este skill solo genera artefactos
|
|
439
|
+
Este skill solo genera artefactos aspec — no modifica ningún archivo del repo.
|
|
442
440
|
Todo cambio real lo ejecuta el desarrollador con `/cleto-apply`, que tiene su propio
|
|
443
441
|
ciclo de revisión. Modificar el repo desde este skill saltearía ese control.
|
|
444
442
|
|
|
445
|
-
- No tocar archivos fuera de `
|
|
443
|
+
- No tocar archivos fuera de `aspec/changes/{CHANGE_NAME}/`
|
|
446
444
|
- Los `VERSION_PATTERNS[]` siempre se aplican, con o sin documentación oficial
|
|
447
445
|
- Si no hay doc disponible, documentarlo en proposal y continuar con el escaneo
|
|
448
446
|
- Si el change ya existe, avisar antes de cualquier acción
|
|
@@ -8,11 +8,11 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Verify
|
|
12
12
|
|
|
13
13
|
Verify that an implementation matches its change artifacts (proposal, design, tasks, delta specs) by reading the files directly. No external binaries are invoked.
|
|
14
14
|
|
|
15
|
-
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `
|
|
15
|
+
**Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `aspec/changes/` that contain a `tasks.md` file and ask the user to select. Mark changes with incomplete tasks as "(In Progress)".
|
|
16
16
|
|
|
17
17
|
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Verify that an implementation matches its change artifacts (proposal, design, ta
|
|
|
20
20
|
|
|
21
21
|
### 1. Load the change artifacts
|
|
22
22
|
|
|
23
|
-
Read everything under `
|
|
23
|
+
Read everything under `aspec/changes/<name>/`:
|
|
24
24
|
|
|
25
25
|
- `tasks.md` — the checklist (required)
|
|
26
26
|
- `proposal.md`, `design.md` — intent and decisions (if present)
|
|
@@ -36,7 +36,7 @@ Read everything under `openspec/changes/<name>/`:
|
|
|
36
36
|
|
|
37
37
|
**Spec Coverage:**
|
|
38
38
|
|
|
39
|
-
- If delta specs exist in `
|
|
39
|
+
- If delta specs exist in `aspec/changes/<name>/specs/`:
|
|
40
40
|
- Extract all requirements (marked with `### Requirement:`).
|
|
41
41
|
- For each requirement, search the codebase for keywords related to it and assess whether implementation likely exists.
|
|
42
42
|
- If a requirement appears unimplemented, add a CRITICAL issue: "Requirement not found: `<requirement name>`" with the recommendation "Implement requirement: `<description>`".
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
version: '1.0'
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# aspec Workflow
|
|
12
12
|
|
|
13
13
|
This skill is the map of the spec-driven lifecycle. It does not execute work itself — it routes: given where the user (or the current change) stands, it names the skill that runs next and hands over the required context.
|
|
14
14
|
|
|
@@ -39,7 +39,7 @@ explore → new/propose/ff → continue* → apply → verify → archive
|
|
|
39
39
|
| Learn the whole cycle hands-on | `ancleto-onboard` |
|
|
40
40
|
| Recall what the team learned about a topic | `searchMemory` directly (or the recall contract) |
|
|
41
41
|
|
|
42
|
-
**By change state** (read `
|
|
42
|
+
**By change state** (read `aspec/changes/<name>/`):
|
|
43
43
|
|
|
44
44
|
| State | Run |
|
|
45
45
|
|---|---|
|
package/src/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync } from 'node:fs'
|
|
3
|
-
import { cp, mkdir, access, writeFile, readFile, readdir } from 'node:fs/promises'
|
|
3
|
+
import { cp, mkdir, access, writeFile, readFile, readdir, rename } from 'node:fs/promises'
|
|
4
4
|
import { spawnSync } from 'node:child_process'
|
|
5
5
|
import { createHash } from 'node:crypto'
|
|
6
6
|
import { createInterface } from 'node:readline'
|
|
@@ -310,17 +310,19 @@ async function installAgentSkills(projectDir, agent) {
|
|
|
310
310
|
return dir.replace(/\\/g, '/')
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const
|
|
313
|
+
const CHANGES_ROOT = 'aspec'
|
|
314
|
+
|
|
315
|
+
const DEFAULT_ASPEC_CONFIG = `# OpenSpec project configuration
|
|
314
316
|
# Generado por @ancleto/spec (G5) — editalo libremente, no se sobrescribe en reinstalaciones.
|
|
315
317
|
schema: spec-driven-development
|
|
316
318
|
`
|
|
317
319
|
|
|
318
|
-
async function
|
|
319
|
-
const changesDir = join(projectDir,
|
|
320
|
+
async function scaffoldAspec(projectDir) {
|
|
321
|
+
const changesDir = join(projectDir, CHANGES_ROOT, 'changes')
|
|
320
322
|
await mkdir(changesDir, { recursive: true })
|
|
321
|
-
const configPath = join(projectDir,
|
|
323
|
+
const configPath = join(projectDir, CHANGES_ROOT, 'config.yaml')
|
|
322
324
|
if (!(await exists(configPath))) {
|
|
323
|
-
await writeFile(configPath,
|
|
325
|
+
await writeFile(configPath, DEFAULT_ASPEC_CONFIG)
|
|
324
326
|
}
|
|
325
327
|
}
|
|
326
328
|
|
|
@@ -392,7 +394,7 @@ async function install(args) {
|
|
|
392
394
|
|
|
393
395
|
if (project) {
|
|
394
396
|
await copyTemplates(resolve(project))
|
|
395
|
-
await
|
|
397
|
+
await scaffoldAspec(resolve(project))
|
|
396
398
|
const existingRc = await readAncletorc(resolve(project))
|
|
397
399
|
const agent = await resolveAgent(args, existingRc?.agent)
|
|
398
400
|
const agentSkillsDir = await installAgentSkills(resolve(project), agent)
|
|
@@ -446,6 +448,14 @@ async function upgradeCmd(args) {
|
|
|
446
448
|
console.error("Error: No se encontro .ancletorc. Ejecuta 'ancleto init' primero.")
|
|
447
449
|
process.exit(1)
|
|
448
450
|
}
|
|
451
|
+
const legacyChanges = join(projectDir, 'openspec')
|
|
452
|
+
const changesRoot = join(projectDir, CHANGES_ROOT)
|
|
453
|
+
if ((await exists(legacyChanges)) && !(await exists(changesRoot))) {
|
|
454
|
+
await rename(legacyChanges, changesRoot)
|
|
455
|
+
console.log('ancleto: changes migrados de openspec/ a aspec/')
|
|
456
|
+
} else if ((await exists(legacyChanges)) && (await exists(changesRoot))) {
|
|
457
|
+
console.warn('ancleto: existen openspec/ y aspec/ — no se migro nada (revisar manualmente)')
|
|
458
|
+
}
|
|
449
459
|
const agent = await resolveAgent(args, rc.agent)
|
|
450
460
|
await copyTemplates(projectDir)
|
|
451
461
|
const agentSkillsDir = await installAgentSkills(projectDir, agent)
|
|
@@ -501,7 +511,7 @@ async function initProject(args) {
|
|
|
501
511
|
}
|
|
502
512
|
|
|
503
513
|
const manifest = await writeManifest(projectDir, { azure, discovery, agent })
|
|
504
|
-
await
|
|
514
|
+
await scaffoldAspec(projectDir)
|
|
505
515
|
if (azure.enabled) console.log(AZURE_MCP_NOTICE)
|
|
506
516
|
console.log(`ancleto: .ancletorc actualizado en ${projectDir} (v${manifest.version})${azure.enabled ? ' (Azure habilitado)' : ' (Azure desactivado)'} (Agente: ${agent})${tier ? ` (Tier: ${tier})` : ''}`)
|
|
507
517
|
}
|