aw-spec-cli 0.1.7 → 0.1.9
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/.appweaver/DESIGN-FORMAT.md +200 -0
- package/assets/.appweaver/ORCH-DIALECT.md +156 -0
- package/assets/.appweaver/RULE-PARTITION.md +175 -0
- package/assets/.appweaver/STACK-PROFILES.md +461 -0
- package/assets/.appweaver/ai-rules.md +180 -0
- package/assets/.appweaver/domain.json +1 -0
- package/assets/.appweaver/extensions/.registry +19 -0
- package/assets/.appweaver/extensions/agent-context/README.md +57 -0
- package/assets/.appweaver/extensions/agent-context/agent-context-config.yml +4 -0
- package/assets/.appweaver/extensions/agent-context/commands/aw-spec.agent-context.update.md +26 -0
- package/assets/.appweaver/extensions/agent-context/extension.yml +37 -0
- package/assets/.appweaver/extensions/agent-context/scripts/bash/update-agent-context.sh +201 -0
- package/assets/.appweaver/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +237 -0
- package/assets/.appweaver/extensions.yml +16 -0
- package/assets/.appweaver/feature.json +3 -0
- package/assets/.appweaver/init-options.json +9 -0
- package/assets/.appweaver/integration.json +15 -0
- package/assets/.appweaver/integrations/aw-spec.manifest.json +9 -0
- package/assets/.appweaver/interpreter/run-skill.py +1176 -0
- package/assets/.appweaver/memory/constitution.md +50 -0
- package/assets/.appweaver/orchestrator/.smoke-out/smoke.md +6 -0
- package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +94 -0
- package/assets/.appweaver/orchestrator/README.md +300 -0
- package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +74 -0
- package/assets/.appweaver/orchestrator/adapters/google_antigravity.py +74 -0
- package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +105 -0
- package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +101 -0
- package/assets/.appweaver/orchestrator/modules/domain-select.orch.yaml +90 -0
- package/assets/.appweaver/orchestrator/modules/lane-gate.orch.yaml +126 -0
- package/assets/.appweaver/orchestrator/modules/tech-select.orch.yaml +123 -0
- package/assets/.appweaver/orchestrator/orchestrator.py +1721 -0
- package/assets/.appweaver/orchestrator/rev-templates/ai-rules.reference.md +40 -0
- package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +101 -0
- package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +245 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-constitution.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +59 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
- package/assets/.appweaver/orchestrator/rev-templates/frontend-rule-file.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +116 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-constitution.skeleton.md +125 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +123 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +294 -0
- package/assets/.appweaver/orchestrator/workflows/_smoke.orch.yaml +160 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-add-component.orch.yaml +270 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +934 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +251 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +437 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +197 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +475 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +727 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml +100 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design-ui.orch.yaml +386 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +462 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +253 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +267 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +287 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +238 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +1822 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +194 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml +83 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +296 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +439 -0
- package/assets/.appweaver/scripts/bash/aw-inventory.sh +17 -0
- package/assets/.appweaver/scripts/bash/aw-parity.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-rev-constitution.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +2626 -0
- package/assets/.appweaver/scripts/bash/aw-xref.sh +15 -0
- package/assets/.appweaver/scripts/bash/common.sh +533 -0
- package/assets/.appweaver/scripts/powershell/aw-inventory.ps1 +17 -0
- package/assets/.appweaver/scripts/powershell/aw-parity.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-rev-constitution.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +2232 -0
- package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +15 -0
- package/assets/.appweaver/scripts/python/aw-component-catalog.py +121 -0
- package/assets/.appweaver/scripts/python/aw-inventory.py +1180 -0
- package/assets/.appweaver/scripts/python/aw-parity.py +380 -0
- package/assets/.appweaver/scripts/python/aw-rev-constitution.py +329 -0
- package/assets/.appweaver/scripts/python/aw-stack.py +1251 -0
- package/assets/.appweaver/scripts/python/aw-xref.py +1330 -0
- package/assets/.appweaver/scripts/python/validate_okf.py +352 -0
- package/assets/.appweaver/stack-profiles/angular.json +16 -0
- package/assets/.appweaver/stack-profiles/blazor-wasm.json +17 -0
- package/assets/.appweaver/stack-profiles/dotnet-webapi.json +15 -0
- package/assets/.appweaver/stack-profiles/go-chi.json +14 -0
- package/assets/.appweaver/stack-profiles/java-spring.json +16 -0
- package/assets/.appweaver/stack-profiles/nextjs.json +16 -0
- package/assets/.appweaver/stack-profiles/node-express.json +15 -0
- package/assets/.appweaver/stack-profiles/python-fastapi.json +16 -0
- package/assets/.appweaver/stack-profiles/react-vite.json +17 -0
- package/assets/.appweaver/stack-profiles/sveltekit.json +16 -0
- package/assets/.appweaver/stack-profiles/vue-vite.json +17 -0
- package/assets/.appweaver/stacks.json +3 -0
- package/assets/.appweaver/templates/constitution-domain-template.md +116 -0
- package/assets/.appweaver/templates/constitution-technical-template.md +108 -0
- package/assets/.appweaver/templates/constitution-ui-template.md +116 -0
- package/assets/.appweaver/templates/delta-design-template.md +69 -0
- package/assets/.appweaver/templates/delta-spec-template.md +63 -0
- package/assets/.appweaver/templates/design-template.md +383 -0
- package/assets/.appweaver/templates/okf-concept-template.md +114 -0
- package/assets/.appweaver/templates/parity-manifest-template.json +49 -0
- package/assets/.appweaver/templates/source-map-template.md +85 -0
- package/assets/.appweaver/templates/spec-template.md +309 -0
- package/assets/.appweaver/templates/ui-design-template.md +273 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.Reference.pack.txt +25248 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.pack.txt +5726 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.Reference.pack.txt +19318 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.pack.txt +2833 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/components/Email/README.md +119 -0
- package/assets/foundations/dotnet/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +84 -0
- package/assets/foundations/dotnet/components/Email/integration.md +300 -0
- package/assets/foundations/dotnet/components/Jobs/README.md +113 -0
- package/assets/foundations/dotnet/components/Jobs/integration.md +259 -0
- package/assets/foundations/dotnet/components/QrGenerator/README.md +85 -0
- package/assets/foundations/dotnet/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +57 -0
- package/assets/foundations/dotnet/components/QrGenerator/integration.md +230 -0
- package/assets/foundations/dotnet/components/README.md +74 -0
- package/assets/guardrails/README.md +222 -0
- package/assets/guardrails/domain/healthcare/ai-rules.domain.md +34 -0
- package/assets/guardrails/domain/healthcare/api-versioning.domain.md +17 -0
- package/assets/guardrails/domain/healthcare/auditing.domain.md +97 -0
- package/assets/guardrails/domain/healthcare/authorization.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/clinical-terms.md +20 -0
- package/assets/guardrails/domain/healthcare/coding-standards.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/consent.md +19 -0
- package/assets/guardrails/domain/healthcare/cqrs.domain.md +12 -0
- package/assets/guardrails/domain/healthcare/data-classification.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/healthcare/dicom.md +15 -0
- package/assets/guardrails/domain/healthcare/domain-constitution.md +119 -0
- package/assets/guardrails/domain/healthcare/domain-driven-design.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/eventing.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/fhir.md +36 -0
- package/assets/guardrails/domain/healthcare/folder-structure.domain.md +25 -0
- package/assets/guardrails/domain/healthcare/hipaa.md +34 -0
- package/assets/guardrails/domain/healthcare/hl7.md +15 -0
- package/assets/guardrails/domain/healthcare/ihe-conformance.md +31 -0
- package/assets/guardrails/domain/healthcare/integration-terms.md +21 -0
- package/assets/guardrails/domain/healthcare/persistence.domain.md +20 -0
- package/assets/guardrails/domain/healthcare/terminology.md +30 -0
- package/assets/guardrails/domain/healthcare/testing.domain.md +15 -0
- package/assets/guardrails/domain/healthcare/ux/accessibility-standards.md +36 -0
- package/assets/guardrails/domain/healthcare/ux/content-design.md +32 -0
- package/assets/guardrails/domain/healthcare/ux/interaction-states.md +44 -0
- package/assets/guardrails/domain/healthcare/ux/journey-mapping.md +40 -0
- package/assets/guardrails/domain/healthcare/vertical-slices.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/zero-trust.domain.md +12 -0
- package/assets/guardrails/domain/pharma/ai-rules.domain.md +32 -0
- package/assets/guardrails/domain/pharma/api-versioning.domain.md +20 -0
- package/assets/guardrails/domain/pharma/atc.md +22 -0
- package/assets/guardrails/domain/pharma/auditing.domain.md +90 -0
- package/assets/guardrails/domain/pharma/authorization.domain.md +25 -0
- package/assets/guardrails/domain/pharma/coding-standards.domain.md +28 -0
- package/assets/guardrails/domain/pharma/cqrs.domain.md +16 -0
- package/assets/guardrails/domain/pharma/data-classification.domain.md +24 -0
- package/assets/guardrails/domain/pharma/data-provenance.md +21 -0
- package/assets/guardrails/domain/pharma/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/pharma/domain-constitution.md +113 -0
- package/assets/guardrails/domain/pharma/domain-driven-design.domain.md +36 -0
- package/assets/guardrails/domain/pharma/domain-requirements.sample.md +103 -0
- package/assets/guardrails/domain/pharma/eventing.domain.md +18 -0
- package/assets/guardrails/domain/pharma/fhir.md +31 -0
- package/assets/guardrails/domain/pharma/folder-structure.domain.md +26 -0
- package/assets/guardrails/domain/pharma/hl7.md +17 -0
- package/assets/guardrails/domain/pharma/idmp.md +26 -0
- package/assets/guardrails/domain/pharma/integration-terms.md +21 -0
- package/assets/guardrails/domain/pharma/ndc.md +28 -0
- package/assets/guardrails/domain/pharma/persistence.domain.md +23 -0
- package/assets/guardrails/domain/pharma/pharma-terms.md +27 -0
- package/assets/guardrails/domain/pharma/product-lifecycle.domain.md +30 -0
- package/assets/guardrails/domain/pharma/regulatory-compliance.md +19 -0
- package/assets/guardrails/domain/pharma/terminology.md +32 -0
- package/assets/guardrails/domain/pharma/testing.domain.md +19 -0
- package/assets/guardrails/domain/pharma/vertical-slices.domain.md +17 -0
- package/assets/guardrails/domain/pharma/zero-trust.domain.md +12 -0
- package/assets/guardrails/projects/dotnet-default-project/domain/domain-requirements.md +58 -0
- package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +113 -0
- package/assets/guardrails/projects/dotnet-default-project/frontend/ui-requirements.md +43 -0
- package/assets/guardrails/projects/dotnet-default-project/service/technical-requirements.md +40 -0
- package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +263 -0
- package/assets/guardrails/requirement-spec.txt +27 -0
- package/assets/guardrails/technology/dotnet-webapi/PACKAGING.md +184 -0
- package/assets/guardrails/technology/dotnet-webapi/api-versioning.md +44 -0
- package/assets/guardrails/technology/dotnet-webapi/auditing.md +96 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization-matrix.md +14 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization.md +39 -0
- package/assets/guardrails/technology/dotnet-webapi/clean-architecture.md +54 -0
- package/assets/guardrails/technology/dotnet-webapi/coding-standards.md +87 -0
- package/assets/guardrails/technology/dotnet-webapi/cqrs.md +63 -0
- package/assets/guardrails/technology/dotnet-webapi/data-classification.md +38 -0
- package/assets/guardrails/technology/dotnet-webapi/dependency-policy.md +40 -0
- package/assets/guardrails/technology/dotnet-webapi/domain-driven-design.md +91 -0
- package/assets/guardrails/technology/dotnet-webapi/eventing.md +57 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/api-versioning.md +75 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/auditing.md +84 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/authorization.md +68 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/clean-architecture.md +37 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/cqrs.md +97 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/domain-driven-design.md +141 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/eventing.md +46 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/persistence.md +207 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/vertical-slices.md +151 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/zero-trust.md +48 -0
- package/assets/guardrails/technology/dotnet-webapi/folder-structure.md +61 -0
- package/assets/guardrails/technology/dotnet-webapi/modular-monolith.md +47 -0
- package/assets/guardrails/technology/dotnet-webapi/persistence.md +82 -0
- package/assets/guardrails/technology/dotnet-webapi/technology-constitution.md +162 -0
- package/assets/guardrails/technology/dotnet-webapi/testing.md +55 -0
- package/assets/guardrails/technology/dotnet-webapi/vertical-slices.md +70 -0
- package/assets/guardrails/technology/dotnet-webapi/zero-trust.md +48 -0
- package/assets/guardrails/technology/java-spring/README.md +62 -0
- package/assets/guardrails/technology/nextjs/accessibility-implementation.md +56 -0
- package/assets/guardrails/technology/nextjs/api-client.md +56 -0
- package/assets/guardrails/technology/nextjs/api-integration.dotnet-webapi.md +174 -0
- package/assets/guardrails/technology/nextjs/api-integration.java-spring.md +203 -0
- package/assets/guardrails/technology/nextjs/auth-session.md +68 -0
- package/assets/guardrails/technology/nextjs/client-security.md +69 -0
- package/assets/guardrails/technology/nextjs/component-architecture.md +60 -0
- package/assets/guardrails/technology/nextjs/component-conventions.md +58 -0
- package/assets/guardrails/technology/nextjs/design-system.md +60 -0
- package/assets/guardrails/technology/nextjs/error-handling.md +72 -0
- package/assets/guardrails/technology/nextjs/forms-and-validation.md +75 -0
- package/assets/guardrails/technology/nextjs/frontend-testing.md +94 -0
- package/assets/guardrails/technology/nextjs/i18n.md +57 -0
- package/assets/guardrails/technology/nextjs/observability.md +67 -0
- package/assets/guardrails/technology/nextjs/performance-budgets.md +66 -0
- package/assets/guardrails/technology/nextjs/routing-navigation.md +52 -0
- package/assets/guardrails/technology/nextjs/state-management.md +70 -0
- package/assets/guardrails/technology/nextjs/ui-constitution.md +166 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/utils/copy-assets.js +8 -8
- package/dist/utils/copy-assets.js.map +1 -1
- package/package.json +1 -1
- package/assets/docs/pharma-constitution.my-ref.md +0 -86
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# aw-spec-implement-ui (orchestrator) — model-driven UI generation from design.ui.md
|
|
3
|
+
#
|
|
4
|
+
# The frontend lane's Implement phase: GENERATE the screens, components, client state
|
|
5
|
+
# and paired tests for the aggregate STRICTLY from its design.ui.md — the mediator
|
|
6
|
+
# between the spec and the lane's code. It is the twin of `implement`, and it keeps the
|
|
7
|
+
# same contract, one lane over:
|
|
8
|
+
#
|
|
9
|
+
# • DESIGN-ONLY. implement-ui does NOT read spec.md. The design is the complete,
|
|
10
|
+
# authoritative source for WHAT to build; anything missing from it is fixed in
|
|
11
|
+
# design-ui, never compensated for here from the spec or from memory.
|
|
12
|
+
# • THE FRAMEWORK BINDS HERE. design.ui.md is technology-agnostic — a "component" is
|
|
13
|
+
# a responsibility, its inputs are field shapes, its states are named. The actual
|
|
14
|
+
# framework, router, state library, component library and styling approach come
|
|
15
|
+
# from constitution.ui.md + the lane declaration + this command's rule set.
|
|
16
|
+
# • ONE SUBTREE. The lane owns the source path .appweaver/stacks.json declares for it,
|
|
17
|
+
# and nothing outside it. A file written elsewhere belongs to the service lane or
|
|
18
|
+
# to no lane at all.
|
|
19
|
+
#
|
|
20
|
+
# WHY A SEPARATE COMMAND, NOT A UI BRANCH INSIDE `implement`. The two lanes take their
|
|
21
|
+
# code-generation rules from different map headings and write into disjoint subtrees.
|
|
22
|
+
# Keying the rule maps on `## /aw-spec-implement-ui` gives the lane its own rule set for
|
|
23
|
+
# zero mechanism change; a UI branch inside `implement` would generate frontend code
|
|
24
|
+
# under the service lane's standards.
|
|
25
|
+
#
|
|
26
|
+
# Prereqs: /appweaver design-ui (the UI design), and a frontend project scaffolded under
|
|
27
|
+
# the lane's own source path — implement-ui GENERATES into that tree, so with no project
|
|
28
|
+
# there is nowhere to place the files. The project gate is deliberately LANE-SCOPED: a
|
|
29
|
+
# manifest found only elsewhere in the repository is the service lane's, and accepting
|
|
30
|
+
# it is how a frontend that was never built reports green.
|
|
31
|
+
#
|
|
32
|
+
# ⌛ /appweaver analyze-design-ui — the spec↔design.ui.md conformance gate that would
|
|
33
|
+
# run between design-ui and this phase — is not built yet. Until it is, the two-way
|
|
34
|
+
# check that no UX-/US- fell between the two designs is design.ui.md §7 read by hand.
|
|
35
|
+
#
|
|
36
|
+
# Next: /appweaver build (compiles every declared lane, this one included).
|
|
37
|
+
#
|
|
38
|
+
# Launch: /appweaver implement-ui [strategy] [guidance]
|
|
39
|
+
# =============================================================================
|
|
40
|
+
|
|
41
|
+
name: aw-spec-implement-ui
|
|
42
|
+
description: Generate the frontend lane's screens, components, client state and paired tests STRICTLY from the aggregate's design.ui.md, bound to the declared UI stack and written only under that lane's source path. Model-driven and design-only — it does not read the spec, the same contract implement keeps for the service lane. The framework, router, state library and styling approach bind here from constitution.ui.md and the lane declaration; the design stays technology-agnostic. Merges the generated files into the feature's existing OKF concept rather than replacing the service lane's.
|
|
43
|
+
version: 1.0.0
|
|
44
|
+
agent_agnostic: true
|
|
45
|
+
dialect: aw-spec.orchestrator/v1
|
|
46
|
+
|
|
47
|
+
inputs:
|
|
48
|
+
user_input:
|
|
49
|
+
description: Optional implementation guidance (focus area, screen subset, framework hints).
|
|
50
|
+
required: false
|
|
51
|
+
bind: USER_INPUT
|
|
52
|
+
|
|
53
|
+
scripts:
|
|
54
|
+
actions:
|
|
55
|
+
sh: .appweaver/scripts/bash/aw-spec-actions.sh
|
|
56
|
+
ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
|
|
57
|
+
xref:
|
|
58
|
+
sh: .appweaver/scripts/bash/aw-xref.sh
|
|
59
|
+
ps1: .appweaver/scripts/powershell/aw-xref.ps1
|
|
60
|
+
|
|
61
|
+
# Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). The lane's
|
|
62
|
+
# FRONTEND code-generation rule files are CONFIGURATION, loaded per-command from
|
|
63
|
+
# guardrails/projects/<project>/tech-rule-bindings.md under `## /aw-spec-implement-ui` by
|
|
64
|
+
# the tech-select module. Per the rule-partition this phase loads NO domain rule file —
|
|
65
|
+
# the domain reached the lane through spec → design.ui.md. The lane's ratified base
|
|
66
|
+
# arrives via constitution.ui.md (referred to directly, as-is — NOT mapped).
|
|
67
|
+
# (missing files skipped at assembly time)
|
|
68
|
+
standards:
|
|
69
|
+
- { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
|
|
70
|
+
|
|
71
|
+
workflow:
|
|
72
|
+
|
|
73
|
+
# 0. FRONTEND code-generation rule files → sticky standards (configuration, not
|
|
74
|
+
# hardcoded). No blocking gate: an unmapped project soft-continues, because
|
|
75
|
+
# constitution.ui.md still carries the lane's conventions and forbidden patterns.
|
|
76
|
+
- id: tech_select
|
|
77
|
+
action: include
|
|
78
|
+
module: .appweaver/orchestrator/modules/tech-select.orch.yaml
|
|
79
|
+
with: { command: aw-spec-implement-ui }
|
|
80
|
+
|
|
81
|
+
# 1. Resolve the current feature + its UI design; require the DESIGN (this phase's
|
|
82
|
+
# only input). No spec — the design is the authoritative source for WHAT to build.
|
|
83
|
+
- id: feature_paths
|
|
84
|
+
action: execute_script
|
|
85
|
+
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
86
|
+
script: { ref: actions }
|
|
87
|
+
subcommand: feature-paths
|
|
88
|
+
outputs:
|
|
89
|
+
- { name: feature_dir, from: "$.feature_dir" }
|
|
90
|
+
- { name: ui_design_doc, from: "$.ui_design_file" }
|
|
91
|
+
- { name: ui_design_exists, from: "$.ui_design_exists" }
|
|
92
|
+
|
|
93
|
+
- id: require_feature
|
|
94
|
+
action: verify_context
|
|
95
|
+
require_non_empty: feature_dir
|
|
96
|
+
on_empty: stop
|
|
97
|
+
on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run implement-ui."
|
|
98
|
+
|
|
99
|
+
- id: verify_ui_design
|
|
100
|
+
action: verify_context
|
|
101
|
+
require_true: ui_design_exists
|
|
102
|
+
on_false: stop
|
|
103
|
+
on_false_message: "No design.ui.md for the current feature. Run /appweaver design-ui first — implement-ui generates STRICTLY from the UI design, and there is nothing else it may read. Review its §7 Traceability before generating: ⌛ /appweaver analyze-design-ui, the spec↔design.ui.md gate, is not built yet."
|
|
104
|
+
|
|
105
|
+
# 1a. Require the FRONTEND LANE and its source path. This phase writes code, and the
|
|
106
|
+
# lane's root is the only subtree it may write into — so this runs before the
|
|
107
|
+
# project gate, which searches that subtree.
|
|
108
|
+
- id: lane_gate
|
|
109
|
+
action: include
|
|
110
|
+
module: .appweaver/orchestrator/modules/lane-gate.orch.yaml
|
|
111
|
+
with: { require: frontend, command: "/appweaver implement-ui" }
|
|
112
|
+
|
|
113
|
+
# 1b. Require a frontend PROJECT under the LANE'S OWN path. Deterministic structure
|
|
114
|
+
# gate: detect-project searches the lane subtree for an ecosystem manifest and
|
|
115
|
+
# falls back to the whole repository when it finds none, reporting which scope
|
|
116
|
+
# answered. THAT DISTINCTION IS THE GATE HERE. A repo-scope hit in a two-lane
|
|
117
|
+
# project is the service lane's manifest, and accepting it is exactly the failure
|
|
118
|
+
# the lane model exists to prevent — a frontend that was never scaffolded,
|
|
119
|
+
# generated into anyway, reporting green.
|
|
120
|
+
- id: detect_ui_project
|
|
121
|
+
action: execute_script
|
|
122
|
+
script: { ref: actions }
|
|
123
|
+
subcommand: detect-project
|
|
124
|
+
args: ["--root", "{{lane_source_path}}"]
|
|
125
|
+
outputs:
|
|
126
|
+
- { name: ui_project_present, from: "$.scaffolded" }
|
|
127
|
+
- { name: project_markers, from: "$.markers" }
|
|
128
|
+
- { name: project_scope, from: "$.scope" }
|
|
129
|
+
|
|
130
|
+
- id: ui_project_gate
|
|
131
|
+
action: verify_context
|
|
132
|
+
require_value: project_scope
|
|
133
|
+
equals: "lane"
|
|
134
|
+
on_mismatch: stop
|
|
135
|
+
on_mismatch_message: "No frontend project found under the {{lane_id}} lane's source path `{{lane_source_path}}`. implement-ui GENERATES this feature's UI into an existing project tree, so one has to be scaffolded there first: run /appweaver foundation <FoundationName> <AppName> where a foundation bundle ships for {{lane_profile}}, or create the project with the stack's own tooling under that path. Any ecosystem manifest inside the lane's path marks it — package.json, go.mod, pyproject.toml, Cargo.toml, pom.xml, build.gradle(.kts) or .sln/.csproj. A manifest found elsewhere in the repository does NOT count: that one belongs to another lane, and generating this lane's code against it is how a frontend that was never built reports green."
|
|
136
|
+
|
|
137
|
+
# 2. Pre-execution hooks.
|
|
138
|
+
- id: resolve_pre_hooks
|
|
139
|
+
action: execute_script
|
|
140
|
+
script: { ref: actions }
|
|
141
|
+
subcommand: resolve-hooks
|
|
142
|
+
args: ["--phase", "before_implement_ui"]
|
|
143
|
+
outputs:
|
|
144
|
+
- { name: before_hooks, from: "$.hooks" }
|
|
145
|
+
- id: dispatch_pre_hooks
|
|
146
|
+
action: dispatch_hooks
|
|
147
|
+
hooks_from_variable: before_hooks
|
|
148
|
+
|
|
149
|
+
# 3. Model-driven generation: design.ui.md → screens, components, state + tests.
|
|
150
|
+
# The design constrains WHAT to build; constitution.ui.md + the lane fix HOW.
|
|
151
|
+
# The spec is deliberately NOT in context — the design is the single source here.
|
|
152
|
+
- id: ctx_generate
|
|
153
|
+
action: build_context
|
|
154
|
+
context:
|
|
155
|
+
- { path: "{{ui_design_doc}}" }
|
|
156
|
+
- { path: .appweaver/memory/constitution.ui.md, optional: true } # the lane's ratified UX-* base — conventions, forbidden patterns, gates
|
|
157
|
+
- id: generate
|
|
158
|
+
action: agent_generate
|
|
159
|
+
tools: "Read,Write,Edit"
|
|
160
|
+
permission_mode: acceptEdits
|
|
161
|
+
task: |
|
|
162
|
+
Generate the production UI code AND paired tests for this feature STRICTLY from
|
|
163
|
+
its design.ui.md (in context). The design is the complete, authoritative source of
|
|
164
|
+
WHAT to build — do NOT consult or infer from the spec. This phase is the HOME of
|
|
165
|
+
the framework-specific, lane-wide code-generation rules. Guidance: {{USER_INPUT}}
|
|
166
|
+
Rules:
|
|
167
|
+
- THE DESIGN IS THE ONLY DOMAIN INPUT. You have design.ui.md + the lane's
|
|
168
|
+
frontend standards, and NO domain rule files. Introduce NO domain rule,
|
|
169
|
+
identifier, terminology or behaviour the design does not state — everything
|
|
170
|
+
domain already passed through spec → design.ui.md. If a domain specific seems
|
|
171
|
+
missing, STOP and surface it; never invent it from memory.
|
|
172
|
+
- BIND THE STACK: this lane is `{{lane_id}}` — {{lane_title}}, language
|
|
173
|
+
{{lane_language}} ({{lane_ecosystem}}), declared in .appweaver/stacks.json and
|
|
174
|
+
built with `{{lane_build}}`, tested with `{{lane_test}}`. Generate in THAT
|
|
175
|
+
framework and no other, using its idioms, its project layout and its test
|
|
176
|
+
framework. Take the router, state approach, component library, design system and
|
|
177
|
+
styling from the UI constitution + the loaded standards; the design is
|
|
178
|
+
technology-agnostic, so do not re-decide anything already fixed there. If the
|
|
179
|
+
loaded standards describe a DIFFERENT stack than the one above, the lane wins on
|
|
180
|
+
framework and layout — follow the standards' INTENT and STOP to surface the
|
|
181
|
+
mismatch in your summary.
|
|
182
|
+
- WRITE ONLY UNDER `{{lane_source_path}}` — the source path the `{{lane_id}}` lane
|
|
183
|
+
declares. That subtree is this lane's; a file outside it belongs to the service
|
|
184
|
+
lane or to no lane. NEVER touch the service lane's code, not even to add a field
|
|
185
|
+
the UI wants: a gap in the service surface is a contract delta raised back to
|
|
186
|
+
that lane. Do not create a parallel source tree because the layout inside this
|
|
187
|
+
one is unfamiliar; if the design needs a place this subtree has no home for,
|
|
188
|
+
STOP and surface it.
|
|
189
|
+
- Follow the UI constitution's folder structure, naming conventions and forbidden
|
|
190
|
+
patterns, plus the loaded standards, for HOW to structure, name and place files
|
|
191
|
+
WITHIN that subtree — the design says WHAT to build; these say HOW.
|
|
192
|
+
- REALISE EVERY DESIGN ELEMENT, changing nothing about WHAT it specifies:
|
|
193
|
+
• §1 — one route/screen per row, with the navigation shape and the access
|
|
194
|
+
conditions the row states.
|
|
195
|
+
• §2 — the client state exactly as owned and scoped there, including its
|
|
196
|
+
invalidation triggers. Anything the design lists under "what must NOT be held"
|
|
197
|
+
NEVER reaches client state, storage, the URL or telemetry.
|
|
198
|
+
• §3 — one component per row, with the responsibility, the input field shapes
|
|
199
|
+
and the events the design gives it. Compose the shared components the design
|
|
200
|
+
says it reuses; do not re-implement them.
|
|
201
|
+
• §4 — EVERY state in EVERY interaction row: loading, empty, error,
|
|
202
|
+
permission-denied and in-flight/disabled, plus the validation timing, the focus
|
|
203
|
+
and keyboard behaviour and the concurrency handling stated there. These are
|
|
204
|
+
requirements, not polish, and they are the first thing a generator drops.
|
|
205
|
+
• §5 — the service binding, through the lane's own client layer, with the write
|
|
206
|
+
semantics and rollback each row states.
|
|
207
|
+
• §6 — the cross-cutting decisions as code: what is hidden vs disabled,
|
|
208
|
+
accessibility obligations, localization, performance and offline behaviour.
|
|
209
|
+
- THE CLIENT IS NOT AN AUTHORITY. A client-side validation or permission check
|
|
210
|
+
restates a server rule for feedback; it never replaces it. Generate no
|
|
211
|
+
server-side behaviour, no persistence and no business rule evaluation here.
|
|
212
|
+
- Author a paired test for every screen, interaction and state the design names —
|
|
213
|
+
including the unwanted-behaviour states from §4 and an accessibility assertion
|
|
214
|
+
per interactive surface — and cite the spec id (UX-/US-/FR-/CN-/DC-/IC-/SC-)
|
|
215
|
+
from the design's §7 Traceability in each test. A snapshot alone is not a test.
|
|
216
|
+
- Do NOT add behaviour the design does not state, and do NOT omit any it does. If
|
|
217
|
+
the design looks wrong or incomplete, STOP and surface it (it is fixed in
|
|
218
|
+
design-ui) — never compensate from the spec or from memory.
|
|
219
|
+
- This feature OWNS its files; never regenerate a file another feature owns, and
|
|
220
|
+
do not modify the app shell, global layout or design system — they belong to no
|
|
221
|
+
feature. If one of them has to change, STOP and surface it.
|
|
222
|
+
- Where generated code depends on a design Assumption (DA-n) or Workaround (WA-n),
|
|
223
|
+
mark it with a comment citing that id so it is easy to revisit later.
|
|
224
|
+
outputs:
|
|
225
|
+
- { name: files, from: "$.files" }
|
|
226
|
+
|
|
227
|
+
- id: verify_generated
|
|
228
|
+
action: verify_context
|
|
229
|
+
require_non_empty: files
|
|
230
|
+
on_empty: stop
|
|
231
|
+
on_empty_message: "No files generated. Ensure /appweaver design-ui produced a filled design.ui.md (not the empty template), then re-run."
|
|
232
|
+
|
|
233
|
+
# 3b. OKF knowledge — the feature has ONE concept across both lanes, so the UI files
|
|
234
|
+
# JOIN it rather than replace it. --merge unions them with whatever is already
|
|
235
|
+
# recorded; without it this run would erase the service lane's source_files, and
|
|
236
|
+
# `implement` may have run before or after this one. The concept's Overview is
|
|
237
|
+
# NOT re-authored here: it describes the aggregate and its invariants, which is
|
|
238
|
+
# the service design's subject, and rewriting it from the UI design would trade a
|
|
239
|
+
# domain description for an experience one.
|
|
240
|
+
- id: xref_concept
|
|
241
|
+
action: execute_script
|
|
242
|
+
script: { ref: xref }
|
|
243
|
+
subcommand: concept-upsert
|
|
244
|
+
args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{files}}", "--merge", "--origin", "greenfield"]
|
|
245
|
+
outputs:
|
|
246
|
+
- { name: okf_concept, from: "$.concept" }
|
|
247
|
+
|
|
248
|
+
# 4. Post-execution hooks.
|
|
249
|
+
- id: resolve_post_hooks
|
|
250
|
+
action: execute_script
|
|
251
|
+
script: { ref: actions }
|
|
252
|
+
subcommand: resolve-hooks
|
|
253
|
+
args: ["--phase", "after_implement_ui"]
|
|
254
|
+
outputs:
|
|
255
|
+
- { name: after_hooks, from: "$.hooks" }
|
|
256
|
+
- id: dispatch_post_hooks
|
|
257
|
+
action: dispatch_hooks
|
|
258
|
+
hooks_from_variable: after_hooks
|
|
259
|
+
|
|
260
|
+
outputs:
|
|
261
|
+
feature_dir: "{{feature_dir}}"
|
|
262
|
+
ui_design_doc: "{{ui_design_doc}}"
|
|
263
|
+
lane_id: "{{lane_id}}"
|
|
264
|
+
lane_source_path: "{{lane_source_path}}"
|
|
265
|
+
files: "{{files}}"
|
|
266
|
+
okf_concept: "{{okf_concept}}"
|
|
267
|
+
next: "/appweaver build (generated the {{lane_id}} lane's UI under {{lane_source_path}} and merged the files into the feature's OKF concept at {{okf_concept}}; build compiles every declared lane, so a break in either one surfaces there)"
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# aw-spec-implement (orchestrator) — model-driven code generation from the DESIGN
|
|
3
|
+
#
|
|
4
|
+
# The spec-anchored Implement phase: GENERATE the source files + paired tests for
|
|
5
|
+
# the aggregate STRICTLY from its single high-level design.md — the mediator between
|
|
6
|
+
# spec and code. Implement does NOT read spec.md: `analyze` already guaranteed the
|
|
7
|
+
# design conforms to the spec (spec is the anchor), so the design is the complete,
|
|
8
|
+
# authoritative source for WHAT to build. The target STACK is bound here from the
|
|
9
|
+
# constitution + the active stack profile (the design is technology-agnostic).
|
|
10
|
+
# Prereqs: run /appweaver design then analyze-design first (the gate conforms the
|
|
11
|
+
# design to the spec + closes any open change), and scaffold the project once —
|
|
12
|
+
# implement GENERATES into that project tree, so with no project there is nowhere
|
|
13
|
+
# to place the files. /appweaver foundation unpacks one where a bundle ships for the
|
|
14
|
+
# stack; a stack with no bundle scaffolds with its own tooling instead, and the gate
|
|
15
|
+
# below accepts either, since it tests for a project rather than for a bundle.
|
|
16
|
+
#
|
|
17
|
+
# Next: Build (compile + fix; reconcile only high-level variations into design.md).
|
|
18
|
+
#
|
|
19
|
+
# Launch: /appweaver implement [strategy] [guidance]
|
|
20
|
+
# =============================================================================
|
|
21
|
+
|
|
22
|
+
name: aw-spec-implement
|
|
23
|
+
description: Generate the aggregate's source files and paired tests STRICTLY from its design.md, bound to the project's stack. Model-driven, design-only (does not read the spec — analyze already conformed the design to it).
|
|
24
|
+
version: 2.1.0
|
|
25
|
+
agent_agnostic: true
|
|
26
|
+
dialect: aw-spec.orchestrator/v1
|
|
27
|
+
|
|
28
|
+
inputs:
|
|
29
|
+
user_input:
|
|
30
|
+
description: Optional implementation guidance (stack hints, focus area).
|
|
31
|
+
required: false
|
|
32
|
+
bind: USER_INPUT
|
|
33
|
+
|
|
34
|
+
scripts:
|
|
35
|
+
actions:
|
|
36
|
+
sh: .appweaver/scripts/bash/aw-spec-actions.sh
|
|
37
|
+
ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
|
|
38
|
+
xref:
|
|
39
|
+
sh: .appweaver/scripts/bash/aw-xref.sh
|
|
40
|
+
ps1: .appweaver/scripts/powershell/aw-xref.ps1
|
|
41
|
+
|
|
42
|
+
# Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). The
|
|
43
|
+
# FRAMEWORK / code-generation rule files are no longer hardcoded here — they are now
|
|
44
|
+
# CONFIGURATION, loaded per-command from guardrails/projects/<project>/tech-rule-bindings.md
|
|
45
|
+
# by the tech-select module (see the workflow's tech_select step), exactly as design's
|
|
46
|
+
# technical rules are. Per the rule-partition, implement still generates from design.md +
|
|
47
|
+
# these HOW-to-build standards and loads NO domain rule file — the tech map lists only
|
|
48
|
+
# technical files. The architecture principles come via constitution.technical.md
|
|
49
|
+
# (referred to directly, as-is — NOT mapped); the structure via design.md. Component
|
|
50
|
+
# rule docs are NOT loaded here — implement codes against a component's PORT; adding the
|
|
51
|
+
# component itself is a separate step, /appweaver add-component. (missing files skipped)
|
|
52
|
+
standards:
|
|
53
|
+
- { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
|
|
54
|
+
|
|
55
|
+
workflow:
|
|
56
|
+
|
|
57
|
+
# 0. TECHNICAL rule files → sticky standards (configuration, not hardcoded).
|
|
58
|
+
# tech-select reads guardrails/projects/<project>/tech-rule-bindings.md under
|
|
59
|
+
# "## /aw-spec-implement" and loads that set into the sticky standards the
|
|
60
|
+
# agent_generate step ALWAYS prepends. No domain rule file is loaded here — the
|
|
61
|
+
# tech map lists only technical files (rule-partition intact). No blocking gate:
|
|
62
|
+
# an unconfigured project soft-continues (constitution.technical.md still carries
|
|
63
|
+
# the tech base, referred to directly below).
|
|
64
|
+
- id: tech_select
|
|
65
|
+
action: include
|
|
66
|
+
module: .appweaver/orchestrator/modules/tech-select.orch.yaml
|
|
67
|
+
with: { command: aw-spec-implement }
|
|
68
|
+
|
|
69
|
+
# 1. Resolve the current feature + its design; require the DESIGN (implement's
|
|
70
|
+
# only input). No spec — analyze already conformed the design to the spec.
|
|
71
|
+
- id: feature_paths
|
|
72
|
+
action: execute_script
|
|
73
|
+
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
74
|
+
script: { ref: actions }
|
|
75
|
+
subcommand: feature-paths
|
|
76
|
+
outputs:
|
|
77
|
+
- { name: feature_dir, from: "$.feature_dir" }
|
|
78
|
+
- { name: design_doc, from: "$.design_file" }
|
|
79
|
+
- { name: design_exists, from: "$.design_exists" }
|
|
80
|
+
|
|
81
|
+
- id: require_feature
|
|
82
|
+
action: verify_context
|
|
83
|
+
require_non_empty: feature_dir
|
|
84
|
+
on_empty: stop
|
|
85
|
+
on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run implement."
|
|
86
|
+
|
|
87
|
+
- id: verify_design
|
|
88
|
+
action: verify_context
|
|
89
|
+
require_true: design_exists
|
|
90
|
+
on_false: stop
|
|
91
|
+
on_false_message: "No design.md for the current feature. Run /appweaver design then /appweaver analyze-design first — implement generates STRICTLY from the conformed design."
|
|
92
|
+
|
|
93
|
+
# 1a. Require the SERVICE LANE and its source path. Implement writes code, and
|
|
94
|
+
# the lane's root is the subtree it is allowed to write into — so this runs
|
|
95
|
+
# before the foundation gate, which searches that subtree for a project.
|
|
96
|
+
- id: lane_gate
|
|
97
|
+
action: include
|
|
98
|
+
module: .appweaver/orchestrator/modules/lane-gate.orch.yaml
|
|
99
|
+
with: { require: backend, command: "/appweaver implement" }
|
|
100
|
+
|
|
101
|
+
# 1b. Require the PROJECT — a scaffolded, compiling tree — to be present. Implement
|
|
102
|
+
# GENERATES the aggregate's code INTO it; with no project there is nowhere to place
|
|
103
|
+
# the files. Deterministic structure gate: searches the LANE'S OWN subtree for an
|
|
104
|
+
# ecosystem manifest (.sln/.csproj, pom.xml, build.gradle, package.json, go.mod,
|
|
105
|
+
# Cargo.toml, pyproject.toml), falling back to the whole repo for the layout that
|
|
106
|
+
# keeps its manifest beside the lane root rather than inside it, and ignoring the
|
|
107
|
+
# framework/spec/guardrails/foundations dirs — never trusts the model for this.
|
|
108
|
+
# How the project got there is not asked: `foundation` unpacked it, or the team
|
|
109
|
+
# scaffolded it with the stack's own tooling.
|
|
110
|
+
- id: detect_foundation
|
|
111
|
+
action: execute_script
|
|
112
|
+
script: { ref: actions }
|
|
113
|
+
subcommand: detect-project
|
|
114
|
+
args: ["--root", "{{lane_source_path}}"]
|
|
115
|
+
outputs:
|
|
116
|
+
- { name: foundation_present, from: "$.scaffolded" }
|
|
117
|
+
- { name: project_markers, from: "$.markers" }
|
|
118
|
+
- { name: project_scope, from: "$.scope" }
|
|
119
|
+
|
|
120
|
+
- id: foundation_gate
|
|
121
|
+
action: verify_context
|
|
122
|
+
require_true: foundation_present
|
|
123
|
+
on_false: stop
|
|
124
|
+
on_false_message: "No project found under the {{lane_id}} lane's source path `{{lane_source_path}}`, nor anywhere else in this repository. Implement GENERATES the aggregate's code into an existing project tree, so one has to be scaffolded first: run /appweaver foundation <FoundationName> <AppName> where a foundation bundle ships for this stack, or create the project with the stack's own tooling under that path. Any ecosystem manifest marks it — .sln/.csproj, pom.xml, build.gradle(.kts), package.json, go.mod, Cargo.toml or pyproject.toml."
|
|
125
|
+
|
|
126
|
+
# 2. Pre-execution hooks.
|
|
127
|
+
- id: resolve_pre_hooks
|
|
128
|
+
action: execute_script
|
|
129
|
+
script: { ref: actions }
|
|
130
|
+
subcommand: resolve-hooks
|
|
131
|
+
args: ["--phase", "before_implement"]
|
|
132
|
+
outputs:
|
|
133
|
+
- { name: before_hooks, from: "$.hooks" }
|
|
134
|
+
- id: dispatch_pre_hooks
|
|
135
|
+
action: dispatch_hooks
|
|
136
|
+
hooks_from_variable: before_hooks
|
|
137
|
+
|
|
138
|
+
# 3. Model-driven generation: design.md → source files + paired tests.
|
|
139
|
+
# The design constrains WHAT to build; the constitution/stack profile fixes HOW.
|
|
140
|
+
# The spec is deliberately NOT in context — the design is the single source here.
|
|
141
|
+
- id: ctx_generate
|
|
142
|
+
action: build_context
|
|
143
|
+
context:
|
|
144
|
+
- { path: "{{design_doc}}" }
|
|
145
|
+
- { path: .appweaver/memory/constitution.technical.md, optional: true } # technology base ONLY — no domain
|
|
146
|
+
- id: generate
|
|
147
|
+
action: agent_generate
|
|
148
|
+
tools: "Read,Write,Edit"
|
|
149
|
+
permission_mode: acceptEdits
|
|
150
|
+
task: |
|
|
151
|
+
Generate the production code AND paired tests for this aggregate STRICTLY from
|
|
152
|
+
its design.md (in context). The design is the complete, authoritative source of
|
|
153
|
+
WHAT to build — do NOT consult or infer from the spec; `analyze` already
|
|
154
|
+
conformed the design to the spec. This phase is the HOME of the
|
|
155
|
+
technology-specific, solution-wide code-generation rules. Guidance: {{USER_INPUT}}
|
|
156
|
+
Rules:
|
|
157
|
+
- THE DESIGN IS THE ONLY DOMAIN INPUT. You have design.md + framework/code
|
|
158
|
+
standards, and NO domain rule files. Introduce NO domain rule, identifier,
|
|
159
|
+
terminology, or behaviour that the design does not state — everything domain
|
|
160
|
+
already passed through spec → design. If a domain specific seems missing, STOP
|
|
161
|
+
and surface it; never invent it from memory.
|
|
162
|
+
- BIND THE STACK: this lane is `{{lane_id}}` — {{lane_title}}, language
|
|
163
|
+
{{lane_language}} ({{lane_ecosystem}}), declared in .appweaver/stacks.json and
|
|
164
|
+
compiled with `{{lane_build}}`, tested with `{{lane_test}}`. Generate in THAT
|
|
165
|
+
language and framework and no other, using its idioms, its project layout and
|
|
166
|
+
its test framework. Take persistence, messaging and the remaining technology
|
|
167
|
+
choices from the constitution's technology base + the loaded standards; the
|
|
168
|
+
design is technology-agnostic, so do not re-decide anything already fixed there.
|
|
169
|
+
If the loaded standards describe a DIFFERENT stack than the one above, the lane
|
|
170
|
+
wins on language and layout — the standards' stack-specific mechanics do not
|
|
171
|
+
apply, so follow their INTENT and STOP to surface the mismatch in your summary.
|
|
172
|
+
- WRITE ONLY UNDER `{{lane_source_path}}` — the source path the `{{lane_id}}`
|
|
173
|
+
lane declares in .appweaver/stacks.json. That subtree is this lane's, and a file
|
|
174
|
+
outside it belongs to another lane or to no lane at all. Do not create a
|
|
175
|
+
parallel source tree because the layout inside it is unfamiliar; if the design
|
|
176
|
+
needs a place this subtree has no home for, STOP and surface it.
|
|
177
|
+
- Follow the project's folder/layer convention + the loaded coding-standards,
|
|
178
|
+
dependency-policy and testing standards for HOW to structure, name, and place
|
|
179
|
+
files WITHIN that subtree — the design says WHAT to build; these standards
|
|
180
|
+
(identical for every feature) say HOW.
|
|
181
|
+
- COMPONENTS: when the design's External Integrations table depends on a framework
|
|
182
|
+
component (e.g. `IEmailService`, `IJobScheduler`), code against that component's
|
|
183
|
+
ABSTRACTION / port as the design declares — do NOT hand-roll it. Installing the
|
|
184
|
+
component into the project (packages, provider wiring, config) is a SEPARATE step:
|
|
185
|
+
/appweaver add-component <Component>. If the port isn't present yet, code to
|
|
186
|
+
it and note add-component as the prerequisite; do not load component rule docs here.
|
|
187
|
+
- Realise EVERY design element as code, changing nothing about WHAT it specifies:
|
|
188
|
+
one file per Domain type / Application use-case / API endpoint / Infrastructure
|
|
189
|
+
adapter, placed by layer. Preserve the ubiquitous-language names verbatim.
|
|
190
|
+
- Enforce EXACTLY as the design states: every Domain invariant, Application
|
|
191
|
+
handler orchestration, and API error contract; the cross-cutting constraints in
|
|
192
|
+
the Cross-Cutting Concerns table (audit / retention / data-exposure — the
|
|
193
|
+
CN-/DC- realisations); and each integration contract (IC-) in the External
|
|
194
|
+
Integrations table. Implement every port the design declares.
|
|
195
|
+
- Author a paired test for every design behaviour / use-case / endpoint; derive
|
|
196
|
+
the cases from the design's pre/post/invariant contracts and cite the spec id
|
|
197
|
+
(FR / BR / CN / DC / IC / US) from the design's Traceability section. Include tests
|
|
198
|
+
for the constraints — e.g. an audit record is emitted, a DC-restricted field is
|
|
199
|
+
NOT exposed on the public surface, an IC- projection round-trips.
|
|
200
|
+
- Do NOT add behaviour the design does not state, and do NOT omit any it does.
|
|
201
|
+
If the design looks wrong or incomplete, STOP and surface it (it is fixed in
|
|
202
|
+
design/analyze) — never compensate from the spec or from memory.
|
|
203
|
+
- This aggregate OWNS its files; never regenerate a file another feature owns.
|
|
204
|
+
- Where generated code depends on a design Assumption (DA-n) or Workaround
|
|
205
|
+
(WA-n), mark it with a comment citing that id so it is easy to revisit later.
|
|
206
|
+
outputs:
|
|
207
|
+
- { name: files, from: "$.files" }
|
|
208
|
+
|
|
209
|
+
- id: verify_generated
|
|
210
|
+
action: verify_context
|
|
211
|
+
require_non_empty: files
|
|
212
|
+
on_empty: stop
|
|
213
|
+
on_empty_message: "No files generated. Ensure /appweaver design produced a filled design.md (not the empty template) and passed analyze, then re-run."
|
|
214
|
+
|
|
215
|
+
# 3b. OKF knowledge + cross-references (deterministic, design-derived). Greenfield's
|
|
216
|
+
# entry into the shared OKF bundle: author THIS aggregate's concept (its source_files
|
|
217
|
+
# = the files just generated), then record its cross-slice edges — write a
|
|
218
|
+
# Cross-References row into every SIBLING aggregate it uses (from design.md §1
|
|
219
|
+
# References-by-id + its External integrations table), reconcile-on-write so a dropped
|
|
220
|
+
# dependency self-heals and a used sibling with no concept yet is stubbed. Finally
|
|
221
|
+
# author the concept's Overview prose (3c). This is enrichment downstream of a
|
|
222
|
+
# successful generate — it never re-decides WHAT was built.
|
|
223
|
+
- id: xref_concept
|
|
224
|
+
action: execute_script
|
|
225
|
+
script: { ref: xref }
|
|
226
|
+
subcommand: concept-upsert
|
|
227
|
+
args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{files}}", "--origin", "greenfield"]
|
|
228
|
+
outputs:
|
|
229
|
+
- { name: okf_concept, from: "$.concept" }
|
|
230
|
+
|
|
231
|
+
- id: xref_record
|
|
232
|
+
action: execute_script
|
|
233
|
+
script: { ref: xref }
|
|
234
|
+
subcommand: record
|
|
235
|
+
args: ["--feature-dir", "{{feature_dir}}", "--design", "{{design_doc}}", "--origin", "greenfield"]
|
|
236
|
+
outputs:
|
|
237
|
+
- { name: xref_wrote, from: "$.wrote" }
|
|
238
|
+
- { name: xref_edge_count, from: "$.edge_count" }
|
|
239
|
+
|
|
240
|
+
# 3c. The concept's Overview — the ONE part of the OKF concept a deterministic script
|
|
241
|
+
# cannot produce (prose distilled from design.md §1). The model authors the text
|
|
242
|
+
# only; concept-overview splices it into the `## Overview` section alone, so the
|
|
243
|
+
# Cross-References rows other slices own are structurally out of reach.
|
|
244
|
+
- id: okf_overview
|
|
245
|
+
action: agent_query
|
|
246
|
+
context: ["{{design_doc}}"]
|
|
247
|
+
include_standards: false
|
|
248
|
+
schema: { overview: "<2-4 sentences of prose>" }
|
|
249
|
+
mock: { overview: "" }
|
|
250
|
+
task: |
|
|
251
|
+
Write the OKF knowledge-concept Overview for the aggregate that design.md (in
|
|
252
|
+
context) describes. 2-4 sentences of PROSE, distilled from §1 Domain Model:
|
|
253
|
+
- name the aggregate ROOT and what the aggregate IS;
|
|
254
|
+
- state the INVARIANTS it guards (from §1 / the design's business rules);
|
|
255
|
+
- state its TRANSACTION BOUNDARY — what it OWNS inside the boundary vs what it
|
|
256
|
+
only REFERENCES by id.
|
|
257
|
+
Plain prose only: no headings, no bullets, no code fences, no file paths, and no
|
|
258
|
+
restating of the dependency edges (those live in the Depends-On / Cross-References
|
|
259
|
+
tables). Describe only what the design states — invent nothing.
|
|
260
|
+
outputs:
|
|
261
|
+
- { name: okf_overview, from: "$.overview" }
|
|
262
|
+
|
|
263
|
+
- id: okf_overview_write
|
|
264
|
+
action: execute_script
|
|
265
|
+
script: { ref: xref }
|
|
266
|
+
subcommand: concept-overview
|
|
267
|
+
args: ["--feature-dir", "{{feature_dir}}", "--text", "{{okf_overview}}"]
|
|
268
|
+
|
|
269
|
+
# 4. Post-execution hooks.
|
|
270
|
+
- id: resolve_post_hooks
|
|
271
|
+
action: execute_script
|
|
272
|
+
script: { ref: actions }
|
|
273
|
+
subcommand: resolve-hooks
|
|
274
|
+
args: ["--phase", "after_implement"]
|
|
275
|
+
outputs:
|
|
276
|
+
- { name: after_hooks, from: "$.hooks" }
|
|
277
|
+
- id: dispatch_post_hooks
|
|
278
|
+
action: dispatch_hooks
|
|
279
|
+
hooks_from_variable: after_hooks
|
|
280
|
+
|
|
281
|
+
outputs:
|
|
282
|
+
feature_dir: "{{feature_dir}}"
|
|
283
|
+
design_doc: "{{design_doc}}"
|
|
284
|
+
files: "{{files}}"
|
|
285
|
+
okf_concept: "{{okf_concept}}"
|
|
286
|
+
xref_edge_count: "{{xref_edge_count}}"
|
|
287
|
+
next: "/appweaver build (OKF concept authored at {{okf_concept}}; {{xref_edge_count}} cross-slice edge(s) recorded into sibling aggregates)"
|