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,238 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# aw-spec-inventory (orchestrator) — B0 of the Brownfield Pipeline
|
|
3
|
+
#
|
|
4
|
+
# The reverse front-end's first phase (see Brownfield-Pipeline.md). Scan
|
|
5
|
+
# an EXISTING codebase, propose AGGREGATE-ROOT boundaries + dependency seams,
|
|
6
|
+
# and emit an aggregate-organized OKF v0.1 knowledge bundle + a migration
|
|
7
|
+
# backlog. Each candidate aggregate is a future specs/<Feature>/ vertical slice —
|
|
8
|
+
# this bundle is the BASE the forward brownfield steps read to reverse-engineer
|
|
9
|
+
# spec.md + design.md per slice.
|
|
10
|
+
#
|
|
11
|
+
# INVENTORY → adopt → (fidelity) → characterize → [ forward pipeline ] ← you are here
|
|
12
|
+
#
|
|
13
|
+
# Two-part shape, mirroring the OKF generate flow:
|
|
14
|
+
# 1. a DETERMINISTIC scan (aw-inventory.py scan) → the factual JSON substrate
|
|
15
|
+
# (files, languages, churn, entrypoints, data/route/api files, and
|
|
16
|
+
# aggregate_signals = candidate roots clustered by vertical-slice layout);
|
|
17
|
+
# 2. an ENRICHMENT agent that turns that substrate into the OKF bundle,
|
|
18
|
+
# organized BY AGGREGATE ROOT, then a conformance gate (validate_okf.py).
|
|
19
|
+
#
|
|
20
|
+
# It does NOT author spec.md / design.md (that is /appweaver adopt per slice)
|
|
21
|
+
# and does NOT touch source code — all writes stay inside the bundle dir.
|
|
22
|
+
#
|
|
23
|
+
# Launch: /appweaver inventory [strategy] [focus/scope hints]
|
|
24
|
+
# =============================================================================
|
|
25
|
+
|
|
26
|
+
name: aw-spec-inventory
|
|
27
|
+
description: Scan a brownfield codebase and produce an aggregate-organized OKF v0.1 knowledge bundle plus a migration backlog — the base for reverse-engineering spec.md + design.md per aggregate/vertical slice. Deterministic scan + enrichment agent + conformance gate; never modifies source.
|
|
28
|
+
version: 1.1.0
|
|
29
|
+
agent_agnostic: true
|
|
30
|
+
dialect: aw-spec.orchestrator/v1
|
|
31
|
+
|
|
32
|
+
inputs:
|
|
33
|
+
user_input:
|
|
34
|
+
description: Optional focus / scope hints (e.g. an area to prioritize, or a granularity note).
|
|
35
|
+
required: false
|
|
36
|
+
bind: USER_INPUT
|
|
37
|
+
|
|
38
|
+
scripts:
|
|
39
|
+
inventory:
|
|
40
|
+
sh: .appweaver/scripts/bash/aw-inventory.sh
|
|
41
|
+
ps1: .appweaver/scripts/powershell/aw-inventory.ps1
|
|
42
|
+
actions:
|
|
43
|
+
sh: .appweaver/scripts/bash/aw-spec-actions.sh
|
|
44
|
+
ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
|
|
45
|
+
|
|
46
|
+
# No modelling rule file is loaded. author_bundle states the vocabulary it needs
|
|
47
|
+
# inline — entities, value objects, domain events, the aggregate that OWNS them,
|
|
48
|
+
# and the clean/torn seam test — in terms no stack owns, which is what lets this
|
|
49
|
+
# scan run against an arbitrary codebase. A rule file here would reach every step
|
|
50
|
+
# (this is the sticky set) and would hand the agent one project's house style as
|
|
51
|
+
# the shape to look for.
|
|
52
|
+
standards:
|
|
53
|
+
- { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
|
|
54
|
+
|
|
55
|
+
vars:
|
|
56
|
+
bundle_present: "false"
|
|
57
|
+
conformant: "false"
|
|
58
|
+
|
|
59
|
+
workflow:
|
|
60
|
+
|
|
61
|
+
# 1. DETERMINISTIC scan of the current codebase → JSON substrate. Emits the
|
|
62
|
+
# factual base (files, churn, categories, aggregate_signals) and reports
|
|
63
|
+
# whether the target bundle already holds curation.
|
|
64
|
+
- id: scan
|
|
65
|
+
action: execute_script
|
|
66
|
+
script: { ref: inventory }
|
|
67
|
+
subcommand: scan
|
|
68
|
+
outputs:
|
|
69
|
+
- { name: inventory_json, from: "$.inventory_json" }
|
|
70
|
+
- { name: root, from: "$.root" }
|
|
71
|
+
- { name: head, from: "$.head" }
|
|
72
|
+
- { name: file_count, from: "$.file_count" }
|
|
73
|
+
- { name: aggregate_count, from: "$.aggregate_count" }
|
|
74
|
+
- { name: bundle_dir, from: "$.bundle_dir" }
|
|
75
|
+
- { name: bundle_present, from: "$.bundle_present" }
|
|
76
|
+
- { name: bundle_md_count, from: "$.bundle_md_count" }
|
|
77
|
+
|
|
78
|
+
# 1b. Substance gate: a scan that found no aggregate candidates has nothing to
|
|
79
|
+
# organize a bundle around (empty repo, or no recognizable domain layout).
|
|
80
|
+
- id: require_aggregates
|
|
81
|
+
action: verify_context
|
|
82
|
+
require_true: aggregate_count
|
|
83
|
+
on_false: stop
|
|
84
|
+
on_false_message: "Scan found no candidate aggregates in {{root}} (file_count={{file_count}}). Point /appweaver inventory at a codebase with a recognizable domain/vertical-slice layout, or scan a subtree that contains one."
|
|
85
|
+
|
|
86
|
+
# 1c. Curation guard (OKF rule): a bundle that already has concept files is
|
|
87
|
+
# hand/agent curation — regenerating from scratch would destroy it. Stop
|
|
88
|
+
# and let the operator clear or back up {{bundle_dir}} before re-running.
|
|
89
|
+
- id: bundle_guard
|
|
90
|
+
action: verify_context
|
|
91
|
+
require_value: bundle_present
|
|
92
|
+
equals: "false"
|
|
93
|
+
on_mismatch: stop
|
|
94
|
+
on_mismatch_message: "The OKF bundle at {{bundle_dir}} already holds {{bundle_md_count}} concept file(s) — inventory would overwrite that curation. Back up or remove {{bundle_dir}} to regenerate from scratch (a future /appweaver inventory-update will refresh incrementally)."
|
|
95
|
+
|
|
96
|
+
# 2. Pre-execution hooks.
|
|
97
|
+
- id: resolve_pre_hooks
|
|
98
|
+
action: execute_script
|
|
99
|
+
script: { ref: actions }
|
|
100
|
+
subcommand: resolve-hooks
|
|
101
|
+
args: ["--phase", "before_inventory"]
|
|
102
|
+
outputs:
|
|
103
|
+
- { name: before_hooks, from: "$.hooks" }
|
|
104
|
+
- id: dispatch_pre_hooks
|
|
105
|
+
action: dispatch_hooks
|
|
106
|
+
hooks_from_variable: before_hooks
|
|
107
|
+
|
|
108
|
+
# 3. ENRICHMENT — turn the substrate into an aggregate-organized OKF bundle.
|
|
109
|
+
# Context is fed via build_context (agent_generate reads the envelope, NOT a
|
|
110
|
+
# step-level context: key): the factual substrate, the OKF format authority
|
|
111
|
+
# (generate.md), and the brownfield design (seam/backlog framing).
|
|
112
|
+
- id: ctx_author
|
|
113
|
+
action: build_context
|
|
114
|
+
context:
|
|
115
|
+
- { path: "{{inventory_json}}" } # the deterministic substrate (aggregate_signals etc.)
|
|
116
|
+
- { path: .appweaver/templates/okf-concept-template.md } # OKF v0.1 format authority (frontmatter, index, log, rules)
|
|
117
|
+
- { path: Brownfield-Pipeline.md } # seam-as-unit-of-work, migration backlog, source anchor
|
|
118
|
+
- id: author_bundle
|
|
119
|
+
action: agent_generate
|
|
120
|
+
tools: "Read,Write,Edit"
|
|
121
|
+
permission_mode: acceptEdits
|
|
122
|
+
task: |
|
|
123
|
+
Act as the OKF enrichment agent for the Brownfield-Pipeline INVENTORY (B0)
|
|
124
|
+
phase. Produce a CONFORMANT OKF v0.1 knowledge bundle at {{bundle_dir}},
|
|
125
|
+
organized BY AGGREGATE ROOT, from the deterministic substrate
|
|
126
|
+
{{inventory_json}} (in context). Follow the OKF concept template in context for
|
|
127
|
+
format (frontmatter, index.md/log.md rules, cross-linking, hard rules) —
|
|
128
|
+
but ORGANIZE around aggregates, not services/modules. Scope/focus hints:
|
|
129
|
+
{{USER_INPUT}}
|
|
130
|
+
|
|
131
|
+
Read the substrate first. Its `aggregate_signals` are CANDIDATE roots,
|
|
132
|
+
each with its files grouped by layer (domain / feature / infra / api) plus
|
|
133
|
+
detected entities; `git.history.churn` ranks significance; the category
|
|
134
|
+
lists (data_layer_files, route_like_files, api_definitions, ops_files,
|
|
135
|
+
docs, adr_docs) and `top_level_dirs` fill in the rest. Signals are input,
|
|
136
|
+
NOT decisions — YOU draw the real boundaries.
|
|
137
|
+
|
|
138
|
+
Consolidate the candidates into REAL aggregates:
|
|
139
|
+
- Merge a src module and its mirror test module into ONE aggregate (e.g.
|
|
140
|
+
src/.../MedicinalProducts + tests/.../MedicinalProducts → MedicinalProduct).
|
|
141
|
+
- Treat service-level / shared infrastructure (a shared DbContext, cross-
|
|
142
|
+
cutting adapters) as a Platform/Shared concept, NOT an aggregate.
|
|
143
|
+
- Fold value objects, entities, domain events and CQRS commands/endpoints
|
|
144
|
+
into the aggregate that OWNS them — one aggregate concept, not one per type.
|
|
145
|
+
|
|
146
|
+
Write the bundle (all paths under {{bundle_dir}}, bundle-relative links
|
|
147
|
+
begin with "/", per OKF §5.1):
|
|
148
|
+
- `index.md` (bundle root) — frontmatter EXACTLY `okf_version: "0.1"` and
|
|
149
|
+
nothing else; body = sections of bulleted links reusing each concept's
|
|
150
|
+
`description`.
|
|
151
|
+
- `architecture/overview.md` (type: Reference) — system purpose, the
|
|
152
|
+
AGGREGATE MAP (each aggregate + its seam), tech stack, and links to every
|
|
153
|
+
other concept.
|
|
154
|
+
- `aggregates/<aggregate>.md` (type: Aggregate) — ONE per aggregate root.
|
|
155
|
+
Cover: Responsibilities; the entities / value objects / domain events /
|
|
156
|
+
commands / API endpoints / persistence it owns (from the signal's layer
|
|
157
|
+
files); invariants (INFERRED from code — mark confidence, park anything
|
|
158
|
+
unclear in `open_questions`, never guess); the SEAM (the boundary you
|
|
159
|
+
could route across — repository, endpoint, table owner, queue — and
|
|
160
|
+
whether it is CLEAN or TORN, i.e. shares a transaction/table with another
|
|
161
|
+
slice); and the candidate `specs/<Feature>/` slice name (feature =
|
|
162
|
+
aggregate). Set `source_files` to the module's files, grouped with YAML
|
|
163
|
+
comment headers by each file's OWN folder — the path segment that VARIES
|
|
164
|
+
across the files after their shared parent directory (the layer folder in
|
|
165
|
+
a vertical slice; the tier project in an n-tier / layered app; tests → a
|
|
166
|
+
single `tests` group). Do NOT impose a fixed Domain/Application/UI
|
|
167
|
+
taxonomy — the CODE's folders ARE the grouping, and the toolchain
|
|
168
|
+
re-derives them the same way on every later write. Set `timestamp` to the
|
|
169
|
+
latest commit time across them.
|
|
170
|
+
- `data/` and `api/` concepts only where a data model or API surface needs
|
|
171
|
+
its own home beyond the owning aggregate (medium granularity: prefer
|
|
172
|
+
folding into the aggregate).
|
|
173
|
+
- `migration-backlog.md` (type: Reference, at bundle root) — the B0
|
|
174
|
+
deliverable: a table `| aggregate | candidate slice | seam (clean/torn) |
|
|
175
|
+
depends on | risks | adopt order |`, sequenced so clean seams go first
|
|
176
|
+
and TORN seams are flagged as remediation items (introduce the seam
|
|
177
|
+
before adopting). This is the strangler rollout plan.
|
|
178
|
+
- An `index.md` in EVERY subdirectory (no frontmatter).
|
|
179
|
+
- `log.md` (bundle root) — first line under a `## <today's date>` heading
|
|
180
|
+
must be `Commit: ` + backtick + `{{head}}` + backtick (validator rule E4),
|
|
181
|
+
then a one-line Initialization entry noting the concept count.
|
|
182
|
+
|
|
183
|
+
Provenance + safety (OKF hard rules):
|
|
184
|
+
- Stamp every concept `origin: reverse-engineered` and `generated_by:
|
|
185
|
+
aw-spec-inventory/1.1.0` in frontmatter.
|
|
186
|
+
- The CODE is the source of truth; capture what IS (bugs/quirks included),
|
|
187
|
+
not what SHOULD be. Where intent/invariants are unclear from code + git
|
|
188
|
+
history, add a concrete `open_questions` entry rather than inventing one.
|
|
189
|
+
- NEVER fabricate facts, and NEVER emit secrets/tokens/credentials/internal
|
|
190
|
+
hostnames found in the code — describe shape, never values.
|
|
191
|
+
- Write ONLY inside {{bundle_dir}}; do NOT modify any source file.
|
|
192
|
+
Report the bundle tree and the concept count by type.
|
|
193
|
+
outputs:
|
|
194
|
+
- { name: bundle_files, from: "$.files" }
|
|
195
|
+
|
|
196
|
+
- id: verify_authored
|
|
197
|
+
action: verify_context
|
|
198
|
+
require_non_empty: bundle_files
|
|
199
|
+
on_empty: stop
|
|
200
|
+
on_empty_message: "No bundle files were written to {{bundle_dir}}. Ensure the substrate {{inventory_json}} has aggregate_signals and re-run."
|
|
201
|
+
|
|
202
|
+
# 4. CONFORMANCE gate — OKF v0.1 validator (errors block; warnings are noted).
|
|
203
|
+
- id: validate_bundle
|
|
204
|
+
action: execute_script
|
|
205
|
+
script: { ref: inventory }
|
|
206
|
+
subcommand: validate
|
|
207
|
+
args: ["--bundle", "{{bundle_dir}}", "--repo-root", "{{root}}"]
|
|
208
|
+
outputs:
|
|
209
|
+
- { name: conformant, from: "$.conformant" }
|
|
210
|
+
- { name: okf_errors, from: "$.errors" }
|
|
211
|
+
- { name: okf_warnings, from: "$.warnings" }
|
|
212
|
+
- { name: concepts, from: "$.concepts" }
|
|
213
|
+
|
|
214
|
+
- id: conformance_gate
|
|
215
|
+
action: verify_context
|
|
216
|
+
require_true: conformant
|
|
217
|
+
on_false: stop
|
|
218
|
+
on_false_message: "The OKF bundle at {{bundle_dir}} is NON-CONFORMANT (errors: {{okf_errors}}). Fix the reported ERRORs (unparseable frontmatter, missing `type`, malformed index.md/log.md) and re-run — or edit the bundle by hand, then re-validate."
|
|
219
|
+
|
|
220
|
+
# 5. Post-execution hooks.
|
|
221
|
+
- id: resolve_post_hooks
|
|
222
|
+
action: execute_script
|
|
223
|
+
script: { ref: actions }
|
|
224
|
+
subcommand: resolve-hooks
|
|
225
|
+
args: ["--phase", "after_inventory"]
|
|
226
|
+
outputs:
|
|
227
|
+
- { name: after_hooks, from: "$.hooks" }
|
|
228
|
+
- id: dispatch_post_hooks
|
|
229
|
+
action: dispatch_hooks
|
|
230
|
+
hooks_from_variable: after_hooks
|
|
231
|
+
|
|
232
|
+
outputs:
|
|
233
|
+
inventory_json: "{{inventory_json}}"
|
|
234
|
+
bundle_dir: "{{bundle_dir}}"
|
|
235
|
+
aggregate_count: "{{aggregate_count}}"
|
|
236
|
+
concepts: "{{concepts}}"
|
|
237
|
+
warnings: "{{okf_warnings}}"
|
|
238
|
+
next: "Review {{bundle_dir}} (start with architecture/overview.md and migration-backlog.md). Then adopt a slice: /appweaver adopt <Aggregate> reverse-engineers its spec.md + design.md from the bundle, and the forward pipeline carries it from there."
|