aw-spec-cli 0.1.5 → 0.1.7
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/agent.json +1 -1
- package/assets/.agents/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.agents/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.claude/agent.json +1 -1
- package/assets/.claude/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.claude/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.kilocode/agent.json +1 -1
- package/assets/.kilocode/workflows/{aw-spec-orch-demo.md → appweaver-demo.md} +9 -9
- package/assets/.kilocode/workflows/{aw-spec-orch.md → appweaver.md} +10 -10
- package/assets/docs/pharma-constitution.my-ref.md +86 -0
- package/dist/utils/paths.js +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/package.json +1 -1
- package/assets/.aw-spec/DESIGN-FORMAT.md +0 -151
- package/assets/.aw-spec/ORCH-DIALECT.md +0 -156
- package/assets/.aw-spec/RULE-PARTITION.md +0 -126
- package/assets/.aw-spec/domain.json +0 -3
- package/assets/.aw-spec/extensions/.registry +0 -19
- package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
- package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
- package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
- package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -37
- package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
- package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
- package/assets/.aw-spec/extensions.yml +0 -16
- package/assets/.aw-spec/feature.json +0 -3
- package/assets/.aw-spec/init-options.json +0 -9
- package/assets/.aw-spec/integration.json +0 -15
- package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -9
- package/assets/.aw-spec/interpreter/run-skill.py +0 -1158
- package/assets/.aw-spec/memory/constitution.md +0 -50
- package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +0 -94
- package/assets/.aw-spec/orchestrator/README.md +0 -300
- package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +0 -74
- package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +0 -74
- package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +0 -105
- package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +0 -81
- package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +0 -75
- package/assets/.aw-spec/orchestrator/orchestrator.py +0 -1721
- package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +0 -40
- package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +0 -59
- package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +0 -97
- package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +0 -61
- package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +0 -48
- package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +0 -39
- package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +0 -106
- package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +0 -54
- package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +0 -160
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +0 -244
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +0 -775
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -248
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -261
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +0 -425
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +0 -188
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +0 -474
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +0 -181
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +0 -284
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +0 -103
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +0 -69
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +0 -85
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +0 -246
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -231
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +0 -258
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +0 -236
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +0 -949
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +0 -293
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +0 -177
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +0 -128
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +0 -412
- package/assets/.aw-spec/scripts/bash/aw-inventory.sh +0 -14
- package/assets/.aw-spec/scripts/bash/aw-parity.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +0 -1899
- package/assets/.aw-spec/scripts/bash/aw-xref.sh +0 -15
- package/assets/.aw-spec/scripts/bash/common.sh +0 -533
- package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +0 -14
- package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +0 -1563
- package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +0 -15
- package/assets/.aw-spec/scripts/python/aw-inventory.py +0 -683
- package/assets/.aw-spec/scripts/python/aw-parity.py +0 -380
- package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +0 -312
- package/assets/.aw-spec/scripts/python/aw-xref.py +0 -1330
- package/assets/.aw-spec/scripts/python/validate_okf.py +0 -349
- package/assets/.aw-spec/templates/constitution-domain-template.md +0 -75
- package/assets/.aw-spec/templates/constitution-technical-template.md +0 -70
- package/assets/.aw-spec/templates/delta-design-template.md +0 -69
- package/assets/.aw-spec/templates/delta-spec-template.md +0 -60
- package/assets/.aw-spec/templates/design-template.md +0 -383
- package/assets/.aw-spec/templates/okf-concept-template.md +0 -103
- package/assets/.aw-spec/templates/parity-manifest-template.json +0 -49
- package/assets/.aw-spec/templates/source-map-template.md +0 -85
- package/assets/.aw-spec/templates/spec-template.md +0 -252
- package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
- package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
- package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
- package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
- package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
- package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
- package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
- package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
- package/assets/docs/README.md +0 -106
- package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
- package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
- package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
- package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
- package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
- package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
- package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
- package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
- package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
- package/assets/docs/architecture/clean-architecture.md +0 -71
- package/assets/docs/architecture/cqrs.md +0 -141
- package/assets/docs/architecture/eventing.md +0 -83
- package/assets/docs/architecture/folder-structure.md +0 -61
- package/assets/docs/architecture/modular-monolith.md +0 -47
- package/assets/docs/architecture/persistence.md +0 -269
- package/assets/docs/architecture/testing.md +0 -55
- package/assets/docs/architecture/vertical-slices.md +0 -201
- package/assets/docs/components/Email/README.md +0 -119
- package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
- package/assets/docs/components/Email/integration.md +0 -300
- package/assets/docs/components/Jobs/README.md +0 -113
- package/assets/docs/components/Jobs/integration.md +0 -259
- package/assets/docs/components/QrGenerator/README.md +0 -85
- package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
- package/assets/docs/components/QrGenerator/integration.md +0 -230
- package/assets/docs/components/README.md +0 -74
- package/assets/docs/domain/domain-driven-design.md +0 -212
- package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
- package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
- package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -97
- package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
- package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -100
- package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/healthcare/consent.md +0 -19
- package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
- package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
- package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
- package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
- package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
- package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
- package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
- package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
- package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
- package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
- package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
- package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
- package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
- package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
- package/assets/docs/domainspecs/pharma/atc.md +0 -22
- package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -90
- package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
- package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
- package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -108
- package/assets/docs/domainspecs/pharma/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
- package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
- package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
- package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
- package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/pharma/fhir.md +0 -31
- package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/hl7.md +0 -17
- package/assets/docs/domainspecs/pharma/idmp.md +0 -26
- package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
- package/assets/docs/domainspecs/pharma/ndc.md +0 -28
- package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
- package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
- package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
- package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
- package/assets/docs/domainspecs/pharma/terminology.md +0 -32
- package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
- package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
- package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
- package/assets/docs/glossary/ai-rules.md +0 -59
- package/assets/docs/governance/api-versioning.md +0 -99
- package/assets/docs/governance/coding-standards.md +0 -87
- package/assets/docs/governance/dependency-policy.md +0 -40
- package/assets/docs/interop/ihe-conformance.md +0 -31
- package/assets/docs/requirement-spec.txt +0 -27
- package/assets/docs/security/auditing.md +0 -160
- package/assets/docs/security/authorization-matrix.md +0 -14
- package/assets/docs/security/authorization.md +0 -87
- package/assets/docs/security/data-classification.md +0 -38
- package/assets/docs/security/zero-trust.md +0 -76
- package/assets/docs/technology-constitution.md +0 -172
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# aw-spec design-doc format — the single high-level design (HLD)
|
|
2
|
-
|
|
3
|
-
The format the spec-anchored pipeline uses for the **Design** phase. Sibling of
|
|
4
|
-
`ORCH-DIALECT.md` (the orchestrator dialect) and `RULE-PARTITION.md` (which rules each
|
|
5
|
-
command loads): this one governs the *artifact* those workflows read and write — the
|
|
6
|
-
design document — not the engine. The authoring template is
|
|
7
|
-
`.aw-spec/templates/design-template.md`.
|
|
8
|
-
|
|
9
|
-
## The contract
|
|
10
|
-
|
|
11
|
-
A feature's design is **one document**, living beside its spec:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
specs/<Aggregate>/
|
|
15
|
-
spec.md # behaviour (tech-agnostic) — WHAT / WHY — the source of truth
|
|
16
|
-
design.md # structure & decisions (tech-agnostic HLD) — the MEDIATOR
|
|
17
|
-
changes/ # open + archived change records (delta-spec + delta-design)
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
`design.md` is the **mediator** between the spec and the generated code:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
spec.md ──▶ design.md ──▶ code (+ tests)
|
|
24
|
-
behaviour structure & generated by `implement`
|
|
25
|
-
FR/BR/US/SC decisions (HLD) (stack bound at generation time)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
- **One design per aggregate.** The four clean-architecture layers (Domain,
|
|
29
|
-
Application, API, Infrastructure) are **sections** of this one document, each at
|
|
30
|
-
design level. Feature = aggregate; commands are user stories inside it. *(This is
|
|
31
|
-
the **greenfield** layout, authored from `design-template.md`. See the Brownfield
|
|
32
|
-
variant below for reverse-engineered / existing-codebase designs.)*
|
|
33
|
-
- **High-level, not code.** It carries entities/value-objects/events, behaviour as
|
|
34
|
-
**signatures + pre/post/invariant/raises**, use-cases, endpoint contracts, ports,
|
|
35
|
-
and the significant technical decisions with rationale — but **no complete method
|
|
36
|
-
bodies**. See `design-template.md` for the section structure (§0–§9). The domain
|
|
37
|
-
layer (§1) follows spec.md exactly — its entities/value-objects are the spec's Key
|
|
38
|
-
Entities and its invariants are the spec's Business Rules.
|
|
39
|
-
- **Technology-agnostic.** Behaviour and contracts use conceptual types, never a
|
|
40
|
-
language. The SAME design.md must be generatable on a different stack. The target
|
|
41
|
-
language/framework/persistence is bound only at `implement` time from the
|
|
42
|
-
constitution's technology base + the active stack profile.
|
|
43
|
-
- **Physical schema is out of scope.** PKs/FKs, columns, indexes, JSON shapes, and
|
|
44
|
-
migration SQL belong to a separate technical-data-model — design.md states WHAT is
|
|
45
|
-
stored and WHICH port persists it, not the schema.
|
|
46
|
-
- **Two deferral ledgers are first-class:** §7 Assumptions (`DA-n`, clarify later)
|
|
47
|
-
and §8 Workarounds (`WA-n`, clear later). They keep the HLD honest about what it
|
|
48
|
-
defers; `implement` tags generated code that leans on them.
|
|
49
|
-
- **Solution-wide rules live elsewhere, not per feature:** the layering/dependency
|
|
50
|
-
rule is the constitution's; the code-generation mechanics (folder mapping,
|
|
51
|
-
file-per-element, test pairing, stack binding) are a technology-specific rule
|
|
52
|
-
applied in the `implement` phase. `design.md` stays feature-specific and
|
|
53
|
-
technology-agnostic.
|
|
54
|
-
|
|
55
|
-
## Brownfield variant (existing codebases)
|
|
56
|
-
|
|
57
|
-
A design reverse-engineered from — or added forward to — an **existing** codebase is
|
|
58
|
-
authored from the repo's **code-derived `design-template` override**, which
|
|
59
|
-
`/aw-spec-orch onboard` reverse-engineers from the repo's own structure and installs at
|
|
60
|
-
`.aw-spec/templates/overrides/design-template.md`. Both `adopt` (reverse design) and the
|
|
61
|
-
forward `design` phase scaffold from it via the default template name. It is the **same
|
|
62
|
-
contract** as above — one living HLD per aggregate, tech-agnostic, spec-anchored, with the
|
|
63
|
-
same traceability spine and the two deferral ledgers — with **one difference that matters**:
|
|
64
|
-
|
|
65
|
-
- **Structure follows the code, not a fixed layering.** The **code is the source of
|
|
66
|
-
truth**, so the design describes the system **as-built**. Its structural sections
|
|
67
|
-
are **derived from the code's own organisation** (its folders / projects / modules)
|
|
68
|
-
rather than the fixed Domain/Application/API/Infrastructure four. A component the
|
|
69
|
-
code has that fits no textbook layer (a UI tier, a worker, a host project) gets its
|
|
70
|
-
own section; a layer the code lacks does not appear. Two neutral anchors are kept
|
|
71
|
-
because every system has them and the tooling keys on them: **§1 is the domain/data
|
|
72
|
-
model** (the cross-reference tool reads it for `<Other>Id` reference edges) and one
|
|
73
|
-
**§2 subsection is the External Integrations table** (matched by heading keyword, so
|
|
74
|
-
`aw-xref` extracts contract edges from either layout). The `debt` ledger records
|
|
75
|
-
only debt the **code itself** evidences (stubs, dead code, torn seams) — being
|
|
76
|
-
organised unlike a reference architecture is **not** debt, it is the as-built shape;
|
|
77
|
-
migrating toward a target is a separate modernization decision.
|
|
78
|
-
|
|
79
|
-
This keeps a brownfield design free of greenfield architectural bias while remaining a
|
|
80
|
-
normal feature the CR delta loop and forward pipeline consume unchanged.
|
|
81
|
-
|
|
82
|
-
## Generate forward, reconcile only the high-level back
|
|
83
|
-
|
|
84
|
-
The design document and the code are **not** a byte-for-byte copy of each other.
|
|
85
|
-
|
|
86
|
-
| Direction | Phase | What happens |
|
|
87
|
-
|---|---|---|
|
|
88
|
-
| **Generate** (forward) | Implement | The model reads spec + design.md and **generates** the code and tests — a reasoning step the design guides and constrains, not a transcription. |
|
|
89
|
-
| **Reconcile** (high-level back) | Build / Run fixes | Compile/typecheck/runtime fixes happen on the **code**. Only when a fix is a **high-level technical variation** — a changed pattern, a new component, an altered contract/dependency — is that decision written back into design.md. Low-level churn stays in the code. |
|
|
90
|
-
|
|
91
|
-
> **Invariant:** design.md remains a faithful **high-level** account of the built
|
|
92
|
-
> system — every significant technical decision is recorded — but it is a durable
|
|
93
|
-
> design reference, **not** a line-by-line mirror of the code. (This retires the old
|
|
94
|
-
> `docs == files` extract/reconcile invariant.)
|
|
95
|
-
|
|
96
|
-
## The traceability spine
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
FR/BR/US/SC ↔ design section (element / decision) ↔ code (+ tests) ↔ commit
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Every design element traces **up** to a spec id, and the whole spec traces **down**
|
|
103
|
-
into a design section (§6 Traceability). This is what makes the analyze gate and the
|
|
104
|
-
review able to check coverage, and what keeps CR impact analysis exact.
|
|
105
|
-
|
|
106
|
-
## Feature granularity (why a command is a delta, not a new feature)
|
|
107
|
-
|
|
108
|
-
A **feature is the largest slice whose code no other feature owns.** Because
|
|
109
|
-
`implement` regenerates the whole feature's code coherently, a shared file
|
|
110
|
-
(`src/Domain/Order.cs`) must have exactly **one** owning design. So for an aggregate
|
|
111
|
-
with a shared entity, **feature = the aggregate** (`Order`), and individual commands
|
|
112
|
-
(`CreateOrder`, `UpdateOrder`, …) are **user stories / deltas** on the same design.md:
|
|
113
|
-
|
|
114
|
-
- `CreateOrder` = US-1; `UpdateOrder` = US-2.
|
|
115
|
-
- Adding `UpdateOrder` is an additive CR: a Delta Spec (`+US-2`) and a Delta Design
|
|
116
|
-
(`ADDED` new use-case/endpoint sections, `MODIFIED` the shared Order/root and
|
|
117
|
-
repository sections — see `delta-design-template.md`). The design phase amends
|
|
118
|
-
design.md doc-first, bumps the feature version (`v1.0 → v1.1`), and archives the CR;
|
|
119
|
-
`implement` regenerates the touched slice; regression re-tests the shared-file
|
|
120
|
-
dependents.
|
|
121
|
-
|
|
122
|
-
Two command-level features would both claim `src/Domain/Order.cs` and collide —
|
|
123
|
-
which is exactly why the aggregate is the boundary.
|
|
124
|
-
|
|
125
|
-
## Migration status
|
|
126
|
-
|
|
127
|
-
**Complete.** Every phase now runs this HLD model, including the executable chain.
|
|
128
|
-
|
|
129
|
-
The legacy path-tagged helpers (`design-extract` / `design-reconcile` / `design-paths`)
|
|
130
|
-
are **retired and deleted** from both shells. They belonged to the four-document,
|
|
131
|
-
full-code model in which `design.{domain,application,api,infra}.md` carried the source
|
|
132
|
-
inside ` ```lang path=… ` fences. That convention is gone — no template emits `path=`,
|
|
133
|
-
and `design-scaffold` writes a single `design.md` — so all three had been finding
|
|
134
|
-
nothing and no-op'ing at exit 0. (Their glob, `design.*.md`, could not have matched a
|
|
135
|
-
single `design.md` even if the fences had survived: the second dot required a middle
|
|
136
|
-
segment. The one legitimate remaining user of that glob, `list-features`'s informational
|
|
137
|
-
`design_docs` count, is fixed to `design*.md`.)
|
|
138
|
-
|
|
139
|
-
The question those helpers answered — *which files is this slice made of* — is now an
|
|
140
|
-
**OKF query**, because the knowledge bundle is where that answer is actually maintained:
|
|
141
|
-
|
|
142
|
-
| Need | Now |
|
|
143
|
-
| --- | --- |
|
|
144
|
-
| read the slice's files | `aw-xref concept-paths --feature-dir <dir>` → the concept's `source_files` |
|
|
145
|
-
| record files a fix loop touched | `aw-xref concept-upsert --source-files … --merge` |
|
|
146
|
-
|
|
147
|
-
`build`, `run`, and `analyze-slice` all read through `concept-paths` (feeding their fix
|
|
148
|
-
loops and, in `analyze-slice`, the conformance pass) and write back through
|
|
149
|
-
`concept-upsert --merge`. Both directions are advisory: `concept-paths` is strictly
|
|
150
|
-
read-only and returns an empty list rather than an error when no concept exists yet, so
|
|
151
|
-
a greenfield slice before its first `implement` behaves exactly as it did before.
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
# aw-spec.orchestrator/v1 — orchestrator workflow dialect
|
|
2
|
-
|
|
3
|
-
The workflow dialect executed by `.aw-spec/orchestrator/orchestrator.py`, and the
|
|
4
|
-
**only** workflow dialect that ships. It grew out of the earlier declarative
|
|
5
|
-
`skill.yaml` dialect (`aw-spec.declarative/v1`, the `aw-spec-decl-*` skills), which
|
|
6
|
-
was **retired 2026-08-03** along with its reference doc: same YAML subset, same
|
|
7
|
-
step/`outputs:`/`condition:` conventions, but built for
|
|
8
|
-
the **orchestrator model**: the interpreter assembles 100% of every model
|
|
9
|
-
payload (system = standards/rules, user = artifacts + task) and a **fresh
|
|
10
|
-
agent** executes it under one of the 4 strategies. Everything here is common
|
|
11
|
-
across agent roots — `.claude`, `.agents`, `.kilocode` differ only in their
|
|
12
|
-
transport profile (`agent.json`) and their thin `/aw-spec-orch` launcher.
|
|
13
|
-
|
|
14
|
-
## Layout (the common folder)
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
.aw-spec/orchestrator/
|
|
18
|
-
orchestrator.py the engine (stdlib-only; reuses run-skill's YAML loader)
|
|
19
|
-
ORCH-DIALECT.md → this doc lives at .aw-spec/ORCH-DIALECT.md
|
|
20
|
-
README.md strategies, transports, checkpoint machinery
|
|
21
|
-
AGENT-PROFILE.md profile (agent.json) reference
|
|
22
|
-
adapters/ shared per-SDK adapters (claude_agent_sdk, google_antigravity)
|
|
23
|
-
modules/ shared includable modules (*.orch.yaml): delta-design,
|
|
24
|
-
delta-spec, domain-select, tech-select
|
|
25
|
-
rev-templates/ neutral (shape-only) skeletons the brownfield govern-backward
|
|
26
|
-
authors follow — see aw-spec-onboard.orch.yaml
|
|
27
|
-
workflows/ one aw-spec-<skill>.orch.yaml per converted skill (+ _smoke)
|
|
28
|
-
.aw-spec/scripts/ 53 deterministic subcommands — 36 in aw-spec-actions (a true
|
|
29
|
-
bash+powershell pair) + 17 across aw-xref, aw-inventory,
|
|
30
|
-
aw-parity, aw-rev-constitution (thin sh/ps1 wrappers over one
|
|
31
|
-
python core each) — reused as-is
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Execution model (strictly held)
|
|
35
|
-
|
|
36
|
-
1. **Context management is the orchestrator's** — as in `workflows/aw-spec-demo.orch.yaml`.
|
|
37
|
-
`build_context` REPLACES the per-request envelope; `load_standards`
|
|
38
|
-
maintains the sticky system prefix. No agent ever assembles its own context.
|
|
39
|
-
2. **Execution follows any of the 4 strategies** (`--strategy`, per-step
|
|
40
|
-
`strategy:` override): `sdk`, `sdk-apply`, `spawn`, `agent` — they only
|
|
41
|
-
govern WHO fulfills a generation, never what goes into it.
|
|
42
|
-
3. **The checkpoint channel is strategy-independent** (D1): `ask`,
|
|
43
|
-
`user_select` and `dispatch_hooks` suspend via `--checkpoint` under EVERY
|
|
44
|
-
strategy, so the launching agent can relay to the human. Converted-skill
|
|
45
|
-
launchers therefore always pass `--checkpoint`.
|
|
46
|
-
|
|
47
|
-
## Workflow file anatomy
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
name: aw-spec-<skill>
|
|
51
|
-
dialect: aw-spec.orchestrator/v1 # checked by --validate
|
|
52
|
-
|
|
53
|
-
inputs: # F10 — bound from --input
|
|
54
|
-
user_input: { description: …, required: false, bind: USER_INPUT }
|
|
55
|
-
|
|
56
|
-
scripts: # F1 — ref map for execute_script
|
|
57
|
-
actions:
|
|
58
|
-
sh: .aw-spec/scripts/bash/aw-spec-actions.sh
|
|
59
|
-
ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
|
|
60
|
-
|
|
61
|
-
standards: # F4 — optional seed of the sticky set
|
|
62
|
-
- { path: docs/architecture/clean-architecture.md, optional: true }
|
|
63
|
-
|
|
64
|
-
vars: { k: v } # seed variables (--var k=v overrides)
|
|
65
|
-
workflow: [ …steps… ]
|
|
66
|
-
outputs: { k: "{{v}}" } # resolved and printed at the end
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Every step: `id:` (required, unique), `action:`, optional `condition:`
|
|
70
|
-
(`==`/`!=`/truthy), optional `strategy:`/`model:` (generating actions),
|
|
71
|
-
optional `outputs: [{name, from: "$.field"}]` (JSONPath into the step's
|
|
72
|
-
structured result). `{{var}}` substitutes with dotted/index access
|
|
73
|
-
(`{{q.text}}`, `{{items.0}}`); a value that is EXACTLY one `{{ref}}` yields
|
|
74
|
-
the raw object, not its JSON string.
|
|
75
|
-
|
|
76
|
-
## Actions
|
|
77
|
-
|
|
78
|
-
| action | who runs | what it does |
|
|
79
|
-
|---|---|---|
|
|
80
|
-
| `set` | engine | assign vars (`vars:` or decl-style `parameters:`); raw-object aware |
|
|
81
|
-
| `build_context` | engine | REPLACE the per-request envelope: `system:`/`context:` file lists (+ `context_from: <var>` holding paths a prior generation reported, + `vars:`) |
|
|
82
|
-
| `load_standards` | engine | F4 — append to the **sticky standards set** prepended to every system block (dedup, `optional:`, `files:`/`files_from_variable`). This is the byte-stable, prompt-cacheable prefix |
|
|
83
|
-
| `execute_script` | engine | F1 — run a `scripts:` ref (`subcommand:` + `args:`; sh/ps1 via `--os`); stdout's last line = JSON, bound via `outputs[]`; `on_error: continue` tolerated; cached across resumes; runs for real even in mock transport |
|
|
84
|
-
| `verify_context` | engine | F2 — gates: `required_files` (+`allow_missing`), `require_non_empty` (+`on_empty[_message]`), `require_true` (+`on_false[_message]`), `require_value`+`equals` (+`on_mismatch[_message]`). `stop` raises a terminal stop |
|
|
85
|
-
| `agent_generate` | fresh agent | demo contract (code work): agent DECIDES file paths per the loaded standards, writes with its tools, reports `files[]` in the trailing ```json fence. `sdk-apply` = read-only generation + invoking agent applies |
|
|
86
|
-
| `agent_review` | fresh agent | read-only review of `review_of_var`/`review_of` files → `{pass, issues}` |
|
|
87
|
-
| `agent_author` | fresh agent | F5 — **authored artifact** (decl `llm_generate`): the INTERPRETER owns `output_target: {type: file, path}`. Generation is READ-ONLY under every strategy; the ENGINE writes the returned content (sdk-apply degrades to sdk). Optional `context:` (per-request extras), `include_standards: false` (narrow payload) |
|
|
88
|
-
| `agent_query` | fresh agent | F6 — generic read-only structured JSON (decl `llm_query`): `schema:` shapes the required fence, `outputs[]` binds it, `mock:` supplies the mock-transport result; one malformed-JSON retry on fresh strategies |
|
|
89
|
-
| `ask` | human (via launcher) | F7 — question: `prompt`, `options`/`options_from`/`options_from_variable`, `multi`, `answer_key`, `answer_var` (default `answer`). Sources in order: cache → `--answer k=v` → `--non-interactive` (first option; all when multi) → checkpoint suspend `ask` → stdin |
|
|
90
|
-
| `user_select` | human (via launcher) | F7 — pick ONE from `options_from_variable`; `preselect_from` (direct-argument fast path), `single_option_confirm`; `--select stepid=v`; binds `selection` + `outputs[]` |
|
|
91
|
-
| `dispatch_hooks` | invoking agent | F8 — suspend kind `hook` with the `hooks_from_variable` list (slash commands of the LAUNCHING agent); logged-only without a checkpoint; never re-fires across resumes |
|
|
92
|
-
| `include` | engine | F9 — run a module `.orch.yaml` inline: shares vars/envelope/standards/scripts/replay-cache; `with:` seeds inputs; cache keys namespaced `inc:<id>/…`; module `Stop` stops the caller |
|
|
93
|
-
| `loop` | engine | `while: <cond>` + `max_iterations` (default 5), or F3 foreach `over: "{{list}}"` + `as: item` (binds `item`, `item_index`, `iteration`); `break` (+`condition:`) exits the innermost loop |
|
|
94
|
-
|
|
95
|
-
Decl steps may keep their `parameters:` wrapper — every ported action reads
|
|
96
|
-
`parameters:` or flat step keys interchangeably, so conversion is mechanical.
|
|
97
|
-
|
|
98
|
-
## The suspend-kind protocol (checkpoint transport)
|
|
99
|
-
|
|
100
|
-
At each handoff the engine writes sidecars next to the state file, prints the
|
|
101
|
-
`pending` request (exit 2), and the launcher fulfills it, writes
|
|
102
|
-
`response_path`, and re-runs the same command. Kinds:
|
|
103
|
-
|
|
104
|
-
| kind | sidecars | launcher writes to response_path | resume ingests as |
|
|
105
|
-
|---|---|---|---|
|
|
106
|
-
| `agent_generate` | system/user | full reply ending in ```json fence | parsed fence → replay cache |
|
|
107
|
-
| `agent_review`, `agent_query` | system/user | read-only reply ending in ```json fence | parsed fence |
|
|
108
|
-
| `apply` | artifact | confirmation ```json fence after writing the named files | parsed fence |
|
|
109
|
-
| `author` | system/user (+`target`) | the COMPLETE file content — no fence, no commentary (the ENGINE writes `target`) | raw content |
|
|
110
|
-
| `ask` | none (`prompt`/`options`/`multi` inline) | the answer as plain text (comma-separated when multi) | string / list |
|
|
111
|
-
| `select` | none (`prompt`/`options` inline) | the chosen option's value | string |
|
|
112
|
-
| `hook` | none (`hooks` inline) | `done` after running the mandatory slash commands | `true` |
|
|
113
|
-
|
|
114
|
-
A rejected response re-suspends with a `note` explaining what to fix. The
|
|
115
|
-
state file persists vars, strategy, model, profile path, `--input`, answers,
|
|
116
|
-
selects, `--os` and the replay cache — a bare
|
|
117
|
-
`… <workflow> --checkpoint <state>` resumes with everything restored.
|
|
118
|
-
Completed steps (generations, scripts, answers, hooks) replay from the cache
|
|
119
|
-
and never re-fire; loop iterations get their own keys (`loopid#i`).
|
|
120
|
-
|
|
121
|
-
## CLI
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
orchestrator.py <workflow.orch.yaml>
|
|
125
|
-
--strategy sdk|sdk-apply|spawn|agent (per-step `strategy:` overrides)
|
|
126
|
-
--agent-profile <agent.json> spawn/sdk/sdk-apply
|
|
127
|
-
--checkpoint <statefile> the interaction channel (always, for converted skills)
|
|
128
|
-
--input "<text>" bound via inputs: (F10)
|
|
129
|
-
--answer k=v … / --select stepid=v … HITL prefills
|
|
130
|
-
--non-interactive CI: first option everywhere
|
|
131
|
-
--os posix|windows script variant (F1 / D7)
|
|
132
|
-
--model <name> / --budget / --isolation bare|fresh / --sdk-install
|
|
133
|
-
--var k=v … / --show-full / --json / --dry-run
|
|
134
|
-
--validate F11 — static lint, never executes
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## decl → orch conversion map
|
|
138
|
-
|
|
139
|
-
| declarative (run-skill) | orchestrator |
|
|
140
|
-
|---|---|
|
|
141
|
-
| `load_context` (standards, domain rules, constitution) | `load_standards` (sticky system set — D3) |
|
|
142
|
-
| `load_context` (feature artifacts, templates) | `build_context` `context:` before the consuming step |
|
|
143
|
-
| `llm_generate` + `output_target` | `agent_author` (same `output_target`) |
|
|
144
|
-
| `llm_query` | `agent_query` (+ `schema:`, `mock:`) |
|
|
145
|
-
| `include_loaded_context: false` | narrow `build_context` + `include_standards: false` |
|
|
146
|
-
| `execute_script` / `verify_context` / `ask` / `user_select` / `dispatch_hooks` / `set` / `loop` / `break` / `include` | same action, `parameters:` wrapper optional |
|
|
147
|
-
| implement-style code tasks | `agent_generate` (+ `agent_review`), `context_from` chaining between iterations |
|
|
148
|
-
|
|
149
|
-
## Validation & smoke
|
|
150
|
-
|
|
151
|
-
- `--validate` every workflow/module (unknown actions/strategies, duplicate
|
|
152
|
-
ids, script refs + files on disk, `output_target.path`, module paths,
|
|
153
|
-
unproduced `{{vars}}`, dialect header).
|
|
154
|
-
- `workflows/_smoke.orch.yaml` exercises every construct with no model and no
|
|
155
|
-
writes outside `.smoke-out`: run it `--non-interactive` (CI) and with
|
|
156
|
-
`--checkpoint` (protocol walk-through).
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
# Rule Partition — which command reads which rules
|
|
2
|
-
|
|
3
|
-
*AppWeaver · aw-spec · companion to [Spec-Anchored-Pipeline.md](Spec-Anchored-Pipeline.md) and
|
|
4
|
-
[DESIGN-FORMAT.md](DESIGN-FORMAT.md)*
|
|
5
|
-
|
|
6
|
-
The authority on how rule files are partitioned across the pipeline, so each phase gets a
|
|
7
|
-
focused, non-overlapping context. Domain-agnostic and technology-agnostic: it describes the
|
|
8
|
-
**contract**, never a particular project's files. The concrete file lists are configuration —
|
|
9
|
-
they live in the two rule maps, not here.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## The principle — the spec is the pivot
|
|
14
|
-
|
|
15
|
-
Domain knowledge enters the pipeline **once**, at `specify`, and is written into the spec as
|
|
16
|
-
identified requirements (`BR-` / `CN-` / `DC-` / `IC-` / `FR-`). From that point on the **spec is
|
|
17
|
-
the only domain input**. Later phases mediate against the spec, not against the domain files.
|
|
18
|
-
|
|
19
|
-
This is what makes a spec re-platformable: swap the technical rule set and the same spec still
|
|
20
|
-
governs. It also stops domain detail leaking straight into code authoring without ever being
|
|
21
|
-
pinned in a reviewable requirement.
|
|
22
|
-
|
|
23
|
-
> **Lift, then gate.** If a domain constraint is needed downstream, it must first be *lifted*
|
|
24
|
-
> into the spec as an id. A gate that finds a constraint in neither the spec nor the design
|
|
25
|
-
> reports `LIFT-FAILURE:` and routes back to `specify` — it must never invent the rule into a
|
|
26
|
-
> design or into code.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## The three classes of rule input
|
|
31
|
-
|
|
32
|
-
| Class | What it is | Carried by |
|
|
33
|
-
|---|---|---|
|
|
34
|
-
| **Domain rule files** | Business/domain rules of the active domain | `comandrulemap.md`, read by `resolve-domain` |
|
|
35
|
-
| **Technical rule files** | Architecture, conventions, code-generation rules | `commandtechrulemap.md`, read by `resolve-tech` |
|
|
36
|
-
| **Constitution halves** | Ratified standing principles | Referred to **directly, as-is** — never mapped |
|
|
37
|
-
|
|
38
|
-
Both maps are **configuration**: to change what a phase loads, edit the map, not the workflow.
|
|
39
|
-
A command with **no heading** in a map loads nothing mapped for that class and
|
|
40
|
-
**soft-continues** — an absent heading is a valid state, never a failure.
|
|
41
|
-
|
|
42
|
-
### The constitution halves are not mapped
|
|
43
|
-
|
|
44
|
-
- `.aw-spec/memory/constitution.technical.md` — the technology base. Standing input to
|
|
45
|
-
**design + implement**. Domain-agnostic.
|
|
46
|
-
- `.aw-spec/memory/constitution.domain.md` — the active domain's addenda. Standing input to
|
|
47
|
-
**specify** (and the gate checklist). Deliberately **not** loaded by design or implement.
|
|
48
|
-
- `.aw-spec/memory/constitution.md` — the composed human/compatibility view. The pipeline loads
|
|
49
|
-
the halves, not this file.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## The map
|
|
54
|
-
|
|
55
|
-
### `specify` — *domain modelling*
|
|
56
|
-
- **Domain rule files: yes** — the domain authority. Authored INTO the spec as ids.
|
|
57
|
-
- **Technical rule files: no**, with one exception: a **modelling methodology** (e.g. DDD
|
|
58
|
-
tactical patterns) may seed it. That is a domain-agnostic way of *modelling*, not a
|
|
59
|
-
technology choice. Like every other class, that exception is **configuration** — it is
|
|
60
|
-
wired under `## /aw-spec-specify` in `commandtechrulemap.md`, not hardcoded in the
|
|
61
|
-
workflow. Nothing else may go under that heading: an architecture, persistence, or
|
|
62
|
-
code-generation file there would break specify's domain purity. Greenfield wires
|
|
63
|
-
`docs/domain/domain-driven-design.md`; a code-derived (brownfield) pack wires
|
|
64
|
-
`tech/domain-modelling.md`, which `onboard` reverse-engineers from the code — the
|
|
65
|
-
as-built answer to *how does this codebase express a domain model*. Either way it is
|
|
66
|
-
**HOW to model**; **WHAT** the model is stays in the domain tier.
|
|
67
|
-
- Constitution: the **domain** half.
|
|
68
|
-
|
|
69
|
-
### `design` — *architecture; domain input = the spec only*
|
|
70
|
-
- **Domain rule files: NEVER.** Domain reaches design solely as spec ids.
|
|
71
|
-
- **Technical rule files: yes** — architecture and cross-cutting rules the design mediates the
|
|
72
|
-
spec against.
|
|
73
|
-
- Constitution: the **technical** half.
|
|
74
|
-
|
|
75
|
-
### `implement` / `implement-delta` — *code generation*
|
|
76
|
-
- **Domain rule files: NEVER.** The design is the only input describing what to build.
|
|
77
|
-
- **Technical rule files: yes** — the code-generation and convention set.
|
|
78
|
-
- Constitution: the **technical** half.
|
|
79
|
-
|
|
80
|
-
### `build` — *compile + repair*
|
|
81
|
-
- **Technical rule files: yes** — the layering and convention rules the compile-fixer respects.
|
|
82
|
-
- No domain files: build repairs against design intent, which the domain never reaches.
|
|
83
|
-
|
|
84
|
-
### `run` — *runtime*
|
|
85
|
-
- **Technical rule files:** only if the project evidences a runtime/hosting concern.
|
|
86
|
-
|
|
87
|
-
### Gates — `analyze-design`, `analyze-delta-design`, `analyze-slice`, and the `/aw-spec-gate` overlay set
|
|
88
|
-
- Load the domain **gate overlays** as a **conformance checklist**.
|
|
89
|
-
- **Validation input ONLY — never authoring.** A gate may fail a document or a slice; it may
|
|
90
|
-
never write a rule into one.
|
|
91
|
-
|
|
92
|
-
### `constitution`
|
|
93
|
-
- Loads both classes to author the two halves from their own sources.
|
|
94
|
-
|
|
95
|
-
### `adopt` (brownfield)
|
|
96
|
-
- Same partition, reversed: the reversed **spec** is authored with domain rules in context; the
|
|
97
|
-
reversed **design** is authored with the technical set only, so design stays domain-free.
|
|
98
|
-
- Technical files here are **reference, not authority — the CODE wins.**
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Invariants
|
|
103
|
-
|
|
104
|
-
1. **No domain rule file is ever loaded by `design`, `implement`, `implement-delta` or `build`.**
|
|
105
|
-
2. **Domain reaches design and code only as spec ids.**
|
|
106
|
-
3. **Gate overlays validate; they never author.**
|
|
107
|
-
4. **A constraint not in the spec cannot be honoured downstream** — lift it first
|
|
108
|
-
(`LIFT-FAILURE:` → back to `specify`).
|
|
109
|
-
5. **An absent map heading loads nothing and soft-continues** — it is never a blocking error.
|
|
110
|
-
6. **The constitution halves are referred to directly** and never listed in either map.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Where the concrete lists live
|
|
115
|
-
|
|
116
|
-
| Map | Reader | Class |
|
|
117
|
-
|---|---|---|
|
|
118
|
-
| `docs/domainspecs/<domain>/comandrulemap.md` | `resolve-domain` | domain rule files |
|
|
119
|
-
| `docs/domainspecs/<domain>/commandtechrulemap.md` | `resolve-tech` | technical rule files |
|
|
120
|
-
|
|
121
|
-
Each map keys on `## /aw-spec-<command>` headings whose `- ` bullets are workspace-relative
|
|
122
|
-
file paths. Shape references for authoring a new pack live in
|
|
123
|
-
`.aw-spec/orchestrator/rev-templates/`.
|
|
124
|
-
|
|
125
|
-
Rule files may carry a `Commands:` header naming their consumers. That header is **derived from
|
|
126
|
-
these maps** — the maps are authoritative; a header that disagrees is a bug in the header.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema_version": "1.0",
|
|
3
|
-
"extensions": {
|
|
4
|
-
"agent-context": {
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"source": "local",
|
|
7
|
-
"manifest_hash": "sha256:9a1dc02d2d0139bb03860392ecacef79183be2c442feda2f9ccaa4e5907b1e47",
|
|
8
|
-
"enabled": true,
|
|
9
|
-
"priority": 10,
|
|
10
|
-
"registered_commands": {
|
|
11
|
-
"claude": [
|
|
12
|
-
"aw-spec.agent-context.update"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
"registered_skills": [],
|
|
16
|
-
"installed_at": "2026-06-10T07:39:02.078494+00:00"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Coding Agent Context Extension
|
|
2
|
-
|
|
3
|
-
This bundled extension manages the **coding agent context/instruction file** (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`, `AGENTS.md`, `GEMINI.md`, …) for the active integration.
|
|
4
|
-
|
|
5
|
-
It owns the lifecycle of the managed section delimited by the configurable start/end markers (defaults: `<!-- AW-SPEC START -->` / `<!-- AW-SPEC END -->`).
|
|
6
|
-
|
|
7
|
-
## Why an extension?
|
|
8
|
-
|
|
9
|
-
Not every AW-Spec user wants AW-Spec to write into the coding agent's context file. Extracting this behavior into a dedicated extension lets users:
|
|
10
|
-
|
|
11
|
-
- **Opt out** entirely with `specify extension disable agent-context` — AW-Spec will then never create or modify the agent context file.
|
|
12
|
-
- **Customize the markers** by editing `.aw-spec/extensions/agent-context/agent-context-config.yml` — both the Python layer and the bundled scripts honor the same `context_markers` value.
|
|
13
|
-
- **Refresh on demand** with `/aw-spec.agent-context.update`, or automatically through the hooks declared in `extension.yml` (`after_specify`, `after_plan`).
|
|
14
|
-
|
|
15
|
-
## Commands
|
|
16
|
-
|
|
17
|
-
| Command | Description |
|
|
18
|
-
|---------|-------------|
|
|
19
|
-
| `aw-spec.agent-context.update` | Refresh the managed section in the agent context file with the current plan path. |
|
|
20
|
-
|
|
21
|
-
## Configuration
|
|
22
|
-
|
|
23
|
-
All configuration flows through the extension's own config file at
|
|
24
|
-
`.aw-spec/extensions/agent-context/agent-context-config.yml`:
|
|
25
|
-
|
|
26
|
-
```yaml
|
|
27
|
-
# Path to the coding agent context file managed by this extension
|
|
28
|
-
context_file: CLAUDE.md
|
|
29
|
-
|
|
30
|
-
# Delimiters for the managed AW-Spec section
|
|
31
|
-
context_markers:
|
|
32
|
-
start: "<!-- AW-SPEC START -->"
|
|
33
|
-
end: "<!-- AW-SPEC END -->"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
- `context_file` — the project-relative path to the coding agent context file, written by `specify init` and `specify integration install`.
|
|
37
|
-
- `context_markers.start` / `.end` — the delimiters around the managed section. Edit these to use custom markers.
|
|
38
|
-
|
|
39
|
-
## Requirements
|
|
40
|
-
|
|
41
|
-
The bundled update scripts require **Python 3** with **PyYAML** for YAML/upsert processing (PowerShell can also use `ConvertFrom-Yaml` when available).
|
|
42
|
-
|
|
43
|
-
PyYAML ships with the `specify` CLI and is normally available via the same `python3` interpreter. If a hook reports *"PyYAML is required … not available in the current Python environment"*, it means the system `python3` differs from the one used to install AW-Spec. To resolve, run:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
pip install pyyaml
|
|
47
|
-
# or target the specific interpreter AW-Spec uses:
|
|
48
|
-
/path/to/aw-spec-python -m pip install pyyaml
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Disable
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
specify extension disable agent-context
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
When disabled, AW-Spec skips context file creation, updates, and removal (the gates are inside `upsert_context_section()` and `remove_context_section()`).
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Refresh the managed AW-Spec section in the coding agent context file"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Update Coding Agent Context
|
|
6
|
-
|
|
7
|
-
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`).
|
|
8
|
-
|
|
9
|
-
## Behavior
|
|
10
|
-
|
|
11
|
-
The script reads the agent-context extension config at
|
|
12
|
-
`.aw-spec/extensions/agent-context/agent-context-config.yml` to discover:
|
|
13
|
-
|
|
14
|
-
- `context_file` — the path of the coding agent context file to manage.
|
|
15
|
-
- `context_markers.start` / `.end` — the delimiters surrounding the managed section. Defaults to `<!-- AW-SPEC START -->` and `<!-- AW-SPEC END -->` when the field is missing.
|
|
16
|
-
|
|
17
|
-
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`).
|
|
18
|
-
|
|
19
|
-
If `context_file` is empty or the file cannot be located, the command reports nothing to do and exits successfully.
|
|
20
|
-
|
|
21
|
-
## Execution
|
|
22
|
-
|
|
23
|
-
- **Bash**: `.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh [plan_path]`
|
|
24
|
-
- **PowerShell**: `.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 [plan_path]`
|
|
25
|
-
|
|
26
|
-
When `plan_path` is omitted, the script auto-detects the most recently modified `specs/*/plan.md`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
schema_version: "1.0"
|
|
2
|
-
|
|
3
|
-
extension:
|
|
4
|
-
id: agent-context
|
|
5
|
-
name: "Coding Agent Context"
|
|
6
|
-
version: "1.0.0"
|
|
7
|
-
description: "Manages coding agent context/instruction files (e.g., CLAUDE.md, copilot-instructions.md) with project-specific plan references and configurable markers"
|
|
8
|
-
author: aw-spec-core
|
|
9
|
-
repository: https://github.com/github/aw-spec
|
|
10
|
-
license: MIT
|
|
11
|
-
|
|
12
|
-
requires:
|
|
13
|
-
aw-spec_version: ">=0.2.0"
|
|
14
|
-
|
|
15
|
-
provides:
|
|
16
|
-
commands:
|
|
17
|
-
- name: aw-spec.agent-context.update
|
|
18
|
-
file: commands/aw-spec.agent-context.update.md
|
|
19
|
-
description: "Refresh the managed AW-Spec section in the coding agent context file"
|
|
20
|
-
|
|
21
|
-
# NO auto-wired hooks — this extension is ON-DEMAND only
|
|
22
|
-
# (/aw-spec.agent-context.update). It previously declared after_specify + after_plan,
|
|
23
|
-
# and installing it re-wrote both into .aw-spec/extensions.yml. Both were stale:
|
|
24
|
-
# • after_plan — no workflow dispatches that phase; the plan/tasks tier was
|
|
25
|
-
# retired by the spec-anchored redesign.
|
|
26
|
-
# • after_specify — the updater targets `specs/*/plan.md`, which nothing produces,
|
|
27
|
-
# so every specify (greenfield forward loop AND brownfield CR
|
|
28
|
-
# loop, which both enter at specify) offered a hook that could
|
|
29
|
-
# not do its job.
|
|
30
|
-
# Restore a hook here once the updater is retargeted at spec.md / design.md — that
|
|
31
|
-
# retarget is the open work, not the hook wiring.
|
|
32
|
-
hooks: {}
|
|
33
|
-
|
|
34
|
-
tags:
|
|
35
|
-
- "agent"
|
|
36
|
-
- "context"
|
|
37
|
-
- "core"
|