aw-spec-cli 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.agents/agent.json +28 -0
- package/assets/.agents/skills/aw-spec-orch/SKILL.md +56 -0
- package/assets/.agents/skills/aw-spec-orch-demo/SKILL.md +59 -0
- package/assets/.aw-spec/DESIGN-FORMAT.md +151 -0
- package/assets/.aw-spec/ORCH-DIALECT.md +156 -0
- package/assets/.aw-spec/RULE-PARTITION.md +126 -0
- package/assets/.aw-spec/extensions/agent-context/extension.yml +12 -9
- package/assets/.aw-spec/extensions.yml +12 -19
- package/assets/.aw-spec/integrations/aw-spec.manifest.json +1 -9
- package/assets/.aw-spec/interpreter/run-skill.py +1158 -0
- package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +94 -0
- package/assets/.aw-spec/orchestrator/README.md +300 -0
- package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +74 -0
- package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +74 -0
- package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +105 -0
- package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +79 -0
- package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +81 -0
- package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +75 -0
- package/assets/.aw-spec/orchestrator/orchestrator.py +1721 -0
- package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +40 -0
- package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +59 -0
- package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +97 -0
- package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +61 -0
- package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
- package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
- package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
- package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
- package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +160 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +244 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +775 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +248 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +261 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +425 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +188 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +474 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +284 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +103 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +382 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +246 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +231 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +258 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +236 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +949 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +177 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +79 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +412 -0
- package/assets/.aw-spec/scripts/bash/aw-inventory.sh +14 -0
- package/assets/.aw-spec/scripts/bash/aw-parity.sh +13 -0
- package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +13 -0
- package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +1899 -0
- package/assets/.aw-spec/scripts/bash/aw-xref.sh +15 -0
- package/assets/.aw-spec/scripts/bash/common.sh +11 -60
- package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +14 -0
- package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +13 -0
- package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +13 -0
- package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +1563 -0
- package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +15 -0
- package/assets/.aw-spec/scripts/python/aw-inventory.py +683 -0
- package/assets/.aw-spec/scripts/python/aw-parity.py +380 -0
- package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +312 -0
- package/assets/.aw-spec/scripts/python/aw-xref.py +1330 -0
- package/assets/.aw-spec/scripts/python/validate_okf.py +349 -0
- package/assets/.aw-spec/templates/constitution-domain-template.md +75 -0
- package/assets/.aw-spec/templates/constitution-technical-template.md +70 -0
- package/assets/.aw-spec/templates/delta-design-template.md +69 -0
- package/assets/.aw-spec/templates/delta-spec-template.md +60 -0
- package/assets/.aw-spec/templates/design-template.md +383 -0
- package/assets/.aw-spec/templates/okf-concept-template.md +103 -0
- package/assets/.aw-spec/templates/parity-manifest-template.json +49 -0
- package/assets/.aw-spec/templates/source-map-template.md +85 -0
- package/assets/.aw-spec/templates/spec-template.md +192 -71
- package/assets/.claude/agent.json +27 -0
- package/assets/.claude/skills/aw-spec-orch/SKILL.md +55 -0
- package/assets/.claude/skills/aw-spec-orch-demo/SKILL.md +59 -0
- package/assets/.kilocode/agent.json +28 -0
- package/assets/.kilocode/workflows/aw-spec-orch-demo.md +59 -0
- package/assets/.kilocode/workflows/aw-spec-orch.md +55 -0
- package/assets/docs/architecture/clean-architecture.md +1 -1
- package/assets/docs/architecture/cqrs.md +1 -1
- package/assets/docs/architecture/eventing.md +1 -1
- package/assets/docs/architecture/folder-structure.md +1 -1
- package/assets/docs/architecture/modular-monolith.md +1 -1
- package/assets/docs/architecture/persistence.md +1 -1
- package/assets/docs/architecture/testing.md +1 -1
- package/assets/docs/architecture/vertical-slices.md +1 -1
- package/assets/docs/components/Email/README.md +1 -1
- package/assets/docs/components/Jobs/README.md +1 -1
- package/assets/docs/components/QrGenerator/README.md +1 -1
- package/assets/docs/components/README.md +1 -1
- package/assets/docs/domain/domain-driven-design.md +1 -1
- package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/auditing.domain.md +86 -18
- package/assets/docs/domainspecs/healthcare/authorization.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/clinical-terms.md +1 -1
- package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +58 -124
- package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +119 -0
- package/assets/docs/domainspecs/healthcare/consent.md +1 -1
- package/assets/docs/domainspecs/healthcare/cqrs.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/data-classification.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/dicom.md +1 -1
- package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/eventing.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/fhir.md +1 -1
- package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/hipaa.md +1 -1
- package/assets/docs/domainspecs/healthcare/hl7.md +1 -1
- package/assets/docs/domainspecs/healthcare/integration-terms.md +1 -1
- package/assets/docs/domainspecs/healthcare/persistence.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/terminology.md +1 -1
- package/assets/docs/domainspecs/healthcare/testing.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +1 -1
- package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/api-versioning.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/atc.md +1 -1
- package/assets/docs/domainspecs/pharma/auditing.domain.md +80 -16
- package/assets/docs/domainspecs/pharma/authorization.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/coding-standards.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/comandrulemap.md +64 -142
- package/assets/docs/domainspecs/pharma/commandtechrulemap.md +119 -0
- package/assets/docs/domainspecs/pharma/cqrs.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/data-classification.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/data-provenance.md +1 -1
- package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/eventing.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/fhir.md +1 -1
- package/assets/docs/domainspecs/pharma/folder-structure.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/hl7.md +1 -1
- package/assets/docs/domainspecs/pharma/idmp.md +1 -1
- package/assets/docs/domainspecs/pharma/integration-terms.md +1 -1
- package/assets/docs/domainspecs/pharma/ndc.md +1 -1
- package/assets/docs/domainspecs/pharma/persistence.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/pharma-terms.md +1 -1
- package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/regulatory-compliance.md +1 -1
- package/assets/docs/domainspecs/pharma/terminology.md +1 -1
- package/assets/docs/domainspecs/pharma/testing.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +1 -1
- package/assets/docs/domainspecs/pharma/zero-trust.domain.md +1 -1
- package/assets/docs/governance/api-versioning.md +1 -1
- package/assets/docs/governance/coding-standards.md +1 -1
- package/assets/docs/governance/dependency-policy.md +1 -1
- package/assets/docs/requirement-spec.txt +27 -0
- package/assets/docs/security/auditing.md +54 -11
- package/assets/docs/security/authorization.md +1 -1
- package/assets/docs/security/data-classification.md +1 -1
- package/assets/docs/security/zero-trust.md +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -54
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/paths.js +2 -2
- package/dist/utils/paths.js.map +1 -1
- package/package.json +1 -1
- package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
- package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
- package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
- package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
- package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
- package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
- package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
- package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
- package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
- package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
- package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
- package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
- package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
- package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
- package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
- package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
- package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
- package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
- package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
- package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
- package/assets/.aw-spec/templates/checklist-template.md +0 -40
- package/assets/.aw-spec/templates/constitution-template.md +0 -57
- package/assets/.aw-spec/templates/plan-template.md +0 -113
- package/assets/.aw-spec/templates/tasks-template.md +0 -252
- package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
- package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
- package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
- package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
- package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
- package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
- package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
- package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
- package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
- package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
- package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
- package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
- package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
- package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
- package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
- package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
- package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
- package/assets/.kilocode/rules/specify-rules.md +0 -4
- package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
- package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
- package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
- package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
- package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
- package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
- package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
- package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
- package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
- package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
- package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
- package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
- package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
- package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
- package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
- package/assets/docs/UI.Visualization/PACKAGING.md +0 -191
- package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +0 -11768
- package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +0 -11214
- package/assets/docs/UI.Visualization/pack-foundation.ps1 +0 -165
- package/assets/docs/UI.Visualization/pack-foundation.sh +0 -206
- package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +0 -159
- package/assets/docs/UI.Visualization/pack-reference-foundation.sh +0 -205
- package/assets/docs/UI.Visualization/unpack-foundation.ps1 +0 -126
- package/assets/docs/UI.Visualization/unpack-foundation.sh +0 -217
- package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +0 -218
- package/assets/docs/command.txt +0 -295
- package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +0 -70
- package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +0 -58
- package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +0 -62
- package/assets/docs/domainspecs/UIVisualization/chart-network.md +0 -69
- package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +0 -75
- package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +0 -66
- package/assets/docs/domainspecs/UIVisualization/chart-survival.md +0 -69
- package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +0 -68
- package/assets/docs/domainspecs/UIVisualization/chart-violin.md +0 -61
- package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +0 -63
- package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +0 -80
- package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +0 -87
- package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +0 -47
- package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +0 -130
- package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +0 -67
- package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +0 -68
- package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +0 -110
- package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +0 -55
- package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +0 -67
- package/assets/docs/domainspecs/UIVisualization/testing.domain.md +0 -52
- package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +0 -39
- package/assets/docs/pharma-constitution.my-ref.md +0 -86
|
@@ -1,131 +1,252 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Specification: [AGGREGATE]
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Aggregate (feature)**: `[Aggregate]` <!-- the feature = the aggregate, e.g. Order -->
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Spec home**: `specs/[Aggregate]/`
|
|
6
|
+
|
|
7
|
+
**Version**: v1.0 <!-- living truth; every applied change request bumps this — see Change History -->
|
|
6
8
|
|
|
7
9
|
**Status**: Draft
|
|
8
10
|
|
|
9
11
|
**Input**: User description: "$ARGUMENTS"
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
<!--
|
|
14
|
+
AGGREGATE = FEATURE. This spec covers ONE aggregate (e.g. Order) and is the
|
|
15
|
+
single LIVING source of truth for its whole lifecycle. Every operation on it
|
|
16
|
+
(CreateOrder, UpdateOrder, …) is a USER STORY below — NOT a separate feature.
|
|
17
|
+
A later requirement is a new US-n added here as a delta (see .aw-spec/changes/
|
|
18
|
+
and delta-spec-template.md), never a new spec folder. One spec + one design.md
|
|
19
|
+
(specs/[Aggregate]/design.md) — the DESIGN derives from THIS document.
|
|
20
|
+
|
|
21
|
+
Section order is intentional: establish the business need and scope, then the
|
|
22
|
+
stable core the aggregate IS (requirements → rules → constraints → entities →
|
|
23
|
+
data classification → integration contracts → edge cases), then the prioritized
|
|
24
|
+
user journeys that exercise it, then measurable success.
|
|
25
|
+
|
|
26
|
+
DOMAIN LIFT (specify's job): three sections — Constraints & NFRs (CN-), Data
|
|
27
|
+
Classification (DC-), Integration Contracts (IC-) — are where specify LIFTS
|
|
28
|
+
domain-derived constraints out of the domain rule files into the spec. Design
|
|
29
|
+
authors architecture from the spec ONLY, so anything not captured here never
|
|
30
|
+
reaches design. Fill them when the domain applies; keep them (empty → "None")
|
|
31
|
+
otherwise.
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
## Business Need
|
|
12
35
|
|
|
13
36
|
<!--
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
you should still have a viable MVP (Minimum Viable Product) that delivers value.
|
|
17
|
-
|
|
18
|
-
Assign priorities (P1, P2, P3, etc.) to each story, where P1 is the most critical.
|
|
19
|
-
Think of each story as a standalone slice of functionality that can be:
|
|
20
|
-
- Developed independently
|
|
21
|
-
- Tested independently
|
|
22
|
-
- Deployed independently
|
|
23
|
-
- Demonstrated to users independently
|
|
37
|
+
ACTION REQUIRED: Why this aggregate exists — the problem, the affected users,
|
|
38
|
+
and the value delivered. Business-facing; no implementation detail.
|
|
24
39
|
-->
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
[The problem this aggregate solves, who it serves, and the value it delivers.]
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
## Scope & Assumptions
|
|
29
44
|
|
|
30
|
-
|
|
45
|
+
### Aggregate Boundary
|
|
31
46
|
|
|
32
|
-
|
|
47
|
+
<!--
|
|
48
|
+
The aggregate = the largest slice whose code no other feature owns. State what
|
|
49
|
+
it OWNS, what it only REFERENCES (by identifier, not owned), and what is out of
|
|
50
|
+
scope. This anchors the design's "dependencies point inward" and keeps commands
|
|
51
|
+
as deltas on THIS aggregate rather than new features.
|
|
52
|
+
-->
|
|
33
53
|
|
|
34
|
-
**
|
|
54
|
+
- **Owns**: [entities/behaviour inside this aggregate — e.g. Order, OrderLine]
|
|
55
|
+
- **References (by id, not owned)**: [Customer, Product — read-only / by identifier]
|
|
56
|
+
- **Out of scope / non-goals**: [explicitly excluded — e.g. payment settlement, shipping]
|
|
35
57
|
|
|
36
|
-
|
|
37
|
-
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
58
|
+
### Assumptions
|
|
38
59
|
|
|
39
|
-
|
|
60
|
+
<!--
|
|
61
|
+
Reasonable defaults chosen where the description was silent, plus dependencies
|
|
62
|
+
on existing systems/services.
|
|
63
|
+
-->
|
|
40
64
|
|
|
41
|
-
|
|
65
|
+
- [Assumption about target users, e.g., "Users have stable internet connectivity"]
|
|
66
|
+
- [Assumption about scope, e.g., "Mobile support is out of scope for v1"]
|
|
67
|
+
- [Dependency on an existing system/service, e.g., "Requires the existing user-profile API"]
|
|
42
68
|
|
|
43
|
-
|
|
69
|
+
## System Requirements *(mandatory)*
|
|
44
70
|
|
|
45
|
-
|
|
71
|
+
<!--
|
|
72
|
+
Functional requirements in EARS notation (Easy Approach to Requirements Syntax):
|
|
73
|
+
atomic, testable, unambiguous. Choose the pattern that fits each requirement —
|
|
74
|
+
|
|
75
|
+
• Ubiquitous THE SYSTEM SHALL <requirement>
|
|
76
|
+
• Event-driven WHEN <trigger> THE SYSTEM SHALL <response>
|
|
77
|
+
• State-driven WHILE <in a state> THE SYSTEM SHALL <response>
|
|
78
|
+
• Unwanted IF <condition/error> THEN THE SYSTEM SHALL <response>
|
|
79
|
+
• Optional WHERE <feature is present> THE SYSTEM SHALL <response>
|
|
80
|
+
|
|
81
|
+
Give each a STABLE id (FR-001, …) — design sections and code trace to these ids.
|
|
82
|
+
Mark genuine unknowns "[NEEDS CLARIFICATION: <question>]" (≤3; scope/UX/security
|
|
83
|
+
only, and only where no reasonable default exists).
|
|
84
|
+
-->
|
|
46
85
|
|
|
47
|
-
**
|
|
86
|
+
- **FR-001**: WHEN [a customer submits an order] THE SYSTEM SHALL [create it in Draft state].
|
|
87
|
+
- **FR-002**: THE SYSTEM SHALL [persist every order under a unique identifier].
|
|
88
|
+
- **FR-003**: IF [the order has no line items] THEN THE SYSTEM SHALL [reject the submission].
|
|
89
|
+
- **FR-004**: WHILE [an order is in Draft] THE SYSTEM SHALL [allow line items to be added or removed].
|
|
90
|
+
- **FR-005**: WHERE [tax calculation is enabled] THE SYSTEM SHALL [apply the regional tax rule].
|
|
48
91
|
|
|
49
|
-
|
|
92
|
+
## Business Rules *(invariants — always true, technology-agnostic)*
|
|
50
93
|
|
|
51
|
-
|
|
94
|
+
<!--
|
|
95
|
+
ACTION REQUIRED: Constraints that must ALWAYS hold for the aggregate, independent
|
|
96
|
+
of any single operation. These become the design's §Domain invariants and must be
|
|
97
|
+
enforceable and testable. Give each a STABLE id (BR-001, …).
|
|
98
|
+
-->
|
|
52
99
|
|
|
53
|
-
|
|
100
|
+
- **BR-001**: [An order's total MUST never be negative.]
|
|
101
|
+
- **BR-002**: [A submitted order MUST always have at least one line item.]
|
|
102
|
+
- **BR-003**: [An order's identifier is immutable once created.]
|
|
54
103
|
|
|
55
|
-
|
|
104
|
+
## Constraints & Non-Functional Requirements *(domain lift — CN)*
|
|
56
105
|
|
|
57
|
-
|
|
106
|
+
<!--
|
|
107
|
+
ACTION REQUIRED (when the domain applies; else "None (as of vX.Y)"). Constraints the
|
|
108
|
+
aggregate MUST satisfy that are NEITHER functional behaviour (those are FR) NOR
|
|
109
|
+
always-true business invariants (those are BR): the regulatory, retention,
|
|
110
|
+
immutability, audit-mandate, and performance-as-a-limit rules. Many are LIFTED here
|
|
111
|
+
by specify from the domain rule files (e.g. persistence.domain, auditing.domain,
|
|
112
|
+
data-classification.domain) so they survive into design — which reads the spec ONLY.
|
|
113
|
+
Give each a STABLE id (CN-001, …); design's §5 Cross-Cutting and the analyze gate
|
|
114
|
+
trace to these ids. State each as testable; where lifted, cite the source rule.
|
|
115
|
+
-->
|
|
58
116
|
|
|
59
|
-
**
|
|
117
|
+
- **CN-001**: [Retention — e.g. submitted orders + their audit trail are retained for [period] per [policy]; hard delete is forbidden once submitted (logical/retire only). — lifted from persistence.domain]
|
|
118
|
+
- **CN-002**: [Audit immutability — e.g. every create/modify/cancel emits an append-only audit entry (User, Timestamp, Action, Previous, New). — lifted from auditing.domain]
|
|
119
|
+
- **CN-003**: [Data integrity — e.g. records subject to [regime] satisfy [integrity standard].]
|
|
120
|
+
- **CN-004**: [Performance-as-a-limit — e.g. P95 read latency < 200 ms at 200 RPS; not a behaviour, a bound.]
|
|
60
121
|
|
|
61
|
-
|
|
122
|
+
## Key Entities *(the aggregate's conceptual model — no implementation detail)*
|
|
62
123
|
|
|
63
|
-
|
|
124
|
+
<!--
|
|
125
|
+
The aggregate root and the entities/value objects inside its boundary: what each
|
|
126
|
+
represents, its key attributes, lifecycle/states, and relationships. Reference to
|
|
127
|
+
OTHER aggregates is by identifier only (see Aggregate Boundary).
|
|
128
|
+
-->
|
|
64
129
|
|
|
65
|
-
|
|
130
|
+
- **[Aggregate root — e.g. Order]**: [what it represents; key attributes; lifecycle/states, e.g. Draft → Submitted → Fulfilled]
|
|
131
|
+
- **[Entity / value object — e.g. OrderLine]**: [what it represents; relationship to the root]
|
|
66
132
|
|
|
67
|
-
|
|
133
|
+
## Data Classification *(domain lift — DC)*
|
|
68
134
|
|
|
69
|
-
|
|
135
|
+
<!--
|
|
136
|
+
ACTION REQUIRED (when the aggregate handles sensitive data; else "None (as of vX.Y)").
|
|
137
|
+
The sensitivity taxonomy for this aggregate's data and the exposure rules that follow:
|
|
138
|
+
which categories exist, which Key-Entity fields fall in each, and where each category
|
|
139
|
+
MAY / MUST NOT appear (public API surface, logs, metrics, traces, external projections).
|
|
140
|
+
Lifted by specify from the domain data-classification rules. Design enforces these; the
|
|
141
|
+
analyze-design / analyze-slice gates check them. Give each a STABLE id (DC-001, …); reference fields by
|
|
142
|
+
the names used in Key Entities.
|
|
143
|
+
-->
|
|
144
|
+
|
|
145
|
+
| id | Category | Applies to (fields / entities) | Exposure rule |
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| DC-001 | [Public] | [id, status, non-sensitive attributes] | [may appear on the public API + external projections] |
|
|
148
|
+
| DC-002 | [Sensitive / restricted] | [PII, pre-release, commercially-sensitive fields] | [MUST NOT appear on the public surface, nor in logs / metrics / traces] |
|
|
149
|
+
| DC-003 | [Externally-sourced] | [imported fields] | [carries provenance; [handling rule]] |
|
|
150
|
+
|
|
151
|
+
## Integration Contracts *(domain lift — IC)*
|
|
152
|
+
|
|
153
|
+
<!--
|
|
154
|
+
ACTION REQUIRED (when the aggregate interoperates; else "None (as of vX.Y)"). The
|
|
155
|
+
external contracts this aggregate MUST satisfy — interoperability obligations lifted by
|
|
156
|
+
specify from the domain interop rules (e.g. FHIR/HL7/DICOM projections, terminology
|
|
157
|
+
services, inbound feeds). State each at CONTRACT level: which standard, which resources,
|
|
158
|
+
direction (inbound/outbound), projection vs system-of-record — NOT the adapter design
|
|
159
|
+
(design realises these in its API / Infrastructure layers). Give each a STABLE id
|
|
160
|
+
(IC-001, …); design's §4.2 External Integrations traces to these ids.
|
|
161
|
+
-->
|
|
70
162
|
|
|
71
|
-
|
|
163
|
+
- **IC-001**: [Outbound projection — e.g. the aggregate SHALL project to [external standard / resources] as read-only projections (not the system of record); identifiers map to [external identifier]; coded fields to [coded type].]
|
|
164
|
+
- **IC-002**: [Reference-data validation — e.g. coded values SHALL validate against [terminology / reference service]; no invented codes.]
|
|
165
|
+
- **IC-003**: [Inbound feed — e.g. inbound [feed/standard] SHALL flow through an Interop adapter, never a direct write path to the aggregate.]
|
|
166
|
+
|
|
167
|
+
## Edge Cases & Exceptional Scenarios
|
|
72
168
|
|
|
73
169
|
<!--
|
|
74
|
-
ACTION REQUIRED:
|
|
75
|
-
|
|
170
|
+
ACTION REQUIRED: Boundary conditions, error paths, and concurrency/consistency
|
|
171
|
+
cases. Each should map to a System Requirement (often an IF…THEN unwanted-behaviour
|
|
172
|
+
requirement) or a Business Rule.
|
|
76
173
|
-->
|
|
77
174
|
|
|
78
|
-
- What happens when [boundary condition]?
|
|
79
|
-
- How does system handle [error scenario]?
|
|
175
|
+
- What happens when [boundary condition, e.g., the same order is submitted twice]?
|
|
176
|
+
- How does the system handle [error scenario, e.g., a referenced product no longer exists]?
|
|
80
177
|
|
|
81
|
-
##
|
|
178
|
+
## User Stories *(prioritized)*
|
|
82
179
|
|
|
83
180
|
<!--
|
|
84
|
-
|
|
85
|
-
|
|
181
|
+
Prioritized user journeys (P1 = most critical). Each MUST be INDEPENDENTLY
|
|
182
|
+
TESTABLE — implementing just one still yields a viable slice of value that can be
|
|
183
|
+
developed, tested, deployed, and demonstrated on its own.
|
|
184
|
+
|
|
185
|
+
Give each a STABLE id (US-1, US-2, …); design sections trace to these ids. Each
|
|
186
|
+
story exercises specific System Requirements / Business Rules — cite them so the
|
|
187
|
+
spine (US ↔ FR/BR ↔ design ↔ code) stays exact. On this living spec, note when a
|
|
188
|
+
story entered or changed: "Added: vX.Y (CR-…)" / "Modified: vX.Y (CR-…)".
|
|
86
189
|
-->
|
|
87
190
|
|
|
88
|
-
###
|
|
191
|
+
### US-1 - [Brief Title] (Priority: P1) · _Added: v1.0_
|
|
192
|
+
|
|
193
|
+
[Describe this user journey in plain language.]
|
|
194
|
+
|
|
195
|
+
**Why this priority**: [The value and why it ranks here.]
|
|
196
|
+
|
|
197
|
+
**Exercises**: [FR-001, FR-003, BR-001]
|
|
198
|
+
|
|
199
|
+
**Acceptance Criteria**:
|
|
200
|
+
|
|
201
|
+
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
202
|
+
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
203
|
+
|
|
204
|
+
**Independent Test**: [How this story is verified on its own and the value it delivers.]
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### US-2 - [Brief Title] (Priority: P2) · _Added: v1.0_
|
|
89
209
|
|
|
90
|
-
|
|
91
|
-
- **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
|
|
92
|
-
- **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
|
|
93
|
-
- **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
|
|
94
|
-
- **FR-005**: System MUST [behavior, e.g., "log all security events"]
|
|
210
|
+
[Describe this user journey in plain language.]
|
|
95
211
|
|
|
96
|
-
|
|
212
|
+
**Why this priority**: [The value and why it ranks here.]
|
|
97
213
|
|
|
98
|
-
|
|
99
|
-
- **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
|
|
214
|
+
**Exercises**: [FR-…, BR-…]
|
|
100
215
|
|
|
101
|
-
|
|
216
|
+
**Acceptance Criteria**:
|
|
102
217
|
|
|
103
|
-
|
|
104
|
-
|
|
218
|
+
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
|
|
219
|
+
|
|
220
|
+
**Independent Test**: [How this story is verified on its own.]
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
[Add more user stories as needed (US-3, US-4, …), each with a priority and a stable id.]
|
|
105
225
|
|
|
106
226
|
## Success Criteria *(mandatory)*
|
|
107
227
|
|
|
108
228
|
<!--
|
|
109
|
-
ACTION REQUIRED:
|
|
110
|
-
|
|
229
|
+
ACTION REQUIRED: Measurable, technology-agnostic outcomes — verified at the
|
|
230
|
+
`analyze-slice` phase. Give each a STABLE id (SC-001, …).
|
|
111
231
|
-->
|
|
112
232
|
|
|
113
233
|
### Measurable Outcomes
|
|
114
234
|
|
|
115
|
-
- **SC-001**: [Measurable metric, e.g., "
|
|
116
|
-
- **SC-002**: [Measurable metric, e.g., "
|
|
117
|
-
- **SC-003**: [User
|
|
118
|
-
- **SC-004**: [Business metric, e.g., "Reduce support tickets
|
|
235
|
+
- **SC-001**: [Measurable metric, e.g., "A customer can place an order in under 2 minutes."]
|
|
236
|
+
- **SC-002**: [Measurable metric, e.g., "The system sustains 1000 concurrent orders without degradation."]
|
|
237
|
+
- **SC-003**: [User-satisfaction metric, e.g., "90% of first-time users complete an order without assistance."]
|
|
238
|
+
- **SC-004**: [Business metric, e.g., "Reduce order-related support tickets by 50%."]
|
|
119
239
|
|
|
120
|
-
##
|
|
240
|
+
## Change History
|
|
121
241
|
|
|
122
242
|
<!--
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
243
|
+
The living-truth ledger. Every applied change request appends a row here, carrying
|
|
244
|
+
the version it ships as. finalize-delta writes the row when it merges the delta;
|
|
245
|
+
close-delta then archives the CR, bumps the minor version in active_version.json and
|
|
246
|
+
stamps that same number into this document's **Version** header — one mechanism, one
|
|
247
|
+
stage, so header, row and active_version.json never disagree. Newest last.
|
|
126
248
|
-->
|
|
127
249
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- [Dependency on existing system/service, e.g., "Requires access to the existing user profile API"]
|
|
250
|
+
| Version | Date | Change | User stories | CR |
|
|
251
|
+
|---------|------|--------|--------------|-----|
|
|
252
|
+
| v1.0 | [DATE] | Initial specification | US-1 | — |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-code",
|
|
3
|
+
"sdk": {
|
|
4
|
+
"type": "claude-agent-sdk",
|
|
5
|
+
"package": "claude-agent-sdk",
|
|
6
|
+
"module": "claude_agent_sdk",
|
|
7
|
+
"adapter": "../.aw-spec/orchestrator/adapters/claude_agent_sdk.py"
|
|
8
|
+
},
|
|
9
|
+
"runtime": "Claude Code CLI (claude -p)",
|
|
10
|
+
"bin": "claude",
|
|
11
|
+
"args": ["-p", "--output-format", "json", "--no-session-persistence"],
|
|
12
|
+
"model_flag": "--model",
|
|
13
|
+
"system": { "flag": "--system-prompt" },
|
|
14
|
+
"user": { "mode": "stdin" },
|
|
15
|
+
"tools_flag": "--tools",
|
|
16
|
+
"approval": {
|
|
17
|
+
"acceptEdits": ["--permission-mode", "acceptEdits"],
|
|
18
|
+
"bypassPermissions": ["--permission-mode", "bypassPermissions"],
|
|
19
|
+
"default": ["--permission-mode", "default"]
|
|
20
|
+
},
|
|
21
|
+
"isolation": {
|
|
22
|
+
"bare": ["--bare"],
|
|
23
|
+
"fresh": ["--setting-sources", ""]
|
|
24
|
+
},
|
|
25
|
+
"budget_flag": "--max-budget-usd",
|
|
26
|
+
"result_keys": ["result"]
|
|
27
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-orch"
|
|
3
|
+
description: "Parametric launcher (Claude Code): run ANY converted aw-spec skill on the aw-orchestrator under one of the 4 strategies (agent [default], spawn, sdk, sdk-apply)."
|
|
4
|
+
argument-hint: "<skill> [strategy] [input…] — e.g. 'select-domain', 'specify spawn Build an order API', 'analyze-slice'"
|
|
5
|
+
compatibility: "Requires .aw-spec/orchestrator/ and the claude CLI on PATH"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Orchestrator Skill Launcher
|
|
11
|
+
|
|
12
|
+
Runs one converted `aw-spec-*` workflow on the shared, agent-agnostic engine. All orchestration and **all context management live in the workflow YAML + engine** (`.aw-spec/orchestrator/orchestrator.py`): the interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself. Execution follows the chosen strategy; the checkpoint channel carries every human-facing interaction regardless of strategy.
|
|
13
|
+
|
|
14
|
+
- **Engine + workflows (common, shared by all agents):** `.aw-spec/orchestrator/orchestrator.py`, `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`, shared modules in `.aw-spec/orchestrator/modules/`, shared scripts in `.aw-spec/scripts/`
|
|
15
|
+
- **This agent's transport profile:** `.claude/agent.json`
|
|
16
|
+
|
|
17
|
+
> Claude Code spawns via the `claude -p` CLI (native `--system-prompt`,
|
|
18
|
+
> `--tools`, and `--bare` isolation). Its `sdk` block declares the SDK the
|
|
19
|
+
> `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`) and the adapter
|
|
20
|
+
> (`.aw-spec/orchestrator/adapters/claude_agent_sdk.py`, shared per-SDK)
|
|
21
|
+
> that owns its calling convention.
|
|
22
|
+
|
|
23
|
+
## Execution Steps
|
|
24
|
+
|
|
25
|
+
1. **Parse Arguments** (`<skill> [strategy] [input…]`):
|
|
26
|
+
- `skill` (required): the aw-spec skill name, e.g. `demo`, `select-domain`, `foundation`, `specify`, `design`, `implement`, `build`. Resolve the workflow file `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`. If it does not exist, list the available `aw-spec-*.orch.yaml` files in that folder and stop.
|
|
27
|
+
- `strategy` (optional, one of `agent`, `spawn`, `sdk`, `sdk-apply`; default `agent` — YOU fulfill each generation through the checkpoint channel, no profile needed): who executes each generation. Always pass `--strategy <strategy>`.
|
|
28
|
+
- Everything after the strategy is the user input: pass it as `--input "<text>"` (omit when empty).
|
|
29
|
+
- `--agent-profile .claude/agent.json` is required for `spawn`, `sdk`, and `sdk-apply` (`agent` needs no profile). If the SDK package isn't installed, add `--sdk-install`.
|
|
30
|
+
- **Always** pass `--checkpoint .aw-spec/orchestrator/.state/<skill>.state.json` — for EVERY strategy. Converted skills contain interactive steps (questions, selections, hooks); the checkpoint is how they reach you and the user. Strategies only govern who generates.
|
|
31
|
+
- `spawn` may also add `--isolation bare|fresh` and `--model <name>`; `sdk`/`sdk-apply` accept `--model <name>`.
|
|
32
|
+
|
|
33
|
+
2. **Run the Interpreter**:
|
|
34
|
+
```bash
|
|
35
|
+
python3 .aw-spec/orchestrator/orchestrator.py \
|
|
36
|
+
.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml \
|
|
37
|
+
--strategy <strategy> \
|
|
38
|
+
--checkpoint .aw-spec/orchestrator/.state/<skill>.state.json \
|
|
39
|
+
[--agent-profile .claude/agent.json] # spawn, sdk, sdk-apply \
|
|
40
|
+
[--input "<user input>"] \
|
|
41
|
+
--json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. **Handle the Suspend/Resume Loop** — whenever the command exits with code `2`, read the printed `pending` JSON and dispatch on `pending.kind`; fulfill it, write the response to `pending.response_path`, then re-run the SAME command. Repeat until exit `0` (done) or `1` (stopped by a gate).
|
|
45
|
+
- **`ask`** — ask the USER the `prompt` with the listed `options` (use your question tool). Write the chosen answer as PLAIN TEXT to `response_path` (comma-separated values when `multi` is true).
|
|
46
|
+
- **`select`** — ask the USER to pick ONE of `options`; write the chosen value as plain text to `response_path`.
|
|
47
|
+
- **`hook`** — run each MANDATORY hook in `hooks` (each is a slash command of THIS agent) in this conversation; optional hooks at your discretion. Then write `done` to `response_path`.
|
|
48
|
+
- **`author`** — read `system_path` + `user_path` and treat them as your ONLY standards and context. Author the COMPLETE content of the file named in `target` and write it — content ONLY, no commentary, no code fence — to `response_path`. Do NOT write the target file yourself; the interpreter does that.
|
|
49
|
+
- **`agent_generate`** — read `system_path` + `user_path`; perform the task YOURSELF with the listed `tools` within `permission_mode`; write your full final reply — ending with the required ```json fence — to `response_path`.
|
|
50
|
+
- **`agent_query` / `agent_review`** — same as above but READ-ONLY (do not modify files); the reply must end with the required ```json fence.
|
|
51
|
+
- **`apply`** — an isolated generation already decided the changes: read `artifact_path` and write its file contents EXACTLY to the paths it names, then write the confirmation ```json fence to `response_path`.
|
|
52
|
+
- If `pending.note` is present, your previous response was rejected — follow the note and rewrite `response_path`.
|
|
53
|
+
|
|
54
|
+
4. **Report**:
|
|
55
|
+
Report the final JSON (`status`, `outputs`, and any `reason`) to the user. On `stopped`, relay the gate message verbatim — it tells the user what to fix or run first.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-orch-demo"
|
|
3
|
+
description: "Prototype launcher (Claude Code): run the aw-orchestrator using the specified strategy (spawn, agent, sdk, sdk-apply)."
|
|
4
|
+
argument-hint: "Optional strategy ('agent', 'spawn', 'sdk', 'sdk-apply') and/or k=value vars (e.g. 'agent out_dir=...')"
|
|
5
|
+
compatibility: "Requires .aw-spec/orchestrator/ and the claude CLI on PATH"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Orchestrator Launcher
|
|
11
|
+
|
|
12
|
+
All orchestration lives in the workflow YAML and is executed by `.aw-spec/orchestrator/orchestrator.py` (the general, agent-agnostic engine). The interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself.
|
|
13
|
+
|
|
14
|
+
- **Engine + workflow (general):** `.aw-spec/orchestrator/orchestrator.py`, `*.orch.yaml`
|
|
15
|
+
- **This agent's transport profile:** `.claude/agent.json`
|
|
16
|
+
|
|
17
|
+
> Claude Code spawns via the `claude -p` CLI (native `--system-prompt`,
|
|
18
|
+
> `--tools`, and `--bare` isolation). Its `sdk` block declares the SDK the
|
|
19
|
+
> `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`) and the adapter
|
|
20
|
+
> (`.aw-spec/orchestrator/adapters/claude_agent_sdk.py`, shared per-SDK)
|
|
21
|
+
> that owns its calling convention.
|
|
22
|
+
|
|
23
|
+
## Execution Steps
|
|
24
|
+
|
|
25
|
+
1. **Parse Arguments**:
|
|
26
|
+
- Identify the requested strategy (one of: `agent`, `spawn`, `sdk`, `sdk-apply`). If the user specifies a strategy as the first argument, use it. Otherwise, default to `spawn`.
|
|
27
|
+
- Always pass the strategy explicitly: `--strategy <strategy>`.
|
|
28
|
+
- `--agent-profile .claude/agent.json` is required for `spawn`, `sdk`, and `sdk-apply`:
|
|
29
|
+
`spawn` reads the CLI to launch from it; `sdk`/`sdk-apply` read the SDK
|
|
30
|
+
package/module (and its `adapter` file) to import from its `sdk` block.
|
|
31
|
+
If the SDK package isn't installed, add `--sdk-install` so the engine
|
|
32
|
+
pip-installs the declared package first. (`agent` needs no profile.)
|
|
33
|
+
- `--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json` is required for
|
|
34
|
+
`sdk-apply` and `agent` (suspend/resume — follow the loop in step 3).
|
|
35
|
+
- `spawn` may also add `--isolation bare|fresh` and `--model <name>` (bare is
|
|
36
|
+
strongest; use it when `ANTHROPIC_API_KEY` is set). `sdk`/`sdk-apply` accept
|
|
37
|
+
`--model <name>`; isolation is intrinsic (fresh SDK session, no settings).
|
|
38
|
+
|
|
39
|
+
2. **Run the Interpreter**:
|
|
40
|
+
Run the command (include only the bracketed flags that apply to the chosen strategy):
|
|
41
|
+
```bash
|
|
42
|
+
python3 .aw-spec/orchestrator/orchestrator.py \
|
|
43
|
+
.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml \
|
|
44
|
+
--strategy <strategy> \
|
|
45
|
+
[--agent-profile .claude/agent.json] # spawn, sdk, sdk-apply \
|
|
46
|
+
[--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json] # sdk-apply, agent \
|
|
47
|
+
--json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. **Handle Suspend/Resume Loop (for `agent` or `sdk-apply` strategies)**:
|
|
51
|
+
- If the command exits with code `2` (suspend):
|
|
52
|
+
- Read the prompt from the sidecar file `<checkpoint-path>.user.md` (and system instructions from `<checkpoint-path>.system.md`).
|
|
53
|
+
- Fulfill the request directly using your own tools (e.g., implementing the handler or reviewing files in the workspace).
|
|
54
|
+
- Write the final generation or review output to `<checkpoint-path>.response.md`.
|
|
55
|
+
- Re-run the exact same command.
|
|
56
|
+
- Repeat until the orchestrator exits with code `0`.
|
|
57
|
+
|
|
58
|
+
4. **Report**:
|
|
59
|
+
Report the final JSON outputs (`status`, `outputs`, `review_pass`, generated file paths, etc.) to the user.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kilocode",
|
|
3
|
+
"sdk": {
|
|
4
|
+
"type": "claude-agent-sdk",
|
|
5
|
+
"package": "claude-agent-sdk",
|
|
6
|
+
"module": "claude_agent_sdk",
|
|
7
|
+
"adapter": "../.aw-spec/orchestrator/adapters/claude_agent_sdk.py"
|
|
8
|
+
},
|
|
9
|
+
"runtime": "Kilo Code launches the interpreter; generation delegates to the Claude Code CLI",
|
|
10
|
+
"note": "Kilo Code is a VS Code extension with no standalone headless generation CLI, so this profile reuses `claude -p` for the fresh generation. To generate via Gemini instead, replace bin/args/system/user/tools_flag/approval with the .agents (antigravity) profile's values.",
|
|
11
|
+
"bin": "claude",
|
|
12
|
+
"args": ["-p", "--output-format", "json", "--no-session-persistence"],
|
|
13
|
+
"model_flag": "--model",
|
|
14
|
+
"system": { "flag": "--system-prompt" },
|
|
15
|
+
"user": { "mode": "stdin" },
|
|
16
|
+
"tools_flag": "--tools",
|
|
17
|
+
"approval": {
|
|
18
|
+
"acceptEdits": ["--permission-mode", "acceptEdits"],
|
|
19
|
+
"bypassPermissions": ["--permission-mode", "bypassPermissions"],
|
|
20
|
+
"default": ["--permission-mode", "default"]
|
|
21
|
+
},
|
|
22
|
+
"isolation": {
|
|
23
|
+
"bare": ["--bare"],
|
|
24
|
+
"fresh": ["--setting-sources", ""]
|
|
25
|
+
},
|
|
26
|
+
"budget_flag": "--max-budget-usd",
|
|
27
|
+
"result_keys": ["result"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-orch-demo"
|
|
3
|
+
description: "Prototype launcher (Kilo Code): run the aw-orchestrator using the specified strategy (spawn, agent, sdk, sdk-apply)."
|
|
4
|
+
argument-hint: "Optional strategy ('agent', 'spawn', 'sdk', 'sdk-apply') and/or k=value vars (e.g. 'agent out_dir=...')"
|
|
5
|
+
compatibility: "Requires .aw-spec/orchestrator/ and the claude CLI on PATH"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Orchestrator Launcher
|
|
11
|
+
|
|
12
|
+
All orchestration lives in the workflow YAML and is executed by `.aw-spec/orchestrator/orchestrator.py` (the general, agent-agnostic engine). The interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself.
|
|
13
|
+
|
|
14
|
+
- **Engine + workflow (general):** `.aw-spec/orchestrator/orchestrator.py`, `*.orch.yaml`
|
|
15
|
+
- **This agent's transport profile:** `.kilocode/agent.json`
|
|
16
|
+
|
|
17
|
+
> Kilo Code has no native headless CLI, so it reuses `claude -p` for `spawn`
|
|
18
|
+
> (native `--system-prompt`, `--tools`, `--bare` isolation). Its `sdk` block
|
|
19
|
+
> declares the SDK the `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`)
|
|
20
|
+
> and the adapter (`.aw-spec/orchestrator/adapters/claude_agent_sdk.py`,
|
|
21
|
+
> shared per-SDK) that owns its calling convention.
|
|
22
|
+
|
|
23
|
+
## Execution Steps
|
|
24
|
+
|
|
25
|
+
1. **Parse Arguments**:
|
|
26
|
+
- Identify the requested strategy (one of: `agent`, `spawn`, `sdk`, `sdk-apply`). If the user specifies a strategy as the first argument, use it. Otherwise, default to `spawn`.
|
|
27
|
+
- Always pass the strategy explicitly: `--strategy <strategy>`.
|
|
28
|
+
- `--agent-profile .kilocode/agent.json` is required for `spawn`, `sdk`, and `sdk-apply`:
|
|
29
|
+
`spawn` reads the CLI to launch from it; `sdk`/`sdk-apply` read the SDK
|
|
30
|
+
package/module (and its `adapter` file) to import from its `sdk` block.
|
|
31
|
+
If the SDK package isn't installed, add `--sdk-install` so the engine
|
|
32
|
+
pip-installs the declared package first. (`agent` needs no profile.)
|
|
33
|
+
- `--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json` is required for
|
|
34
|
+
`sdk-apply` and `agent` (suspend/resume — follow the loop in step 3).
|
|
35
|
+
- `spawn` may also add `--isolation bare|fresh` and `--model <name>` (bare is
|
|
36
|
+
strongest; use it when `ANTHROPIC_API_KEY` is set). `sdk`/`sdk-apply` accept
|
|
37
|
+
`--model <name>`; isolation is intrinsic (fresh SDK session, no settings).
|
|
38
|
+
|
|
39
|
+
2. **Run the Interpreter**:
|
|
40
|
+
Run the command (include only the bracketed flags that apply to the chosen strategy):
|
|
41
|
+
```bash
|
|
42
|
+
python3 .aw-spec/orchestrator/orchestrator.py \
|
|
43
|
+
.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml \
|
|
44
|
+
--strategy <strategy> \
|
|
45
|
+
[--agent-profile .kilocode/agent.json] # spawn, sdk, sdk-apply \
|
|
46
|
+
[--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json] # sdk-apply, agent \
|
|
47
|
+
--json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. **Handle Suspend/Resume Loop (for `agent` or `sdk-apply` strategies)**:
|
|
51
|
+
- If the command exits with code `2` (suspend):
|
|
52
|
+
- Read the prompt from the sidecar file `<checkpoint-path>.user.md` (and system instructions from `<checkpoint-path>.system.md`).
|
|
53
|
+
- Fulfill the request directly using your own tools (e.g., implementing the handler or reviewing files in the workspace).
|
|
54
|
+
- Write the final generation or review output to `<checkpoint-path>.response.md`.
|
|
55
|
+
- Re-run the exact same command.
|
|
56
|
+
- Repeat until the orchestrator exits with code `0`.
|
|
57
|
+
|
|
58
|
+
4. **Report**:
|
|
59
|
+
Report the final JSON outputs (`status`, `outputs`, `review_pass`, generated file paths, etc.) to the user.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "aw-spec-orch"
|
|
3
|
+
description: "Parametric launcher (Kilo Code): run ANY converted aw-spec skill on the aw-orchestrator under one of the 4 strategies (agent [default], spawn, sdk, sdk-apply)."
|
|
4
|
+
argument-hint: "<skill> [strategy] [input…] — e.g. 'select-domain', 'specify spawn Build an order API', 'analyze-slice'"
|
|
5
|
+
compatibility: "Requires .aw-spec/orchestrator/ and the claude CLI on PATH"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Orchestrator Skill Launcher
|
|
11
|
+
|
|
12
|
+
Runs one converted `aw-spec-*` workflow on the shared, agent-agnostic engine. All orchestration and **all context management live in the workflow YAML + engine** (`.aw-spec/orchestrator/orchestrator.py`): the interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself. Execution follows the chosen strategy; the checkpoint channel carries every human-facing interaction regardless of strategy.
|
|
13
|
+
|
|
14
|
+
- **Engine + workflows (common, shared by all agents):** `.aw-spec/orchestrator/orchestrator.py`, `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`, shared modules in `.aw-spec/orchestrator/modules/`, shared scripts in `.aw-spec/scripts/`
|
|
15
|
+
- **This agent's transport profile:** `.kilocode/agent.json`
|
|
16
|
+
|
|
17
|
+
> Kilo Code has no native headless CLI, so it reuses `claude -p` for `spawn`
|
|
18
|
+
> (native `--system-prompt`, `--tools`, `--bare` isolation). Its `sdk` block
|
|
19
|
+
> declares the SDK the `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`)
|
|
20
|
+
> and the adapter (`.aw-spec/orchestrator/adapters/claude_agent_sdk.py`,
|
|
21
|
+
> shared per-SDK) that owns its calling convention.
|
|
22
|
+
|
|
23
|
+
## Execution Steps
|
|
24
|
+
|
|
25
|
+
1. **Parse Arguments** (`<skill> [strategy] [input…]`):
|
|
26
|
+
- `skill` (required): the aw-spec skill name, e.g. `demo`, `select-domain`, `foundation`, `specify`, `design`, `implement`, `build`. Resolve the workflow file `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`. If it does not exist, list the available `aw-spec-*.orch.yaml` files in that folder and stop.
|
|
27
|
+
- `strategy` (optional, one of `agent`, `spawn`, `sdk`, `sdk-apply`; default `agent` — YOU fulfill each generation through the checkpoint channel, no profile needed): who executes each generation. Always pass `--strategy <strategy>`.
|
|
28
|
+
- Everything after the strategy is the user input: pass it as `--input "<text>"` (omit when empty).
|
|
29
|
+
- `--agent-profile .kilocode/agent.json` is required for `spawn`, `sdk`, and `sdk-apply` (`agent` needs no profile). If the SDK package isn't installed, add `--sdk-install`.
|
|
30
|
+
- **Always** pass `--checkpoint .aw-spec/orchestrator/.state/<skill>.state.json` — for EVERY strategy. Converted skills contain interactive steps (questions, selections, hooks); the checkpoint is how they reach you and the user. Strategies only govern who generates.
|
|
31
|
+
- `spawn` may also add `--isolation bare|fresh` and `--model <name>`; `sdk`/`sdk-apply` accept `--model <name>`.
|
|
32
|
+
|
|
33
|
+
2. **Run the Interpreter**:
|
|
34
|
+
```bash
|
|
35
|
+
python3 .aw-spec/orchestrator/orchestrator.py \
|
|
36
|
+
.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml \
|
|
37
|
+
--strategy <strategy> \
|
|
38
|
+
--checkpoint .aw-spec/orchestrator/.state/<skill>.state.json \
|
|
39
|
+
[--agent-profile .kilocode/agent.json] # spawn, sdk, sdk-apply \
|
|
40
|
+
[--input "<user input>"] \
|
|
41
|
+
--json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
3. **Handle the Suspend/Resume Loop** — whenever the command exits with code `2`, read the printed `pending` JSON and dispatch on `pending.kind`; fulfill it, write the response to `pending.response_path`, then re-run the SAME command. Repeat until exit `0` (done) or `1` (stopped by a gate).
|
|
45
|
+
- **`ask`** — ask the USER the `prompt` with the listed `options` (use your question tool). Write the chosen answer as PLAIN TEXT to `response_path` (comma-separated values when `multi` is true).
|
|
46
|
+
- **`select`** — ask the USER to pick ONE of `options`; write the chosen value as plain text to `response_path`.
|
|
47
|
+
- **`hook`** — run each MANDATORY hook in `hooks` (each is a slash command of THIS agent) in this conversation; optional hooks at your discretion. Then write `done` to `response_path`.
|
|
48
|
+
- **`author`** — read `system_path` + `user_path` and treat them as your ONLY standards and context. Author the COMPLETE content of the file named in `target` and write it — content ONLY, no commentary, no code fence — to `response_path`. Do NOT write the target file yourself; the interpreter does that.
|
|
49
|
+
- **`agent_generate`** — read `system_path` + `user_path`; perform the task YOURSELF with the listed `tools` within `permission_mode`; write your full final reply — ending with the required ```json fence — to `response_path`.
|
|
50
|
+
- **`agent_query` / `agent_review`** — same as above but READ-ONLY (do not modify files); the reply must end with the required ```json fence.
|
|
51
|
+
- **`apply`** — an isolated generation already decided the changes: read `artifact_path` and write its file contents EXACTLY to the paths it names, then write the confirmation ```json fence to `response_path`.
|
|
52
|
+
- If `pending.note` is present, your previous response was rejected — follow the note and rewrite `response_path`.
|
|
53
|
+
|
|
54
|
+
4. **Report**:
|
|
55
|
+
Report the final JSON (`status`, `outputs`, and any `reason`) to the user. On `stopped`, relay the gate message verbatim — it tells the user what to fix or run first.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Clean Architecture Standards
|
|
2
2
|
|
|
3
|
-
> Pure technology (domain-agnostic). NON-NEGOTIABLE. Commands: `/aw-spec-
|
|
3
|
+
> Pure technology (domain-agnostic). NON-NEGOTIABLE. Commands: `/aw-spec-design`, `/aw-spec-build`.
|
|
4
4
|
|
|
5
5
|
## Dependency direction
|
|
6
6
|
|