gaia-framework 1.65.0 → 1.66.0
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/.claude/commands/gaia-add-feature.md +2 -2
- package/.claude/commands/gaia-change-request.md +16 -4
- package/.claude/commands/gaia-edit-ux.md +17 -0
- package/.claude/commands/gaia-resume.md +1 -1
- package/.claude/commands/gaia-validate-prd.md +9 -3
- package/CLAUDE.md +16 -1
- package/README.md +3 -3
- package/_gaia/_config/adversarial-triggers.yaml +91 -0
- package/_gaia/_config/files-manifest.csv +1 -0
- package/_gaia/_config/gaia-help.csv +10 -6
- package/_gaia/_config/global.yaml +2 -1
- package/_gaia/_config/lifecycle-sequence.yaml +26 -4
- package/_gaia/_config/manifest.yaml +3 -3
- package/_gaia/_config/skill-manifest.csv +3 -1
- package/_gaia/_config/workflow-manifest.csv +5 -3
- package/_gaia/core/config.yaml +1 -1
- package/_gaia/core/engine/workflow.xml +31 -5
- package/_gaia/core/protocols/review-gate-check.xml +29 -1
- package/_gaia/core/workflows/brainstorming/template.md +6 -0
- package/_gaia/lifecycle/agents/pm.md +9 -10
- package/_gaia/lifecycle/agents/ux-designer.md +1 -0
- package/_gaia/lifecycle/agents/validator.md +2 -1
- package/_gaia/lifecycle/config.yaml +1 -1
- package/_gaia/lifecycle/knowledge/brownfield/config-contradiction-scan.md +137 -0
- package/_gaia/lifecycle/knowledge/brownfield/dead-code-scan.md +179 -0
- package/_gaia/lifecycle/knowledge/brownfield/test-execution-scan.md +209 -0
- package/_gaia/lifecycle/module-help.csv +1 -1
- package/_gaia/lifecycle/skills/document-rulesets.md +251 -0
- package/_gaia/lifecycle/skills/memory-management-cross-agent.md +218 -0
- package/_gaia/lifecycle/skills/memory-management.md +32 -122
- package/_gaia/lifecycle/templates/brownfield-scan-doc-code-prompt.md +219 -0
- package/_gaia/lifecycle/templates/brownfield-scan-hardcoded-prompt.md +169 -0
- package/_gaia/lifecycle/templates/brownfield-scan-integration-seam-prompt.md +127 -0
- package/_gaia/lifecycle/templates/brownfield-scan-runtime-behavior-prompt.md +141 -0
- package/_gaia/lifecycle/templates/brownfield-scan-security-prompt.md +212 -0
- package/_gaia/lifecycle/templates/gap-entry-schema.md +247 -0
- package/_gaia/lifecycle/templates/infra-prd-template.md +356 -0
- package/_gaia/lifecycle/templates/platform-prd-template.md +431 -0
- package/_gaia/lifecycle/templates/prd-template.md +70 -0
- package/_gaia/lifecycle/templates/story-template.md +1 -0
- package/_gaia/lifecycle/workflows/1-analysis/create-product-brief/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/2-planning/create-prd/instructions.xml +4 -2
- package/_gaia/lifecycle/workflows/2-planning/create-prd/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/2-planning/create-ux-design/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/2-planning/edit-prd/instructions.xml +4 -4
- package/_gaia/lifecycle/workflows/2-planning/edit-prd/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/checklist.md +18 -0
- package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/instructions.xml +66 -0
- package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/workflow.yaml +27 -0
- package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/instructions.xml +3 -1
- package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/instructions.xml +4 -7
- package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/3-solutioning/security-threat-model/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/4-implementation/add-feature/checklist.md +42 -0
- package/_gaia/lifecycle/workflows/4-implementation/add-feature/instructions.xml +196 -0
- package/_gaia/lifecycle/workflows/{cross-phase → 4-implementation}/add-feature/workflow.yaml +20 -9
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/checklist.md +5 -0
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/instructions.xml +73 -1
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/4-implementation/code-review/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/4-implementation/correct-course/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/4-implementation/create-story/checklist.md +1 -1
- package/_gaia/lifecycle/workflows/4-implementation/create-story/instructions.xml +5 -4
- package/_gaia/lifecycle/workflows/4-implementation/dev-story/workflow.yaml +1 -1
- package/_gaia/lifecycle/workflows/4-implementation/retrospective/instructions.xml +21 -1
- package/_gaia/lifecycle/workflows/4-implementation/retrospective/workflow.yaml +2 -1
- package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/instructions.xml +3 -0
- package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/workflow.yaml +2 -0
- package/_gaia/lifecycle/workflows/4-implementation/triage-findings/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/checklist.md +15 -0
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/instructions.xml +153 -57
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/workflow.yaml +5 -0
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/instructions.xml +23 -12
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/workflow.yaml +11 -0
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-plan/instructions.xml +0 -2
- package/_gaia/lifecycle/workflows/5-deployment/deployment-checklist/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/checklist.md +12 -0
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/instructions.xml +313 -5
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/workflow.yaml +1 -0
- package/_gaia/lifecycle/workflows/anytime/memory-hygiene/instructions.xml +8 -18
- package/_gaia/testing/config.yaml +1 -1
- package/_gaia/testing/workflows/edit-test-plan/workflow.yaml +1 -0
- package/_gaia/testing/workflows/test-design/workflow.yaml +2 -0
- package/_gaia/testing/workflows/traceability/workflow.yaml +1 -0
- package/bin/gaia-framework.js +25 -9
- package/bin/generate-checksums.js +124 -0
- package/gaia-install.sh +74 -28
- package/package.json +5 -2
- package/_gaia/lifecycle/workflows/cross-phase/add-feature/checklist.md +0 -30
- package/_gaia/lifecycle/workflows/cross-phase/add-feature/instructions.xml +0 -85
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: edit-ux-design
|
|
2
|
+
description: 'Edit an existing UX design document'
|
|
3
|
+
module: lifecycle
|
|
4
|
+
agent: ux-designer
|
|
5
|
+
val_validate_output: true
|
|
6
|
+
config_resolved: "{installed_path}/.resolved/edit-ux-design.yaml"
|
|
7
|
+
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
8
|
+
installed_path: "{project-root}/_gaia/lifecycle/workflows/2-planning/edit-ux-design"
|
|
9
|
+
instructions: "{installed_path}/instructions.xml"
|
|
10
|
+
validation: "{installed_path}/checklist.md"
|
|
11
|
+
input_file_patterns:
|
|
12
|
+
ux_design:
|
|
13
|
+
whole: "{planning_artifacts}/ux-design.md"
|
|
14
|
+
load_strategy: "FULL_LOAD"
|
|
15
|
+
architecture:
|
|
16
|
+
whole: "{planning_artifacts}/architecture.md"
|
|
17
|
+
load_strategy: "SELECTIVE_LOAD"
|
|
18
|
+
quality_gates:
|
|
19
|
+
pre_start:
|
|
20
|
+
- check: "ux_design_exists"
|
|
21
|
+
on_fail: "HALT: No ux-design.md found. Run /gaia-create-ux first."
|
|
22
|
+
on_error:
|
|
23
|
+
missing_file: "ask_user"
|
|
24
|
+
unresolved_variable: "halt"
|
|
25
|
+
|
|
26
|
+
output:
|
|
27
|
+
primary: "{planning_artifacts}/ux-design.md"
|
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
<action>If skip: API review can be run anytime later with /gaia-review-api</action>
|
|
79
79
|
</step>
|
|
80
80
|
<step n="11" title="Adversarial Review">
|
|
81
|
-
<action>
|
|
81
|
+
<action>Read {project-root}/_gaia/_config/adversarial-triggers.yaml to evaluate trigger rules. Determine the current change_type: if this workflow was invoked with a change_type context (e.g., from add-feature triage), use that value. If no context is available (standalone architecture creation), default to "feature". Determine the current magnitude from the architecture scope classification (NONE/MINOR/SIGNIFICANT/BREAKING) — default to SIGNIFICANT for standalone creation.</action>
|
|
82
|
+
<action>Look up the trigger rule for change_type + artifact "architecture". If adversarial is false for this combination: skip the adversarial review — log "Adversarial review skipped: change_type={change_type} does not trigger for architecture per adversarial-triggers.yaml" and proceed to next step. If adversarial is true but the rule has a magnitude_threshold and the current magnitude is below it: skip — log "Adversarial review skipped: magnitude {magnitude} is below threshold {magnitude_threshold} per adversarial-triggers.yaml". Add "## Review Findings Incorporated" with "Adversarial review not triggered — change type: {change_type}, magnitude: {magnitude}".</action>
|
|
83
|
+
<action>If adversarial is true and magnitude meets or exceeds threshold: Spawn a subagent using the Agent tool: "Load {project-root}/_gaia/core/tasks/review-adversarial.xml. Read its entire contents. Target: {planning_artifacts}/architecture.md. Target label: architecture. Follow the task instructions EXACTLY." This is required — findings will be incorporated back into the architecture document.</action>
|
|
82
84
|
<action>When subagent returns: verify adversarial-review-architecture-{date}.md exists in {planning_artifacts}/</action>
|
|
83
85
|
</step>
|
|
84
86
|
<step n="12" title="Incorporate Adversarial Findings">
|
|
@@ -2,6 +2,7 @@ name: create-architecture
|
|
|
2
2
|
description: 'Create architecture and solution design'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: architect
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/create-architecture.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/3-solutioning/create-architecture"
|
|
@@ -2,6 +2,7 @@ name: create-epics-stories
|
|
|
2
2
|
description: 'Break requirements into epics and user stories'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: pm
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/create-epics-stories.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories"
|
|
@@ -57,8 +57,10 @@
|
|
|
57
57
|
<template-output file="{planning_artifacts}/architecture.md">
|
|
58
58
|
Save updated architecture document with all edits applied, new ADRs appended, version incremented, and version note added.
|
|
59
59
|
</template-output>
|
|
60
|
-
<
|
|
61
|
-
|
|
60
|
+
<action>Read {project-root}/_gaia/_config/adversarial-triggers.yaml to evaluate trigger rules. Determine the current change_type: if this workflow was invoked with a change_type context (e.g., from add-feature triage), use that value. If no context is available, infer from the change scope and driver: adversarial-finding or technical-discovery maps to "feature", change-request depends on the CR classification.</action>
|
|
61
|
+
<action>Look up the trigger rule for change_type + artifact "architecture". If adversarial is false for this combination: skip adversarial review — mark "Review Findings Incorporated" as "Adversarial review not triggered — change type: {change_type} per adversarial-triggers.yaml". If adversarial is true but the rule has a magnitude_threshold and change_scope is below it (e.g., MINOR is below SIGNIFICANT): skip — mark "Review Findings Incorporated" as "Adversarial review not triggered — magnitude {change_scope} below threshold per adversarial-triggers.yaml".</action>
|
|
62
|
+
<check if="adversarial trigger rule is true AND magnitude meets or exceeds threshold">
|
|
63
|
+
<action>Adversarial review triggered per adversarial-triggers.yaml: change_type={change_type}, magnitude={change_scope}.</action>
|
|
62
64
|
<action>Spawn a subagent using the Agent tool: "Load {project-root}/_gaia/core/tasks/review-adversarial.xml. Read its entire contents. Target: {planning_artifacts}/architecture.md. Target label: architecture. Follow the task instructions EXACTLY. Focus review on changed sections: {sections_affected}."</action>
|
|
63
65
|
<action>When subagent returns: verify adversarial-review-architecture-{date}.md exists.</action>
|
|
64
66
|
<action>Read findings — extract critical and high severity items.</action>
|
|
@@ -68,11 +70,6 @@
|
|
|
68
70
|
Update architecture with adversarial review findings incorporated. Append to existing "Review Findings Incorporated" section with amendment date.
|
|
69
71
|
</template-output>
|
|
70
72
|
</check>
|
|
71
|
-
<check if="change_scope == MINOR">
|
|
72
|
-
<ask>The architecture has been updated with MINOR changes. Would you like to run an adversarial review? (yes / skip for minor edits)</ask>
|
|
73
|
-
<action>If yes: spawn subagent as above, incorporate findings.</action>
|
|
74
|
-
<action>If skip: mark "Review Findings Incorporated" as "Incremental edit — adversarial review skipped (minor change)"</action>
|
|
75
|
-
</check>
|
|
76
73
|
</step>
|
|
77
74
|
<step n="7" title="Cascade Impact Analysis">
|
|
78
75
|
<action>Classify cascade impact on downstream artifacts:</action>
|
|
@@ -2,6 +2,7 @@ name: edit-architecture
|
|
|
2
2
|
description: 'Edit an existing architecture document'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: architect
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/edit-architecture.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/3-solutioning/edit-architecture"
|
|
@@ -2,6 +2,7 @@ name: security-threat-model
|
|
|
2
2
|
description: 'Create security threat model using STRIDE/DREAD methodology'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: security
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/security-threat-model.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/3-solutioning/security-threat-model"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Add Feature Triage Validation'
|
|
3
|
+
validation-target: 'Feature/Enhancement/Patch Triage and Cascade'
|
|
4
|
+
---
|
|
5
|
+
## Intake
|
|
6
|
+
- [ ] User description captured
|
|
7
|
+
- [ ] Driver identified (user feedback / stakeholder / technical / market / regulatory)
|
|
8
|
+
- [ ] Urgency classified (critical / high / normal)
|
|
9
|
+
- [ ] Feature ID assigned (AF-{date}-{seq})
|
|
10
|
+
## Classification
|
|
11
|
+
- [ ] Change classified as patch / enhancement / feature
|
|
12
|
+
- [ ] Affected artifacts list built based on classification
|
|
13
|
+
- [ ] Classification confirmed by user
|
|
14
|
+
## Impact Scan
|
|
15
|
+
- [ ] Each affected artifact scanned for specific sections impacted
|
|
16
|
+
- [ ] Impact summary generated per artifact
|
|
17
|
+
## Val Review
|
|
18
|
+
- [ ] Proposed changes validated by Val
|
|
19
|
+
- [ ] CRITICAL findings addressed before proceeding
|
|
20
|
+
- [ ] WARNING findings noted
|
|
21
|
+
## Approval
|
|
22
|
+
- [ ] Triage plan presented to user
|
|
23
|
+
- [ ] User APPROVED or REJECTED the plan
|
|
24
|
+
## CR Record (if applicable)
|
|
25
|
+
- [ ] CR record created for enhancements and features
|
|
26
|
+
- [ ] Skipped for patches with justification
|
|
27
|
+
## Cascade
|
|
28
|
+
- [ ] Cascade follows corrected lifecycle order: PRD → UX → Architecture → Test Plan → Threat Model → Traceability
|
|
29
|
+
- [ ] Only affected artifacts processed — patches skip most steps
|
|
30
|
+
- [ ] Each step spawned as subagent (owning agent's workflow)
|
|
31
|
+
- [ ] Cascade manifest tracks state across steps
|
|
32
|
+
- [ ] Failed steps handled with retry/skip/abort options
|
|
33
|
+
- [ ] Checkpoint saved for /gaia-resume recovery
|
|
34
|
+
## Story
|
|
35
|
+
- [ ] Implementation stories created (patch, enhancement, and feature all create stories via subagent)
|
|
36
|
+
- [ ] Story keys captured
|
|
37
|
+
## Assessment Doc
|
|
38
|
+
- [ ] Assessment document generated at {planning_artifacts}/add-feature-{feature_id}.md
|
|
39
|
+
- [ ] All sections populated (classification, impact, cascade results, stories, next steps)
|
|
40
|
+
## Completion
|
|
41
|
+
- [ ] Next steps communicated based on classification
|
|
42
|
+
- [ ] Cascade manifest finalized
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<workflow name="add-feature">
|
|
2
|
+
<critical>
|
|
3
|
+
<mandate>This is a PM-owned triage workflow — classify the change before cascading</mandate>
|
|
4
|
+
<mandate>Only cascade through AFFECTED artifacts — patches skip most steps</mandate>
|
|
5
|
+
<mandate>Cascade follows corrected lifecycle order: PRD → UX → Architecture → Test Plan → Threat Model → Traceability</mandate>
|
|
6
|
+
<mandate>Each cascade step spawns the owning agent's workflow as a subagent — do not perform edits directly</mandate>
|
|
7
|
+
<mandate>In yolo mode: auto-proceed through all steps EXCEPT CRITICAL Val findings which require user confirmation</mandate>
|
|
8
|
+
<mandate>On cascade failure: halt at the failed step, record partial state in assessment doc and checkpoint, present retry/skip/abort options (FR-89a)</mandate>
|
|
9
|
+
<mandate>Track cascade state via a lightweight manifest — do not hold subagent context in memory. Stay within the 40K token framework budget (FR-89b)</mandate>
|
|
10
|
+
</critical>
|
|
11
|
+
|
|
12
|
+
<step n="1" title="Intake">
|
|
13
|
+
<ask>Describe the fix, enhancement, or feature you want to add.</ask>
|
|
14
|
+
<ask>What is driving this change? (user feedback / stakeholder request / technical discovery / market shift / regulatory)</ask>
|
|
15
|
+
<ask>Urgency level? (critical — blocks current sprint / high — next sprint / normal — backlog)</ask>
|
|
16
|
+
<action>Assign a feature ID: AF-{date}-{seq} (e.g., AF-2026-03-26-1). Check {planning_artifacts}/ for existing add-feature-*.md files to determine next sequence number.</action>
|
|
17
|
+
<action>Record: feature_id, description, driver, urgency</action>
|
|
18
|
+
</step>
|
|
19
|
+
|
|
20
|
+
<step n="2" title="Classify">
|
|
21
|
+
<action>Analyze the user's description against the classification matrix:
|
|
22
|
+
|
|
23
|
+
**Patch** — bug fix, typo, config correction. Characteristics:
|
|
24
|
+
- Affects 1-2 files in a single module
|
|
25
|
+
- No new requirements (FR/NFR) needed
|
|
26
|
+
- No architecture changes
|
|
27
|
+
- No UX changes
|
|
28
|
+
- Existing tests cover the fix (or need minor additions)
|
|
29
|
+
|
|
30
|
+
**Enhancement** — improvement to existing feature. Characteristics:
|
|
31
|
+
- Modifies existing requirements or adds minor new ones
|
|
32
|
+
- May require architecture adjustments (MINOR)
|
|
33
|
+
- May affect UX flows
|
|
34
|
+
- Needs test updates for changed behavior
|
|
35
|
+
|
|
36
|
+
**Feature** — wholly new capability. Characteristics:
|
|
37
|
+
- Adds new requirements (FR/NFR)
|
|
38
|
+
- Requires architecture review (SIGNIFICANT)
|
|
39
|
+
- Adds new UX flows or screens
|
|
40
|
+
- Needs new test cases and possibly threat model updates
|
|
41
|
+
</action>
|
|
42
|
+
<action>Determine classification: patch | enhancement | feature</action>
|
|
43
|
+
<action>Build the affected artifacts list based on classification:
|
|
44
|
+
- **Patch**: PRD (optional — if wording fix), Traceability (if test changes)
|
|
45
|
+
- **Enhancement**: PRD, UX (if UI changes), Architecture (if technical changes), Test Plan, Traceability
|
|
46
|
+
- **Feature**: PRD, UX, Architecture, Test Plan, Threat Model, Traceability (all artifacts)
|
|
47
|
+
</action>
|
|
48
|
+
<action>Present classification and affected artifacts list to user for confirmation.</action>
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
<step n="3" title="Impact Scan">
|
|
52
|
+
<action>For each affected artifact, scan current content to identify specific sections impacted:</action>
|
|
53
|
+
<action>— PRD: identify affected requirement IDs (FR-*, NFR-*), feature sections, user personas</action>
|
|
54
|
+
<action>— UX Design: identify affected screens, interaction patterns, navigation flows</action>
|
|
55
|
+
<action>— Architecture: identify affected components, APIs, data models, ADRs</action>
|
|
56
|
+
<action>— Test Plan: identify affected test suites, risk areas, coverage gaps</action>
|
|
57
|
+
<action>— Threat Model: identify new attack surfaces or changed trust boundaries</action>
|
|
58
|
+
<action>— Traceability: identify requirement-to-test-to-story linkages that will change</action>
|
|
59
|
+
<action>Build impact summary: for each affected artifact, list specific sections and what will change.</action>
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step n="4" title="Val Review">
|
|
63
|
+
<action>Present the proposed changes (classification, affected artifacts, impact summary) to Val for validation.</action>
|
|
64
|
+
<action>Invoke val-validate-artifact as a subagent, passing the impact summary as the artifact to validate.</action>
|
|
65
|
+
<action>If Val returns CRITICAL findings: present findings to user. In yolo mode, HALT and require user confirmation before proceeding. In normal mode, present [c]ontinue / [r]evise / [x]abort options.</action>
|
|
66
|
+
<action>If Val returns WARNING findings: present findings. In yolo mode, auto-proceed with findings noted. In normal mode, present options.</action>
|
|
67
|
+
<action>If Val returns no findings or INFO only: auto-proceed.</action>
|
|
68
|
+
</step>
|
|
69
|
+
|
|
70
|
+
<step n="5" title="User Approval">
|
|
71
|
+
<action>Present the complete triage plan:
|
|
72
|
+
|
|
73
|
+
**Add-Feature Triage: {feature_id}**
|
|
74
|
+
|
|
75
|
+
| Field | Value |
|
|
76
|
+
|-------|-------|
|
|
77
|
+
| Description | {description} |
|
|
78
|
+
| Classification | {patch/enhancement/feature} |
|
|
79
|
+
| Driver | {driver} |
|
|
80
|
+
| Urgency | {urgency} |
|
|
81
|
+
|
|
82
|
+
**Affected Artifacts:**
|
|
83
|
+
{list each artifact and what will change}
|
|
84
|
+
|
|
85
|
+
**Cascade Steps:**
|
|
86
|
+
{numbered list of cascade steps that will execute, with skipped steps noted}
|
|
87
|
+
|
|
88
|
+
**Val Review:** {passed/warnings noted/findings summary}
|
|
89
|
+
</action>
|
|
90
|
+
<ask>Review the triage plan above. Do you APPROVE or REJECT? [approve / reject / revise]</ask>
|
|
91
|
+
<check if="user_rejects">Set status = REJECTED. Skip steps 6-8 — proceed directly to step 9 (Assessment Doc) to record the rejection.</check>
|
|
92
|
+
</step>
|
|
93
|
+
|
|
94
|
+
<step n="6" title="CR Record" optional="true" condition="classification != patch">
|
|
95
|
+
<action>Skip if classification is 'patch' — patches do not need a formal change request record.</action>
|
|
96
|
+
<action>For enhancements and features: create a change request record.</action>
|
|
97
|
+
<action>Assign CR ID: CR-{date}-{seq}. Check {planning_artifacts}/ for existing CR files.</action>
|
|
98
|
+
<action>Record: cr_id, feature_id, classification, driver, urgency, affected_artifacts, impact_summary.</action>
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step n="7" title="Cascade">
|
|
102
|
+
<action>Initialize cascade manifest:
|
|
103
|
+
```yaml
|
|
104
|
+
cascade_manifest:
|
|
105
|
+
feature_id: "{feature_id}"
|
|
106
|
+
classification: "{classification}"
|
|
107
|
+
steps_total: {count of affected artifacts}
|
|
108
|
+
steps_completed: 0
|
|
109
|
+
steps_failed: 0
|
|
110
|
+
status: "in_progress"
|
|
111
|
+
steps: []
|
|
112
|
+
```
|
|
113
|
+
</action>
|
|
114
|
+
|
|
115
|
+
<action>Execute cascade in corrected lifecycle order, skipping unaffected artifacts:
|
|
116
|
+
|
|
117
|
+
**7a. PRD Update** (if affected)
|
|
118
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/lifecycle/workflows/2-planning/edit-prd/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. Impact: {prd_impact}. Feature ID: {feature_id}."
|
|
119
|
+
On success: record prd_diff (new FR/NFR IDs), update cascade manifest.
|
|
120
|
+
On failure: record failure in manifest, present retry/skip/abort to user (FR-89a). If skip: note in assessment. If abort: halt cascade, save checkpoint.
|
|
121
|
+
|
|
122
|
+
**7b. UX Update** (if affected — skip for patches)
|
|
123
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/lifecycle/workflows/3-solutioning/edit-ux/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. PRD changes: {prd_diff}. Impact: {ux_impact}. Feature ID: {feature_id}."
|
|
124
|
+
On success: record ux_diff, update manifest. On failure: retry/skip/abort.
|
|
125
|
+
|
|
126
|
+
**7c. Architecture Update** (if affected — skip for patches)
|
|
127
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. PRD changes: {prd_diff}. UX changes: {ux_diff}. Impact: {arch_impact}. Feature ID: {feature_id}."
|
|
128
|
+
On success: record arch_diff, update manifest. On failure: retry/skip/abort.
|
|
129
|
+
|
|
130
|
+
**7d. Test Plan Update via test-design** (if affected — skip for patches unless test changes needed)
|
|
131
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/testing/workflows/edit-test-plan/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. PRD changes: {prd_diff}. Architecture changes: {arch_diff}. Feature ID: {feature_id}." Alternative: use /gaia-test-design for full test plan regeneration when the scope warrants it.
|
|
132
|
+
On success: record test_diff, update manifest. On failure: retry/skip/abort.
|
|
133
|
+
|
|
134
|
+
**7e. Threat Model Update** (if affected — features only, skip for patches and enhancements)
|
|
135
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/testing/workflows/threat-model/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. Architecture changes: {arch_diff}. Feature ID: {feature_id}."
|
|
136
|
+
On success: record threat_diff, update manifest. On failure: retry/skip/abort.
|
|
137
|
+
|
|
138
|
+
**7f. Traceability Update** (if affected)
|
|
139
|
+
Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/testing/workflows/traceability/workflow.yaml as workflow-config. Run in YOLO mode. Context: Regenerate traceability to include changes from {feature_id}."
|
|
140
|
+
On success: record trace_updated, update manifest. On failure: retry/skip/abort.
|
|
141
|
+
</action>
|
|
142
|
+
|
|
143
|
+
<action>After all cascade steps complete (or are skipped/failed): finalize cascade manifest with status summary.</action>
|
|
144
|
+
<action>Save cascade checkpoint to {checkpoint_path}/add-feature-{feature_id}.yaml for /gaia-resume recovery.</action>
|
|
145
|
+
</step>
|
|
146
|
+
|
|
147
|
+
<step n="8" title="Story">
|
|
148
|
+
<action>If classification is 'feature' or 'enhancement': spawn subagent to create implementation stories.</action>
|
|
149
|
+
<action>Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/lifecycle/workflows/4-implementation/add-stories/workflow.yaml as workflow-config. Run in YOLO mode. Context: {classification} — {description}. New requirements: {prd_diff}. Architecture changes: {arch_diff}. Feature ID: {feature_id}."</action>
|
|
150
|
+
<action>When subagent returns: capture new story keys and epic assignments.</action>
|
|
151
|
+
<action>If classification is 'patch': spawn subagent to create a fix story. Spawn subagent: "Load {project-root}/_gaia/core/engine/workflow.xml, then process {project-root}/_gaia/lifecycle/workflows/4-implementation/create-story/workflow.yaml as workflow-config. Run in YOLO mode. Context: patch fix — {description}. Feature ID: {feature_id}." When subagent returns: capture the new story key.</action>
|
|
152
|
+
<action>Priority flag integration: if the feature driver is high-urgency (P0 priority, business-critical, or regulatory driver), set priority_flag: "next-sprint" in each created story's frontmatter. This signals sprint planning to auto-include these stories in the next sprint cycle. For non-urgent features, priority_flag remains null (default).</action>
|
|
153
|
+
</step>
|
|
154
|
+
|
|
155
|
+
<step n="9" title="Assessment Doc">
|
|
156
|
+
<template-output file="{planning_artifacts}/add-feature-{feature_id}.md">
|
|
157
|
+
Generate assessment document with YAML frontmatter:
|
|
158
|
+
---
|
|
159
|
+
feature_id: "{feature_id}"
|
|
160
|
+
date: "{date}"
|
|
161
|
+
classification: "{patch|enhancement|feature}"
|
|
162
|
+
status: "{APPROVED|REJECTED}"
|
|
163
|
+
urgency: "{critical|high|normal}"
|
|
164
|
+
driver: "{source}"
|
|
165
|
+
cr_id: "{cr_id or null}"
|
|
166
|
+
---
|
|
167
|
+
Then detailed sections:
|
|
168
|
+
- Description: what was requested and why
|
|
169
|
+
- Classification: how it was classified with reasoning
|
|
170
|
+
- Impact Analysis: per-artifact impact summary
|
|
171
|
+
- Val Review: findings summary
|
|
172
|
+
- Cascade Results: for each artifact — updated/skipped/failed with details
|
|
173
|
+
- Stories Created: list of new story keys (or N/A for patches)
|
|
174
|
+
- Cascade Manifest: final manifest state (steps completed, failed, skipped)
|
|
175
|
+
- Recommended Next Actions: what to do next based on outcome
|
|
176
|
+
If REJECTED: include rejection reason and impact analysis for future reference.
|
|
177
|
+
</template-output>
|
|
178
|
+
</step>
|
|
179
|
+
|
|
180
|
+
<step n="10" title="Next Steps">
|
|
181
|
+
<action>Present summary and recommended next actions based on classification and outcome:
|
|
182
|
+
|
|
183
|
+
**Patch:**
|
|
184
|
+
- "Run `/gaia-dev-story {story_key}` to implement the fix."
|
|
185
|
+
|
|
186
|
+
**Enhancement:**
|
|
187
|
+
- "New stories created: {story_keys}. Run /gaia-sprint-plan or /gaia-correct-course to schedule."
|
|
188
|
+
- If architecture updated: "Architecture changes recorded. Review with /gaia-agent-architect."
|
|
189
|
+
|
|
190
|
+
**Feature:**
|
|
191
|
+
- "Full cascade complete. New stories: {story_keys}."
|
|
192
|
+
- "Run /gaia-sprint-plan to schedule implementation."
|
|
193
|
+
- "Consider running /gaia-implementation-readiness to verify consistency."
|
|
194
|
+
</action>
|
|
195
|
+
</step>
|
|
196
|
+
</workflow>
|
package/_gaia/lifecycle/workflows/{cross-phase → 4-implementation}/add-feature/workflow.yaml
RENAMED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
name: add-feature
|
|
2
|
-
description: '
|
|
2
|
+
description: 'PM-owned triage workflow for adding a fix, enhancement, or feature — classifies, scans impact, cascades only through affected artifacts'
|
|
3
3
|
module: lifecycle
|
|
4
|
-
agent:
|
|
4
|
+
agent: pm
|
|
5
|
+
execution_mode: planning
|
|
6
|
+
val_validate_output: true
|
|
7
|
+
val_auto_in_yolo: true
|
|
8
|
+
val_auto_in_yolo_steps: [4, 9]
|
|
5
9
|
config_resolved: "{installed_path}/.resolved/add-feature.yaml"
|
|
6
10
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
|
-
installed_path: "{project-root}/_gaia/lifecycle/workflows/
|
|
11
|
+
installed_path: "{project-root}/_gaia/lifecycle/workflows/4-implementation/add-feature"
|
|
8
12
|
instructions: "{installed_path}/instructions.xml"
|
|
9
13
|
validation: "{installed_path}/checklist.md"
|
|
10
14
|
input_file_patterns:
|
|
@@ -14,24 +18,31 @@ input_file_patterns:
|
|
|
14
18
|
architecture:
|
|
15
19
|
whole: "{planning_artifacts}/architecture.md"
|
|
16
20
|
load_strategy: "SELECTIVE_LOAD"
|
|
17
|
-
|
|
18
|
-
whole: "{
|
|
19
|
-
load_strategy: "
|
|
21
|
+
ux_design:
|
|
22
|
+
whole: "{planning_artifacts}/ux-design.md"
|
|
23
|
+
load_strategy: "INDEX_GUIDED"
|
|
20
24
|
epics:
|
|
21
25
|
whole: "{planning_artifacts}/epics-and-stories.md"
|
|
22
26
|
load_strategy: "SELECTIVE_LOAD"
|
|
23
27
|
sprint_status:
|
|
24
28
|
whole: "{implementation_artifacts}/sprint-status.yaml"
|
|
25
29
|
load_strategy: "SELECTIVE_LOAD"
|
|
30
|
+
test_plan:
|
|
31
|
+
whole: "{test_artifacts}/test-plan.md"
|
|
32
|
+
load_strategy: "SELECTIVE_LOAD"
|
|
33
|
+
threat_model:
|
|
34
|
+
whole: "{test_artifacts}/threat-model.md"
|
|
35
|
+
load_strategy: "SELECTIVE_LOAD"
|
|
36
|
+
traceability:
|
|
37
|
+
whole: "{test_artifacts}/traceability-matrix.md"
|
|
38
|
+
load_strategy: "SELECTIVE_LOAD"
|
|
26
39
|
quality_gates:
|
|
27
40
|
pre_start:
|
|
28
41
|
- check: "prd_exists"
|
|
29
42
|
on_fail: "HALT: prd.md does not exist. Run /gaia-create-prd first."
|
|
30
|
-
- check: "epics_exists"
|
|
31
|
-
on_fail: "HALT: epics-and-stories.md does not exist. Run /gaia-create-epics first."
|
|
32
43
|
on_error:
|
|
33
44
|
missing_file: "ask_user"
|
|
34
45
|
unresolved_variable: "halt"
|
|
35
46
|
|
|
36
47
|
output:
|
|
37
|
-
primary: "{planning_artifacts}/
|
|
48
|
+
primary: "{planning_artifacts}/add-feature-{feature_id}.md"
|
|
@@ -22,6 +22,11 @@ validation-target: 'Updated epics-and-stories.md'
|
|
|
22
22
|
- [ ] Source: CR-{cr_id} added (if change request linked)
|
|
23
23
|
## Change Log
|
|
24
24
|
- [ ] Change log entry added with date, feature name, and CR ID
|
|
25
|
+
## Inline Validation
|
|
26
|
+
- [ ] Inline validation invoked for each new story
|
|
27
|
+
- [ ] Fix loop executed if CRITICAL/WARNING findings found (max 3 attempts)
|
|
28
|
+
- [ ] Validation results recorded per story (validated / validating / degraded)
|
|
29
|
+
- [ ] Graceful degradation handled if Val unavailable (prerequisites missing or invocation failure)
|
|
25
30
|
## Existing Content
|
|
26
31
|
- [ ] Existing stories not modified
|
|
27
32
|
- [ ] Existing epic structure preserved
|
|
@@ -88,9 +88,81 @@
|
|
|
88
88
|
If new epic: include epic header with name, description, goal, success criteria before its stories.
|
|
89
89
|
Prepend a Change Log entry if not already present.
|
|
90
90
|
</template-output>
|
|
91
|
+
<action>Recount epic overview table story counts and update in-place:
|
|
92
|
+
1. Parse all `### Story (E\d+)-S\d+:` headers in the saved epics-and-stories.md file
|
|
93
|
+
2. Group and count story headers per epic key (E1, E2, etc.)
|
|
94
|
+
3. Locate the Epic Overview table in epics-and-stories.md (the markdown table with columns: epic ID, name, goal, count, priority)
|
|
95
|
+
4. For each epic row in the table, update the count column to match the actual count of story headers for that epic
|
|
96
|
+
5. If a new epic was created in Step 4 and does not yet have a row in the Epic Overview table, insert a new row with the correct initial story count
|
|
97
|
+
6. If an existing epic row in the overview table has zero matching story headers after recount, preserve the row as-is (do not delete it) — log a warning: "Epic {EN} has 0 story headers but overview row preserved"
|
|
98
|
+
7. Table format: `| E{N} | {name} | {goal} | {count} | {priority} |` — only the `{count}` column cell is updated; do not modify other columns
|
|
99
|
+
8. Save the updated epics-and-stories.md file</action>
|
|
91
100
|
</step>
|
|
92
101
|
|
|
93
|
-
<step n="8" title="
|
|
102
|
+
<step n="8" title="Inline Validation">
|
|
103
|
+
<action>Check Val prerequisites: verify {project-root}/_gaia/lifecycle/agents/validator.md exists AND {project-root}/_memory/validator-sidecar/ directory exists. If either prerequisite is missing, log warning "Val prerequisites unavailable — skipping inline validation. Stories will be marked as validating." Set val_available = false.</action>
|
|
104
|
+
|
|
105
|
+
<action>For each newly created story from Step 5 (batch iteration — each story validated independently):
|
|
106
|
+
Set story_validation_status = "pending"
|
|
107
|
+
Set validation_attempt = 0
|
|
108
|
+
|
|
109
|
+
If val_available == false:
|
|
110
|
+
Set story_validation_status = "degraded"
|
|
111
|
+
Mark story status as 'validating' in the story entry
|
|
112
|
+
Log: "Story {story_key}: Val unavailable — marked as validating"
|
|
113
|
+
Continue to next story
|
|
114
|
+
End If
|
|
115
|
+
|
|
116
|
+
VALIDATION LOOP (maximum 3 attempts):
|
|
117
|
+
Increment validation_attempt
|
|
118
|
+
|
|
119
|
+
Invoke Val validation directly within workflow context (no subagent nesting — works at both standalone level 1 and subagent level 2 from add-feature, never exceeding 2-level nesting max):
|
|
120
|
+
<invoke-workflow
|
|
121
|
+
target="{project-root}/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/workflow.yaml"
|
|
122
|
+
input_artifact="{planning_artifacts}/epics-and-stories.md"
|
|
123
|
+
story_scope="{story_key}"
|
|
124
|
+
on_error="warn_and_continue" />
|
|
125
|
+
|
|
126
|
+
If Val invocation fails (timeout, context overflow, crash, or missing prerequisites):
|
|
127
|
+
Log warning: "Val validation failed for {story_key}: {reason}"
|
|
128
|
+
Set story_validation_status = "degraded"
|
|
129
|
+
Mark story status as 'validating'
|
|
130
|
+
Break loop — continue to next story
|
|
131
|
+
End If
|
|
132
|
+
|
|
133
|
+
Separate findings by severity:
|
|
134
|
+
- CRITICAL and WARNING findings → actionable_findings (trigger fix loop)
|
|
135
|
+
- INFO findings → info_findings (do not trigger fix loop, non-blocking — log only)
|
|
136
|
+
|
|
137
|
+
Log all INFO findings to output (INFO does not block progression and does not trigger re-validation)
|
|
138
|
+
|
|
139
|
+
If actionable_findings is empty:
|
|
140
|
+
Set story_validation_status = "validated"
|
|
141
|
+
Note story as "validated" in output validation summary
|
|
142
|
+
Break loop — continue to next story
|
|
143
|
+
End If
|
|
144
|
+
|
|
145
|
+
If validation_attempt less than 3:
|
|
146
|
+
Auto-fix each CRITICAL and WARNING finding in the story content
|
|
147
|
+
Re-invoke Val validation (loop continues)
|
|
148
|
+
Else (validation_attempt == 3, maximum reached):
|
|
149
|
+
Set story_validation_status = "failed"
|
|
150
|
+
Mark story status as 'validating' (not 'ready-for-dev')
|
|
151
|
+
Log remaining unresolved findings
|
|
152
|
+
Break loop — continue to next story
|
|
153
|
+
End If
|
|
154
|
+
END VALIDATION LOOP
|
|
155
|
+
End For Each
|
|
156
|
+
|
|
157
|
+
Report batch validation summary:
|
|
158
|
+
- Stories validated successfully: {count} ({list})
|
|
159
|
+
- Stories marked validating (failed after 3 attempts): {count} ({list})
|
|
160
|
+
- Stories marked validating (Val unavailable/degraded): {count} ({list})
|
|
161
|
+
- INFO findings logged: {count}
|
|
162
|
+
</action>
|
|
163
|
+
</step>
|
|
164
|
+
|
|
165
|
+
<step n="9" title="Next Steps">
|
|
94
166
|
<action>Report summary: new epic(s) created (if any), stories added with IDs and epic assignments</action>
|
|
95
167
|
<action>For each new story: "Run /gaia-create-story {story_key} to elaborate before development"</action>
|
|
96
168
|
<action>If stories should enter current sprint: "Run /gaia-correct-course to inject into sprint"</action>
|
|
@@ -2,6 +2,7 @@ name: add-stories
|
|
|
2
2
|
description: 'Add new stories to existing epics or create new epics with stories'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: pm
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/add-stories.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/4-implementation/add-stories"
|
|
@@ -7,6 +7,7 @@ config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
|
7
7
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/4-implementation/code-review"
|
|
8
8
|
instructions: "{installed_path}/instructions.xml"
|
|
9
9
|
validation: "{installed_path}/checklist.md"
|
|
10
|
+
template: "{project-root}/_gaia/lifecycle/templates/review-template.md"
|
|
10
11
|
input_file_patterns:
|
|
11
12
|
architecture:
|
|
12
13
|
whole: "{planning_artifacts}/architecture.md"
|
|
@@ -2,6 +2,7 @@ name: correct-course
|
|
|
2
2
|
description: 'Manage significant sprint scope changes'
|
|
3
3
|
module: lifecycle
|
|
4
4
|
agent: sm
|
|
5
|
+
val_validate_output: true
|
|
5
6
|
config_resolved: "{installed_path}/.resolved/correct-course.yaml"
|
|
6
7
|
config_source: "{project-root}/_gaia/lifecycle/config.yaml"
|
|
7
8
|
installed_path: "{project-root}/_gaia/lifecycle/workflows/4-implementation/correct-course"
|
|
@@ -3,7 +3,7 @@ title: 'Story Creation Validation'
|
|
|
3
3
|
validation-target: 'Story file'
|
|
4
4
|
---
|
|
5
5
|
## Structure
|
|
6
|
-
- [ ] YAML frontmatter present with all
|
|
6
|
+
- [ ] YAML frontmatter present with all 15 required fields: key, title, epic, status, priority, size, points, risk, sprint_id, depends_on, blocks, traces_to, date, author, priority_flag
|
|
7
7
|
- [ ] Acceptance criteria section complete
|
|
8
8
|
- [ ] Technical notes included
|
|
9
9
|
- [ ] Subtasks defined
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<workflow name="create-story">
|
|
2
2
|
<critical>
|
|
3
|
-
<mandate>Story files must include complete YAML frontmatter with ALL required fields: key, title, epic, status, priority, size, points, risk, sprint_id, depends_on, blocks, traces_to, date, author
|
|
3
|
+
<mandate>Story files must include complete YAML frontmatter with ALL required fields: key, title, epic, status, priority, size, points, risk, sprint_id, depends_on, blocks, traces_to, date, author, priority_flag. The priority_flag field accepts only null (default) or "next-sprint" as valid values.</mandate>
|
|
4
4
|
<mandate>All acceptance criteria MUST use Given/When/Then format: "Given {context}, when {action}, then {expected result}"</mandate>
|
|
5
5
|
<mandate>Check web access availability if story references external APIs</mandate>
|
|
6
6
|
</critical>
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<action>Append DoD checklist: all AC met, tests pass, code reviewed, docs updated</action>
|
|
93
93
|
</step>
|
|
94
94
|
<step n="6" title="Generate Output">
|
|
95
|
-
<action>Read the story template from {project-root}/_gaia/lifecycle/templates/story-template.md
|
|
95
|
+
<action>Read the story template from the engine-resolved template path. The engine resolves this in Step 1 (Load and Resolve Config): if {project-root}/custom/templates/story-template.md exists and is non-empty, the custom template is used; otherwise it falls back to {project-root}/_gaia/lifecycle/templates/story-template.md. Use whichever path the engine resolved.</action>
|
|
96
96
|
<action>Read sizing_map from {project-root}/_gaia/_config/global.yaml to resolve T-shirt size to story points (S→2, M→5, L→8, XL→13).</action>
|
|
97
97
|
<action>Populate ALL YAML frontmatter fields from epics-and-stories.md data:
|
|
98
98
|
- key: story key from epics (e.g., E1-S1)
|
|
@@ -109,9 +109,10 @@
|
|
|
109
109
|
- traces_to: requirement IDs this story traces to (from epics)
|
|
110
110
|
- date: current date
|
|
111
111
|
- author: agent name (e.g., "Nate (Scrum Master)")
|
|
112
|
+
- priority_flag: null (default — set to "next-sprint" by add-feature for high-urgency stories)
|
|
112
113
|
</action>
|
|
113
114
|
<template-output file="{implementation_artifacts}/{story_key}-{story_title_slug}.md">
|
|
114
|
-
Generate the story file following the story-template.md structure. The filename must use the story key and slugified title (e.g., E1-S1-user-login.md). Include complete YAML frontmatter with ALL
|
|
115
|
+
Generate the story file following the story-template.md structure. The filename must use the story key and slugified title (e.g., E1-S1-user-login.md). Include complete YAML frontmatter with ALL 15 fields populated. Fill all template sections: User Story, Acceptance Criteria, Tasks/Subtasks (linked to AC numbers), Dev Notes, Technical Notes, Dependencies, Test Scenarios, Project Structure Notes, References, Dev Agent Record, and Estimate. IMPORTANT: The body "**Status:**" line MUST match the frontmatter status field exactly. Both must say the same status value.
|
|
115
116
|
</template-output>
|
|
116
117
|
<action>Add the new story to {implementation_artifacts}/story-index.yaml:
|
|
117
118
|
1. Read story-index.yaml (create with header if doesn't exist)
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
<step n="7" title="Val Full Validation">
|
|
123
124
|
<action>Invoke Val as a subagent to perform full validation on the saved story file. Val validates:
|
|
124
125
|
|
|
125
|
-
(a) Completeness — all
|
|
126
|
+
(a) Completeness — all 15 YAML frontmatter fields present and valid, all template sections present
|
|
126
127
|
(b) Clarity — all ACs in Given/When/Then format, subtasks linked to AC numbers, DoD items measurable
|
|
127
128
|
(c) Semantic quality — duplicate detection across epic, ADR cross-references against architecture.md
|
|
128
129
|
(d) Dependencies — all declared dependencies exist and resolve
|
|
@@ -28,7 +28,7 @@ quality_gates:
|
|
|
28
28
|
- check: "story_file_exists({implementation_artifacts}/{story_key}-*.md)"
|
|
29
29
|
on_fail: "HALT: Story file not found. Expected {implementation_artifacts}/{story_key}-*.md. Run /gaia-create-story first."
|
|
30
30
|
- check: "story_status in ['ready-for-dev', 'in-progress']"
|
|
31
|
-
on_fail: "HALT: Story must be in ready-for-dev or in-progress status."
|
|
31
|
+
on_fail: "HALT: Story must be in ready-for-dev or in-progress status. Check {implementation_artifacts}/{story_key}-*.md frontmatter or run /gaia-sprint-status to verify."
|
|
32
32
|
post_complete:
|
|
33
33
|
- check: "all_tests_pass == true"
|
|
34
34
|
on_fail: "HALT: All tests must pass before marking complete. Run test suite in {project-path}/ and fix failing tests."
|
|
@@ -96,7 +96,27 @@
|
|
|
96
96
|
<action>For each related skill, propose a concrete addition or modification: what section should change, what content to add, and why (link back to the retro finding)</action>
|
|
97
97
|
<action if="yolo_mode">In YOLO mode: auto-approve all recommended skill improvements. Skip the user prompt below.</action>
|
|
98
98
|
<ask>Here are the proposed skill improvements based on this sprint's findings. Approve, modify, or skip each. [approve all / select / skip]</ask>
|
|
99
|
-
<action>If approved:
|
|
99
|
+
<action>If approved: write the skill improvement to {project-root}/custom/skills/{skill-name}.md (NOT _gaia/dev/skills/).
|
|
100
|
+
Follow this sequence for each approved skill improvement:
|
|
101
|
+
|
|
102
|
+
1. Ensure directory exists: create {project-root}/custom/skills/ if it does not already exist (mkdir -p equivalent).
|
|
103
|
+
|
|
104
|
+
2. Base-skill copy guard: check if {project-root}/custom/skills/{skill-name}.md already exists.
|
|
105
|
+
- If the custom skill file does NOT exist: copy the base skill from _gaia/dev/skills/{skill-name}.md (resolved at {project-root}) to {project-root}/custom/skills/{skill-name}.md, preserving all <!-- SECTION: xxx --> markers intact. This ensures the engine's sectioned loading continues to work for the custom copy.
|
|
106
|
+
- If the base skill does NOT exist at _gaia/dev/skills/{skill-name}.md (e.g., removed in a framework update): log a warning ("Base skill {skill-name} not found at _gaia/dev/skills/ — creating custom skill from scratch") and write the improvement content directly to custom/skills/{skill-name}.md without a base copy.
|
|
107
|
+
- If the custom skill file already exists: preserve existing content and apply the improvement on top.
|
|
108
|
+
|
|
109
|
+
3. Apply the improvement: append to or modify the relevant section in custom/skills/{skill-name}.md with comment "<!-- Added from retro-{sprint_id}: {reason} -->".
|
|
110
|
+
|
|
111
|
+
4. Register in .customize.yaml: after writing the custom skill file, register it in {project-root}/_gaia/_config/agents/all-dev.customize.yaml so the engine loads from the custom path on subsequent runs.
|
|
112
|
+
- If all-dev.customize.yaml does not exist: create it with proper YAML structure:
|
|
113
|
+
```yaml
|
|
114
|
+
skill_overrides:
|
|
115
|
+
{skill-name}:
|
|
116
|
+
source: "custom/skills/{skill-name}.md"
|
|
117
|
+
```
|
|
118
|
+
- If all-dev.customize.yaml already exists: read current content, check if a skill_overrides entry for this skill already exists. If it does not exist, append the new entry under skill_overrides. Preserve all existing entries — only add the new one. If it already exists (duplicate), skip registration to prevent duplicate entries.
|
|
119
|
+
</action>
|
|
100
120
|
<action>If no skill improvements identified, state: "No skill improvements identified this sprint."</action>
|
|
101
121
|
</step>
|
|
102
122
|
<step n="7" title="Cross-Retro Pattern Detection">
|