feat: promote draft decisions when creating plans
Promote referenced drafts deterministically with system provenance, causal Plan links, supersession history and recovery from publication failures. Preserve direct human approval and historical records. Add JVM and native regression coverage and update the portable protocol. Record the WRK-0007 importer decision and six-step plan, and complete WRK-0008 with verification evidence.
This commit is contained in:
@@ -92,6 +92,32 @@ grep -q '"valid" : true' validation.json
|
||||
test ! -e .git
|
||||
cd "$aie_fixture"
|
||||
|
||||
# Creating a Plan promotes a draft without a model or direct human attestation.
|
||||
mkdir plan-promotion
|
||||
cd plan-promotion
|
||||
aie_without_git init --name 'Plan Promotion' > init.yaml
|
||||
aie_without_git work create 'Promote decision' > work.yaml
|
||||
aie_without_git decision draft WRK-0001 --title 'Chosen approach' --context 'Problem' \
|
||||
--approach 'Small implementation' --rationale 'Bounded scope' > draft.yaml
|
||||
aie_without_git plan create WRK-0001 --title 'Delivery' --decision DEC-0001 --author requester > plan.yaml
|
||||
aie_without_git decision show WRK-0001 DEC-0001 --format json > promoted.json
|
||||
grep -q '"approvalStatus" : "ACCEPTED"' promoted.json
|
||||
grep -q '"origin" : "SYSTEM_PLAN"' promoted.json
|
||||
grep -q '"humanApproved" : false' promoted.json
|
||||
grep -q '"planId" : "PLN-0001"' promoted.json
|
||||
aie_without_git decision history WRK-0001 DEC-0001 --format json > history.json
|
||||
grep -q '"approvalStatus" : "DRAFT"' history.json
|
||||
grep -q '"approvalStatus" : "ACCEPTED"' history.json
|
||||
cp .ai-engineering/works/WRK-0001-promote-decision/decisions/DEC-0001.md before-second-plan.md
|
||||
aie_without_git plan create WRK-0001 --title 'More delivery' --decision DEC-0001 > second-plan.yaml
|
||||
cmp before-second-plan.md .ai-engineering/works/WRK-0001-promote-decision/decisions/DEC-0001.md
|
||||
aie_without_git work context WRK-0001 --format markdown > context.md
|
||||
grep -q 'SYSTEM_PLAN' context.md
|
||||
aie_without_git project validate > validation.yaml
|
||||
aie_without_git project compatibility --format json > compatibility.json
|
||||
grep -q '"state" : "CURRENT"' compatibility.json
|
||||
cd "$aie_fixture"
|
||||
|
||||
# A single Git repository can contain both the source and protocol workspace.
|
||||
git init -q single
|
||||
cd single
|
||||
|
||||
Reference in New Issue
Block a user