aw-spec-cli 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.agents/agent.json +1 -1
- package/assets/.agents/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.agents/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.claude/agent.json +1 -1
- package/assets/.claude/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.claude/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.kilocode/agent.json +1 -1
- package/assets/.kilocode/workflows/{aw-spec-orch-demo.md → appweaver-demo.md} +9 -9
- package/assets/.kilocode/workflows/{aw-spec-orch.md → appweaver.md} +10 -10
- package/assets/docs/pharma-constitution.my-ref.md +86 -0
- package/dist/utils/paths.js +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/package.json +1 -1
- package/assets/.aw-spec/DESIGN-FORMAT.md +0 -151
- package/assets/.aw-spec/ORCH-DIALECT.md +0 -156
- package/assets/.aw-spec/RULE-PARTITION.md +0 -126
- package/assets/.aw-spec/domain.json +0 -3
- package/assets/.aw-spec/extensions/.registry +0 -19
- package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
- package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
- package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
- package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -37
- package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
- package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
- package/assets/.aw-spec/extensions.yml +0 -16
- package/assets/.aw-spec/feature.json +0 -3
- package/assets/.aw-spec/init-options.json +0 -9
- package/assets/.aw-spec/integration.json +0 -15
- package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -9
- package/assets/.aw-spec/interpreter/run-skill.py +0 -1158
- package/assets/.aw-spec/memory/constitution.md +0 -50
- package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +0 -94
- package/assets/.aw-spec/orchestrator/README.md +0 -300
- package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +0 -74
- package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +0 -74
- package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +0 -105
- package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +0 -81
- package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +0 -75
- package/assets/.aw-spec/orchestrator/orchestrator.py +0 -1721
- package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +0 -40
- package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +0 -59
- package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +0 -97
- package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +0 -61
- package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +0 -48
- package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +0 -39
- package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +0 -106
- package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +0 -54
- package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +0 -160
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +0 -244
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +0 -775
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -248
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -261
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +0 -425
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +0 -188
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +0 -474
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +0 -181
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +0 -284
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +0 -103
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +0 -69
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +0 -85
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +0 -246
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -231
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +0 -258
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +0 -236
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +0 -949
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +0 -293
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +0 -177
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +0 -128
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +0 -412
- package/assets/.aw-spec/scripts/bash/aw-inventory.sh +0 -14
- package/assets/.aw-spec/scripts/bash/aw-parity.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +0 -1899
- package/assets/.aw-spec/scripts/bash/aw-xref.sh +0 -15
- package/assets/.aw-spec/scripts/bash/common.sh +0 -533
- package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +0 -14
- package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +0 -1563
- package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +0 -15
- package/assets/.aw-spec/scripts/python/aw-inventory.py +0 -683
- package/assets/.aw-spec/scripts/python/aw-parity.py +0 -380
- package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +0 -312
- package/assets/.aw-spec/scripts/python/aw-xref.py +0 -1330
- package/assets/.aw-spec/scripts/python/validate_okf.py +0 -349
- package/assets/.aw-spec/templates/constitution-domain-template.md +0 -75
- package/assets/.aw-spec/templates/constitution-technical-template.md +0 -70
- package/assets/.aw-spec/templates/delta-design-template.md +0 -69
- package/assets/.aw-spec/templates/delta-spec-template.md +0 -60
- package/assets/.aw-spec/templates/design-template.md +0 -383
- package/assets/.aw-spec/templates/okf-concept-template.md +0 -103
- package/assets/.aw-spec/templates/parity-manifest-template.json +0 -49
- package/assets/.aw-spec/templates/source-map-template.md +0 -85
- package/assets/.aw-spec/templates/spec-template.md +0 -252
- package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
- package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
- package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
- package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
- package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
- package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
- package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
- package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
- package/assets/docs/README.md +0 -106
- package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
- package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
- package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
- package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
- package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
- package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
- package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
- package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
- package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
- package/assets/docs/architecture/clean-architecture.md +0 -71
- package/assets/docs/architecture/cqrs.md +0 -141
- package/assets/docs/architecture/eventing.md +0 -83
- package/assets/docs/architecture/folder-structure.md +0 -61
- package/assets/docs/architecture/modular-monolith.md +0 -47
- package/assets/docs/architecture/persistence.md +0 -269
- package/assets/docs/architecture/testing.md +0 -55
- package/assets/docs/architecture/vertical-slices.md +0 -201
- package/assets/docs/components/Email/README.md +0 -119
- package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
- package/assets/docs/components/Email/integration.md +0 -300
- package/assets/docs/components/Jobs/README.md +0 -113
- package/assets/docs/components/Jobs/integration.md +0 -259
- package/assets/docs/components/QrGenerator/README.md +0 -85
- package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
- package/assets/docs/components/QrGenerator/integration.md +0 -230
- package/assets/docs/components/README.md +0 -74
- package/assets/docs/domain/domain-driven-design.md +0 -212
- package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
- package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
- package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -97
- package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
- package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -100
- package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/healthcare/consent.md +0 -19
- package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
- package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
- package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
- package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
- package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
- package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
- package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
- package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
- package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
- package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
- package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
- package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
- package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
- package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
- package/assets/docs/domainspecs/pharma/atc.md +0 -22
- package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -90
- package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
- package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
- package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -108
- package/assets/docs/domainspecs/pharma/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
- package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
- package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
- package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
- package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/pharma/fhir.md +0 -31
- package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/hl7.md +0 -17
- package/assets/docs/domainspecs/pharma/idmp.md +0 -26
- package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
- package/assets/docs/domainspecs/pharma/ndc.md +0 -28
- package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
- package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
- package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
- package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
- package/assets/docs/domainspecs/pharma/terminology.md +0 -32
- package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
- package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
- package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
- package/assets/docs/glossary/ai-rules.md +0 -59
- package/assets/docs/governance/api-versioning.md +0 -99
- package/assets/docs/governance/coding-standards.md +0 -87
- package/assets/docs/governance/dependency-policy.md +0 -40
- package/assets/docs/interop/ihe-conformance.md +0 -31
- package/assets/docs/requirement-spec.txt +0 -27
- package/assets/docs/security/auditing.md +0 -160
- package/assets/docs/security/authorization-matrix.md +0 -14
- package/assets/docs/security/authorization.md +0 -87
- package/assets/docs/security/data-classification.md +0 -38
- package/assets/docs/security/zero-trust.md +0 -76
- package/assets/docs/technology-constitution.md +0 -172
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# aw-spec-analyze-slice (orchestrator) — the design↔code conformance GATE
|
|
3
|
-
#
|
|
4
|
-
# The second of the two discrete conformance gates on the forward path, and the
|
|
5
|
-
# sibling of analyze-design:
|
|
6
|
-
# analyze-design gates spec ↔ design — STATIC, before implement
|
|
7
|
-
# analyze-slice gates design ↔ slice — DYNAMIC, after build
|
|
8
|
-
# "Slice" is the unit under analysis: the aggregate's code, its paired tests, and
|
|
9
|
-
# its OKF knowledge concept. Three passes over it —
|
|
10
|
-
# 1. BEHAVIOUR run the tests (paired to the spec's acceptance criteria by the
|
|
11
|
-
# design docs); on red, fix up to 3×.
|
|
12
|
-
# 2. CONFORMANCE check the code against the domain gate overlays (validate-only).
|
|
13
|
-
# 3. KNOWLEDGE refresh + review the slice's OKF concept (advisory).
|
|
14
|
-
# Every fix made here is recorded in that concept, which is also where the slice's
|
|
15
|
-
# file list is READ from (2.3.0 — `aw-xref concept-paths`, replacing the retired
|
|
16
|
-
# `design-paths` scan for ```lang path=… fences that the tech-agnostic design.md no
|
|
17
|
-
# longer carries; the paired `design-reconcile` write-back is retired with it, its job
|
|
18
|
-
# already done by the concept-upsert --merge steps in pass 3).
|
|
19
|
-
#
|
|
20
|
-
# TWO POSITIONS, one gate — and in BOTH the master spec.md is the whole truth:
|
|
21
|
-
# BOOTSTRAP implement → build → analyze-slice → run
|
|
22
|
-
# CHANGE implement-delta → build → finalize-delta → analyze-slice → close-delta
|
|
23
|
-
# On the CHANGE path this gate deliberately runs AFTER finalize-delta, which has already
|
|
24
|
-
# merged the delta into spec.md + design.md — so the master carries the change and needs
|
|
25
|
-
# no delta-awareness here. It runs BEFORE close-delta, so the change is still OPEN: a red
|
|
26
|
-
# result is recoverable ("fix and re-run"), not a defect on an already-shipped version.
|
|
27
|
-
# The only thing this gate reads the open change for is where to send you next.
|
|
28
|
-
#
|
|
29
|
-
# Launch: /aw-spec-orch analyze-slice [strategy]
|
|
30
|
-
# Prereq: /aw-spec-orch build (compiled code for the active feature).
|
|
31
|
-
# =============================================================================
|
|
32
|
-
|
|
33
|
-
name: aw-spec-analyze-slice
|
|
34
|
-
description: The design↔code conformance gate — run the slice's tests against its acceptance criteria, check the code against the domain gate overlays, verify the change did not break any referring aggregate (the OKF referrer blast radius) and write a triage report before stopping if it did, refresh + review its OKF concept, and record every fix in it. Sits after finalize-delta on the change path, so the master spec it scores against already carries the change, and before close-delta, so a red gate leaves the change open and recoverable.
|
|
35
|
-
version: 2.3.0
|
|
36
|
-
agent_agnostic: true
|
|
37
|
-
dialect: aw-spec.orchestrator/v1
|
|
38
|
-
|
|
39
|
-
scripts:
|
|
40
|
-
actions:
|
|
41
|
-
sh: .aw-spec/scripts/bash/aw-spec-actions.sh
|
|
42
|
-
ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
|
|
43
|
-
xref:
|
|
44
|
-
sh: .aw-spec/scripts/bash/aw-xref.sh
|
|
45
|
-
ps1: .aw-spec/scripts/powershell/aw-xref.ps1
|
|
46
|
-
|
|
47
|
-
# No hardcoded technical standards seed. The technical rule files the code/conformance
|
|
48
|
-
# passes check against (testing + coding-standards) are now CONFIGURATION, loaded per-
|
|
49
|
-
# command from docs/domainspecs/<domain>/commandtechrulemap.md under "## /aw-spec-analyze-slice"
|
|
50
|
-
# by the tech-select module (see the tech_select step below). The DOMAIN gate overlays are
|
|
51
|
-
# still loaded separately, as before (resolve_gate_overlays → load_gate_overlays). This gate
|
|
52
|
-
# does not reference constitution.technical.md. (analyze-slice had no ai-rules seed — kept so.)
|
|
53
|
-
standards: []
|
|
54
|
-
|
|
55
|
-
vars:
|
|
56
|
-
test_ok: "false"
|
|
57
|
-
conformance_ok: "false"
|
|
58
|
-
# NAVIGATION ONLY. Whether a change is open decides where this gate sends you next
|
|
59
|
-
# (close-delta vs run) — nothing else in this workflow reads them. On the CHANGE path
|
|
60
|
-
# finalize-delta has already merged the delta into the master docs, so the delta files
|
|
61
|
-
# are redundant here and are deliberately NOT loaded into any context.
|
|
62
|
-
active_change: ""
|
|
63
|
-
has_change: "false"
|
|
64
|
-
# Integrity pass (referrer blast radius) defaults — safe values if xref/test-run is
|
|
65
|
-
# skipped or errors, so the gate reads a real verdict rather than an empty var.
|
|
66
|
-
integrity_ok: "false"
|
|
67
|
-
referrer_csv: ""
|
|
68
|
-
referrer_count: "0"
|
|
69
|
-
referrer_names: ""
|
|
70
|
-
# Pass-3 (OKF) reporting defaults — the knowledge pass is advisory, so these stay
|
|
71
|
-
# readable in the outputs even when a step is skipped or errors out.
|
|
72
|
-
okf_ok: "unknown"
|
|
73
|
-
okf_orphans: "0"
|
|
74
|
-
|
|
75
|
-
workflow:
|
|
76
|
-
|
|
77
|
-
# 0. TECHNICAL rule files → sticky standards (configuration, not hardcoded).
|
|
78
|
-
# tech-select reads docs/domainspecs/<domain>/commandtechrulemap.md under
|
|
79
|
-
# "## /aw-spec-analyze-slice" and loads that set (testing + coding-standards) into
|
|
80
|
-
# the sticky standards the conformance query reads (include_standards: true). The
|
|
81
|
-
# DOMAIN gate overlays are loaded separately below. No blocking gate: an unconfigured
|
|
82
|
-
# project soft-continues (the gate then checks only the domain overlays).
|
|
83
|
-
- id: tech_select
|
|
84
|
-
action: include
|
|
85
|
-
module: .aw-spec/orchestrator/modules/tech-select.orch.yaml
|
|
86
|
-
with: { command: aw-spec-analyze-slice }
|
|
87
|
-
|
|
88
|
-
- id: feature_paths
|
|
89
|
-
action: execute_script
|
|
90
|
-
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
91
|
-
script: { ref: actions }
|
|
92
|
-
subcommand: feature-paths
|
|
93
|
-
outputs:
|
|
94
|
-
- { name: feature_dir, from: "$.feature_dir" }
|
|
95
|
-
- { name: spec_file, from: "$.spec_file" }
|
|
96
|
-
|
|
97
|
-
- id: require_feature
|
|
98
|
-
action: verify_context
|
|
99
|
-
require_non_empty: feature_dir
|
|
100
|
-
on_empty: stop
|
|
101
|
-
on_empty_message: "No active feature. Run /aw-spec-orch select-feature first (pick or create the aggregate, e.g. Order), then re-run analyze-slice."
|
|
102
|
-
|
|
103
|
-
# Is a change OPEN on this feature? Read for NAVIGATION only — see the vars note. Safe
|
|
104
|
-
# on the bootstrap path: with no active_version.json, version-read returns
|
|
105
|
-
# active_change="" / has_change=false and exits 0, so nothing here is conditional on it.
|
|
106
|
-
- id: read_change
|
|
107
|
-
action: execute_script
|
|
108
|
-
script: { ref: actions }
|
|
109
|
-
subcommand: version-read
|
|
110
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
111
|
-
outputs:
|
|
112
|
-
- { name: active_change, from: "$.active_change" }
|
|
113
|
-
- { name: has_change, from: "$.has_change" }
|
|
114
|
-
|
|
115
|
-
# The slice's source files, from its OKF concept — the context all three passes below
|
|
116
|
-
# work over (test fix loop, integrity triage, conformance). Replaces the retired
|
|
117
|
-
# `design-paths` fence scan: design.md is tech-agnostic prose with no ```lang path=…
|
|
118
|
-
# code blocks, so that scan returned nothing and every pass ran on an EMPTY file list.
|
|
119
|
-
# Read-only, exits 0 with paths=[] when there is no concept yet; on_error: continue so
|
|
120
|
-
# a missing bundle degrades the gate to its pre-existing (empty) behaviour, never blocks.
|
|
121
|
-
- id: concept_paths
|
|
122
|
-
action: execute_script
|
|
123
|
-
on_error: continue
|
|
124
|
-
script: { ref: xref }
|
|
125
|
-
subcommand: concept-paths
|
|
126
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
127
|
-
outputs:
|
|
128
|
-
- { name: all_paths, from: "$.paths" }
|
|
129
|
-
- { name: paths_missing, from: "$.missing" }
|
|
130
|
-
|
|
131
|
-
- id: resolve_pre_hooks
|
|
132
|
-
action: execute_script
|
|
133
|
-
script: { ref: actions }
|
|
134
|
-
subcommand: resolve-hooks
|
|
135
|
-
args: ["--phase", "before_analyze_slice"]
|
|
136
|
-
outputs:
|
|
137
|
-
- { name: before_hooks, from: "$.hooks" }
|
|
138
|
-
- id: dispatch_pre_hooks
|
|
139
|
-
action: dispatch_hooks
|
|
140
|
-
hooks_from_variable: before_hooks
|
|
141
|
-
|
|
142
|
-
# ═══════ PASS 1 — BEHAVIOUR: the slice's tests vs the spec's acceptance criteria ═══════
|
|
143
|
-
# Run tests → (if red) fix → re-run, up to 3×.
|
|
144
|
-
- id: test_loop
|
|
145
|
-
action: loop
|
|
146
|
-
while: "{{test_ok}} != true"
|
|
147
|
-
max_iterations: 3
|
|
148
|
-
steps:
|
|
149
|
-
- id: run_tests
|
|
150
|
-
action: execute_script
|
|
151
|
-
on_error: continue
|
|
152
|
-
script: { ref: actions }
|
|
153
|
-
subcommand: test-run
|
|
154
|
-
# scope=slice: run ONLY this feature's tests in the fix loop. The loop EDITS code
|
|
155
|
-
# to make tests pass, and it can only repair THIS feature (its design + spec are
|
|
156
|
-
# what is in context) — so referring aggregates are deliberately NOT in this run;
|
|
157
|
-
# they are verified read-only by the integrity gate below.
|
|
158
|
-
args: ["--feature-dir", "{{feature_dir}}", "--scope", "slice"]
|
|
159
|
-
outputs:
|
|
160
|
-
- { name: test_ok, from: "$.fence_green" }
|
|
161
|
-
- { name: test_tool, from: "$.tool" }
|
|
162
|
-
- { name: test_log, from: "$.log_tail" }
|
|
163
|
-
- { name: test_matched, from: "$.matched" }
|
|
164
|
-
- id: green_break
|
|
165
|
-
action: break
|
|
166
|
-
condition: "{{test_ok}} == true"
|
|
167
|
-
- id: ctx_fix
|
|
168
|
-
action: build_context
|
|
169
|
-
vars:
|
|
170
|
-
test_log: "{{test_log}}"
|
|
171
|
-
context:
|
|
172
|
-
- { path: "{{spec_file}}" }
|
|
173
|
-
context_from: all_paths
|
|
174
|
-
- id: fix
|
|
175
|
-
action: agent_generate
|
|
176
|
-
tools: "Read,Write,Edit,Bash"
|
|
177
|
-
permission_mode: acceptEdits
|
|
178
|
-
task: |
|
|
179
|
-
Tests failed. Make them pass by fixing the code (or a genuinely wrong
|
|
180
|
-
test) in the files in context, keeping behaviour aligned with the spec's
|
|
181
|
-
acceptance criteria (spec in context). Test log:
|
|
182
|
-
{{test_log}}
|
|
183
|
-
outputs:
|
|
184
|
-
- { name: fixed_files, from: "$.files" }
|
|
185
|
-
|
|
186
|
-
- id: test_gate
|
|
187
|
-
action: verify_context
|
|
188
|
-
require_true: test_ok
|
|
189
|
-
on_false: stop
|
|
190
|
-
on_false_message: "Slice tests not green after 3 fix attempts (scope=slice, matched={{test_matched}}). If matched=false the name filter selected ZERO tests for this feature — the test names don't contain the aggregate name — which the fence treats as a failure, not a vacuous pass. Last log: {{test_log}}"
|
|
191
|
-
|
|
192
|
-
# ═══════ PASS 2 — DOMAIN CONFORMANCE: code vs the gate overlay checklist (validation) ═══════
|
|
193
|
-
# With tests green, scan the feature's CODE against the domain gate overlays (the
|
|
194
|
-
# forbidden-patterns / refusal conditions / CI gates). The overlays load as the
|
|
195
|
-
# checklist — VALIDATION only, never an authoring input to feature code. No-op for a
|
|
196
|
-
# non-domain project. Fix violations (bounded 2×); the gate stops if any remain.
|
|
197
|
-
- id: resolve_gate_overlays
|
|
198
|
-
action: execute_script
|
|
199
|
-
script: { ref: actions }
|
|
200
|
-
subcommand: resolve-domain
|
|
201
|
-
args: ["--command", "aw-spec-gate"]
|
|
202
|
-
outputs:
|
|
203
|
-
- { name: gate_overlays, from: "$.candidates" }
|
|
204
|
-
- id: load_gate_overlays
|
|
205
|
-
action: load_standards
|
|
206
|
-
files_from_variable: gate_overlays
|
|
207
|
-
optional: true
|
|
208
|
-
|
|
209
|
-
- id: conformance_loop
|
|
210
|
-
action: loop
|
|
211
|
-
while: "{{conformance_ok}} != true"
|
|
212
|
-
max_iterations: 2
|
|
213
|
-
steps:
|
|
214
|
-
- id: ctx_conformance
|
|
215
|
-
action: build_context
|
|
216
|
-
context:
|
|
217
|
-
- { path: "{{spec_file}}" }
|
|
218
|
-
context_from: all_paths
|
|
219
|
-
- id: check_overlays
|
|
220
|
-
action: agent_query
|
|
221
|
-
include_standards: true # the gate overlays (checklist) are in the standards
|
|
222
|
-
schema: { ok: true, violations: [ { rule: "<overlay rule / id>", where: "<file:symbol>", issue: "<what is violated>" } ] }
|
|
223
|
-
mock: { ok: true, violations: [] }
|
|
224
|
-
task: |
|
|
225
|
-
The domain gate checklist is loaded in the standards (the overlay
|
|
226
|
-
forbidden-patterns, refusal conditions, and CI gates). Check the feature's
|
|
227
|
-
generated code + tests (in context) against EACH checklist rule and list
|
|
228
|
-
EVERY violation, e.g.: a hard delete of a retention-protected aggregate /
|
|
229
|
-
version history / audit record; a second write path bypassing the aggregate
|
|
230
|
-
or interop adapter; an invented/free-text coded value where a validated code
|
|
231
|
-
is required; a missing or weakened audit emission on an audited operation; a
|
|
232
|
-
data-classification-restricted field exposed on the public surface or written
|
|
233
|
-
to logs/metrics/traces. Also confirm the constraint TESTS exist (audit is
|
|
234
|
-
emitted, a restricted field is not exposed, an interop projection round-trips).
|
|
235
|
-
ok=true ONLY when no checklist rule is violated.
|
|
236
|
-
outputs:
|
|
237
|
-
- { name: conformance_ok, from: "$.ok" }
|
|
238
|
-
- { name: conformance_violations, from: "$.violations" }
|
|
239
|
-
- id: conformance_break
|
|
240
|
-
action: break
|
|
241
|
-
condition: "{{conformance_ok}} == true"
|
|
242
|
-
- id: fix_violations
|
|
243
|
-
action: agent_generate
|
|
244
|
-
tools: "Read,Write,Edit,Bash"
|
|
245
|
-
permission_mode: acceptEdits
|
|
246
|
-
task: |
|
|
247
|
-
Fix these domain-conformance violations in the feature's code (in context),
|
|
248
|
-
following the gate checklist rules (in the standards) and keeping the design's
|
|
249
|
-
behaviour intact. Do NOT weaken or delete a test to hide a violation — fix the
|
|
250
|
-
code. After fixing, re-run the tests (Bash) to confirm they stay green.
|
|
251
|
-
Violations: {{conformance_violations}}
|
|
252
|
-
outputs:
|
|
253
|
-
- { name: conformance_fixes, from: "$.files" }
|
|
254
|
-
|
|
255
|
-
- id: conformance_gate
|
|
256
|
-
action: verify_context
|
|
257
|
-
require_true: conformance_ok
|
|
258
|
-
on_false: stop
|
|
259
|
-
on_false_message: "Code violates the domain gate checklist after 2 fix attempts (violations: {{conformance_violations}}). These are the domain constraints design/implement must satisfy — fix the code, or if the constraint itself is wrong, correct it upstream (/aw-spec-orch specify → design)."
|
|
260
|
-
|
|
261
|
-
# ═══════ INTEGRITY — did this feature's change break any aggregate that USES it? ═══════
|
|
262
|
-
# The slice is green + domain-conformant on its own. But a change to a feature can break
|
|
263
|
-
# any OTHER aggregate that references it. Ask the OKF Cross-References index "who refers to
|
|
264
|
-
# me?" (the transitive referrer closure — C→B→A all count), then RE-RUN the feature's tests
|
|
265
|
-
# PLUS every referrer's tests as one read-only fence. Unlike PASS 1 this NEVER edits code:
|
|
266
|
-
# analyze-slice cannot repair a referrer (that is the referrer's own slice's job), so a
|
|
267
|
-
# broken referrer STOPS the gate for a human to resolve, it is not auto-fixed here.
|
|
268
|
-
# Empty referrer set (a leaf feature, or the only aggregate in the repo) → the fence is just
|
|
269
|
-
# the feature's own tests again → passes trivially, blocks nothing.
|
|
270
|
-
- id: xref_referrers
|
|
271
|
-
action: execute_script
|
|
272
|
-
on_error: continue
|
|
273
|
-
script: { ref: xref }
|
|
274
|
-
subcommand: list
|
|
275
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
276
|
-
outputs:
|
|
277
|
-
- { name: referrer_csv, from: "$.referrer_closure_csv" }
|
|
278
|
-
- { name: referrer_count, from: "$.referrer_closure_count" }
|
|
279
|
-
- { name: referrer_names, from: "$.referrer_closure" }
|
|
280
|
-
|
|
281
|
-
- id: run_integrity
|
|
282
|
-
action: execute_script
|
|
283
|
-
on_error: continue
|
|
284
|
-
script: { ref: actions }
|
|
285
|
-
subcommand: test-run
|
|
286
|
-
args: ["--feature-dir", "{{feature_dir}}", "--scope", "slice", "--also", "{{referrer_csv}}"]
|
|
287
|
-
outputs:
|
|
288
|
-
- { name: integrity_ok, from: "$.fence_green" }
|
|
289
|
-
- { name: integrity_log, from: "$.log_tail" }
|
|
290
|
-
|
|
291
|
-
# On a RED fence, author a durable triage report BEFORE stopping — a broken referrer
|
|
292
|
-
# means someone must go fix ANOTHER slice, so this is a record, not scrollback (mirrors
|
|
293
|
-
# characterize's drifted-tests.md). Context is built unconditionally (cheap, no model
|
|
294
|
-
# call); the authoring model call is gated on failure, so a green run spends nothing.
|
|
295
|
-
# The report self-dates and is regenerated on each failing run — a later green fence
|
|
296
|
-
# supersedes it (no gate points here when integrity_ok is true).
|
|
297
|
-
- id: ctx_broken_referrers
|
|
298
|
-
action: build_context
|
|
299
|
-
vars:
|
|
300
|
-
referrer_names: "{{referrer_names}}"
|
|
301
|
-
referrer_count: "{{referrer_count}}"
|
|
302
|
-
integrity_log: "{{integrity_log}}"
|
|
303
|
-
context:
|
|
304
|
-
- { path: "{{spec_file}}" }
|
|
305
|
-
context_from: all_paths
|
|
306
|
-
- id: write_broken_referrers
|
|
307
|
-
action: agent_author
|
|
308
|
-
condition: "{{integrity_ok}} != true"
|
|
309
|
-
include_standards: false # a triage report, not generated code
|
|
310
|
-
output_target: { type: file, path: "{{feature_dir}}/broken-referrers.md" }
|
|
311
|
-
task: |
|
|
312
|
-
Author the BROKEN-REFERRER integrity report for this slice: the aggregates that
|
|
313
|
-
REFER to this feature whose tests went red when this feature's change was run
|
|
314
|
-
against them. This is a triage record for a human — analyze-slice does NOT fix a
|
|
315
|
-
referrer (that is the referrer's own slice's job). Referrer blast radius
|
|
316
|
-
({{referrer_count}}): {{referrer_names}}. Failing test log:
|
|
317
|
-
{{integrity_log}}
|
|
318
|
-
Write markdown, in this order:
|
|
319
|
-
- `# Broken Referrers — <feature>` and a one-line statement of what this file is:
|
|
320
|
-
aggregates that USE this feature and whose tests went red when this feature's
|
|
321
|
-
change was run against them, found by analyze-slice's integrity gate. Add a line
|
|
322
|
-
stamping when + why it was generated (integrity fence RED for this feature), and
|
|
323
|
-
that it is regenerated on every FAILING analyze-slice run — a later green fence
|
|
324
|
-
supersedes it.
|
|
325
|
-
- A SUMMARY line: total referrers in the blast radius, and how many have a failing
|
|
326
|
-
test in the log.
|
|
327
|
-
- One `##` section per REFERRER that has a failing test — attribute a failure to a
|
|
328
|
-
referrer by matching the failing test names in the log to the referrer's name.
|
|
329
|
-
Under it, on their own labelled lines: the referrer aggregate, the failing
|
|
330
|
-
test(s) named in the log, what broke (as far as the log shows), and a RESOLUTION
|
|
331
|
-
line — either this feature's change broke the referrer's expected contract (fix
|
|
332
|
-
belongs in the referrer's OWN slice, or reconsider this feature's contract change)
|
|
333
|
-
or the referrer test is stale (correct it in that slice). Recommend one; do not
|
|
334
|
-
claim certainty the log does not support.
|
|
335
|
-
- A closing `## How to use this file`: resolve each finding in the referrer's own
|
|
336
|
-
slice (or via a CR on this feature's contract), then re-run
|
|
337
|
-
/aw-spec-orch analyze-slice; do not edit this file in place.
|
|
338
|
-
Attribute only what the log supports; invent no failures. Do NOT propose an edit to
|
|
339
|
-
THIS feature's production code to silence a referrer — that would hide a real
|
|
340
|
-
contract break.
|
|
341
|
-
outputs:
|
|
342
|
-
- { name: broken_report_file, from: "$.files" }
|
|
343
|
-
|
|
344
|
-
- id: integrity_gate
|
|
345
|
-
action: verify_context
|
|
346
|
-
require_true: integrity_ok
|
|
347
|
-
on_false: stop
|
|
348
|
-
on_false_message: "Integrity check failed — this feature's change breaks a test in an aggregate that REFERS to it. Referrer blast radius ({{referrer_count}}): {{referrer_names}}. Triage written to {{feature_dir}}/broken-referrers.md — resolve each in the referrer's own slice (or reconsider this feature's contract change), then re-run. Last log: {{integrity_log}}"
|
|
349
|
-
|
|
350
|
-
# ═══════ PASS 3 — OKF KNOWLEDGE: keep the slice's concept true to what now exists ═══════
|
|
351
|
-
# analyze-slice is the LAST stage that changes a greenfield slice's files: both fix loops
|
|
352
|
-
# above run with Write/Edit, and the conformance loop is explicitly asked to ADD missing
|
|
353
|
-
# constraint tests. Those files did not exist when implement wrote the OKF concept, so its
|
|
354
|
-
# source_files list is stale by the time we get here. Merge them in (UNION — never replace:
|
|
355
|
-
# the concept holds the full set implement recorded, these two vars hold only what the fix
|
|
356
|
-
# loops touched), then report cross-reference drift.
|
|
357
|
-
#
|
|
358
|
-
# These two steps are now the WHOLE write-back: the former `design-reconcile` step that
|
|
359
|
-
# preceded them was deleted (it copied on-disk file bodies into path-tagged design fences
|
|
360
|
-
# — meaningless once design.md became tech-agnostic prose, and it read the same
|
|
361
|
-
# fixed_files/paths these steps already own). Recording the files in the concept IS the
|
|
362
|
-
# current reconcile.
|
|
363
|
-
#
|
|
364
|
-
# Deliberately NOT re-running `record`: the Depends-On/Cross-References edges derive from
|
|
365
|
-
# design.md §1 + its External integrations table, and no step in this stage edits
|
|
366
|
-
# design.md — the edge sources
|
|
367
|
-
# cannot have moved here. `--origin` is likewise omitted: concept-upsert setdefaults it,
|
|
368
|
-
# so an adopted (brownfield) slice keeps its `reverse-engineered` provenance instead of
|
|
369
|
-
# being restamped greenfield.
|
|
370
|
-
#
|
|
371
|
-
# Advisory by design (on_error: continue, no gate): a green, domain-conformant slice is
|
|
372
|
-
# never failed over its knowledge index — drift is reported in the outputs and fixed by
|
|
373
|
-
# `aw-xref validate --prune` / re-running the owning slice's `record`.
|
|
374
|
-
- id: okf_merge_test_fixes
|
|
375
|
-
action: execute_script
|
|
376
|
-
condition: "{{fixed_files}}"
|
|
377
|
-
on_error: continue
|
|
378
|
-
script: { ref: xref }
|
|
379
|
-
subcommand: concept-upsert
|
|
380
|
-
args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{fixed_files}}", "--merge"]
|
|
381
|
-
outputs:
|
|
382
|
-
- { name: okf_concept, from: "$.concept" }
|
|
383
|
-
|
|
384
|
-
- id: okf_merge_conformance_fixes
|
|
385
|
-
action: execute_script
|
|
386
|
-
condition: "{{conformance_fixes}}"
|
|
387
|
-
on_error: continue
|
|
388
|
-
script: { ref: xref }
|
|
389
|
-
subcommand: concept-upsert
|
|
390
|
-
args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{conformance_fixes}}", "--merge"]
|
|
391
|
-
outputs:
|
|
392
|
-
- { name: okf_concept, from: "$.concept" }
|
|
393
|
-
|
|
394
|
-
- id: okf_review
|
|
395
|
-
action: execute_script
|
|
396
|
-
on_error: continue
|
|
397
|
-
script: { ref: xref }
|
|
398
|
-
subcommand: validate
|
|
399
|
-
outputs:
|
|
400
|
-
- { name: okf_ok, from: "$.ok" }
|
|
401
|
-
- { name: okf_orphans, from: "$.orphan_count" }
|
|
402
|
-
|
|
403
|
-
- id: resolve_post_hooks
|
|
404
|
-
action: execute_script
|
|
405
|
-
script: { ref: actions }
|
|
406
|
-
subcommand: resolve-hooks
|
|
407
|
-
args: ["--phase", "after_analyze_slice"]
|
|
408
|
-
outputs:
|
|
409
|
-
- { name: after_hooks, from: "$.hooks" }
|
|
410
|
-
- id: dispatch_post_hooks
|
|
411
|
-
action: dispatch_hooks
|
|
412
|
-
hooks_from_variable: after_hooks
|
|
413
|
-
|
|
414
|
-
outputs:
|
|
415
|
-
feature_dir: "{{feature_dir}}"
|
|
416
|
-
test_tool: "{{test_tool}}"
|
|
417
|
-
referrer_count: "{{referrer_count}}"
|
|
418
|
-
referrer_blast_radius: "{{referrer_names}}"
|
|
419
|
-
okf_concept: "{{okf_concept}}"
|
|
420
|
-
okf_index_ok: "{{okf_ok}}"
|
|
421
|
-
okf_orphans: "{{okf_orphans}}"
|
|
422
|
-
# Declared in the concept but absent on disk — advisory index drift, never gated.
|
|
423
|
-
stale_source_files: "{{paths_missing}}"
|
|
424
|
-
active_change: "{{active_change}}"
|
|
425
|
-
next: "CHANGE OPEN ({{active_change}}): /aw-spec-orch close-delta — the slice is green, domain-conformant and did not break a referrer, and its delta is already merged into the master docs, so the change may now be archived and the version bumped. NO OPEN CHANGE: /aw-spec-orch run."
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# aw-spec-build (orchestrator) — compile + fix + reconcile
|
|
3
|
-
#
|
|
4
|
-
# Compile the materialized code; on failure, fix the source files (the slice's own
|
|
5
|
-
# source files as context, design intent as reference) up to 3×; then record whatever
|
|
6
|
-
# the fix loop touched in the slice's OKF concept. Run after /aw-spec-orch implement.
|
|
7
|
-
#
|
|
8
|
-
# 1.1.0 — the slice's file list now comes from the OKF concept's `source_files`
|
|
9
|
-
# (`aw-xref concept-paths`) instead of the retired `design-paths` scan for
|
|
10
|
-
# ```lang path=… fences, a convention the tech-agnostic design.md no longer carries;
|
|
11
|
-
# and the tail step records fix-loop files in that concept instead of copying file
|
|
12
|
-
# bodies back into design fences (`design-reconcile`, likewise retired).
|
|
13
|
-
#
|
|
14
|
-
# 1.2.0 — TECHNICAL RULES ONLY: the `domain-select` include is REMOVED. Build repairs
|
|
15
|
-
# compile errors against design intent — a purely technical job — and the domain never
|
|
16
|
-
# reaches this stage anyway (specify is the domain's sole carrier into the pipeline;
|
|
17
|
-
# build reads code and design.md, never the spec or the domain docs). The include was
|
|
18
|
-
# also inert: no shipped comandrulemap.md carries a "## /aw-spec-build" heading, so
|
|
19
|
-
# `resolve-domain` — which keys `rulemap_exists` off the FILE, not the heading —
|
|
20
|
-
# returned `candidates: []` and every load step skipped. On a CONFIGURED project it was
|
|
21
|
-
# a silent no-op; on an UNCONFIGURED one it was worse, firing domain-select's
|
|
22
|
-
# interactive "continue or exit?" gate on every build to load rules that could never
|
|
23
|
-
# have been found. Removing it makes greenfield `build` non-interactive.
|
|
24
|
-
#
|
|
25
|
-
# Launch: /aw-spec-orch build [strategy]
|
|
26
|
-
# =============================================================================
|
|
27
|
-
|
|
28
|
-
name: aw-spec-build
|
|
29
|
-
description: Compile the feature, fix compile errors against the design intent, then record the touched files in the slice's knowledge concept. Loads TECHNICAL rules only (commandtechrulemap) — no domain rules reach this stage.
|
|
30
|
-
version: 1.2.0
|
|
31
|
-
agent_agnostic: true
|
|
32
|
-
dialect: aw-spec.orchestrator/v1
|
|
33
|
-
|
|
34
|
-
scripts:
|
|
35
|
-
actions:
|
|
36
|
-
sh: .aw-spec/scripts/bash/aw-spec-actions.sh
|
|
37
|
-
ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
|
|
38
|
-
xref:
|
|
39
|
-
sh: .aw-spec/scripts/bash/aw-xref.sh
|
|
40
|
-
ps1: .aw-spec/scripts/powershell/aw-xref.ps1
|
|
41
|
-
|
|
42
|
-
# Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). The technical
|
|
43
|
-
# rule files (the compile/fix reference set) are CONFIGURATION, loaded per-command from
|
|
44
|
-
# docs/domainspecs/<domain>/commandtechrulemap.md by the tech-select module (see the
|
|
45
|
-
# tech_select step below). Technical rules ONLY — build loads no domain rules and does
|
|
46
|
-
# not reference constitution.technical.md. A required file that is missing is reported
|
|
47
|
-
# at assembly time (`[system] MISSING (required)`), an `optional:` one is skipped.
|
|
48
|
-
standards:
|
|
49
|
-
- { path: docs/glossary/ai-rules.md, optional: true }
|
|
50
|
-
|
|
51
|
-
vars:
|
|
52
|
-
build_ok: "false"
|
|
53
|
-
|
|
54
|
-
workflow:
|
|
55
|
-
|
|
56
|
-
# Rule files → sticky standards: TECHNICAL only, via tech-select, read from
|
|
57
|
-
# docs/domainspecs/<domain>/commandtechrulemap.md under "## /aw-spec-build".
|
|
58
|
-
# NO domain-select here — see the header: build repairs compile errors, a purely
|
|
59
|
-
# technical job, and the domain never reaches this stage anyway (specify is its sole
|
|
60
|
-
# carrier; build reads code and design intent, not spec).
|
|
61
|
-
- id: tech_select
|
|
62
|
-
action: include
|
|
63
|
-
module: .aw-spec/orchestrator/modules/tech-select.orch.yaml
|
|
64
|
-
with: { command: aw-spec-build }
|
|
65
|
-
|
|
66
|
-
- id: feature_paths
|
|
67
|
-
action: execute_script
|
|
68
|
-
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
69
|
-
script: { ref: actions }
|
|
70
|
-
subcommand: feature-paths
|
|
71
|
-
outputs:
|
|
72
|
-
- { name: feature_dir, from: "$.feature_dir" }
|
|
73
|
-
|
|
74
|
-
- id: require_feature
|
|
75
|
-
action: verify_context
|
|
76
|
-
require_non_empty: feature_dir
|
|
77
|
-
on_empty: stop
|
|
78
|
-
on_empty_message: "No active feature. Run /aw-spec-orch select-feature first (pick or create the aggregate, e.g. Order), then re-run build."
|
|
79
|
-
|
|
80
|
-
# The slice's source files, from its OKF concept — what the fix loop below is handed.
|
|
81
|
-
# This replaces the retired `design-paths` fence scan: the tech-agnostic design.md
|
|
82
|
-
# carries no ```lang path=… code blocks, so that scan returned nothing and the fixer
|
|
83
|
-
# was told to "fix the source files in context" with an EMPTY context. `source_files`
|
|
84
|
-
# is the maintained answer (implement writes it, analyze-slice merges fixes into it).
|
|
85
|
-
# Advisory: read-only, exits 0 with paths=[] when there is no concept yet, and
|
|
86
|
-
# on_error: continue so an unreadable bundle can never block a compile.
|
|
87
|
-
- id: concept_paths
|
|
88
|
-
action: execute_script
|
|
89
|
-
on_error: continue
|
|
90
|
-
script: { ref: xref }
|
|
91
|
-
subcommand: concept-paths
|
|
92
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
93
|
-
outputs:
|
|
94
|
-
- { name: all_paths, from: "$.paths" }
|
|
95
|
-
- { name: paths_missing, from: "$.missing" }
|
|
96
|
-
|
|
97
|
-
- id: resolve_pre_hooks
|
|
98
|
-
action: execute_script
|
|
99
|
-
script: { ref: actions }
|
|
100
|
-
subcommand: resolve-hooks
|
|
101
|
-
args: ["--phase", "before_build"]
|
|
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
|
-
# Compile → (if red) fix the source files → recompile, up to 3×.
|
|
109
|
-
- id: build_loop
|
|
110
|
-
action: loop
|
|
111
|
-
while: "{{build_ok}} != true"
|
|
112
|
-
max_iterations: 3
|
|
113
|
-
steps:
|
|
114
|
-
- id: compile
|
|
115
|
-
action: execute_script
|
|
116
|
-
on_error: continue
|
|
117
|
-
script: { ref: actions }
|
|
118
|
-
subcommand: build-compile
|
|
119
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
120
|
-
outputs:
|
|
121
|
-
- { name: build_ok, from: "$.ok" }
|
|
122
|
-
- { name: build_tool, from: "$.tool" }
|
|
123
|
-
- { name: build_log, from: "$.log_tail" }
|
|
124
|
-
- id: green_break
|
|
125
|
-
action: break
|
|
126
|
-
condition: "{{build_ok}} == true"
|
|
127
|
-
- id: ctx_fix
|
|
128
|
-
action: build_context
|
|
129
|
-
vars:
|
|
130
|
-
build_log: "{{build_log}}"
|
|
131
|
-
context_from: all_paths
|
|
132
|
-
- id: fix
|
|
133
|
-
action: agent_generate
|
|
134
|
-
tools: "Read,Write,Edit,Bash"
|
|
135
|
-
permission_mode: acceptEdits
|
|
136
|
-
task: |
|
|
137
|
-
The build failed. Fix the COMPILE errors in the source files provided in
|
|
138
|
-
context, honoring the loaded standards and the design intent. Change only
|
|
139
|
-
what the errors require — do not alter behaviour. Build log:
|
|
140
|
-
{{build_log}}
|
|
141
|
-
outputs:
|
|
142
|
-
- { name: fixed_files, from: "$.files" }
|
|
143
|
-
|
|
144
|
-
- id: build_gate
|
|
145
|
-
action: verify_context
|
|
146
|
-
require_true: build_ok
|
|
147
|
-
on_false: stop
|
|
148
|
-
on_false_message: "Build still failing after 3 fix attempts. Last log: {{build_log}}"
|
|
149
|
-
|
|
150
|
-
# Record what the fix loop touched in the slice's OKF concept. This replaces the retired
|
|
151
|
-
# `design-reconcile` step, which copied on-disk file bodies back into the design doc's
|
|
152
|
-
# path-tagged fences — meaningless now that design.md describes contracts, not code (and
|
|
153
|
-
# a silent no-op for as long as that has been true). The fix loop can CREATE files that
|
|
154
|
-
# implement never recorded, so the knowledge index, not the design prose, is what has to
|
|
155
|
-
# be caught up. UNION (--merge), never replace: fixed_files holds only what this loop
|
|
156
|
-
# touched, while the concept holds the slice's full set.
|
|
157
|
-
#
|
|
158
|
-
# Advisory by design (condition + on_error: continue, no gate): a green build is never
|
|
159
|
-
# failed over its knowledge index — same stance as analyze-slice's OKF pass.
|
|
160
|
-
- id: okf_merge_build_fixes
|
|
161
|
-
action: execute_script
|
|
162
|
-
condition: "{{fixed_files}}"
|
|
163
|
-
on_error: continue
|
|
164
|
-
script: { ref: xref }
|
|
165
|
-
subcommand: concept-upsert
|
|
166
|
-
args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{fixed_files}}", "--merge"]
|
|
167
|
-
outputs:
|
|
168
|
-
- { name: okf_concept, from: "$.concept" }
|
|
169
|
-
|
|
170
|
-
- id: resolve_post_hooks
|
|
171
|
-
action: execute_script
|
|
172
|
-
script: { ref: actions }
|
|
173
|
-
subcommand: resolve-hooks
|
|
174
|
-
args: ["--phase", "after_build"]
|
|
175
|
-
outputs:
|
|
176
|
-
- { name: after_hooks, from: "$.hooks" }
|
|
177
|
-
- id: dispatch_post_hooks
|
|
178
|
-
action: dispatch_hooks
|
|
179
|
-
hooks_from_variable: after_hooks
|
|
180
|
-
|
|
181
|
-
outputs:
|
|
182
|
-
feature_dir: "{{feature_dir}}"
|
|
183
|
-
build_tool: "{{build_tool}}"
|
|
184
|
-
okf_concept: "{{okf_concept}}"
|
|
185
|
-
# Declared in the concept but absent on disk — index drift worth an operator's eye
|
|
186
|
-
# (a file moved or deleted without re-running the owning slice). Advisory, never gated.
|
|
187
|
-
stale_source_files: "{{paths_missing}}"
|
|
188
|
-
next: "/aw-spec-orch analyze-slice"
|