aw-spec-cli 0.1.1 → 0.1.2
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/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +18 -5
- package/assets/.agents/skills/aw-spec-analyze/SKILL.md +4 -0
- package/assets/.agents/skills/aw-spec-clarify/SKILL.md +4 -0
- package/assets/.agents/skills/aw-spec-constitution/SKILL.md +4 -0
- package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +268 -0
- package/assets/.agents/skills/aw-spec-foundation/SKILL.md +219 -49
- package/assets/.agents/skills/aw-spec-implement/SKILL.md +11 -0
- package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +209 -0
- package/assets/.agents/skills/aw-spec-plan/SKILL.md +4 -0
- package/assets/.agents/skills/aw-spec-specify/SKILL.md +4 -0
- package/assets/.agents/skills/aw-spec-tasks/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +18 -5
- package/assets/.claude/skills/aw-spec-analyze/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-clarify/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-constitution/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +268 -0
- package/assets/.claude/skills/aw-spec-foundation/SKILL.md +219 -49
- package/assets/.claude/skills/aw-spec-implement/SKILL.md +11 -0
- package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +209 -0
- package/assets/.claude/skills/aw-spec-plan/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-specify/SKILL.md +4 -0
- package/assets/.claude/skills/aw-spec-tasks/SKILL.md +4 -0
- package/assets/.kilocode/rules/specify-rules.md +4 -0
- package/assets/.kilocode/workflows/aw-spec-addcomponent.md +129 -0
- package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +31 -0
- package/assets/.kilocode/workflows/aw-spec-analyze.md +296 -0
- package/assets/.kilocode/workflows/aw-spec-checklist.md +374 -0
- package/assets/.kilocode/workflows/aw-spec-clarify.md +320 -0
- package/assets/.kilocode/workflows/aw-spec-constitution.md +194 -0
- package/assets/.kilocode/workflows/aw-spec-fast-implement.md +263 -0
- package/assets/.kilocode/workflows/aw-spec-foundation.md +358 -0
- package/assets/.kilocode/workflows/aw-spec-implement.md +279 -0
- package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +204 -0
- package/assets/.kilocode/workflows/aw-spec-plan.md +221 -0
- package/assets/.kilocode/workflows/aw-spec-select-domain.md +73 -0
- package/assets/.kilocode/workflows/aw-spec-specify.md +382 -0
- package/assets/.kilocode/workflows/aw-spec-tasks.md +259 -0
- package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +107 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/utils/copy-assets.d.ts +8 -1
- package/dist/utils/copy-assets.d.ts.map +1 -1
- package/dist/utils/copy-assets.js +1 -0
- package/dist/utils/copy-assets.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,17 @@ $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
21
|
|
|
22
|
+
## Context Reuse (cross-command dedup)
|
|
23
|
+
|
|
24
|
+
**Skip Read-ing any file already in this conversation.** Before loading a standards/domain/template/spec file this command names, check whether it is already in context (loaded earlier here or by a prior `/aw-spec-*` command). If present and unchanged, reuse it and **skip the Read** — only Read files not yet loaded. A file already in context still counts as loaded; this just avoids the redundant re-read.
|
|
25
|
+
|
|
26
|
+
## Project Structure Gate (run before loading standards)
|
|
27
|
+
|
|
28
|
+
**Before loading standards or writing code, confirm a scaffolded app exists** — the output of `/aw-spec-foundation`, not just `.aw-spec/`/`docs/`/`specs/` framework files. Check the repo root (Glob/Bash) for a real build entrypoint, ignoring matches only inside `.aw-spec/`/`docs/`/`specs/`: `*.sln` or `*.csproj` under `src/` (.NET/AppWeaver), else `package.json`/`pom.xml`/`build.gradle`/`go.mod`/`Cargo.toml`/`pyproject.toml` etc.
|
|
29
|
+
|
|
30
|
+
- **None found → STOP, no side effects** (don't load standards, run hooks, or write anything): tell the developer *"No scaffolded project found — run `/aw-spec-foundation ModularMonolith <AppName>` (or `VerticalSlice <AppName>`) first, then re-run."*
|
|
31
|
+
- **Found →** use its solution/host-project path as the implementation target and continue.
|
|
32
|
+
|
|
22
33
|
## Auto-Loaded Engineering Standards (Required Context)
|
|
23
34
|
|
|
24
35
|
**Before doing anything else in this command, load the project engineering-standards files listed below into context using the Read tool.** These were previously supplied manually as `@docs/...` mentions; they are now loaded automatically so the user does not need to pass them. Rules:
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-minimal-implementation"
|
|
3
|
+
description: "Single-step implementation tier: takes a requirement DIRECTLY as the argument (an `Aggregate/Feature` token + free-text requirement) and implements it in one load-and-execute pass — no /aw-spec-specify, no spec.md, no plan.md/tasks.md, no analysis report. Loads a curated technical + domain rule set once, builds a structurally complete vertical slice (implementing what the loaded rules support, stubbing only genuinely-external runtime services), emits a final execution note, then offers an opt-in breakdown of unclear areas. For audited/traceable work use /aw-spec-fast-implement or the full plan→tasks→analyze→implement flow instead."
|
|
4
|
+
argument-hint: "<Aggregate>/<Feature> then the requirement text — e.g. MedicinalProduct/RegisterMedicinalProduct Allow an authorized user to register a new medicinal product..."
|
|
5
|
+
compatibility: "Requires a scaffolded application project (output of /aw-spec-foundation) and the .aw-spec/ directory. Does NOT require a spec.md or /aw-spec-specify."
|
|
6
|
+
metadata:
|
|
7
|
+
author: "github-aw-spec"
|
|
8
|
+
source: "templates/commands/minimal-implementation.md"
|
|
9
|
+
user-invocable: true
|
|
10
|
+
disable-model-invocation: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## User Input
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
|
+
|
|
22
|
+
**The argument IS the requirement — this is a single-step command.** `$ARGUMENTS` contains an `Aggregate/Feature` token (two PascalCase segments separated by `/`, e.g. `MedicinalProduct/RegisterMedicinalProduct`) followed by the free-text requirement (the feature description + acceptance criteria). There is **no** `/aw-spec-specify` step and **no** `spec.md`: parse the requirement straight from this argument and implement it in one pass. If `$ARGUMENTS` is empty, or carries an `Aggregate/Feature` token but no requirement text, STOP and show usage: `/aw-spec-minimal-implementation <Aggregate>/<Feature> <requirement text>`.
|
|
23
|
+
|
|
24
|
+
## Context Reuse (cross-command dedup)
|
|
25
|
+
|
|
26
|
+
**Skip Read-ing any file already in this conversation.** Before loading a standards/domain/template/spec file this command names, check whether it is already in context (loaded earlier here or by a prior `/aw-spec-*` command). If present and unchanged, reuse it and **skip the Read** — only Read files not yet loaded. A file already in context still counts as loaded; this just avoids the redundant re-read.
|
|
27
|
+
|
|
28
|
+
## When to use this command
|
|
29
|
+
|
|
30
|
+
**Single-step tier.** Takes the requirement directly from the argument and implements it in one pass — **no** `/aw-spec-specify`, **no** `spec.md`/`plan.md`/`tasks.md`/research/contracts/analysis — loading a curated rule set (technical standards + the domain's single-step set) once, ending with a final note + an opt-in unclear-areas breakdown. It implements what the loaded rules support; only a **genuinely-external runtime service** (live terminology server, external FHIR endpoint) is left as an injectable fixture port, recorded as a deferral.
|
|
31
|
+
|
|
32
|
+
**Non-negotiable:** scaffolded project present (gate below), requirement supplied, constitution MUST principles honored, architecture patterns (vertical slices, CQRS, folder structure) + the aggregate's in-aggregate invariants (NDC format, ≥1 ingredient, ≥1 packaging, Draft guard) implemented, and an in-memory coverage check before writing code. **Escalate to `/aw-spec-fast-implement`** (or the full flow) if you need the heavy integrations actually built, traceable artifacts, or the work is audited/complex.
|
|
33
|
+
|
|
34
|
+
## Project Structure Gate (run before loading standards)
|
|
35
|
+
|
|
36
|
+
**Before loading standards or writing code, confirm a scaffolded app exists** — the output of `/aw-spec-foundation`, not just `.aw-spec/`/`docs/`/`specs/` framework files. Check the repo root (Glob/Bash) for a real build entrypoint, ignoring matches only inside `.aw-spec/`/`docs/`/`specs/`: `*.sln` or `*.csproj` under `src/` (.NET/AppWeaver), else `package.json`/`pom.xml`/`build.gradle`/`go.mod`/`Cargo.toml`/`pyproject.toml` etc.
|
|
37
|
+
|
|
38
|
+
- **None found → STOP, no side effects** (don't load standards, run hooks, or write anything): tell the developer *"No scaffolded project found — run `/aw-spec-foundation ModularMonolith <AppName>` (or `VerticalSlice <AppName>`) first, then re-run."*
|
|
39
|
+
- **Found →** use its solution/host-project path as the implementation target and continue.
|
|
40
|
+
|
|
41
|
+
## Auto-Loaded Engineering Standards (Required Context)
|
|
42
|
+
|
|
43
|
+
**Load these files once with the Read tool, before the Pre-Execution Checks.** Treat them as authoritative (second only to `.aw-spec/memory/constitution.md`); skip any that don't exist. This list is the domain-agnostic **technical knob** (the domain knob is the `## /aw-spec-minimal-implementation` heading in `comandrulemap.md`); edit it to tune richness, or add a file with an `@` mention.
|
|
44
|
+
|
|
45
|
+
Technical standards for `/aw-spec-minimal-implementation`:
|
|
46
|
+
- docs/architecture/folder-structure.md
|
|
47
|
+
- docs/architecture/vertical-slices.md
|
|
48
|
+
- docs/architecture/cqrs.md
|
|
49
|
+
- docs/architecture/persistence.md
|
|
50
|
+
- docs/architecture/eventing.md
|
|
51
|
+
- docs/domain/domain-driven-design.md
|
|
52
|
+
- docs/security/authorization.md
|
|
53
|
+
- docs/security/auditing.md
|
|
54
|
+
- docs/security/data-classification.md
|
|
55
|
+
- docs/governance/coding-standards.md
|
|
56
|
+
- docs/governance/dependency-policy.md
|
|
57
|
+
- docs/glossary/ai-rules.md
|
|
58
|
+
|
|
59
|
+
## Domain Rule-File Selection (once)
|
|
60
|
+
|
|
61
|
+
After the technical standards are loaded, resolve the active domain and load the domain's curated rule set — once.
|
|
62
|
+
|
|
63
|
+
1. **Resolve the active domain.** Read `.aw-spec/domain.json`'s `domain`. Load **exactly the files listed** under the **`## /aw-spec-minimal-implementation`** heading in `docs/domainspecs/<domain>/comandrulemap.md` (the per-domain knob; the set varies by domain).
|
|
64
|
+
- **Fallback:** if that heading is absent, load `domain-driven-design.domain.md` + the domain's terms file (`pharma-terms.md`/`clinical-terms.md`) + lifecycle file (`product-lifecycle.domain.md`) if present. A missing heading is **not** an error.
|
|
65
|
+
2. **Domain gate (missing domain or rules).** If `.aw-spec/domain.json` is absent or its `domain` is empty, **or** `docs/domainspecs/<domain>/comandrulemap.md` does not exist:
|
|
66
|
+
- If no domain is set, do **not** hard-block. Note "no domain set / domain rules unavailable — running technical-only" and continue with just the technical standards (plus any `@`-mentioned files).
|
|
67
|
+
- Exception: if the user explicitly asked to enforce a domain and none is set, tell them to run `/aw-spec-select-domain` and stop.
|
|
68
|
+
3. **Load the minimal set.** Because the set is already small, default to loading **all** of it (no selection prompt needed). Read each file once; skip missing files silently. In an interactive session you MAY offer a one-line confirm, but the default is "load all of the minimal set".
|
|
69
|
+
4. **Final context set** = technical standards + the domain's rule set + any `@`-mentioned files (always loaded in addition).
|
|
70
|
+
5. Proceed to the Pre-Execution Checks only after these are loaded.
|
|
71
|
+
|
|
72
|
+
## Pre-Execution Checks
|
|
73
|
+
|
|
74
|
+
**Check for collapsed pre-hooks**:
|
|
75
|
+
- Check if `.aw-spec/extensions.yml` exists. If not, skip silently.
|
|
76
|
+
- If it exists, read it and collect enabled hook entries under `hooks.before_implement` (the only pre-point relevant to an implementation-only tier). Treat hooks without `enabled` as enabled; skip `enabled: false`.
|
|
77
|
+
- Do **not** evaluate `condition` expressions: run a hook only if it has no non-empty `condition`; otherwise leave it to the HookExecutor.
|
|
78
|
+
- When building slash commands from hook command names, replace dots with hyphens (`aw-spec.git.commit` → `/aw-spec-git-commit`).
|
|
79
|
+
- For each executable hook, emit:
|
|
80
|
+
- **Optional** (`optional: true`):
|
|
81
|
+
```
|
|
82
|
+
## Extension Hooks
|
|
83
|
+
|
|
84
|
+
**Optional Pre-Hook**: {extension}
|
|
85
|
+
Command: `/{command}`
|
|
86
|
+
Description: {description}
|
|
87
|
+
|
|
88
|
+
Prompt: {prompt}
|
|
89
|
+
To execute: `/{command}`
|
|
90
|
+
```
|
|
91
|
+
- **Mandatory** (`optional: false`):
|
|
92
|
+
```
|
|
93
|
+
## Extension Hooks
|
|
94
|
+
|
|
95
|
+
**Automatic Pre-Hook**: {extension}
|
|
96
|
+
Executing: `/{command}`
|
|
97
|
+
EXECUTE_COMMAND: {command}
|
|
98
|
+
|
|
99
|
+
Wait for the result of the hook command before proceeding to the Outline.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Outline
|
|
103
|
+
|
|
104
|
+
This is a **single-step** flow: parse the requirement from the argument, derive the design in your
|
|
105
|
+
head, and implement — all in one pass. No scripts seed artifacts; nothing is read from or written to
|
|
106
|
+
`specs/`.
|
|
107
|
+
|
|
108
|
+
### 1. Parse the requirement (from the argument — no spec.md)
|
|
109
|
+
|
|
110
|
+
- From `$ARGUMENTS`, take the leading **`Aggregate/Feature`** token (two PascalCase segments split by `/`, e.g. `MedicinalProduct/RegisterMedicinalProduct`) and treat the remaining text as the **requirement** (description + acceptance criteria). If no `Aggregate/Feature` token is given, derive `<Feature>` from the requirement and `<Aggregate>` from its primary domain entity.
|
|
111
|
+
- If the argument is empty, or carries an `Aggregate/Feature` token but no requirement text, **STOP** with usage (see the User Input section). Do **not** invent a requirement.
|
|
112
|
+
- The **implementation target** is the scaffolded application source tree located by the Project Structure Gate above (its solution/host project). You will place the slice under that app for `<Aggregate>/<Feature>`.
|
|
113
|
+
|
|
114
|
+
### 2. Build the internal model (in your head — collapses specify+plan+tasks)
|
|
115
|
+
|
|
116
|
+
Derive, **without writing any files**:
|
|
117
|
+
- **User story + acceptance criteria** from the requirement (what success looks like).
|
|
118
|
+
- **Functional requirements** — give them working `FR-###` keys for the coverage check and the note.
|
|
119
|
+
- **Key entities / aggregate shape**: the aggregate root, its value objects and child entities, and the **in-aggregate invariants** the acceptance criteria imply (e.g. NDC format + uniqueness, ≥1 ingredient, ≥1 packaging, Draft on create).
|
|
120
|
+
- **Constitution**: IF `.aw-spec/memory/constitution.md` exists, load it; its MUST principles are authoritative even here.
|
|
121
|
+
- Track every **ambiguity / missing detail / assumption** as you go — these feed the opt-in part of the Final Execution Note.
|
|
122
|
+
- Do **not** create `spec.md`, `plan.md`, `tasks.md`, `research.md`, `data-model.md`, `contracts/`, or `quickstart.md`.
|
|
123
|
+
|
|
124
|
+
### 3. Resolve unclear areas without blocking
|
|
125
|
+
|
|
126
|
+
For each ambiguity or missing detail in the requirement, choose a **documented reasonable assumption** and proceed — this is single-step, so do **not** stop to ask mid-way. Keep a running list of (a) assumptions made and (b) genuinely unclear/under-specified items; both surface in the opt-in section of the Final Execution Note.
|
|
127
|
+
|
|
128
|
+
### 4. Implement directly from the requirement
|
|
129
|
+
|
|
130
|
+
Implement straight into the scaffolded app's source tree (no design files):
|
|
131
|
+
- **Structure**: follow `docs/architecture/folder-structure.md` and `vertical-slices.md` — place the feature as a vertical slice under `<Aggregate>/<Feature>` inside the app located by the Project Structure Gate.
|
|
132
|
+
- **Behavior**: apply CQRS command/query separation per `cqrs.md`; model the entities derived in step 2; implement each Functional Requirement and the primary user-story/acceptance flow.
|
|
133
|
+
- **Conventions**: follow `coding-standards.md` and `ai-rules.md` (loaded in the technical set), the loaded domain rules, and the domain's ubiquitous-language/terms glossary for correct vocabulary in names/labels.
|
|
134
|
+
- **Implement what the loaded rules support; stub only genuinely-external services**: implement the aggregate, value objects, entities, and **in-aggregate invariants** for real, and honor whatever domain rules are in this domain's set (e.g. NDC format/structure, ATC/identifier shape, FHIR mapping shape where those files are loaded). Stub **only** a genuinely-external runtime dependency that can't exist in a self-contained build — e.g. a live terminology server or external FHIR endpoint — behind an **injectable port** with a fixture implementation (e.g. an `INdcValidator` / `ITerminologyValidator`). Never invent real coded values; use a clearly-named sentinel. Record each stub/port as a deferral in the Final Execution Note.
|
|
135
|
+
- **Coverage (in-memory)**: before finishing, confirm every Functional Requirement and the acceptance flow is addressed, the aggregate's structural invariants hold, and nothing violates a constitution MUST. **STOP** and recommend `/aw-spec-fast-implement` only if the *structure itself* can't be expressed simply or a constitution MUST is at stake — not merely because an integration is stubbed.
|
|
136
|
+
- **Tests**: only if the requirement explicitly requests them (this tier defaults to no tests).
|
|
137
|
+
- **Ignore files**: ensure `.gitignore` covers the stack (this is a .NET/C# project by default: `bin/`, `obj/`, `*.user`); append only missing critical patterns.
|
|
138
|
+
|
|
139
|
+
### 5. Build check
|
|
140
|
+
|
|
141
|
+
Build/compile the affected project. Report the result in the final note. If it fails, fix obvious issues; if the failure indicates the task is more complex than "minimal," say so and recommend escalating to `/aw-spec-fast-implement`.
|
|
142
|
+
|
|
143
|
+
## Mandatory Post-Execution Hooks
|
|
144
|
+
|
|
145
|
+
**Complete this before the Final Execution Note.**
|
|
146
|
+
|
|
147
|
+
- Check if `.aw-spec/extensions.yml` exists; if not, skip to the Final Execution Note.
|
|
148
|
+
- Read enabled hook entries under `hooks.after_implement` (the only post-point relevant to an implementation-only tier — this tier produces no plan, so plan/agent-context hooks do not apply). Treat missing `enabled` as enabled; skip `enabled: false`; do not evaluate `condition` expressions.
|
|
149
|
+
- Convert command names dots→hyphens. For each executable hook, emit:
|
|
150
|
+
- **Mandatory** (`optional: false`) — **emit `EXECUTE_COMMAND:`**:
|
|
151
|
+
```
|
|
152
|
+
## Extension Hooks
|
|
153
|
+
|
|
154
|
+
**Automatic Hook**: {extension}
|
|
155
|
+
Executing: `/{command}`
|
|
156
|
+
EXECUTE_COMMAND: {command}
|
|
157
|
+
```
|
|
158
|
+
- **Optional** (`optional: true`):
|
|
159
|
+
```
|
|
160
|
+
## Extension Hooks
|
|
161
|
+
|
|
162
|
+
**Optional Hook**: {extension}
|
|
163
|
+
Command: `/{command}`
|
|
164
|
+
Description: {description}
|
|
165
|
+
|
|
166
|
+
Prompt: {prompt}
|
|
167
|
+
To execute: `/{command}`
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Final Execution Note
|
|
171
|
+
|
|
172
|
+
This is the **only** output record for this tier — there are no spec.md/plan.md/tasks.md files. After the build check, emit a concise note in chat:
|
|
173
|
+
|
|
174
|
+
- **Feature**: `<Aggregate>/<Feature>` (parsed from the argument).
|
|
175
|
+
- **Files created/changed**: each path with a one-line purpose.
|
|
176
|
+
- **Requirement coverage**: a short `FR-### → file(s)` map and the user-story/acceptance flow implemented.
|
|
177
|
+
- **Stubbed / deferred integrations (option "B")**: each heavy integration stubbed behind a port (terminology/NDC/ATC validation, FHIR projection, audit/lifecycle depth, etc.) with its fixture/sentinel name — so the reader knows what is NOT production-grade and must be built (e.g. via `/aw-spec-fast-implement`) before release.
|
|
178
|
+
- **Standards applied**: "technical standards + <domain> single-step rule set" (or "technical-only").
|
|
179
|
+
- **Build status**: pass/fail (and what was fixed).
|
|
180
|
+
|
|
181
|
+
### Then offer the unclear-areas breakdown (opt-in)
|
|
182
|
+
|
|
183
|
+
After the note above, **ask the developer one question** (single-select, e.g. via AskUserQuestion):
|
|
184
|
+
|
|
185
|
+
> *"Want a breakdown of the unclear/ambiguous areas and the assumptions I made, so you can refine them one by one?"* — options **"Yes — list them"** / **"No — leave it"**.
|
|
186
|
+
|
|
187
|
+
- **If the developer says yes** (and in a non-interactive run, default to yes): append an **"⚠️ Unclear Areas & Assumptions to Refine"** section — an **itemized, numbered** list where each entry states: *what was unclear or missing in the requirement*, *the assumption / default chosen*, *where it shows up in the code* (file/symbol), and *how to firm it up*. Order them so the developer can fix them one at a time, and include the stubbed integrations here too (each is a thing to finish).
|
|
188
|
+
- **If the developer says no**: end with just the concise note plus the reminder below.
|
|
189
|
+
|
|
190
|
+
End with: *no design artifacts were persisted — re-run with `/aw-spec-fast-implement` if you need a traceable `plan.md`/`tasks.md` or the heavy integrations fully built.*
|
|
191
|
+
|
|
192
|
+
## Key rules
|
|
193
|
+
|
|
194
|
+
- **Single step**: the requirement comes from the argument — never call `/aw-spec-specify` and never read or create a `spec.md`.
|
|
195
|
+
- Load each rule file **once**; never re-read context you already hold.
|
|
196
|
+
- **Never** create `spec.md`, `plan.md`, `tasks.md`, or Phase-1 design files in this tier — the whole point is no persisted artifacts, just the final note.
|
|
197
|
+
- The constitution and the loaded standards are authoritative. **STOP** on an unjustified constitution MUST violation or a requirement that cannot be met simply — escalate to `/aw-spec-fast-implement` rather than shipping partial/incorrect code.
|
|
198
|
+
- Do **not** block mid-way to clarify: make documented assumptions, finish, then offer the unclear-areas breakdown at the end.
|
|
199
|
+
- This is the tier for **simple, non-domain-rich** tasks. If the work turns out domain-rich or complex, stop and recommend `/aw-spec-fast-implement`.
|
|
200
|
+
|
|
201
|
+
## Done When
|
|
202
|
+
|
|
203
|
+
- [ ] Project Structure Gate passed (scaffolded app present); requirement parsed from the argument
|
|
204
|
+
- [ ] Technical standards and the domain rule set loaded **once** (or technical-only); constitution MUST principles honored
|
|
205
|
+
- [ ] Internal model derived in-head (no spec.md/plan.md/tasks.md/design files created)
|
|
206
|
+
- [ ] Feature implemented as a vertical slice (CQRS, correct folder structure, domain vocabulary) into the scaffolded app
|
|
207
|
+
- [ ] In-memory coverage check passed (every FR + the acceptance flow addressed)
|
|
208
|
+
- [ ] Build checked; extension hooks dispatched or skipped per the rules above
|
|
209
|
+
- [ ] **Final Execution Note** emitted, and the developer asked whether to include the itemized unclear-areas / assumptions breakdown
|
|
@@ -19,6 +19,10 @@ $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
21
|
|
|
22
|
+
## Context Reuse (cross-command dedup)
|
|
23
|
+
|
|
24
|
+
**Skip Read-ing any file already in this conversation.** Before loading a standards/domain/template/spec file this command names, check whether it is already in context (loaded earlier here or by a prior `/aw-spec-*` command). If present and unchanged, reuse it and **skip the Read** — only Read files not yet loaded. A file already in context still counts as loaded; this just avoids the redundant re-read.
|
|
25
|
+
|
|
22
26
|
## Auto-Loaded Engineering Standards (Required Context)
|
|
23
27
|
|
|
24
28
|
**Before doing anything else in this command, load the project engineering-standards files listed below into context using the Read tool.** These were previously supplied manually as `@docs/...` mentions; they are now loaded automatically so the user does not need to pass them. Rules:
|
|
@@ -19,6 +19,10 @@ $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
21
|
|
|
22
|
+
## Context Reuse (cross-command dedup)
|
|
23
|
+
|
|
24
|
+
**Skip Read-ing any file already in this conversation.** Before loading a standards/domain/template/spec file this command names, check whether it is already in context (loaded earlier here or by a prior `/aw-spec-*` command). If present and unchanged, reuse it and **skip the Read** — only Read files not yet loaded. A file already in context still counts as loaded; this just avoids the redundant re-read.
|
|
25
|
+
|
|
22
26
|
## Auto-Loaded Engineering Standards (Required Context)
|
|
23
27
|
|
|
24
28
|
**Before doing anything else in this command, load the project engineering-standards files listed below into context using the Read tool.** These were previously supplied manually as `@docs/...` mentions; they are now loaded automatically so the user does not need to pass them. Rules:
|
|
@@ -19,6 +19,10 @@ $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
21
21
|
|
|
22
|
+
## Context Reuse (cross-command dedup)
|
|
23
|
+
|
|
24
|
+
**Skip Read-ing any file already in this conversation.** Before loading a standards/domain/template/spec file this command names, check whether it is already in context (loaded earlier here or by a prior `/aw-spec-*` command). If present and unchanged, reuse it and **skip the Read** — only Read files not yet loaded. A file already in context still counts as loaded; this just avoids the redundant re-read.
|
|
25
|
+
|
|
22
26
|
## Auto-Loaded Engineering Standards (Required Context)
|
|
23
27
|
|
|
24
28
|
**Before doing anything else in this command, load the project engineering-standards files listed below into context using the Read tool.** These were previously supplied manually as `@docs/...` mentions; they are now loaded automatically so the user does not need to pass them. Rules:
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-addcomponent"
|
|
3
|
+
description: "Add an opt-in AppWeaver framework component to the project: pick a component from docs/components/, choose one or more implementations from its integration.md catalog, and wire the matching code in."
|
|
4
|
+
argument-hint: "Optional component folder name to select directly (e.g. Email)"
|
|
5
|
+
compatibility: "Requires aw-spec project structure with a docs/components/ directory whose subfolders each contain an integration.md runbook"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "github-aw-spec"
|
|
8
|
+
source: "local"
|
|
9
|
+
user-invocable: true
|
|
10
|
+
disable-model-invocation: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## User Input
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The text the user typed after `/aw-spec-addcomponent` (if any) is an optional component folder name
|
|
21
|
+
to select directly (e.g. `Email`). If it matches a folder under `docs/components/`, skip the
|
|
22
|
+
component-selection prompt; otherwise fall through to interactive selection.
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
Add an **opt-in AppWeaver framework component** (Email, Jobs, QrGenerator, …) to the current
|
|
27
|
+
project. Each component lives in its own folder under `docs/components/` and ships two
|
|
28
|
+
agent-readable files: `README.md` (the contract) and `integration.md` (an **ordered agent
|
|
29
|
+
runbook**). This command discovers the available components, lets the developer pick **one**, then
|
|
30
|
+
lets them pick **one or more implementations** from that component's catalog, and finally executes
|
|
31
|
+
the component's own `integration.md` runbook to add the required code.
|
|
32
|
+
|
|
33
|
+
This command is the entry point; the per-component `integration.md` is the authority on *what code
|
|
34
|
+
to add*. Always defer to the selected component's runbook for the actual edits, package versions,
|
|
35
|
+
registration scaffold, and verification steps — do not invent integration steps from memory.
|
|
36
|
+
|
|
37
|
+
## Outline
|
|
38
|
+
|
|
39
|
+
1. **Discover candidate components.** List the immediate **subdirectories** of `docs/components/`
|
|
40
|
+
(directories only — ignore loose files such as `README.md`). This is the set of selectable
|
|
41
|
+
components.
|
|
42
|
+
- If `docs/components/` does not exist or has **no** subdirectories, report that no components
|
|
43
|
+
are available, point the user at `docs/components/README.md` for the expected layout, and
|
|
44
|
+
**stop** without changing anything.
|
|
45
|
+
- A component folder is only valid if it contains an `integration.md`. Skip (and note) any
|
|
46
|
+
subfolder missing one.
|
|
47
|
+
|
|
48
|
+
2. **Direct argument (optional).** If the user passed an argument:
|
|
49
|
+
- If it exactly matches one of the discovered folder names, treat that as the chosen component
|
|
50
|
+
and skip to step 4.
|
|
51
|
+
- If it does not match any folder, note the mismatch, list the available names, and fall through
|
|
52
|
+
to the interactive selection in step 3.
|
|
53
|
+
|
|
54
|
+
3. **Select the component (single-select).** Present the candidate components with the
|
|
55
|
+
`AskUserQuestion` tool (single-select, `multiSelect: false`). Use each folder name as the option
|
|
56
|
+
label and, if cheaply available, the one-line "Use when…" summary from
|
|
57
|
+
`docs/components/README.md` as the option description.
|
|
58
|
+
- If **more than 4** components exist, split across multiple `AskUserQuestion` questions/calls
|
|
59
|
+
(≤4 options per question).
|
|
60
|
+
- If **exactly one** component exists, ask a confirmation — *"Add component '<name>'?"* with
|
|
61
|
+
options **"Add '<name>'"** and **"Cancel"**.
|
|
62
|
+
- If the user cancels (or interactive questions cannot be asked and no valid argument was given),
|
|
63
|
+
**stop** without changing anything.
|
|
64
|
+
|
|
65
|
+
4. **Load the component runbook.** Read `docs/components/<chosen>/integration.md` and, when it
|
|
66
|
+
references it, `docs/components/<chosen>/README.md`. Locate the **"Implementation catalog
|
|
67
|
+
(selection list)"** section — its table rows are the selectable implementations. Each row's
|
|
68
|
+
`Key` is the implementation identifier; capture each Key plus its human description for the
|
|
69
|
+
prompt.
|
|
70
|
+
- If `integration.md` is missing or has no implementation catalog, report that the component is
|
|
71
|
+
not integrable via this command and **stop**.
|
|
72
|
+
|
|
73
|
+
5. **Select implementation(s) (multi-select).** Present the catalog rows with `AskUserQuestion`,
|
|
74
|
+
`multiSelect: true`. Use the `Key` as the option label and the row's "Implementation"/"Best for"
|
|
75
|
+
text as the description.
|
|
76
|
+
- If the catalog has a **single** row, tell the user it is the only available implementation and
|
|
77
|
+
ask them to confirm it (do not invent others).
|
|
78
|
+
- Honor any **grouping / selection rules** the component's `integration.md` states for reading
|
|
79
|
+
the answer (e.g. Jobs: pick exactly one Group A store, optionally one Group B status store).
|
|
80
|
+
If more rows exist than fit one prompt, split across multiple `AskUserQuestion` calls.
|
|
81
|
+
|
|
82
|
+
6. **Empty selection → exit cleanly.** If the user submits with **nothing selected** (or cancels
|
|
83
|
+
the implementation prompt), do **not** modify the project. Report that no implementation was
|
|
84
|
+
chosen, name the component, and tell them they can re-run `/aw-spec-addcomponent` any time. Then
|
|
85
|
+
**stop**.
|
|
86
|
+
|
|
87
|
+
7. **Add the code (one or more selected).** Execute the chosen component's `integration.md` runbook
|
|
88
|
+
**in order** for the selected implementation(s):
|
|
89
|
+
- Resolve the **host/startup project** the runbook targets — the single project that owns
|
|
90
|
+
`Program.cs` + the ASP.NET Core web SDK (`<App>.Service` for the Vertical Slice foundation,
|
|
91
|
+
`<App>.API` for the Modular Monolith foundation, or another name in a future template). **Find it
|
|
92
|
+
by locating `Program.cs`, not by assuming a fixed name.** These foundations have **no** separate
|
|
93
|
+
`…Application` / `…Infrastructure` project — package references, registration, and
|
|
94
|
+
`appsettings.json` all target this one project.
|
|
95
|
+
- Apply the runbook's **"Common steps"** once.
|
|
96
|
+
- Apply each selected implementation's **block** (package version in
|
|
97
|
+
`Directory.Packages.props`, `PackageReference` without `Version=`, registration line, config).
|
|
98
|
+
- Set `options.Provider` per the runbook (when multiple implementations are selected, follow the
|
|
99
|
+
runbook's rule for choosing the default/active provider — ask a single-select follow-up if it
|
|
100
|
+
requires one).
|
|
101
|
+
- Honor the cross-cutting rules in `docs/components/README.md` (R0.1–R0.5, incl. R0.2a): versions
|
|
102
|
+
only in `Directory.Packages.props`; register in the host/startup project resolved via `Program.cs`
|
|
103
|
+
(R0.2 — its `Extensions/InfrastructureServiceRegistration.cs`/`AddInfrastructure` if present,
|
|
104
|
+
else `Program.cs`); inject the abstraction; always set `options.Provider`; never commit secrets.
|
|
105
|
+
- **Register in both startup paths when they exist (R0.2a).** If the host project splits
|
|
106
|
+
registration into `AddInfrastructure` (`Extensions/InfrastructureServiceRegistration.cs`) **and**
|
|
107
|
+
`AddAspireInfrastructure` (`Extensions/AspireInfrastructureExtensions.cs`) — the
|
|
108
|
+
`if (isAspire) AddAspireInfrastructure(...) else AddInfrastructure(...)` switch in `Program.cs` —
|
|
109
|
+
add the component's registration to **both** methods, not just `AddInfrastructure`. The block is
|
|
110
|
+
the same in each, differing only in provider-specific calls (connection strings, `UseSqlite` vs
|
|
111
|
+
`UseNpgsql`) that must match that method's existing provider. Registering in only one leaves the
|
|
112
|
+
component missing whenever the app runs in the other mode.
|
|
113
|
+
- Run any optional usage/feature-slice and schema steps only if the runbook calls for them or the
|
|
114
|
+
user asks.
|
|
115
|
+
|
|
116
|
+
8. **Verify and report.** Run the component runbook's **Verification** checklist (at minimum
|
|
117
|
+
`dotnet build`). Then report:
|
|
118
|
+
- the component added and which implementation key(s) were wired,
|
|
119
|
+
- the active provider,
|
|
120
|
+
- the files changed,
|
|
121
|
+
- any follow-ups the developer must do out-of-band (secrets, migrations, DDL).
|
|
122
|
+
|
|
123
|
+
## Done When
|
|
124
|
+
|
|
125
|
+
- [ ] A component was chosen, or nothing was changed (no components available, or the user
|
|
126
|
+
cancelled).
|
|
127
|
+
- [ ] If implementations were selected, the component's `integration.md` runbook was executed for
|
|
128
|
+
each, the project builds, and the changes were reported.
|
|
129
|
+
- [ ] If **no** implementation was selected, the project was left untouched and the user was told so.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aw-spec-agent-context-update
|
|
3
|
+
description: Refresh the managed AW-Spec section in the coding agent context file
|
|
4
|
+
compatibility: Requires aw-spec project structure with .aw-spec/ directory
|
|
5
|
+
metadata:
|
|
6
|
+
author: github-aw-spec
|
|
7
|
+
source: agent-context:commands/aw-spec.agent-context.update.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Update Coding Agent Context
|
|
11
|
+
|
|
12
|
+
Refresh the managed AW-Spec section inside the active coding agent's context/instruction file (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`, `AGENTS.md`).
|
|
13
|
+
|
|
14
|
+
## Behavior
|
|
15
|
+
|
|
16
|
+
The script reads the agent-context extension config at
|
|
17
|
+
`.aw-spec/extensions/agent-context/agent-context-config.yml` to discover:
|
|
18
|
+
|
|
19
|
+
- `context_file` — the path of the coding agent context file to manage.
|
|
20
|
+
- `context_markers.start` / `.end` — the delimiters surrounding the managed section. Defaults to `<!-- AW-SPEC START -->` and `<!-- AW-SPEC END -->` when the field is missing.
|
|
21
|
+
|
|
22
|
+
It then creates, replaces, or appends the managed block so that the section points at the most recent plan path when one can be discovered (`specs/<feature>/plan.md`).
|
|
23
|
+
|
|
24
|
+
If `context_file` is empty or the file cannot be located, the command reports nothing to do and exits successfully.
|
|
25
|
+
|
|
26
|
+
## Execution
|
|
27
|
+
|
|
28
|
+
- **Bash**: `.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh [plan_path]`
|
|
29
|
+
- **PowerShell**: `.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 [plan_path]`
|
|
30
|
+
|
|
31
|
+
When `plan_path` is omitted, the script auto-detects the most recently modified `specs/*/plan.md`.
|