agentme 0.19.0 → 0.20.1
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/.filedist-package.yml +1 -36
- package/.xdrs/agentme/edrs/application/019-ai-agents-development-standards.md +2 -2
- package/.xdrs/agentme/edrs/application/skills/001-create-javascript-project/SKILL.md +1 -1
- package/.xdrs/agentme/edrs/application/skills/003-create-golang-project/SKILL.md +1 -1
- package/.xdrs/agentme/edrs/application/skills/004-select-relevant-xdrs/SKILL.md +18 -44
- package/.xdrs/agentme/edrs/application/skills/005-create-python-project/SKILL.md +1 -1
- package/.xdrs/agentme/edrs/devops/skills/002-monorepo-setup/SKILL.md +1 -1
- package/README.md +3 -16
- package/package.json +4 -8
- package/.github/agents/speckit.analyze.agent.md +0 -184
- package/.github/agents/speckit.checklist.agent.md +0 -295
- package/.github/agents/speckit.clarify.agent.md +0 -181
- package/.github/agents/speckit.constitution.agent.md +0 -84
- package/.github/agents/speckit.implement.agent.md +0 -198
- package/.github/agents/speckit.plan.agent.md +0 -90
- package/.github/agents/speckit.specify.agent.md +0 -237
- package/.github/agents/speckit.tasks.agent.md +0 -200
- package/.github/agents/speckit.taskstoissues.agent.md +0 -30
- package/.github/prompts/speckit.analyze.prompt.md +0 -3
- package/.github/prompts/speckit.checklist.prompt.md +0 -3
- package/.github/prompts/speckit.clarify.prompt.md +0 -3
- package/.github/prompts/speckit.constitution.prompt.md +0 -3
- package/.github/prompts/speckit.implement.prompt.md +0 -3
- package/.github/prompts/speckit.plan.prompt.md +0 -3
- package/.github/prompts/speckit.specify.prompt.md +0 -3
- package/.github/prompts/speckit.tasks.prompt.md +0 -3
- package/.github/prompts/speckit.taskstoissues.prompt.md +0 -3
- package/.specify/memory/constitution.md +0 -99
- package/.specify/scripts/bash/check-prerequisites.sh +0 -190
- package/.specify/scripts/bash/common.sh +0 -253
- package/.specify/scripts/bash/create-new-feature.sh +0 -333
- package/.specify/scripts/bash/setup-plan.sh +0 -73
- package/.specify/scripts/bash/update-agent-context.sh +0 -808
- package/.specify/templates/agent-file-template.md +0 -28
- package/.specify/templates/checklist-template.md +0 -40
- package/.specify/templates/constitution-template.md +0 -50
- package/.specify/templates/plan-template.md +0 -110
- package/.specify/templates/spec-template.md +0 -115
- package/.specify/templates/tasks-template.md +0 -251
- package/.vscode/settings.json +0 -14
package/.filedist-package.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sets:
|
|
2
|
-
- package: xdrs-core@0.
|
|
2
|
+
- package: xdrs-core@0.30.0
|
|
3
3
|
# - package: git:https://github.com/flaviostutz/xdrs-core.git@main
|
|
4
4
|
selector:
|
|
5
5
|
files:
|
|
@@ -41,38 +41,3 @@ sets:
|
|
|
41
41
|
presets:
|
|
42
42
|
- basic
|
|
43
43
|
|
|
44
|
-
- selector:
|
|
45
|
-
files:
|
|
46
|
-
- .github/agents/speckit*
|
|
47
|
-
- .github/prompts/speckit*
|
|
48
|
-
- .specify/**
|
|
49
|
-
exclude:
|
|
50
|
-
- .specify/templates/**
|
|
51
|
-
output:
|
|
52
|
-
path: .
|
|
53
|
-
gitignore: false
|
|
54
|
-
readonly: true
|
|
55
|
-
presets:
|
|
56
|
-
- speckit
|
|
57
|
-
|
|
58
|
-
- selector:
|
|
59
|
-
files:
|
|
60
|
-
- .specify/templates/**
|
|
61
|
-
output:
|
|
62
|
-
path: .
|
|
63
|
-
gitignore: false
|
|
64
|
-
readonly: false
|
|
65
|
-
presets:
|
|
66
|
-
- speckit
|
|
67
|
-
|
|
68
|
-
- selector:
|
|
69
|
-
files:
|
|
70
|
-
- .vscode/settings.json
|
|
71
|
-
output:
|
|
72
|
-
path: .
|
|
73
|
-
managed: false
|
|
74
|
-
skipIfExists: true
|
|
75
|
-
readonly: false
|
|
76
|
-
gitignore: false
|
|
77
|
-
presets:
|
|
78
|
-
- speckit
|
|
@@ -178,7 +178,7 @@ e.g.: Respond with a JSON object matching this schema: ... ALWAYS return valid J
|
|
|
178
178
|
</WORKFLOW_CONTEXT>
|
|
179
179
|
|
|
180
180
|
<SYSTEM_CONTEXT>
|
|
181
|
-
The current date
|
|
181
|
+
The current date is [today in YYYY-MM-DD format].
|
|
182
182
|
The current OS is: [operating system name].
|
|
183
183
|
</SYSTEM_CONTEXT>
|
|
184
184
|
```
|
|
@@ -187,7 +187,7 @@ The current OS is: [operating system name].
|
|
|
187
187
|
|
|
188
188
|
| Section | Required? | Notes |
|
|
189
189
|
|---|---|---|
|
|
190
|
-
| `<SYSTEM_CONTEXT>` | Optional | Runtime environment context injected at invocation time (e.g., current date
|
|
190
|
+
| `<SYSTEM_CONTEXT>` | Optional | Runtime environment context injected at invocation time (e.g., current date in YYYY-MM-DD, OS). Include whenever the agent may need temporal or environment awareness. Time MUST NOT be included — it changes every second and breaks prompt caching. |
|
|
191
191
|
| `<OBJECTIVE>` | Required | One or two sentences summarising the agent's main deliverable. |
|
|
192
192
|
| `<ROLE>` | Required | Agent persona and expertise. When inside a workflow, MUST reference its node name from `<WORKFLOW_CONTEXT>`. |
|
|
193
193
|
| `<INPUT>` | Required | List ALL inputs. For workflow agents: workflow-level inputs first, then agent-specific inputs. |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: 001-create-javascript-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a JavaScript/TypeScript project following
|
|
5
5
|
the standard tooling and layout defined in agentme-edr-003. Activate this skill when the user
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: 003-create-golang-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a Go (Golang) CLI or library project following
|
|
5
5
|
the standard tooling and layout defined in agentme-edr-010. Activate this skill when the user
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: 004-select-relevant-xdrs
|
|
3
3
|
description: >
|
|
4
4
|
Analyzes a client repository, extracts the full agentme XDR set, and excludes the records that do
|
|
5
5
|
not fit the project's structure and workflow needs. Activate this skill when the user asks to
|
|
@@ -15,8 +15,7 @@ compatibility: Node.js 18+
|
|
|
15
15
|
|
|
16
16
|
Installs the full agentme XDR set for a repository through the published CLI, then removes only the
|
|
17
17
|
records that clearly do not fit the target project by passing explicit `--exclude` flags during
|
|
18
|
-
extraction.
|
|
19
|
-
separately instead of using presets to narrow the XDR set.
|
|
18
|
+
extraction.
|
|
20
19
|
|
|
21
20
|
## Instructions
|
|
22
21
|
|
|
@@ -25,7 +24,7 @@ separately instead of using presets to narrow the XDR set.
|
|
|
25
24
|
1. Discover how the current published package exposes extraction. Prefer the package CLI help,
|
|
26
25
|
installed package metadata, and the agentme README so you know how to invoke:
|
|
27
26
|
- the full XDR extraction path with `extract --all`
|
|
28
|
-
- any optional workflow artifacts
|
|
27
|
+
- any optional workflow artifacts
|
|
29
28
|
2. Build an explicit inventory of the shipped agentme XDR files so exclusions can be chosen by
|
|
30
29
|
stable path.
|
|
31
30
|
3. If the runtime environment cannot enumerate the shipped XDRs directly, fall back to the package
|
|
@@ -41,16 +40,13 @@ separately instead of using presets to narrow the XDR set.
|
|
|
41
40
|
- project shape (single package, monorepo, library, application, CLI, service)
|
|
42
41
|
- frameworks and tooling (`next.config.*`, `vite.config.*`, `jest.config.*`, `.mise.toml`,
|
|
43
42
|
`docker-compose.*`, CI workflows, Makefiles)
|
|
44
|
-
- existing agent workflow files (`.xdrs/`, `AGENTS.md`, `.github/agents/`, `.github/prompts
|
|
45
|
-
`.specify/`, `.vscode/settings.json`)
|
|
43
|
+
- existing agent workflow files (`.xdrs/`, `AGENTS.md`, `.github/agents/`, `.github/prompts/`)
|
|
46
44
|
2. Determine whether the repository already has:
|
|
47
45
|
- XDR-driven guidance in `.xdrs/`
|
|
48
|
-
- spec-driven workflow artifacts from speckit
|
|
49
46
|
- local conventions that would make a preset redundant or conflicting
|
|
50
47
|
3. Summarize the project in a short decision note before selecting exclusions:
|
|
51
48
|
- what the project is
|
|
52
49
|
- which languages and frameworks are present
|
|
53
|
-
- whether it appears to want only XDRs or also agent workflow scaffolding such as `speckit`
|
|
54
50
|
4. From that analysis, build a candidate list of XDRs that are obviously out of scope for the
|
|
55
51
|
repository. Only include exclusions when the mismatch is concrete, for example:
|
|
56
52
|
- language-specific XDRs for languages not used in the repository
|
|
@@ -59,7 +55,7 @@ separately instead of using presets to narrow the XDR set.
|
|
|
59
55
|
5. Do not exclude baseline or broadly applicable guidance just because the project is small or
|
|
60
56
|
simple. Exclusions must remove only XDRs that would clearly mislead the repository.
|
|
61
57
|
|
|
62
|
-
### Phase 3: Select exclusions
|
|
58
|
+
### Phase 3: Select exclusions
|
|
63
59
|
|
|
64
60
|
1. Start from the full shipped agentme XDR set as the default installation target.
|
|
65
61
|
2. Reduce that set only by excluding the XDRs that clearly do not fit the repository. Use
|
|
@@ -68,18 +64,10 @@ separately instead of using presets to narrow the XDR set.
|
|
|
68
64
|
- `.xdrs/agentme/edrs/devops/005-monorepo-structure.md` for non-monorepos
|
|
69
65
|
- `.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md` for projects without
|
|
70
66
|
a long-running service surface
|
|
71
|
-
3.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
baseline decision framework.
|
|
75
|
-
- Add `speckit` only when the repository already uses speckit artifacts, explicitly asks for
|
|
76
|
-
specification-driven workflow support, or clearly needs the `.github/agents/`, `.github/prompts/`,
|
|
77
|
-
`.specify/`, and related workflow files shipped by that preset.
|
|
78
|
-
5. If the repository does not want agentme XDRs and does not want any optional workflow artifacts,
|
|
79
|
-
stop and explain why instead of forcing an installation.
|
|
80
|
-
6. State the final decision with:
|
|
67
|
+
3. If the repository does not want agentme XDRs, stop and explain why instead of forcing an
|
|
68
|
+
installation.
|
|
69
|
+
4. State the final decision with:
|
|
81
70
|
- whether full XDR extraction will run
|
|
82
|
-
- whether `speckit` will be added
|
|
83
71
|
- the final exclude list with one-line rationale per excluded XDR
|
|
84
72
|
|
|
85
73
|
### Phase 4: Install the selected presets
|
|
@@ -91,28 +79,18 @@ separately instead of using presets to narrow the XDR set.
|
|
|
91
79
|
npx -y agentme extract --output . --all --exclude <xdr-path> --exclude <xdr-path>
|
|
92
80
|
```
|
|
93
81
|
|
|
94
|
-
3. If the
|
|
95
|
-
stays explicit:
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
npx -y agentme extract --output . --presets speckit
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
4. If the user wants a pinned dependency instead of one-off extraction, prefer:
|
|
82
|
+
3. If the user wants a pinned dependency instead of one-off extraction, prefer:
|
|
102
83
|
|
|
103
84
|
```sh
|
|
104
85
|
pnpm add -D agentme
|
|
105
86
|
pnpm exec agentme extract --output . --all --exclude <xdr-path> --exclude <xdr-path>
|
|
106
|
-
pnpm exec agentme extract --output . --presets speckit
|
|
107
87
|
```
|
|
108
88
|
|
|
109
|
-
|
|
89
|
+
4. After extraction, verify that the expected XDR files now exist:
|
|
110
90
|
- `.xdrs/index.md`, `.xdrs/agentme/`, `AGENTS.md`
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
8. Report whether full XDR extraction ran, whether `speckit` was added, which XDRs were excluded
|
|
115
|
-
with `--exclude`, and the paths that were added or updated.
|
|
91
|
+
5. Also verify that each excluded XDR path is absent from the extracted output.
|
|
92
|
+
6. Report whether full XDR extraction ran, which XDRs were excluded with `--exclude`, and the
|
|
93
|
+
paths that were added or updated.
|
|
116
94
|
|
|
117
95
|
### Phase 5: Handle conflicts and repeat runs
|
|
118
96
|
|
|
@@ -130,28 +108,24 @@ separately instead of using presets to narrow the XDR set.
|
|
|
130
108
|
|
|
131
109
|
Input: "Install the right agentme XDR presets for this Node.js library"
|
|
132
110
|
- Inventory the shipped agentme XDR files
|
|
133
|
-
- Analyze the repository and detect a JavaScript library with Makefiles
|
|
111
|
+
- Analyze the repository and detect a JavaScript library with Makefiles
|
|
134
112
|
- Exclude `.xdrs/agentme/edrs/application/010-golang-project-tooling.md` and `.xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md`
|
|
135
113
|
- Run `npx -y agentme extract --output . --all --exclude .xdrs/agentme/edrs/application/010-golang-project-tooling.md --exclude .xdrs/agentme/edrs/observability/011-service-health-check-endpoint.md`
|
|
136
114
|
|
|
137
|
-
Input: "Set up agentme for this repo
|
|
115
|
+
Input: "Set up agentme for this repo"
|
|
138
116
|
- Inventory the shipped agentme XDR files
|
|
139
|
-
- Detect `.
|
|
140
|
-
- Choose full XDR extraction
|
|
117
|
+
- Detect `.xdrs/`, `.github/agents/`, and `.github/prompts/`
|
|
118
|
+
- Choose full XDR extraction
|
|
141
119
|
- Exclude only the XDRs that are concretely irrelevant for the repository shape
|
|
142
120
|
- Run `npx -y agentme extract --output . --all --exclude <irrelevant-xdr-path>`
|
|
143
|
-
- Run `npx -y agentme extract --output . --presets speckit`
|
|
144
121
|
|
|
145
122
|
## Edge Cases
|
|
146
123
|
|
|
147
124
|
- If the CLI cannot directly list the shipped XDRs, use the package's published metadata or README
|
|
148
125
|
as a fallback instead of failing immediately.
|
|
149
|
-
- If the repository already has `.xdrs
|
|
150
|
-
set unless the user requests the workflow files.
|
|
126
|
+
- If the repository already has `.xdrs/`, install or update the XDR set.
|
|
151
127
|
- If a candidate exclusion is debatable, keep the XDR. The skill should exclude only records that
|
|
152
128
|
clearly do not make sense for the project.
|
|
153
|
-
- If the user asks specifically for XDRs, do not add `speckit` unless they also request that
|
|
154
|
-
workflow.
|
|
155
129
|
- If preset extraction would overwrite locally customized agent files, warn the user and describe the
|
|
156
130
|
likely merge points.
|
|
157
131
|
- If the repository is a spike or intentionally minimal experiment, still prefer the smallest preset
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: 005-create-python-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a Python project following the standard tooling
|
|
5
5
|
and layout defined in agentme-edr-014. Activate this skill when the user asks to create,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: 002-monorepo-setup
|
|
3
3
|
description: >
|
|
4
4
|
Step-by-step instructions for setting up and scaffolding a new monorepo following the standard
|
|
5
5
|
layout, naming conventions, Makefiles, Mise tooling, and README requirements defined in
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agentme
|
|
2
2
|
|
|
3
|
-
Curated distribution package of XDRs and
|
|
3
|
+
Curated distribution package of XDRs and AI agent workflow files for AI-assisted software development.
|
|
4
4
|
|
|
5
5
|
This collection is being updated as we develop applications and feel the need for new instructions and skills to help with AI agents.
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ For guidance on turning recurring delivery friction into reusable decision recor
|
|
|
8
8
|
|
|
9
9
|
## Getting Started
|
|
10
10
|
|
|
11
|
-
This will extract all the features of agentme (skills, github configurations,
|
|
11
|
+
This will extract all the features of agentme (skills, github configurations, xdrs collection):
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
npx agentme
|
|
@@ -27,7 +27,6 @@ mise exec -- pnpm exec agentme check --output . --presets basic
|
|
|
27
27
|
agentme is published as an npm package and consumed through `filedist`-based extraction. It ships a curated set of reusable artifacts for other repositories:
|
|
28
28
|
|
|
29
29
|
- XDRs in `.xdrs/agentme/` for engineering, architecture, testing, tooling, and CI/CD standards.
|
|
30
|
-
- speckit agent files in `.github/`, `.specify/`, and `.vscode/` for specification-driven AI development workflows.
|
|
31
30
|
|
|
32
31
|
The package is intentionally static: consumers install it as a development dependency, extract files into their own repository, and commit the generated output.
|
|
33
32
|
|
|
@@ -36,7 +35,6 @@ The package is intentionally static: consumers install it as a development depen
|
|
|
36
35
|
| Preset | Contents |
|
|
37
36
|
| --- | --- |
|
|
38
37
|
| `basic` | `xdrs-core` baseline ADRs, `AGENTS.md`, and agentme XDRs |
|
|
39
|
-
| `speckit` | speckit agents, prompts, templates, scripts, memory files, and VS Code settings |
|
|
40
38
|
| no preset | all shipped artifacts combined |
|
|
41
39
|
|
|
42
40
|
Typical consumer workflow:
|
|
@@ -68,16 +66,6 @@ This is useful when you want feature work to leave behind maintainable documenta
|
|
|
68
66
|
- product requirements and business constraints;
|
|
69
67
|
- business decisions that explain why the feature behaves the way it does.
|
|
70
68
|
|
|
71
|
-
### Keep project documentation current through the speckit workflow
|
|
72
|
-
|
|
73
|
-
Use the `speckit` distribution when you want the delivery workflow itself to instruct agents to maintain ADRs, EDRs, and BDRs as implementation evolves. In this model, feature development and project documentation happen together: major technical and business decisions are continuously written back into XDRs instead of being deferred to a separate documentation pass.
|
|
74
|
-
|
|
75
|
-
This is useful when you want to:
|
|
76
|
-
|
|
77
|
-
- keep the project decision log up to date as new features are specified and implemented;
|
|
78
|
-
- have architecture, engineering, and business documentation generated in a consistent XDR format;
|
|
79
|
-
- reuse the same XDR-based approach across other repositories that consume agentme.
|
|
80
|
-
|
|
81
69
|
## Development
|
|
82
70
|
|
|
83
71
|
Install [Mise](https://mise.jdx.dev/getting-started.html), then bootstrap the repository through the root `Makefile`:
|
|
@@ -110,8 +98,7 @@ What these targets do:
|
|
|
110
98
|
├── bin/ CLI entrypoint delegated to filedist
|
|
111
99
|
├── dist/ Generated npm package tarballs
|
|
112
100
|
├── examples/ Runnable verification of consumer extraction behavior
|
|
113
|
-
├── .github/ Shipped
|
|
114
|
-
├── .specify/ Shipped speckit memory, scripts, and templates
|
|
101
|
+
├── .github/ Shipped agent and prompt files
|
|
115
102
|
└── .xdrs/ Shipped XDRs plus local project-only decision records
|
|
116
103
|
```
|
|
117
104
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"filedist": "^0.
|
|
6
|
+
"filedist": "^0.36.0"
|
|
7
7
|
},
|
|
8
8
|
"bin": "bin/filedist.js",
|
|
9
9
|
"files": [
|
|
@@ -11,17 +11,13 @@
|
|
|
11
11
|
"bin/filedist.js",
|
|
12
12
|
".filedist-package.yml",
|
|
13
13
|
".xdrs/agentme/**",
|
|
14
|
-
".xdrs/index.md"
|
|
15
|
-
".github/agents/speckit*",
|
|
16
|
-
".github/prompts/speckit*",
|
|
17
|
-
".specify/**",
|
|
18
|
-
".vscode/settings.json"
|
|
14
|
+
".xdrs/index.md"
|
|
19
15
|
],
|
|
20
16
|
"repository": {
|
|
21
17
|
"type": "git",
|
|
22
18
|
"url": "https://github.com/flaviostutz/agentme.git"
|
|
23
19
|
},
|
|
24
20
|
"devDependencies": {
|
|
25
|
-
"xdrs-core": "^0.
|
|
21
|
+
"xdrs-core": "^0.30.1"
|
|
26
22
|
}
|
|
27
23
|
}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## User Input
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
$ARGUMENTS
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
You **MUST** consider the user input before proceeding (if not empty).
|
|
12
|
-
|
|
13
|
-
## Goal
|
|
14
|
-
|
|
15
|
-
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.
|
|
16
|
-
|
|
17
|
-
## Operating Constraints
|
|
18
|
-
|
|
19
|
-
**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
|
|
20
|
-
|
|
21
|
-
**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit.analyze`.
|
|
22
|
-
|
|
23
|
-
## Execution Steps
|
|
24
|
-
|
|
25
|
-
### 1. Initialize Analysis Context
|
|
26
|
-
|
|
27
|
-
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
|
|
28
|
-
|
|
29
|
-
- SPEC = FEATURE_DIR/spec.md
|
|
30
|
-
- PLAN = FEATURE_DIR/plan.md
|
|
31
|
-
- TASKS = FEATURE_DIR/tasks.md
|
|
32
|
-
|
|
33
|
-
Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
|
|
34
|
-
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
35
|
-
|
|
36
|
-
### 2. Load Artifacts (Progressive Disclosure)
|
|
37
|
-
|
|
38
|
-
Load only the minimal necessary context from each artifact:
|
|
39
|
-
|
|
40
|
-
**From spec.md:**
|
|
41
|
-
|
|
42
|
-
- Overview/Context
|
|
43
|
-
- Functional Requirements
|
|
44
|
-
- Non-Functional Requirements
|
|
45
|
-
- User Stories
|
|
46
|
-
- Edge Cases (if present)
|
|
47
|
-
|
|
48
|
-
**From plan.md:**
|
|
49
|
-
|
|
50
|
-
- Architecture/stack choices
|
|
51
|
-
- Data Model references
|
|
52
|
-
- Phases
|
|
53
|
-
- Technical constraints
|
|
54
|
-
|
|
55
|
-
**From tasks.md:**
|
|
56
|
-
|
|
57
|
-
- Task IDs
|
|
58
|
-
- Descriptions
|
|
59
|
-
- Phase grouping
|
|
60
|
-
- Parallel markers [P]
|
|
61
|
-
- Referenced file paths
|
|
62
|
-
|
|
63
|
-
**From constitution:**
|
|
64
|
-
|
|
65
|
-
- Load `.specify/memory/constitution.md` for principle validation
|
|
66
|
-
|
|
67
|
-
### 3. Build Semantic Models
|
|
68
|
-
|
|
69
|
-
Create internal representations (do not include raw artifacts in output):
|
|
70
|
-
|
|
71
|
-
- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`)
|
|
72
|
-
- **User story/action inventory**: Discrete user actions with acceptance criteria
|
|
73
|
-
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
|
|
74
|
-
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
|
|
75
|
-
|
|
76
|
-
### 4. Detection Passes (Token-Efficient Analysis)
|
|
77
|
-
|
|
78
|
-
Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
|
|
79
|
-
|
|
80
|
-
#### A. Duplication Detection
|
|
81
|
-
|
|
82
|
-
- Identify near-duplicate requirements
|
|
83
|
-
- Mark lower-quality phrasing for consolidation
|
|
84
|
-
|
|
85
|
-
#### B. Ambiguity Detection
|
|
86
|
-
|
|
87
|
-
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
|
|
88
|
-
- Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
|
|
89
|
-
|
|
90
|
-
#### C. Underspecification
|
|
91
|
-
|
|
92
|
-
- Requirements with verbs but missing object or measurable outcome
|
|
93
|
-
- User stories missing acceptance criteria alignment
|
|
94
|
-
- Tasks referencing files or components not defined in spec/plan
|
|
95
|
-
|
|
96
|
-
#### D. Constitution Alignment
|
|
97
|
-
|
|
98
|
-
- Any requirement or plan element conflicting with a MUST principle
|
|
99
|
-
- Missing mandated sections or quality gates from constitution
|
|
100
|
-
|
|
101
|
-
#### E. Coverage Gaps
|
|
102
|
-
|
|
103
|
-
- Requirements with zero associated tasks
|
|
104
|
-
- Tasks with no mapped requirement/story
|
|
105
|
-
- Non-functional requirements not reflected in tasks (e.g., performance, security)
|
|
106
|
-
|
|
107
|
-
#### F. Inconsistency
|
|
108
|
-
|
|
109
|
-
- Terminology drift (same concept named differently across files)
|
|
110
|
-
- Data entities referenced in plan but absent in spec (or vice versa)
|
|
111
|
-
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
|
|
112
|
-
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
|
|
113
|
-
|
|
114
|
-
### 5. Severity Assignment
|
|
115
|
-
|
|
116
|
-
Use this heuristic to prioritize findings:
|
|
117
|
-
|
|
118
|
-
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
|
|
119
|
-
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
|
|
120
|
-
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
|
|
121
|
-
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
|
|
122
|
-
|
|
123
|
-
### 6. Produce Compact Analysis Report
|
|
124
|
-
|
|
125
|
-
Output a Markdown report (no file writes) with the following structure:
|
|
126
|
-
|
|
127
|
-
## Specification Analysis Report
|
|
128
|
-
|
|
129
|
-
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
|
130
|
-
|----|----------|----------|-------------|---------|----------------|
|
|
131
|
-
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
|
|
132
|
-
|
|
133
|
-
(Add one row per finding; generate stable IDs prefixed by category initial.)
|
|
134
|
-
|
|
135
|
-
**Coverage Summary Table:**
|
|
136
|
-
|
|
137
|
-
| Requirement Key | Has Task? | Task IDs | Notes |
|
|
138
|
-
|-----------------|-----------|----------|-------|
|
|
139
|
-
|
|
140
|
-
**Constitution Alignment Issues:** (if any)
|
|
141
|
-
|
|
142
|
-
**Unmapped Tasks:** (if any)
|
|
143
|
-
|
|
144
|
-
**Metrics:**
|
|
145
|
-
|
|
146
|
-
- Total Requirements
|
|
147
|
-
- Total Tasks
|
|
148
|
-
- Coverage % (requirements with >=1 task)
|
|
149
|
-
- Ambiguity Count
|
|
150
|
-
- Duplication Count
|
|
151
|
-
- Critical Issues Count
|
|
152
|
-
|
|
153
|
-
### 7. Provide Next Actions
|
|
154
|
-
|
|
155
|
-
At end of report, output a concise Next Actions block:
|
|
156
|
-
|
|
157
|
-
- If CRITICAL issues exist: Recommend resolving before `/speckit.implement`
|
|
158
|
-
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
|
|
159
|
-
- Provide explicit command suggestions: e.g., "Run /speckit.specify with refinement", "Run /speckit.plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
|
|
160
|
-
|
|
161
|
-
### 8. Offer Remediation
|
|
162
|
-
|
|
163
|
-
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
|
|
164
|
-
|
|
165
|
-
## Operating Principles
|
|
166
|
-
|
|
167
|
-
### Context Efficiency
|
|
168
|
-
|
|
169
|
-
- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
|
|
170
|
-
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
|
|
171
|
-
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
|
|
172
|
-
- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
|
|
173
|
-
|
|
174
|
-
### Analysis Guidelines
|
|
175
|
-
|
|
176
|
-
- **NEVER modify files** (this is read-only analysis)
|
|
177
|
-
- **NEVER hallucinate missing sections** (if absent, report them accurately)
|
|
178
|
-
- **Prioritize constitution violations** (these are always CRITICAL)
|
|
179
|
-
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
|
|
180
|
-
- **Report zero issues gracefully** (emit success report with coverage statistics)
|
|
181
|
-
|
|
182
|
-
## Context
|
|
183
|
-
|
|
184
|
-
$ARGUMENTS
|