ai-delivery-workflow 0.4.0 → 0.5.1
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/README.md +7 -8
- package/bin/ai-delivery.mjs +2 -24
- package/bin/release-check.mjs +8 -2
- package/docs/CLI-PARAMETER-REFERENCE.zh-CN.md +6 -67
- package/docs/DUAL-REPOSITORY-WORKSPACE.zh-CN.md +14 -1
- package/docs/FILE-REFERENCE.zh-CN.md +17 -36
- package/docs/MAINTENANCE-VERIFICATION.zh-CN.md +2 -2
- package/docs/NPM-RELEASE-MANAGEMENT.zh-CN.md +2 -1
- package/docs/PROJECT-MANUAL.zh-CN.md +50 -43
- package/docs/STATE-CLI-MAINTENANCE.zh-CN.md +8 -10
- package/docs/STATE-CLI-USER-GUIDE.zh-CN.md +7 -17
- package/docs/adr/0006-product-line-candidate-inventory.md +20 -0
- package/docs/agents/domain.md +31 -6
- package/docs/agents/issue-tracker.md +17 -18
- package/docs/agents/triage-labels.md +7 -7
- package/docs/agents/workflow-manager-acceptance-matrix.md +9 -15
- package/docs/agents/workflow-manager-current-state.md +14 -17
- package/lib/delivery-state.mjs +59 -910
- package/lib/fs-utils.mjs +0 -16
- package/lib/npm-auth.mjs +16 -0
- package/lib/project-bootstrap.mjs +21 -58
- package/lib/project-installer.mjs +24 -180
- package/lib/project-repair.mjs +217 -0
- package/lib/toml-hooks.mjs +2 -4
- package/lib/workflow-manager-governance.mjs +3 -47
- package/lib/workspace.mjs +2 -3
- package/package.json +2 -2
- package/skills/ai-delivery-assemble-release/SKILL.md +10 -8
- package/skills/ai-delivery-assemble-release/agents/openai.yaml +3 -3
- package/skills/ai-delivery-assemble-release/assets/release-candidate-manifest.yaml +16 -4
- package/skills/ai-delivery-assemble-release/assets/release-git-plan.yaml +96 -6
- package/skills/ai-delivery-assemble-release/assets/version-inclusion.csv +2 -2
- package/skills/ai-delivery-assemble-release/references/release-assembly-contract.md +16 -2
- package/skills/ai-delivery-assemble-release/scripts/plan-release.mjs +127 -3
- package/skills/ai-delivery-bootstrap/SKILL.md +1 -1
- package/skills/ai-delivery-bootstrap/agents/openai.yaml +3 -3
- package/skills/ai-delivery-bootstrap/references/bootstrap-contract.md +1 -1
- package/skills/ai-delivery-checkpoint-task/SKILL.md +0 -4
- package/skills/ai-delivery-checkpoint-task/agents/openai.yaml +3 -3
- package/skills/ai-delivery-checkpoint-task/references/checkpoint-contract.md +2 -2
- package/skills/ai-delivery-checkpoint-task/scripts/hook-event.mjs +2 -8
- package/skills/ai-delivery-checkpoint-task/scripts/task-state.mjs +26 -46
- package/skills/ai-delivery-close-version/agents/openai.yaml +3 -3
- package/skills/ai-delivery-define-product/agents/openai.yaml +4 -4
- package/skills/ai-delivery-deploy-production/agents/openai.yaml +3 -3
- package/skills/ai-delivery-design-experience/SKILL.md +3 -3
- package/skills/ai-delivery-design-experience/agents/openai.yaml +4 -4
- package/skills/ai-delivery-design-experience/references/experience-contract.md +1 -11
- package/skills/ai-delivery-design-experience/references/prototype-management-contract.md +1 -1
- package/skills/ai-delivery-develop-iteration/agents/openai.yaml +3 -3
- package/skills/ai-delivery-evolve-workflow/agents/openai.yaml +3 -3
- package/skills/ai-delivery-execute-test/agents/openai.yaml +4 -4
- package/skills/ai-delivery-execute-work-package/agents/openai.yaml +4 -4
- package/skills/ai-delivery-manage-git/SKILL.md +9 -7
- package/skills/ai-delivery-manage-git/agents/openai.yaml +3 -3
- package/skills/ai-delivery-manage-git/references/git-policy.md +7 -3
- package/skills/ai-delivery-manage-git/scripts/release-git.mjs +995 -0
- package/skills/ai-delivery-manage-standards/agents/openai.yaml +4 -4
- package/skills/ai-delivery-orchestrate/SKILL.md +5 -7
- package/skills/ai-delivery-orchestrate/agents/openai.yaml +3 -3
- package/skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/hooks/hook-event.mjs +2 -8
- package/skills/ai-delivery-orchestrate/assets/project-template/AGENTS.md +9 -8
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/CONTRIBUTING.md +25 -25
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airbnb/DESIGN.md +545 -545
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airbnb/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airtable/DESIGN.md +554 -554
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airtable/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/apple/DESIGN.md +562 -562
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/apple/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/binance/DESIGN.md +634 -634
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/binance/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw/DESIGN.md +544 -544
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw-m/DESIGN.md +503 -503
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw-m/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bugatti/DESIGN.md +454 -454
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bugatti/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cal/DESIGN.md +542 -542
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cal/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/claude/DESIGN.md +589 -589
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/claude/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clay/DESIGN.md +541 -541
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clay/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clickhouse/DESIGN.md +544 -544
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clickhouse/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cohere/DESIGN.md +451 -451
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cohere/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/coinbase/DESIGN.md +570 -570
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/coinbase/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/composio/DESIGN.md +506 -506
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/composio/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cursor/DESIGN.md +537 -537
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cursor/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/dell-1996/DESIGN.md +632 -632
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/dell-1996/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/elevenlabs/DESIGN.md +504 -504
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/elevenlabs/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/expo/DESIGN.md +526 -526
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/expo/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ferrari/DESIGN.md +531 -531
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ferrari/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/figma/DESIGN.md +578 -578
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/figma/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/framer/DESIGN.md +544 -544
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/framer/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hashicorp/DESIGN.md +575 -575
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hashicorp/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hp/DESIGN.md +670 -670
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hp/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ibm/DESIGN.md +550 -550
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ibm/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/intercom/DESIGN.md +546 -546
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/intercom/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/kraken/DESIGN.md +125 -125
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/kraken/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lamborghini/DESIGN.md +288 -288
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lamborghini/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/linear.app/DESIGN.md +548 -548
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/linear.app/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lovable/DESIGN.md +298 -298
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lovable/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mastercard/DESIGN.md +365 -365
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mastercard/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/meta/DESIGN.md +683 -683
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/meta/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/minimax/DESIGN.md +746 -746
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/minimax/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mintlify/DESIGN.md +852 -852
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mintlify/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/miro/DESIGN.md +825 -825
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/miro/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mistral.ai/DESIGN.md +773 -773
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mistral.ai/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mongodb/DESIGN.md +767 -767
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mongodb/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nike/DESIGN.md +575 -575
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nike/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nintendo-2001/DESIGN.md +649 -649
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nintendo-2001/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/notion/DESIGN.md +821 -821
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/notion/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nvidia/DESIGN.md +640 -640
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nvidia/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ollama/DESIGN.md +539 -539
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ollama/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/opencode.ai/DESIGN.md +521 -521
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/opencode.ai/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/pinterest/DESIGN.md +597 -597
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/pinterest/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/playstation/DESIGN.md +661 -661
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/playstation/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/posthog/DESIGN.md +690 -690
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/posthog/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/raycast/DESIGN.md +669 -669
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/raycast/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/renault/DESIGN.md +589 -589
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/renault/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/replicate/DESIGN.md +616 -616
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/replicate/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/resend/DESIGN.md +585 -585
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/resend/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/revolut/DESIGN.md +636 -636
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/revolut/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/runwayml/DESIGN.md +244 -244
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/runwayml/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sanity/DESIGN.md +357 -357
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sanity/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sentry/DESIGN.md +551 -551
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sentry/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/shopify/DESIGN.md +516 -516
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/shopify/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/slack/DESIGN.md +482 -482
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spacex/DESIGN.md +363 -363
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spacex/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spotify/DESIGN.md +246 -246
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spotify/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/starbucks/DESIGN.md +580 -580
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/starbucks/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/stripe/DESIGN.md +487 -487
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/stripe/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/supabase/DESIGN.md +462 -462
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/supabase/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/superhuman/DESIGN.md +448 -448
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/superhuman/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/tesla/DESIGN.md +286 -286
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/tesla/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/theverge/DESIGN.md +339 -339
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/theverge/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/together.ai/DESIGN.md +633 -633
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/together.ai/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/uber/DESIGN.md +636 -636
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/uber/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vercel/DESIGN.md +736 -736
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vercel/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vodafone/DESIGN.md +538 -538
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vodafone/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/voltagent/DESIGN.md +521 -521
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/voltagent/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/warp/DESIGN.md +526 -526
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/warp/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/webflow/DESIGN.md +588 -588
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/webflow/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wired/DESIGN.md +497 -497
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wired/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wise/DESIGN.md +544 -544
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wise/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/x.ai/DESIGN.md +465 -465
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/x.ai/README.md +5 -5
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/zapier/DESIGN.md +537 -537
- package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/zapier/README.md +5 -5
- package/skills/ai-delivery-orchestrate/references/formal-state-contract.md +11 -20
- package/skills/ai-delivery-orchestrate/references/workflow-model.md +2 -4
- package/skills/ai-delivery-orchestrate-release/SKILL.md +10 -10
- package/skills/ai-delivery-orchestrate-release/agents/openai.yaml +4 -4
- package/skills/ai-delivery-orchestrate-release/assets/release-request.yaml +4 -1
- package/skills/ai-delivery-orchestrate-release/assets/version-selection.yaml +13 -1
- package/skills/ai-delivery-orchestrate-release/references/release-workflow-contract.md +14 -0
- package/skills/ai-delivery-plan-iteration/agents/openai.yaml +4 -4
- package/skills/ai-delivery-prepare-platform/agents/openai.yaml +4 -4
- package/skills/ai-delivery-prepare-release/SKILL.md +6 -5
- package/skills/ai-delivery-prepare-release/agents/openai.yaml +4 -4
- package/skills/ai-delivery-prepare-release/assets/release-template/release-manifest.yaml +21 -2
- package/skills/ai-delivery-prepare-release/references/release-contract.md +5 -1
- package/skills/ai-delivery-review-change/agents/openai.yaml +4 -4
- package/skills/ai-delivery-triage-failure/agents/openai.yaml +4 -4
- package/skills/ai-delivery-validate-artifacts/agents/openai.yaml +4 -4
- package/skills/ai-delivery-verify-candidate/agents/openai.yaml +3 -3
- package/skills/ai-delivery-verify-production/SKILL.md +7 -4
- package/skills/ai-delivery-verify-production/agents/openai.yaml +3 -3
- package/skills/ai-delivery-verify-production/assets/production-verification-template/production-verification.json +9 -0
- package/skills/ai-delivery-verify-production/assets/production-verification-template/production-verification.md +20 -0
- package/skills/ai-delivery-verify-production/references/production-verification-contract.md +19 -3
- package/docs/PROTOTYPE-MIGRATION.zh-CN.md +0 -164
- package/docs/VIEWER-MAINTENANCE.zh-CN.md +0 -150
- package/docs/VIEWER-USER-GUIDE.zh-CN.md +0 -113
- package/lib/project-migration.mjs +0 -1193
- package/lib/prototype-migration.mjs +0 -713
- package/skills/ai-delivery-design-experience/assets/experience-template/LEGACY-COMPATIBILITY.md +0 -16
- package/skills/ai-delivery-design-experience/assets/experience-template/canvas-catalog.csv +0 -1
- package/skills/ai-delivery-design-experience/assets/experience-template/canvas-pages.csv +0 -1
- package/skills/ai-delivery-design-experience/assets/experience-template/page-catalog.csv +0 -1
- package/skills/ai-delivery-design-experience/assets/experience-template/prototype-file-terminals.csv +0 -1
- package/skills/ai-delivery-design-experience/assets/experience-template/prototype-files.csv +0 -1
- package/skills/ai-delivery-design-experience/assets/experience-template/prototype-manifest.yaml +0 -76
- package/skills/ai-delivery-design-experience/assets/experience-template/prototype-set.yaml +0 -24
|
@@ -69,6 +69,7 @@ function repositoriesFromWorkspace(workspaceRoot) {
|
|
|
69
69
|
codeRepo,
|
|
70
70
|
workflowRepo: root,
|
|
71
71
|
repoId,
|
|
72
|
+
productionBranch: value(codeSection, "default_branch") || "main",
|
|
72
73
|
codeRemote: value(codeSection, "remote"),
|
|
73
74
|
workflowRemote: value(workflowSection, "remote"),
|
|
74
75
|
};
|
|
@@ -134,6 +135,72 @@ function validateRemoteTag(remote, tag, expectedCommit) {
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
function validateRemoteBranch(remote, branch, expectedCommit) {
|
|
139
|
+
if (!remote) return;
|
|
140
|
+
const reference = `refs/heads/${branch}`;
|
|
141
|
+
const result = spawnSync("git", ["ls-remote", "--heads", remote, reference], {
|
|
142
|
+
encoding: "utf8",
|
|
143
|
+
windowsHide: true,
|
|
144
|
+
});
|
|
145
|
+
if (result.status !== 0) {
|
|
146
|
+
throw new Error(`Remote branch validation failed for ${branch}: ${result.stderr.trim()}`);
|
|
147
|
+
}
|
|
148
|
+
const commits = result.stdout.split(/\r?\n/).filter(Boolean).map((line) => line.split(/\s+/)[0].toLowerCase());
|
|
149
|
+
if (!commits.length) throw new Error(`Remote is missing production branch ${branch}: ${remote}`);
|
|
150
|
+
if (!commits.includes(expectedCommit.toLowerCase())) {
|
|
151
|
+
throw new Error(
|
|
152
|
+
`Remote production branch ${branch} drifted from the captured main commit ${expectedCommit}; refresh the release request.`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function validateReleaseBase(repo, branch, currentProduction, remote) {
|
|
158
|
+
const reference = `refs/heads/${branch}`;
|
|
159
|
+
const commit = git(repo, ["rev-parse", "--verify", `${reference}^{commit}`]);
|
|
160
|
+
validateRemoteBranch(remote, branch, commit);
|
|
161
|
+
if (currentProduction) {
|
|
162
|
+
const result = spawnSync(
|
|
163
|
+
"git",
|
|
164
|
+
["merge-base", "--is-ancestor", currentProduction.candidate_commit, commit],
|
|
165
|
+
{ cwd: repo, encoding: "utf8", windowsHide: true },
|
|
166
|
+
);
|
|
167
|
+
if (result.status !== 0) {
|
|
168
|
+
throw new Error(
|
|
169
|
+
`Production branch ${branch} is not descended from current production ${currentProduction.version_id}; refusing a divergent release base.`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return commit;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function validateTargetContainsReleaseBase(repo, branch, releaseBase, target) {
|
|
177
|
+
if (releaseBase.toLowerCase() === String(target.candidate_commit).toLowerCase()) {
|
|
178
|
+
throw new Error(
|
|
179
|
+
`Target ${target.version_ready_tag} equals captured production branch ${branch} commit ${releaseBase}; an incremental release target must strictly descend from the R00 main snapshot.`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
const targetAlreadyReachable = spawnSync(
|
|
183
|
+
"git",
|
|
184
|
+
["merge-base", "--is-ancestor", target.candidate_commit, releaseBase],
|
|
185
|
+
{ cwd: repo, encoding: "utf8", windowsHide: true },
|
|
186
|
+
);
|
|
187
|
+
if (targetAlreadyReachable.status === 0) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
`Target ${target.version_ready_tag} is already reachable from captured production branch ${branch} commit ${releaseBase}; an incremental release target must strictly descend from the R00 main snapshot.`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
const result = spawnSync(
|
|
193
|
+
"git",
|
|
194
|
+
["merge-base", "--is-ancestor", releaseBase, target.candidate_commit],
|
|
195
|
+
{ cwd: repo, encoding: "utf8", windowsHide: true },
|
|
196
|
+
);
|
|
197
|
+
if (result.status !== 0) {
|
|
198
|
+
throw new Error(
|
|
199
|
+
`Captured production branch ${branch} commit ${releaseBase} is not an ancestor of target ${target.version_ready_tag}; recreate the version candidate before release.`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
137
204
|
function validateAdjacentAncestry(repo, selected, currentProduction, commitField, label) {
|
|
138
205
|
const chain = currentProduction
|
|
139
206
|
? [currentProduction, ...selected.filter((version) => version.version_id !== currentProduction.version_id)]
|
|
@@ -199,9 +266,21 @@ export function planRelease(lineage, request, options = {}) {
|
|
|
199
266
|
}
|
|
200
267
|
|
|
201
268
|
const target = ordered[targetIndex];
|
|
269
|
+
const sameVersionRedeploy = targetIndex === currentIndex;
|
|
202
270
|
const newlyIncluded = ordered.slice(currentIndex + 1, targetIndex + 1);
|
|
203
|
-
const releaseEvidence =
|
|
271
|
+
const releaseEvidence = sameVersionRedeploy ? [target] : newlyIncluded;
|
|
204
272
|
const dependencyClosure = ordered.slice(0, targetIndex + 1);
|
|
273
|
+
const productionBranch = options.productionBranch || "main";
|
|
274
|
+
const currentProduction = currentIndex < 0 ? null : ordered[currentIndex];
|
|
275
|
+
let releaseBaseCommit = null;
|
|
276
|
+
if (!sameVersionRedeploy
|
|
277
|
+
&& currentProduction?.candidate_commit
|
|
278
|
+
&& target.candidate_commit
|
|
279
|
+
&& String(currentProduction.candidate_commit).toLowerCase() === String(target.candidate_commit).toLowerCase()) {
|
|
280
|
+
throw new Error(
|
|
281
|
+
`Incremental target ${target.version_id} reuses current production ${currentProduction.version_id} candidate commit; use same-version redeploy instead.`,
|
|
282
|
+
);
|
|
283
|
+
}
|
|
205
284
|
for (const version of releaseEvidence) {
|
|
206
285
|
if (!ELIGIBLE_STATUSES.has(version.status)) {
|
|
207
286
|
throw new Error(`Version ${version.version_id} is not eligible for release: ${version.status || "missing status"}.`);
|
|
@@ -221,6 +300,20 @@ export function planRelease(lineage, request, options = {}) {
|
|
|
221
300
|
}
|
|
222
301
|
|
|
223
302
|
if (!options.skipGit) {
|
|
303
|
+
releaseBaseCommit = validateReleaseBase(
|
|
304
|
+
path.resolve(options.repo || process.cwd()),
|
|
305
|
+
productionBranch,
|
|
306
|
+
currentProduction,
|
|
307
|
+
options.codeRemote || null,
|
|
308
|
+
);
|
|
309
|
+
if (!sameVersionRedeploy) {
|
|
310
|
+
validateTargetContainsReleaseBase(
|
|
311
|
+
path.resolve(options.repo || process.cwd()),
|
|
312
|
+
productionBranch,
|
|
313
|
+
releaseBaseCommit,
|
|
314
|
+
target,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
224
317
|
validateGit(
|
|
225
318
|
path.resolve(options.repo || process.cwd()),
|
|
226
319
|
dependencyClosure,
|
|
@@ -244,7 +337,7 @@ export function planRelease(lineage, request, options = {}) {
|
|
|
244
337
|
target_environment: "production",
|
|
245
338
|
current_production_version: currentId,
|
|
246
339
|
target_version: target.version_id,
|
|
247
|
-
mode:
|
|
340
|
+
mode: sameVersionRedeploy ? "same-version-redeploy" : "incremental",
|
|
248
341
|
newly_included_versions: newlyIncluded.map((version) => version.version_id),
|
|
249
342
|
dependency_closure: dependencyClosure.map((version) => version.version_id),
|
|
250
343
|
target: {
|
|
@@ -262,6 +355,29 @@ export function planRelease(lineage, request, options = {}) {
|
|
|
262
355
|
requires_fresh_verification: true,
|
|
263
356
|
requires_fresh_approval: true,
|
|
264
357
|
rollback_strategy: "previous-immutable-image-digest",
|
|
358
|
+
release_base: {
|
|
359
|
+
branch: productionBranch,
|
|
360
|
+
commit: releaseBaseCommit,
|
|
361
|
+
status: releaseBaseCommit ? "captured" : "pending-git-validation",
|
|
362
|
+
target_relation: sameVersionRedeploy
|
|
363
|
+
? "target-already-in-release-base"
|
|
364
|
+
: "target-must-descend-from-release-base",
|
|
365
|
+
},
|
|
366
|
+
release_merge: {
|
|
367
|
+
strategy: sameVersionRedeploy ? "target-already-in-release-base" : "no-ff-single-version-ready-tag",
|
|
368
|
+
source_tag: target.version_ready_tag,
|
|
369
|
+
source_commit: target.candidate_commit,
|
|
370
|
+
merge_commit: null,
|
|
371
|
+
merge_created: !sameVersionRedeploy,
|
|
372
|
+
status: "pending-controlled-git-operation",
|
|
373
|
+
},
|
|
374
|
+
release_candidate: {
|
|
375
|
+
commit: sameVersionRedeploy ? releaseBaseCommit : null,
|
|
376
|
+
identity_source: sameVersionRedeploy
|
|
377
|
+
? "release-base-when-target-already-reachable"
|
|
378
|
+
: "release-branch-head-after-merge",
|
|
379
|
+
status: "pending-controlled-git-operation",
|
|
380
|
+
},
|
|
265
381
|
};
|
|
266
382
|
}
|
|
267
383
|
|
|
@@ -270,7 +386,14 @@ function main(argv) {
|
|
|
270
386
|
const lineageFile = path.resolve(required(options, "--lineage"));
|
|
271
387
|
const configured = options.get("--workspace")
|
|
272
388
|
? repositoriesFromWorkspace(options.get("--workspace"))
|
|
273
|
-
: {
|
|
389
|
+
: {
|
|
390
|
+
codeRepo: process.cwd(),
|
|
391
|
+
workflowRepo: process.cwd(),
|
|
392
|
+
repoId: null,
|
|
393
|
+
productionBranch: "main",
|
|
394
|
+
codeRemote: null,
|
|
395
|
+
workflowRemote: null,
|
|
396
|
+
};
|
|
274
397
|
const result = planRelease(readLineage(lineageFile), {
|
|
275
398
|
release_id: required(options, "--release-id"),
|
|
276
399
|
target_version: required(options, "--target"),
|
|
@@ -280,6 +403,7 @@ function main(argv) {
|
|
|
280
403
|
repo: options.get("--repo") || configured.codeRepo,
|
|
281
404
|
workflowRepo: options.get("--workflow-repo") || configured.workflowRepo,
|
|
282
405
|
repoId: configured.repoId,
|
|
406
|
+
productionBranch: options.get("--production-branch") || configured.productionBranch || "main",
|
|
283
407
|
codeRemote: configured.codeRemote,
|
|
284
408
|
workflowRemote: configured.workflowRemote,
|
|
285
409
|
skipGit: options.get("--skip-git") === true,
|
|
@@ -44,7 +44,7 @@ The first product question is the safe stopping point. Do not invent the initial
|
|
|
44
44
|
- `codebase-uninitialized`: use packaged `ai-delivery bootstrap`, review the repository baseline, inventory, context index, and adoption assessment, then invoke `$ai-delivery-define-product` to distinguish observed behavior from intended product behavior.
|
|
45
45
|
- `workflow-interrupted`: do not write bootstrap artifacts. If `runtime.next_action_owner` is `user`, return the recorded `next_action` as the single business question and perform no recovery, activation, checkpoint, task, artifact, or Git mutation. If it is `external`, report the recorded wait condition without mutation. Only an `agent`-owned next action may invoke `$ai-delivery-checkpoint-task recover`, reconcile reality, inspect the pending Evolution queue without applying changes mid-task, and continue `recommended_task_id`. When required input arrives, transfer ownership with both `--next-action-owner agent` and a new idempotent `--next-action`.
|
|
46
46
|
- `workflow-ready`: when a queued task is recommended, first apply the same `next_action_owner` boundary; activate it through `$ai-delivery-checkpoint-task` only when the owner is `agent`. Otherwise use the reported specialist skill or `$ai-delivery-orchestrate` to derive the next development node. Treat `release-ready` versions as completed development evidence, not implicit release intent. Route to `$ai-delivery-orchestrate-release` only when the user explicitly requests a release.
|
|
47
|
-
- `workflow-inconsistent`: stop automatic mutation, run the available project/package doctor internally, report exact conflicts, and obtain
|
|
47
|
+
- `workflow-inconsistent`: stop automatic mutation, run the available project/package doctor internally, report exact conflicts, and obtain an explicit repair decision. Use `upgrade --dry-run` for current managed installation drift; malformed current state, missing anchors, archive conflicts, and checksum drift fail closed until repaired through the governed current-state interface. Use `upgrade --force` only when the user explicitly approves replacing the reported managed files.
|
|
48
48
|
|
|
49
49
|
## Brownfield Rules
|
|
50
50
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Bootstrap AI Delivery"
|
|
3
|
-
short_description: "Inspect project state and route the next workflow action"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Bootstrap AI Delivery"
|
|
3
|
+
short_description: "Inspect project state and route the next workflow action"
|
|
4
4
|
default_prompt: "Use $ai-delivery-bootstrap to inspect the dual-repository workspace, recover shared checkpoints, or initialize the minimum delivery context."
|
|
@@ -28,7 +28,7 @@ After installation, `node .workflow/tools/bootstrap/bootstrap.mjs inspect` is th
|
|
|
28
28
|
|
|
29
29
|
`ai-delivery bootstrap <project-root>` may initialize only `empty-uninitialized` and `codebase-uninitialized` projects through the project-scoped installer. Preserve existing code and configuration. On partial or conflicting installation, return `workflow-inconsistent` without writes. `--force` is allowed only after explicit user approval.
|
|
30
30
|
|
|
31
|
-
For an installed
|
|
31
|
+
For an installed or conflicting state, keep Bootstrap read-only and return `workflow-inconsistent` with the failing path and remediation. Use the packaged `repair --invalidate-archive` forward transaction only for an explicitly identified archive integrity defect; it records a human actor, reason, RCA evidence, and recovery evidence without rewriting immutable history.
|
|
32
32
|
|
|
33
33
|
For an uninitialized project, generate repository inventory and context artifacts from the first read-only scan snapshot. Do not let installer-generated `AGENTS.md`, `.gitignore`, Hook, skill, standard, or delivery files contaminate the observed pre-install codebase baseline.
|
|
34
34
|
|
|
@@ -11,10 +11,6 @@ Treat explicit task snapshots as authoritative. Treat Hook events as an audit tr
|
|
|
11
11
|
|
|
12
12
|
Write portable task state to `.workflow/control/tasks/<task-id>.yaml` and `.workflow/control/checkpoints/<task-id>/<checkpoint-id>.yaml`. Keep only PID, heartbeat, temporary locks, raw Hook events, and unshared context under ignored `.workflow/delivery/runtime/`. Keep durable node documents under `.workflow/iterations/<iteration-id>/<node-id>/`; runtime snapshots never replace registered delivery artifacts. Resolve code branch and commit from `.workflow/config/workspace.yaml` and the nested code repository.
|
|
13
13
|
|
|
14
|
-
## Legacy Node Boundary
|
|
15
|
-
|
|
16
|
-
Legacy development nodes are read-only compatibility. `inspect` remains a strictly read-only diagnosis path for historical tasks. `init`, `activate`, `checkpoint`, `finish`, and `archive-version` reject legacy task targets before mutation or Hook dispatch; `recover` refuses to materialize them and `publish` refuses to share them. New tasks use only the `development-seven-node` route, while `R00-release-request` through `R10-release-archive` remain writable.
|
|
17
|
-
|
|
18
14
|
## Start Or Resume
|
|
19
15
|
|
|
20
16
|
1. Locate the project root and shared state root.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Checkpoint Delivery Task"
|
|
3
|
-
short_description: "Persist task checkpoints, hook events, and resume context"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Checkpoint Delivery Task"
|
|
3
|
+
short_description: "Persist task checkpoints, hook events, and resume context"
|
|
4
4
|
default_prompt: "Use $ai-delivery-checkpoint-task to start, checkpoint, publish, finish, or recover a shared delivery task."
|
|
@@ -34,7 +34,7 @@ Keep `.workflow/delivery/runtime/` local and ignored. Persist durable stage outp
|
|
|
34
34
|
|
|
35
35
|
`task-state.mjs` is the only runtime-state writer. Do not directly edit task JSON, checkpoint JSON, active-task markers, recovery output, or archive indexes. Formal workflow and artifact state belong to `.workflow/tools/state/state.mjs`; do not edit its YAML or JSONL streams directly.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Task contracts use the current `development-seven-node` route or the independent `R00-release-request` through `R10-release-archive` release route. `inspect` is read-only diagnosis; `init`, `activate`, `checkpoint`, `finish`, `recover`, `archive-version`, and `publish` operate only on current task contracts.
|
|
38
38
|
|
|
39
39
|
When the installed Evolution CLI exists, `init`, `activate`, `checkpoint`, `finish`, and `archive-version` emit idempotent schema 1 `task.before`, `task.after`, and `task.failed` events. An approved blocking `task.before` result stops the task command before mutation. Hook dispatch failures otherwise fail open as warnings and never replace checkpoint state as the completion authority.
|
|
40
40
|
|
|
@@ -75,7 +75,7 @@ For an installed dual-repository project, `task-state.mjs` resolves `code_branch
|
|
|
75
75
|
|
|
76
76
|
`blockers` represents current unresolved blockers. A `blocked` update replaces that list; any transition to another status clears it. Historical blocker text remains available in prior checkpoints and events.
|
|
77
77
|
|
|
78
|
-
`next_action_owner` is required in persisted state and has exactly three values: `agent`, `user`, or `external`;
|
|
78
|
+
`next_action_owner` is required in persisted state and has exactly three values: `agent`, `user`, or `external`; explicit null, empty, boolean, numeric, or unknown values are invalid. `user` and `external` are zero-mutation wait states. `recover` may report shared wait state but must not hydrate local task or resume files for it. After the required input arrives, `activate` requires both `--next-action-owner agent` and a new idempotent `--next-action`; it may atomically hydrate a missing local runtime snapshot from the matching shared shard and transfer ownership in the same transition. Same-revision local and shared content must have identical semantic checksums. Evidence arrays are ordered sets: replaying an already recorded `--evidence` value does not append a duplicate.
|
|
79
79
|
|
|
80
80
|
Pass `--state-root` when worktrees must write to one shared primary state directory. Pass `--worktree` during init so the script writes a local `.workflow/delivery/runtime/active-task.json` marker pointing to that state root. Later `checkpoint`, `finish`, and `recover` commands automatically use the marker's shared state root.
|
|
81
81
|
|
|
@@ -144,15 +144,9 @@ function enforceFrontendGuard(projectRoot, input) {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
try {
|
|
147
|
-
const
|
|
148
|
-
const legacyProjectFile = currentProjectFile
|
|
149
|
-
? null
|
|
150
|
-
: findUp(process.cwd(), path.join("delivery", "project.yaml"));
|
|
151
|
-
const projectFile = currentProjectFile || legacyProjectFile;
|
|
147
|
+
const projectFile = findUp(process.cwd(), path.join(".workflow", "delivery", "project.yaml"));
|
|
152
148
|
if (!projectFile) process.exit(0);
|
|
153
|
-
const projectRoot =
|
|
154
|
-
? path.dirname(path.dirname(path.dirname(projectFile)))
|
|
155
|
-
: path.dirname(path.dirname(projectFile));
|
|
149
|
+
const projectRoot = path.dirname(path.dirname(path.dirname(projectFile)));
|
|
156
150
|
const markerFile = path.join(projectRoot, ".workflow", "delivery", "runtime", "active-task.json");
|
|
157
151
|
const marker = fs.existsSync(markerFile) ? JSON.parse(fs.readFileSync(markerFile, "utf8")) : null;
|
|
158
152
|
const raw = await readStdin();
|
|
@@ -42,19 +42,13 @@ const REPEATABLE_ARGS = new Set([
|
|
|
42
42
|
"completed-step", "blocker", "evidence", "depends-on", "acceptance", "finding-json",
|
|
43
43
|
"change-set-json",
|
|
44
44
|
]);
|
|
45
|
-
const
|
|
46
|
-
"01-product-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"07-iteration-planning",
|
|
53
|
-
"08-test-design",
|
|
54
|
-
"09-development",
|
|
55
|
-
"10-change-review",
|
|
56
|
-
"11-candidate-verification",
|
|
57
|
-
"12-version-closeout",
|
|
45
|
+
const VALID_NODE_IDS = new Set([
|
|
46
|
+
"00-bootstrap", "01-product-shaping", "02-solution-design", "03-delivery-readiness",
|
|
47
|
+
"04-implementation", "05-candidate-assurance", "06-version-closeout",
|
|
48
|
+
"R00-release-request", "R01-version-selection", "R02-release-eligibility", "R03-material-aggregation",
|
|
49
|
+
"R04-release-candidate", "R05-release-verification", "R06-release-preparation", "R07-production-approval",
|
|
50
|
+
"R08-production-deployment", "R09-production-verification", "R10-release-archive",
|
|
51
|
+
"development", "implementation", "planning", "test", "review",
|
|
58
52
|
]);
|
|
59
53
|
|
|
60
54
|
function parseArgs(argv) {
|
|
@@ -83,10 +77,8 @@ function requireValue(args, key) {
|
|
|
83
77
|
return value;
|
|
84
78
|
}
|
|
85
79
|
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
88
|
-
throw new Error(`Legacy workflow node is read-only: ${node}`);
|
|
89
|
-
}
|
|
80
|
+
function assertCurrentNode(node) {
|
|
81
|
+
if (!VALID_NODE_IDS.has(node)) throw new Error(`Unsupported workflow node: ${node}`);
|
|
90
82
|
return node;
|
|
91
83
|
}
|
|
92
84
|
|
|
@@ -720,7 +712,7 @@ function repairChangesSinceBaseline(workflowRoot, baseline) {
|
|
|
720
712
|
}
|
|
721
713
|
|
|
722
714
|
function writeSharedTask(runtime, workflowRoot, task) {
|
|
723
|
-
|
|
715
|
+
assertCurrentNode(task.node);
|
|
724
716
|
const sharedFile = sharedTaskFile(workflowRoot, task.task_id);
|
|
725
717
|
let previousRevision = 0;
|
|
726
718
|
if (fs.existsSync(sharedFile)) {
|
|
@@ -786,25 +778,15 @@ function normalizeTask(task) {
|
|
|
786
778
|
task[key] = [...new Set(task[key])];
|
|
787
779
|
}
|
|
788
780
|
task.sequence = parseSequence(task.sequence);
|
|
789
|
-
task.next_action_owner = parseNextActionOwner(task.next_action_owner);
|
|
790
|
-
task.responsibility
|
|
781
|
+
task.next_action_owner = parseNextActionOwner(task.next_action_owner, undefined);
|
|
782
|
+
if (!task.responsibility) throw new Error(`Task ${task.task_id || "unknown"} is missing responsibility.`);
|
|
791
783
|
task.derived_from = task.derived_from || null;
|
|
792
784
|
task.supersedes = task.supersedes || null;
|
|
793
|
-
if (!Array.isArray(task.attempts)) {
|
|
794
|
-
|
|
795
|
-
task.attempts = legacyNumber > 0 && (task.started_at || task.status !== "queued")
|
|
796
|
-
? [normalizeAttempt(task.task_id, {
|
|
797
|
-
number: legacyNumber,
|
|
798
|
-
status: projectedTaskStatus(task.status, "attempt"),
|
|
799
|
-
started_at: task.started_at || task.created_at || null,
|
|
800
|
-
finished_at: CLOSED_STATUS.has(task.status) ? task.finished_at || task.updated_at || null : null,
|
|
801
|
-
}, legacyNumber)]
|
|
802
|
-
: [];
|
|
803
|
-
} else {
|
|
804
|
-
task.attempts = task.attempts.map((attempt, index) => normalizeAttempt(task.task_id, attempt, index + 1));
|
|
785
|
+
if (Object.prototype.hasOwnProperty.call(task, "attempt") || !Array.isArray(task.attempts)) {
|
|
786
|
+
throw new Error(`Task ${task.task_id || "unknown"} must use canonical attempts.`);
|
|
805
787
|
}
|
|
788
|
+
task.attempts = task.attempts.map((attempt, index) => normalizeAttempt(task.task_id, attempt, index + 1));
|
|
806
789
|
task.change_sets = Array.isArray(task.change_sets) ? task.change_sets.map((item) => normalizeChangeSet(item)) : [];
|
|
807
|
-
task.attempt = task.attempts.at(-1)?.number || 0;
|
|
808
790
|
return task;
|
|
809
791
|
}
|
|
810
792
|
|
|
@@ -852,7 +834,6 @@ function startAttempt(task, phase, timestamp) {
|
|
|
852
834
|
time_entries: [],
|
|
853
835
|
}, number);
|
|
854
836
|
task.attempts.push(attempt);
|
|
855
|
-
task.attempt = number;
|
|
856
837
|
return attempt;
|
|
857
838
|
}
|
|
858
839
|
|
|
@@ -1379,7 +1360,7 @@ function summarizeIteration(tasks, iterationId) {
|
|
|
1379
1360
|
function commandInit(args) {
|
|
1380
1361
|
const taskId = sanitizeId(requireValue(args, "task-id"));
|
|
1381
1362
|
const iterationId = sanitizeId(requireValue(args, "iteration-id"));
|
|
1382
|
-
const node =
|
|
1363
|
+
const node = assertCurrentNode(requireValue(args, "node"));
|
|
1383
1364
|
const { projectRoot, stateRoot, workflowRoot, runtime } = statePaths(args);
|
|
1384
1365
|
return withTaskLock(runtime, `version.${iterationId}`, () => withTaskLock(runtime, taskId, () => {
|
|
1385
1366
|
if (fs.existsSync(archivedTaskIndexFile(runtime, taskId))) {
|
|
@@ -1424,6 +1405,7 @@ function commandInit(args) {
|
|
|
1424
1405
|
const candidateContract = normalizeTask({
|
|
1425
1406
|
...(existing || {}),
|
|
1426
1407
|
...contractFields,
|
|
1408
|
+
attempts: existing?.attempts || [],
|
|
1427
1409
|
next_action_owner: existing?.next_action_owner || "agent",
|
|
1428
1410
|
});
|
|
1429
1411
|
if (existing) {
|
|
@@ -1459,7 +1441,6 @@ function commandInit(args) {
|
|
|
1459
1441
|
...contractFields,
|
|
1460
1442
|
status,
|
|
1461
1443
|
sequence: parseSequence(args.sequence ?? existing?.sequence),
|
|
1462
|
-
attempt: 0,
|
|
1463
1444
|
attempts: [],
|
|
1464
1445
|
change_sets: [],
|
|
1465
1446
|
input_artifacts: args["input-artifact"] || existing?.input_artifacts || [],
|
|
@@ -1486,7 +1467,7 @@ function commandInit(args) {
|
|
|
1486
1467
|
clearTaskMarker(task);
|
|
1487
1468
|
appendEvent(runtime, taskId, "task-initialized", {
|
|
1488
1469
|
status: task.status,
|
|
1489
|
-
|
|
1470
|
+
attempt_count: task.attempts.length,
|
|
1490
1471
|
derived_from: task.derived_from,
|
|
1491
1472
|
supersedes: task.supersedes,
|
|
1492
1473
|
});
|
|
@@ -1557,7 +1538,6 @@ function commandActivate(args) {
|
|
|
1557
1538
|
phase.status = "active";
|
|
1558
1539
|
phase.finished_at = null;
|
|
1559
1540
|
}
|
|
1560
|
-
task.attempt = attempt.number;
|
|
1561
1541
|
task.started_at ||= timestamp;
|
|
1562
1542
|
task.updated_at = timestamp;
|
|
1563
1543
|
task.finished_at = null;
|
|
@@ -1573,7 +1553,7 @@ function commandActivate(args) {
|
|
|
1573
1553
|
});
|
|
1574
1554
|
appendEvent(runtime, taskId, "task-activated", {
|
|
1575
1555
|
status,
|
|
1576
|
-
|
|
1556
|
+
attempt_count: task.attempts.length,
|
|
1577
1557
|
attempt_id: attempt.attempt_id,
|
|
1578
1558
|
phase: attempt.phases.at(-1)?.phase || null,
|
|
1579
1559
|
new_attempt: newAttempt,
|
|
@@ -1627,7 +1607,7 @@ function commandUpdate(args, finish = false) {
|
|
|
1627
1607
|
writeResume(runtime, task);
|
|
1628
1608
|
appendEvent(runtime, taskId, finish ? "task-finished" : "task-checkpointed", {
|
|
1629
1609
|
status,
|
|
1630
|
-
|
|
1610
|
+
attempt_number: attempt.number,
|
|
1631
1611
|
attempt_id: attempt.attempt_id,
|
|
1632
1612
|
phase: attempt.phases.at(-1)?.phase || null,
|
|
1633
1613
|
});
|
|
@@ -1696,7 +1676,7 @@ function commandArchiveVersion(args) {
|
|
|
1696
1676
|
.map((name) => normalizeTask(JSON.parse(fs.readFileSync(path.join(tasksDir, name), "utf8"))))
|
|
1697
1677
|
.filter((task) => task.iteration_id === iterationId);
|
|
1698
1678
|
if (!tasks.length) throw new Error(`No tasks found for version: ${iterationId}`);
|
|
1699
|
-
for (const task of tasks)
|
|
1679
|
+
for (const task of tasks) assertCurrentNode(task.node);
|
|
1700
1680
|
const sharedById = new Map(readSharedTasks(workflowRoot, stateRoot).map((task) => [task.task_id, task]));
|
|
1701
1681
|
for (const task of tasks) {
|
|
1702
1682
|
const shared = sharedById.get(task.task_id);
|
|
@@ -1795,7 +1775,7 @@ function commandRecover(args) {
|
|
|
1795
1775
|
const reportableTasks = selectedTasks
|
|
1796
1776
|
.filter((task) => !requested || task.task_id === requested)
|
|
1797
1777
|
.filter((task) => includeClosed || !RECOVERY_COMPLETE_STATUS.has(task.status));
|
|
1798
|
-
for (const task of reportableTasks)
|
|
1778
|
+
for (const task of reportableTasks) assertCurrentNode(task.node);
|
|
1799
1779
|
for (const task of reportableTasks) {
|
|
1800
1780
|
if (missingLocalTaskIds.has(task.task_id)) atomicWrite(taskFile(runtime, task.task_id), task);
|
|
1801
1781
|
}
|
|
@@ -1853,7 +1833,7 @@ function commandPublish(args) {
|
|
|
1853
1833
|
const checkpointDirectory = path.join(workflowRoot, "control", "checkpoints", taskId);
|
|
1854
1834
|
if (!fs.existsSync(sharedFile)) throw new Error(`Shared task state not found: ${taskId}`);
|
|
1855
1835
|
const shared = JSON.parse(fs.readFileSync(sharedFile, "utf8"));
|
|
1856
|
-
|
|
1836
|
+
assertCurrentNode(shared.node);
|
|
1857
1837
|
|
|
1858
1838
|
const repository = gitState(stateRoot);
|
|
1859
1839
|
if (!repository.repository || path.resolve(repository.root).toLowerCase() !== path.resolve(stateRoot).toLowerCase()) {
|
|
@@ -1978,7 +1958,7 @@ function assertWritableEvolutionTarget(args, command) {
|
|
|
1978
1958
|
if (!new Set(["init", "activate", "checkpoint", "finish", "archive-version"]).has(command)) return;
|
|
1979
1959
|
if (command === "init") {
|
|
1980
1960
|
const node = args.node && args.node !== true ? String(args.node) : null;
|
|
1981
|
-
if (node)
|
|
1961
|
+
if (node) assertCurrentNode(node);
|
|
1982
1962
|
return;
|
|
1983
1963
|
}
|
|
1984
1964
|
const { runtime, workflowRoot, stateRoot } = statePaths(args);
|
|
@@ -1990,14 +1970,14 @@ function assertWritableEvolutionTarget(args, command) {
|
|
|
1990
1970
|
if (!iterationId || !fs.existsSync(tasksDir)) return;
|
|
1991
1971
|
for (const name of fs.readdirSync(tasksDir).filter((item) => item.endsWith(".json"))) {
|
|
1992
1972
|
const task = normalizeTask(JSON.parse(fs.readFileSync(path.join(tasksDir, name), "utf8")));
|
|
1993
|
-
if (task.iteration_id === iterationId)
|
|
1973
|
+
if (task.iteration_id === iterationId) assertCurrentNode(task.node);
|
|
1994
1974
|
}
|
|
1995
1975
|
return;
|
|
1996
1976
|
}
|
|
1997
1977
|
const taskId = args["task-id"] && args["task-id"] !== true ? sanitizeId(args["task-id"]) : null;
|
|
1998
1978
|
if (!taskId) return;
|
|
1999
1979
|
const task = taskSources(runtime, workflowRoot, stateRoot, taskId).task;
|
|
2000
|
-
if (task)
|
|
1980
|
+
if (task) assertCurrentNode(task.node);
|
|
2001
1981
|
}
|
|
2002
1982
|
|
|
2003
1983
|
function dispatchTaskEvolution(context, phase, result = null, error = null) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Close Planned Version"
|
|
3
|
-
short_description: "Freeze a verified version as release-ready"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Close Planned Version"
|
|
3
|
+
short_description: "Freeze a verified version as release-ready"
|
|
4
4
|
default_prompt: "Use $ai-delivery-close-version to bind code Tag, workflow Tag, and manifest checksum without publishing."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Define Product"
|
|
3
|
-
short_description: "Discover requirements and produce an approved product baseline"
|
|
4
|
-
default_prompt: "Use $ai-delivery-define-product to discover and define the product baseline."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Define Product"
|
|
3
|
+
short_description: "Discover requirements and produce an approved product baseline"
|
|
4
|
+
default_prompt: "Use $ai-delivery-define-product to discover and define the product baseline."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Deploy Production"
|
|
3
|
-
short_description: "Deploy one approved immutable iteration version to production"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Deploy Production"
|
|
3
|
+
short_description: "Deploy one approved immutable iteration version to production"
|
|
4
4
|
default_prompt: "Use $ai-delivery-deploy-production to deploy the approved immutable package and record facts in the workflow repository."
|
|
@@ -25,7 +25,7 @@ This Skill shares `02-solution-design` with `$ai-delivery-design-architecture`.
|
|
|
25
25
|
|
|
26
26
|
Read the approved product baseline, terminal and feature catalogs, initial architecture baseline, major-decision approval receipt or explicit not-required assessment, applicable design standards, and existing experience baseline. Verify all input versions and checksums. Return missing terminal scope or feature behavior to product definition; refuse to prototype from unapproved major architecture decisions.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Require the current `prototype.yaml`, v2 catalogs, isolated source tree, and Review Shell before authoring. A missing current catalog or checksum is a failed preflight; repair the current Prototype package before continuing.
|
|
29
29
|
|
|
30
30
|
## Workflow
|
|
31
31
|
|
|
@@ -68,10 +68,10 @@ Tool selection, visual-system/framework approval, formal-UI approval, and final
|
|
|
68
68
|
- `feature-screen-coverage.csv` mapping feature ID, terminal ID, flow ID, screen ID, and state ID;
|
|
69
69
|
- versioned experience baseline and unresolved technical questions.
|
|
70
70
|
|
|
71
|
-
Read [experience-contract.md](references/experience-contract.md) for handoff identity and [prototype-management-contract.md](references/prototype-management-contract.md) for tool, terminal, Page, Review Scene, route, UI Mapping, and review rules. Use `assets/experience-template/` for all controlled templates
|
|
71
|
+
Read [experience-contract.md](references/experience-contract.md) for handoff identity and [prototype-management-contract.md](references/prototype-management-contract.md) for tool, terminal, Page, Review Scene, route, UI Mapping, and review rules. Use `assets/experience-template/` for all controlled templates.
|
|
72
72
|
|
|
73
73
|
## Handoff
|
|
74
74
|
|
|
75
75
|
Send the experience baseline, `ui-handoff.yaml`, tool-selection receipt, both experience Gate receipts, product-reconciliation receipt, change sets, interaction/visual/component contracts, exact Prototype revision identity/checksum, source revision, review-bundle checksum, catalog checksums, traceability checksum, and source-confirmation checksum to `$ai-delivery-design-architecture` in reconcile mode. Preserve the same frozen revision for planning and test design; downstream nodes must never edit experience artifacts.
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Complete when the current Prototype Revision is frozen, validated, approved through `UX-VS` and `UX-UI`, reconciled with product requirements, and handed off with checksums for every source and catalog.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Design Managed Prototypes"
|
|
3
|
-
short_description: "Select tools and manage reviewable prototypes"
|
|
4
|
-
default_prompt: "Use $ai-delivery-design-experience to select a prototype tool, manage pages and canvases, and close review before handoff."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Design Managed Prototypes"
|
|
3
|
+
short_description: "Select tools and manage reviewable prototypes"
|
|
4
|
+
default_prompt: "Use $ai-delivery-design-experience to select a prototype tool, manage pages and canvases, and close review before handoff."
|
|
@@ -42,17 +42,7 @@ When Review Scenes depend on protocol simulations, keep External Dependency Mock
|
|
|
42
42
|
|
|
43
43
|
Each iteration and every approval, source confirmation, architecture receipt, test receipt, plan, development task, and candidate check pin one exact Prototype revision identity and checksum. Later source work creates a new revision of the same Prototype; it never creates a Prototype copy or member bundle.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Legacy Prototype Migration
|
|
48
|
-
|
|
49
|
-
`upgrade` installs migration capability and reports `prototype_migration.required_follow_up`; it never applies the Prototype migration. `migrate --dry-run` is the authoritative zero-write plan, and `migrate` applies it only when `can_apply: true`.
|
|
50
|
-
|
|
51
|
-
For the open iteration, validate set/member identity, manifest/source/catalog SHA-256, contained paths, and stable terminal, Page, route, and file identities. A valid zero-member input is `not-required`. A single member migrates automatically only when every identity, checksum, catalog, and target is unambiguous. Multiple members merge equal stable identities and block on differing definitions until one checksum-bound `human:<identity>` decision selects the canonical member. The one migration decision file always contains both `decisions` and `prototype_decisions` lists.
|
|
52
|
-
|
|
53
|
-
Apply creates only `.workflow/experience/<iteration-id>/prototype.yaml`, `prototype-migration.yaml`, copied `prototype/source/<member-id>/...` bytes, and a current Review Shell. Preserve legacy set/member/source bytes, closed and archived iterations, Gate files, approvals, and events. The new descriptor uses `prototype_id: PROTOTYPE`, `status: migration-pending-ux-ui`, and `current_revision_ref: null`.
|
|
54
|
-
|
|
55
|
-
Migration approval is never inherited. Complete the current normalized catalogs and Review Shell, freeze a new immutable revision, pass `prototype-revision validate`, then request a new `UX-UI`. The migration Review Shell is only a navigation aid; Workflow Manager may accept decisions only for the new complete frozen revision, and P17 keeps the migration lineage available for audit.
|
|
45
|
+
The current Prototype package contains one `prototype.yaml`, one source tree, one Review Shell, and the normalized v2 catalogs. Freeze each approved iteration as one immutable `prototype-revision.yaml`, validate it with `ai-delivery prototype-revision validate`, and route all Page decisions through Workflow Manager against that exact revision checksum. A missing catalog, source checksum, or review receipt blocks the flow until the current package is repaired.
|
|
56
46
|
|
|
57
47
|
`prototype-traceability.csv`:
|
|
58
48
|
|
|
@@ -33,7 +33,7 @@ Keep all terminals in the same logical Prototype. `prototype-terminals.csv` decl
|
|
|
33
33
|
|
|
34
34
|
The frozen Review Shell entrypoint must consume Workflow Manager's `review_path` query parameter and render the matching active path from `prototype-routes.csv`. Treat an absent, unknown, retired, or cross-terminal path as an explicit not-found state. Relative CSS, JavaScript, font, and media references must remain runnable from the frozen entrypoint; Manager embeds only that checksummed content in a sandbox and never interprets product behavior.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The current Prototype package records source structure in the Prototype repository and normalized terminal/route catalogs. One Review Scene belongs to one stable Page family, and stable identities remain immutable across revisions.
|
|
37
37
|
|
|
38
38
|
## Production Frontend Scope
|
|
39
39
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Develop Iteration"
|
|
3
|
-
short_description: "Orchestrate dynamic technical work packages with TDD"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Develop Iteration"
|
|
3
|
+
short_description: "Orchestrate dynamic technical work packages with TDD"
|
|
4
4
|
default_prompt: "Use $ai-delivery-develop-iteration to implement the current vertical slice in the configured code repository."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "自进化工作流"
|
|
3
|
-
short_description: "持续记录反馈、评估信号并安全演进项目级交付工作流扩展能力"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "自进化工作流"
|
|
3
|
+
short_description: "持续记录反馈、评估信号并安全演进项目级交付工作流扩展能力"
|
|
4
4
|
default_prompt: "使用 $ai-delivery-evolve-workflow 记录当前意见并在安全点评估可验证的项目级扩展。"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Execute Test Work"
|
|
3
|
-
short_description: "Execute one risk-based independent test work package"
|
|
4
|
-
default_prompt: "Use $ai-delivery-execute-test to execute the assigned independent test work package."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Execute Test Work"
|
|
3
|
+
short_description: "Execute one risk-based independent test work package"
|
|
4
|
+
default_prompt: "Use $ai-delivery-execute-test to execute the assigned independent test work package."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Execute Technical Work"
|
|
3
|
-
short_description: "Implement one architecture-constrained technical work package"
|
|
4
|
-
default_prompt: "Use $ai-delivery-execute-work-package to implement the assigned technical work package."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Execute Technical Work"
|
|
3
|
+
short_description: "Implement one architecture-constrained technical work package"
|
|
4
|
+
default_prompt: "Use $ai-delivery-execute-work-package to implement the assigned technical work package."
|