gaia-framework 1.61.0 → 1.63.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.md +1 -1
- package/README.md +1 -1
- package/_gaia/_config/global.yaml +1 -1
- package/_gaia/_config/manifest.yaml +1 -1
- package/_gaia/_config/skill-manifest.csv +1 -1
- package/_gaia/lifecycle/config.yaml +1 -1
- package/_gaia/lifecycle/skills/memory-management.md +34 -1
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/checklist.md +0 -15
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/instructions.xml +57 -153
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/workflow.yaml +0 -5
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/instructions.xml +69 -1
- package/_gaia/lifecycle/workflows/anytime/memory-hygiene/instructions.xml +8 -18
- package/gaia-install.sh +1 -1
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# GAIA Framework v1.
|
|
2
|
+
# GAIA Framework v1.63.0
|
|
3
3
|
|
|
4
4
|
This project uses the **GAIA** (Generative Agile Intelligence Architecture) framework — an AI agent framework for Claude Code that orchestrates software product development through 26 specialized agents, 65 workflows, and 8 shared skills.
|
|
5
5
|
|
package/README.md
CHANGED
|
@@ -9,4 +9,4 @@ name,displayName,description,path,applicable_agents
|
|
|
9
9
|
"security-basics","Security Basics","OWASP Top 10, input validation, secrets, CORS/CSRF","_gaia/dev/skills/security-basics.md","all-dev,architect,security,devops"
|
|
10
10
|
"validation-patterns","Validation Patterns","Claim extraction, filesystem verification, cross-reference, severity classification, findings formatting","_gaia/lifecycle/skills/validation-patterns.md","validator"
|
|
11
11
|
"ground-truth-management","Ground Truth Management","Entry structure, incremental/full refresh, conflict resolution, archival, token budget, brownfield extraction","_gaia/lifecycle/skills/ground-truth-management.md","validator"
|
|
12
|
-
"memory-management","Memory Management","Session load/save, decision formatting, stale detection, deduplication, context summarization","_gaia/lifecycle/skills/memory-management.md","all"
|
|
12
|
+
"memory-management","Memory Management","Session load/save, decision formatting, stale detection, deduplication, context summarization, cross-ref loading, budget-monitoring","_gaia/lifecycle/skills/memory-management.md","all"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
inherits: "{project-root}/_gaia/_config/global.yaml"
|
|
3
3
|
|
|
4
4
|
module_name: "lifecycle"
|
|
5
|
-
module_version: "1.
|
|
5
|
+
module_version: "1.40.0"
|
|
6
6
|
|
|
7
7
|
planning_artifacts: "{project-root}/docs/planning-artifacts"
|
|
8
8
|
implementation_artifacts: "{project-root}/docs/implementation-artifacts"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: memory-management
|
|
3
3
|
version: '1.0'
|
|
4
4
|
applicable_agents: [all]
|
|
5
|
-
description: 'Session load/save, decision formatting, stale detection, deduplication, context summarization'
|
|
5
|
+
description: 'Session load/save, decision formatting, stale detection, deduplication, context summarization, cross-ref loading, budget monitoring'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<!-- SECTION: decision-formatting -->
|
|
@@ -320,3 +320,36 @@ After loading cross-references, record in the session checkpoint:
|
|
|
320
320
|
|
|
321
321
|
This enables `/gaia-resume` to detect stale cross-references when resuming a session.
|
|
322
322
|
<!-- END SECTION -->
|
|
323
|
+
|
|
324
|
+
<!-- SECTION: budget-monitoring -->
|
|
325
|
+
## Budget Monitoring
|
|
326
|
+
|
|
327
|
+
Calculate and report token budget usage per agent sidecar. Reusable by any workflow that needs budget status.
|
|
328
|
+
|
|
329
|
+
**Input:**
|
|
330
|
+
- Agent sidecar file sizes (bytes) from filesystem scan
|
|
331
|
+
- Tier budgets from `_memory/config.yaml`: `tiers.tier_1.session_budget` (300K), `tiers.tier_2.session_budget` (100K)
|
|
332
|
+
- Per-agent ground truth budgets: `agents.{agent-id}.ground_truth_budget` (Tier 1 only)
|
|
333
|
+
|
|
334
|
+
**Token calculation:**
|
|
335
|
+
- Approximate tokens = file size in bytes / 4 (chars-per-token convention)
|
|
336
|
+
- Sum across all sidecar files per agent (decision-log.md + conversation-context.md + ground-truth.md)
|
|
337
|
+
|
|
338
|
+
**Threshold classification:**
|
|
339
|
+
- **OK:** below 80% of budget
|
|
340
|
+
- **warning:** at or above 80%, below 90%
|
|
341
|
+
- **critical:** at or above 90%, below 100%
|
|
342
|
+
- **over-budget:** at or above 100% — triggers archival recommendation
|
|
343
|
+
|
|
344
|
+
**Tier handling:**
|
|
345
|
+
- Tier 1: report session budget usage and ground truth budget usage separately
|
|
346
|
+
- Tier 2: report session budget usage only (no ground truth file)
|
|
347
|
+
- Tier 3 / untiered: report actual token count with "no budget enforced"
|
|
348
|
+
|
|
349
|
+
**Output format (Token Budget Table):**
|
|
350
|
+
|
|
351
|
+
| Agent | Tier | Files Scanned | Token Usage | Session Budget | GT Budget | % Used | Status |
|
|
352
|
+
|-------|------|---------------|-------------|----------------|-----------|--------|--------|
|
|
353
|
+
|
|
354
|
+
For Tier 3 and untiered agents, budget columns show "no budget enforced" with actual token count.
|
|
355
|
+
<!-- END SECTION -->
|
|
@@ -42,21 +42,6 @@ validation-target: 'Ground truth refresh workflow'
|
|
|
42
42
|
- [ ] ground-truth-management sections loaded JIT
|
|
43
43
|
- [ ] Sections: full-refresh, incremental-refresh, entry-structure, conflict-resolution, token-budget
|
|
44
44
|
|
|
45
|
-
## --agent Parameter (E9-S11)
|
|
46
|
-
- [ ] workflow.yaml declares agent parameter with flag --agent and allowed values [val, theo, derek, nate, all]
|
|
47
|
-
- [ ] Default agent is val (backward compatible — no --agent behaves identically to pre-E9-S11)
|
|
48
|
-
- [ ] Invalid agent names produce clear error with valid values list
|
|
49
|
-
- [ ] Per-agent sidecar initialization creates missing ground-truth.md for any Tier 1 agent
|
|
50
|
-
- [ ] Theo inventory scans filesystem structure + architecture.md
|
|
51
|
-
- [ ] Derek inventory scans prd.md + epics-and-stories.md + sprint-status.yaml
|
|
52
|
-
- [ ] Nate inventory scans sprint-status.yaml + story files in implementation-artifacts/
|
|
53
|
-
- [ ] Val inventory uses existing 6-target scan (unchanged)
|
|
54
|
-
- [ ] Decision log entries route to target agent's own decision-log.md
|
|
55
|
-
- [ ] Per-agent ground_truth_budget enforced (Val 200K, Theo 150K, Derek 100K, Nate 100K)
|
|
56
|
-
- [ ] --agent all runs val → theo → derek → nate sequentially
|
|
57
|
-
- [ ] --agent all continues on per-agent failure and reports which succeeded/failed
|
|
58
|
-
- [ ] --agent all presents combined summary with per-agent status
|
|
59
|
-
|
|
60
45
|
## Integration
|
|
61
46
|
- [ ] Manifest entry exists in workflow-manifest.csv
|
|
62
47
|
- [ ] Works identically standalone or as sub-step
|
package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/instructions.xml
CHANGED
|
@@ -7,166 +7,95 @@
|
|
|
7
7
|
<mandate>Behavior must be identical whether called standalone or as sub-step from another workflow</mandate>
|
|
8
8
|
</critical>
|
|
9
9
|
|
|
10
|
-
<step n="1" title="
|
|
11
|
-
<action>
|
|
12
|
-
<action
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<action>
|
|
16
|
-
- val: sidecar = {memory_path}/validator-sidecar/, inventory = 6-target scan (existing)
|
|
17
|
-
- theo: sidecar = {memory_path}/architect-sidecar/, inventory = filesystem structure + {planning_artifacts}/architecture.md
|
|
18
|
-
- derek: sidecar = {memory_path}/pm-sidecar/, inventory = {planning_artifacts}/prd.md + {planning_artifacts}/epics-and-stories.md + {implementation_artifacts}/sprint-status.yaml
|
|
19
|
-
- nate: sidecar = {memory_path}/sm-sidecar/, inventory = {implementation_artifacts}/sprint-status.yaml + story files in {implementation_artifacts}/
|
|
20
|
-
- all: run sequentially for val, theo, derek, nate (see Step 13)</action>
|
|
21
|
-
<action if="agent == all">Set agent_queue = [val, theo, derek, nate]. Proceed to Step 13 for orchestration.</action>
|
|
10
|
+
<step n="1" title="Initialize Validator Sidecar">
|
|
11
|
+
<action>Check if {memory_path}/validator-sidecar/ directory exists</action>
|
|
12
|
+
<action if="directory missing">Create {memory_path}/validator-sidecar/ directory</action>
|
|
13
|
+
<action if="ground-truth.md missing">Create {memory_path}/validator-sidecar/ground-truth.md with empty header containing last-refresh timestamp set to "never"</action>
|
|
14
|
+
<action if="decision-log.md missing">Create {memory_path}/validator-sidecar/decision-log.md with header: "# Val Decision Log" and empty entries</action>
|
|
15
|
+
<action if="conversation-context.md missing">Create {memory_path}/validator-sidecar/conversation-context.md with header: "# Val Conversation Context" and empty rolling state</action>
|
|
22
16
|
</step>
|
|
23
17
|
|
|
24
|
-
<step n="2" title="
|
|
25
|
-
<action>Check if the resolved target sidecar directory exists (e.g., {memory_path}/validator-sidecar/ for val, {memory_path}/architect-sidecar/ for theo, {memory_path}/pm-sidecar/ for derek, {memory_path}/sm-sidecar/ for nate)</action>
|
|
26
|
-
<action if="directory missing">Create the resolved sidecar directory</action>
|
|
27
|
-
<action if="ground-truth.md missing">Create ground-truth.md in the resolved sidecar directory with empty header containing last-refresh timestamp set to "never"</action>
|
|
28
|
-
<action if="decision-log.md missing">Create decision-log.md in the resolved sidecar directory with header: "# {agent_display_name} Decision Log" and empty entries</action>
|
|
29
|
-
<action if="conversation-context.md missing">Create conversation-context.md in the resolved sidecar directory with header: "# {agent_display_name} Conversation Context" and empty rolling state</action>
|
|
30
|
-
</step>
|
|
31
|
-
|
|
32
|
-
<step n="3" title="Determine Refresh Mode">
|
|
18
|
+
<step n="2" title="Determine Refresh Mode">
|
|
33
19
|
<action>Check if --incremental flag was passed</action>
|
|
34
20
|
<action if="incremental">Set mode to incremental — only scan files modified since last-refresh timestamp from ground-truth.md header</action>
|
|
35
21
|
<action if="not incremental">Set mode to full — scan all targets completely. Full refresh catches deletions and renames that incremental would miss.</action>
|
|
36
22
|
</step>
|
|
37
23
|
|
|
38
|
-
<step n="
|
|
24
|
+
<step n="3" title="Load Entry Structure">
|
|
39
25
|
<action>Load ground-truth-management skill section: entry-structure (JIT)</action>
|
|
40
26
|
<action>Use entry-structure format for all ground truth entries written in subsequent steps</action>
|
|
41
27
|
</step>
|
|
42
28
|
|
|
43
|
-
<step n="
|
|
44
|
-
<action>Read existing ground-truth.md
|
|
29
|
+
<step n="4" title="Parse Previous State">
|
|
30
|
+
<action>Read existing {memory_path}/validator-sidecar/ground-truth.md</action>
|
|
45
31
|
<action>Extract last-refresh timestamp from header</action>
|
|
46
32
|
<action>Parse all existing entries into a lookup map keyed by file path for diff comparison</action>
|
|
47
33
|
<action if="incremental mode">Filter scan targets to only files modified after last-refresh timestamp</action>
|
|
48
34
|
</step>
|
|
49
35
|
|
|
50
|
-
<step n="
|
|
36
|
+
<step n="5" title="Scan Inventory Targets">
|
|
51
37
|
<action>Load ground-truth-management skill section based on mode: full-refresh or incremental-refresh (JIT)</action>
|
|
38
|
+
<action>Scan the following 6 inventory targets, showing section-by-section progress to the user after each target completes.</action>
|
|
52
39
|
|
|
53
|
-
<action
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<action title="Exclusion list">
|
|
57
|
-
ALWAYS exclude these directories and files from scanning — they are framework internals, not project code:
|
|
58
|
-
_gaia/, .claude/, bin/, _memory/, node_modules/, .git/, build/, dist/, .DS_Store, *.lock
|
|
59
|
-
</action>
|
|
60
|
-
|
|
61
|
-
<action title="Target 1: Project Source Files">
|
|
62
|
-
Scan {project-path}/**/* (excluding the exclusion list above)
|
|
63
|
-
Extract: file inventory, directory structure, languages used, entry points
|
|
64
|
-
Report progress: "Scanning project source files... found N files across N directories."
|
|
65
|
-
</action>
|
|
66
|
-
|
|
67
|
-
<action title="Target 2: Project Config Files">
|
|
68
|
-
Scan {project-path}/*.{json,yaml,yml,toml,xml,env.example} (root-level config files)
|
|
69
|
-
Extract: config keys, settings, dependency declarations
|
|
70
|
-
Report progress: "Scanning project config files... found N config files."
|
|
71
|
-
</action>
|
|
72
|
-
|
|
73
|
-
<action title="Target 3: Project Package Manifests">
|
|
74
|
-
Scan {project-path}/**/package.json, pubspec.yaml, pom.xml, build.gradle, requirements.txt, Cargo.toml, go.mod, Gemfile, *.csproj (whichever exist)
|
|
75
|
-
Extract: dependencies, versions, scripts, build targets
|
|
76
|
-
Report progress: "Scanning package manifests... found N manifests."
|
|
77
|
-
</action>
|
|
78
|
-
|
|
79
|
-
<action title="Target 4: Planning Artifacts">
|
|
80
|
-
Scan {project-root}/docs/planning-artifacts/*.md
|
|
81
|
-
Extract: artifact name, type, date
|
|
82
|
-
Report progress: "Scanning planning artifacts... found N artifacts."
|
|
83
|
-
</action>
|
|
84
|
-
|
|
85
|
-
<action title="Target 5: Implementation Artifacts">
|
|
86
|
-
Scan {project-root}/docs/implementation-artifacts/*.md
|
|
87
|
-
Extract: artifact name, type, story key if applicable
|
|
88
|
-
Report progress: "Scanning implementation artifacts... found N artifacts."
|
|
89
|
-
</action>
|
|
90
|
-
|
|
91
|
-
<action title="Target 6: Test Artifacts">
|
|
92
|
-
Scan {project-root}/docs/test-artifacts/*.md
|
|
93
|
-
Extract: artifact name, type, coverage area
|
|
94
|
-
Report progress: "Scanning test artifacts... found N artifacts."
|
|
95
|
-
</action>
|
|
40
|
+
<action title="Exclusion list">
|
|
41
|
+
ALWAYS exclude these directories and files from scanning — they are framework internals, not project code:
|
|
42
|
+
_gaia/, .claude/, bin/, _memory/, node_modules/, .git/, build/, dist/, .DS_Store, *.lock
|
|
96
43
|
</action>
|
|
97
44
|
|
|
98
|
-
<action
|
|
99
|
-
Scan
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Extract: tech stack, components, module boundaries, entry points, build configuration.
|
|
104
|
-
Report progress: "Scanning filesystem structure for Theo... found N directories, N files."
|
|
105
|
-
</action>
|
|
45
|
+
<action title="Target 1: Project Source Files">
|
|
46
|
+
Scan {project-path}/**/* (excluding the exclusion list above)
|
|
47
|
+
Extract: file inventory, directory structure, languages used, entry points
|
|
48
|
+
Report progress: "Scanning project source files... found N files across N directories."
|
|
49
|
+
</action>
|
|
106
50
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</action>
|
|
51
|
+
<action title="Target 2: Project Config Files">
|
|
52
|
+
Scan {project-path}/*.{json,yaml,yml,toml,xml,env.example} (root-level config files)
|
|
53
|
+
Extract: config keys, settings, dependency declarations
|
|
54
|
+
Report progress: "Scanning project config files... found N config files."
|
|
112
55
|
</action>
|
|
113
56
|
|
|
114
|
-
<action
|
|
115
|
-
Scan
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Scan {planning_artifacts}/prd.md
|
|
119
|
-
Extract: functional requirements, non-functional requirements, user stories overview, feature list, product goals.
|
|
120
|
-
Report progress: "Scanning prd.md for Derek... extracted N requirements."
|
|
121
|
-
</action>
|
|
122
|
-
|
|
123
|
-
<action title="Target 2: Epics and Stories">
|
|
124
|
-
Scan {planning_artifacts}/epics-and-stories.md
|
|
125
|
-
Extract: epic list, story breakdown, acceptance criteria summaries, dependency graph, sizing data.
|
|
126
|
-
Report progress: "Scanning epics-and-stories.md for Derek... extracted N epics, N stories."
|
|
127
|
-
</action>
|
|
128
|
-
|
|
129
|
-
<action title="Target 3: Sprint Status">
|
|
130
|
-
Scan {implementation_artifacts}/sprint-status.yaml
|
|
131
|
-
Extract: current sprint state, story statuses, velocity data, blocked items, completion rates.
|
|
132
|
-
Report progress: "Scanning sprint-status.yaml for Derek... extracted sprint state."
|
|
133
|
-
</action>
|
|
57
|
+
<action title="Target 3: Project Package Manifests">
|
|
58
|
+
Scan {project-path}/**/package.json, pubspec.yaml, pom.xml, build.gradle, requirements.txt, Cargo.toml, go.mod, Gemfile, *.csproj (whichever exist)
|
|
59
|
+
Extract: dependencies, versions, scripts, build targets
|
|
60
|
+
Report progress: "Scanning package manifests... found N manifests."
|
|
134
61
|
</action>
|
|
135
62
|
|
|
136
|
-
<action
|
|
137
|
-
Scan
|
|
63
|
+
<action title="Target 4: Planning Artifacts">
|
|
64
|
+
Scan {project-root}/docs/planning-artifacts/*.md
|
|
65
|
+
Extract: artifact name, type, date
|
|
66
|
+
Report progress: "Scanning planning artifacts... found N artifacts."
|
|
67
|
+
</action>
|
|
138
68
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
69
|
+
<action title="Target 5: Implementation Artifacts">
|
|
70
|
+
Scan {project-root}/docs/implementation-artifacts/*.md
|
|
71
|
+
Extract: artifact name, type, story key if applicable
|
|
72
|
+
Report progress: "Scanning implementation artifacts... found N artifacts."
|
|
73
|
+
</action>
|
|
144
74
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
</action>
|
|
75
|
+
<action title="Target 6: Test Artifacts">
|
|
76
|
+
Scan {project-root}/docs/test-artifacts/*.md
|
|
77
|
+
Extract: artifact name, type, coverage area
|
|
78
|
+
Report progress: "Scanning test artifacts... found N artifacts."
|
|
150
79
|
</action>
|
|
151
80
|
</step>
|
|
152
81
|
|
|
153
|
-
<step n="
|
|
154
|
-
<action>Compare scan results against previous state from Step
|
|
82
|
+
<step n="6" title="Compare and Detect Changes">
|
|
83
|
+
<action>Compare scan results against previous state from Step 4</action>
|
|
155
84
|
<action>Classify each entry as: ADDED (new file not in previous state), UPDATED (file exists but metadata changed), UNCHANGED (no changes detected)</action>
|
|
156
85
|
<action if="full mode">For entries in previous state not found in scan results: mark as REMOVED with detection date (e.g., "REMOVED (file deleted, detected 2026-03-19)"). Do NOT silently delete entries.</action>
|
|
157
86
|
<action if="incremental mode">Skip deletion detection — incremental mode cannot detect deletions. This is a documented limitation.</action>
|
|
158
87
|
<action>Load ground-truth-management skill section: conflict-resolution (JIT) if any conflicts are detected between scan results and existing entries</action>
|
|
159
88
|
</step>
|
|
160
89
|
|
|
161
|
-
<step n="
|
|
162
|
-
<action>Update ground-truth.md
|
|
90
|
+
<step n="7" title="Write Ground Truth">
|
|
91
|
+
<action>Update {memory_path}/validator-sidecar/ground-truth.md with all scan results</action>
|
|
163
92
|
<action>Write header with last-refresh timestamp set to current date/time</action>
|
|
164
|
-
<action>Organize entries by category
|
|
93
|
+
<action>Organize entries by category: Agents, Workflows, Skills, Commands, Manifests, Config, Artifacts</action>
|
|
165
94
|
<action>Include verified counts, locations, and structural patterns for each category</action>
|
|
166
95
|
<action>Preserve REMOVED entries with their detection dates — do not purge</action>
|
|
167
96
|
</step>
|
|
168
97
|
|
|
169
|
-
<step n="
|
|
98
|
+
<step n="8" title="Generate Diff Report">
|
|
170
99
|
<action>Generate diff/delta report summarizing changes since last refresh</action>
|
|
171
100
|
<action>Include counts by category: added, removed, updated entries</action>
|
|
172
101
|
<action>Include total entry count across all categories</action>
|
|
@@ -174,48 +103,23 @@
|
|
|
174
103
|
<action>Present the full diff report to the user</action>
|
|
175
104
|
</step>
|
|
176
105
|
|
|
177
|
-
<step n="
|
|
178
|
-
<action>Append the diff/delta report to
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
- theo: {memory_path}/architect-sidecar/decision-log.md
|
|
182
|
-
- derek: {memory_path}/pm-sidecar/decision-log.md
|
|
183
|
-
- nate: {memory_path}/sm-sidecar/decision-log.md
|
|
184
|
-
Never write to another agent's decision-log.md — this would violate cross-agent write isolation.</action>
|
|
185
|
-
<action>Include date, refresh mode (full or incremental), target agent name, and summary</action>
|
|
186
|
-
<action>Format: "## Refresh — {date} ({mode}) — Agent: {agent_name}\n{summary}"</action>
|
|
106
|
+
<step n="9" title="Log to Decision Log">
|
|
107
|
+
<action>Append the diff/delta report to {memory_path}/validator-sidecar/decision-log.md</action>
|
|
108
|
+
<action>Include date, refresh mode (full or incremental), and summary</action>
|
|
109
|
+
<action>Format: "## Refresh — {date} ({mode})\n{summary}"</action>
|
|
187
110
|
</step>
|
|
188
111
|
|
|
189
|
-
<step n="
|
|
112
|
+
<step n="10" title="Check Token Budget">
|
|
190
113
|
<action>Load ground-truth-management skill section: token-budget (JIT)</action>
|
|
191
|
-
<action>
|
|
192
|
-
|
|
193
|
-
- Theo: 150K (150,000 tokens)
|
|
194
|
-
- Derek: 100K (100,000 tokens)
|
|
195
|
-
- Nate: 100K (100,000 tokens)
|
|
196
|
-
These are distinct from the 300K session_budget — ground_truth_budget controls only ground-truth.md size.</action>
|
|
197
|
-
<action>Estimate token count of the target agent's ground-truth.md</action>
|
|
198
|
-
<action>If token count exceeds the per-agent budget threshold: trigger archival of oldest REMOVED entries per token-budget skill guidance</action>
|
|
199
|
-
<action if="agent == all">Report per-agent usage separately (e.g., "Theo: 42K/150K, Derek: 18K/100K")</action>
|
|
114
|
+
<action>Estimate token count of ground-truth.md</action>
|
|
115
|
+
<action>If token count exceeds budget threshold: trigger archival of oldest REMOVED entries per token-budget skill guidance</action>
|
|
200
116
|
<action>Report token usage to user</action>
|
|
201
117
|
</step>
|
|
202
118
|
|
|
203
|
-
<step n="
|
|
119
|
+
<step n="11" title="Present Results">
|
|
204
120
|
<template-output file="{memory_path}/validator-sidecar/ground-truth.md">
|
|
205
|
-
Ground truth refreshed
|
|
206
|
-
Output path is resolved at runtime based on --agent parameter (defaults to validator-sidecar).
|
|
121
|
+
Ground truth refreshed with verified inventory of all framework components.
|
|
207
122
|
Includes last-refresh timestamp, categorized entries, and REMOVED markers for deleted files.
|
|
208
123
|
</template-output>
|
|
209
124
|
</step>
|
|
210
|
-
|
|
211
|
-
<step n="13" title="Orchestrate --agent all" if="agent == all">
|
|
212
|
-
<action>Run refresh sequentially for each agent in order: val, theo, derek, nate.
|
|
213
|
-
Each agent's refresh completes fully (Steps 2-12) before the next begins.
|
|
214
|
-
No cross-contamination of sidecar writes — each agent writes only to its own sidecar.</action>
|
|
215
|
-
<action>On per-agent failure (e.g., missing source file like prd.md): log the error with reason, continue with remaining agents. Do not halt the entire sequence.</action>
|
|
216
|
-
<action>After all agents complete: present a combined summary with per-agent status:
|
|
217
|
-
- Which agents succeeded and their entry counts
|
|
218
|
-
- Which agents failed and the failure reasons
|
|
219
|
-
Format: "Refresh complete. Results: Val: OK (N entries), Theo: OK (N entries), Derek: FAILED (prd.md not found), Nate: OK (N entries)."</action>
|
|
220
|
-
</step>
|
|
221
125
|
</workflow>
|
|
@@ -9,11 +9,6 @@ installed_path: "{project-root}/_gaia/lifecycle/workflows/4-implementation/val-r
|
|
|
9
9
|
instructions: "{installed_path}/instructions.xml"
|
|
10
10
|
validation: "{installed_path}/checklist.md"
|
|
11
11
|
parameters:
|
|
12
|
-
agent:
|
|
13
|
-
flag: "--agent"
|
|
14
|
-
description: "Which Tier 1 agent's ground truth to refresh. Defaults to val for backward compatibility."
|
|
15
|
-
default: "val"
|
|
16
|
-
allowed_values: [val, theo, derek, nate, all]
|
|
17
12
|
incremental:
|
|
18
13
|
flag: "--incremental"
|
|
19
14
|
description: "Only scan files modified since last refresh timestamp. Full refresh is default."
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
/gaia-review-api (optional, if APIs) → /gaia-adversarial → /gaia-test-design → /gaia-test-framework (optional) → /gaia-create-epics → /gaia-threat-model → /gaia-infra-design → /gaia-trace → /gaia-ci-setup → /gaia-readiness-check</action>
|
|
83
83
|
</step>
|
|
84
84
|
|
|
85
|
-
<step n="7" title="Bootstrap
|
|
85
|
+
<step n="7" title="Bootstrap Agent Ground Truth" optional="true">
|
|
86
86
|
<action>Check if Val is installed: verify {project-root}/_gaia/lifecycle/agents/validator.md exists AND {memory_path}/validator-sidecar/ directory exists</action>
|
|
87
87
|
<check if="validator.md not found OR validator-sidecar/ not found">Skip Step 7 silently — Val is not installed. Brownfield onboarding continues without ground truth bootstrap.</check>
|
|
88
88
|
|
|
@@ -102,6 +102,74 @@
|
|
|
102
102
|
|
|
103
103
|
<action>Write extracted project facts to {memory_path}/validator-sidecar/ground-truth.md. If ground-truth.md already exists with content: merge new facts with existing entries — add new facts, update changed facts, flag removed facts — never destructive overwrite. Follow merge semantics from ground-truth-management conflict-resolution section. If ground-truth.md is empty or new: write all extracted facts as initial seed entries with verification count = 1.</action>
|
|
104
104
|
<action>Report: "Seeded {N} ground-truth entries from brownfield artifacts + filesystem scan"</action>
|
|
105
|
+
|
|
106
|
+
<!-- Step 7d/7e/7f: Tier 1 Agent Ground Truth Bootstrap (E9-S12) -->
|
|
107
|
+
|
|
108
|
+
<ask>Bootstrap Tier 1 agent ground truth (Theo, Derek, Nate)? [y/n]</ask>
|
|
109
|
+
|
|
110
|
+
<action>JIT load ground-truth-management skill sections from {project-root}/_gaia/lifecycle/skills/ground-truth-management.md: entry-structure, conflict-resolution, brownfield-extraction. All ground-truth entries must follow the canonical entry format from the entry-structure section. When the same fact appears in multiple source documents with conflicting values (e.g., different version numbers), annotate the entry with "conflicting sources: {source1} says X, {source2} says Y" and use the higher-precedence source (brownfield-assessment.md > project-documentation.md for tech stack facts).</action>
|
|
111
|
+
|
|
112
|
+
<!-- Step 7d: Theo (Architect) ground truth extraction (AC1) -->
|
|
113
|
+
<action>Step 7d — Theo ground truth extraction.
|
|
114
|
+
Read {planning_artifacts}/architecture.md and extract:
|
|
115
|
+
— Tech stack (languages, frameworks, runtime versions) → variable-inventory entries
|
|
116
|
+
— ADRs (architecture decision records — ID, title, status, rationale) → structural-pattern entries
|
|
117
|
+
— Component inventory (modules, packages, services) → file-inventory entries
|
|
118
|
+
— Dependency map (internal and external dependencies) → cross-reference entries
|
|
119
|
+
|
|
120
|
+
If {planning_artifacts}/architecture.md does not exist: fall back to {planning_artifacts}/brownfield-assessment.md for Theo. Extract tech stack, file counts, and project structure from the brownfield assessment instead.
|
|
121
|
+
|
|
122
|
+
Token budget guard: Theo has a 150K token budget (150,000 tokens). Estimate extraction size (characters / 4). If estimated tokens exceed 60% threshold (90,000 tokens), trim to highest-signal entries — prioritize ADRs and tech stack over detailed file inventories.
|
|
123
|
+
|
|
124
|
+
Write extracted entries to {memory_path}/architect-sidecar/ground-truth.md.
|
|
125
|
+
If the {memory_path}/architect-sidecar/ directory does not exist, create it along with a new ground-truth.md file with standard headers.
|
|
126
|
+
If ground-truth.md already exists with content: follow merge semantics from the conflict-resolution section — add new entries, update changed entries, preserve existing entries. Never perform a destructive overwrite.</action>
|
|
127
|
+
|
|
128
|
+
<!-- Step 7e: Derek (Product Manager) ground truth extraction (AC2) -->
|
|
129
|
+
<action>Step 7e — Derek ground truth extraction.
|
|
130
|
+
Read {planning_artifacts}/prd.md and extract:
|
|
131
|
+
— Functional requirements (feature list, requirement IDs) → structural-pattern entries
|
|
132
|
+
— User stories and acceptance criteria summaries → cross-reference entries
|
|
133
|
+
|
|
134
|
+
If {planning_artifacts}/prd.md does not exist: fall back to {planning_artifacts}/prd-brownfield-gaps.md as the alternate PRD path for Derek.
|
|
135
|
+
|
|
136
|
+
Read {planning_artifacts}/epics-and-stories.md and extract for Derek:
|
|
137
|
+
— Epic overview (epic IDs, titles, story counts) → file-inventory entries
|
|
138
|
+
— Story-to-epic mappings → cross-reference entries
|
|
139
|
+
|
|
140
|
+
Read {test_artifacts}/nfr-assessment.md (if present) and extract for Derek:
|
|
141
|
+
— Quality baselines (performance targets, security posture, test coverage) → variable-inventory entries
|
|
142
|
+
If {test_artifacts}/nfr-assessment.md does not exist: log warning "nfr-assessment.md not found in test_artifacts — skipping quality baselines for Derek" and continue without error.
|
|
143
|
+
|
|
144
|
+
Token budget guard: Derek has a 100K token budget (100,000 tokens). Estimate extraction size (characters / 4). If estimated tokens exceed 60% threshold (60,000 tokens), trim to highest-signal entries — prioritize functional requirements and epic summaries over detailed story mappings.
|
|
145
|
+
|
|
146
|
+
Write extracted entries to {memory_path}/pm-sidecar/ground-truth.md.
|
|
147
|
+
If the {memory_path}/pm-sidecar/ directory does not exist, create it along with a new ground-truth.md file with standard headers.
|
|
148
|
+
If ground-truth.md already exists with content: follow merge semantics from the conflict-resolution section — add new entries, update changed entries, preserve existing entries. Never perform a destructive overwrite.</action>
|
|
149
|
+
|
|
150
|
+
<!-- Step 7f: Nate (Scrum Master) ground truth extraction (AC3) -->
|
|
151
|
+
<action>Step 7f — Nate ground truth extraction.
|
|
152
|
+
Read {implementation_artifacts}/sprint-status.yaml (if it exists) and extract for Nate:
|
|
153
|
+
— Current sprint ID, story count, points total → variable-inventory entries
|
|
154
|
+
— Story status distribution → structural-pattern entries
|
|
155
|
+
|
|
156
|
+
Read {memory_path}/sm-sidecar/velocity-data.md (if it exists) and extract for Nate:
|
|
157
|
+
— Velocity history (sprint-over-sprint) → variable-inventory entries
|
|
158
|
+
— Capacity data → variable-inventory entries
|
|
159
|
+
|
|
160
|
+
If neither {implementation_artifacts}/sprint-status.yaml nor {memory_path}/sm-sidecar/velocity-data.md exists: complete this step gracefully with a log message "insufficient sprint data, velocity unavailable" and write ground-truth.md omitting velocity entries. Do not raise an error.
|
|
161
|
+
|
|
162
|
+
Token budget guard: Nate has a 100K token budget (100,000 tokens). Estimate extraction size (characters / 4). If estimated tokens exceed 60% threshold (60,000 tokens), trim to highest-signal entries — prioritize current sprint status over historical velocity data.
|
|
163
|
+
|
|
164
|
+
Write extracted entries to {memory_path}/sm-sidecar/ground-truth.md.
|
|
165
|
+
If the {memory_path}/sm-sidecar/ directory does not exist, create it along with a new ground-truth.md file with standard headers.
|
|
166
|
+
If ground-truth.md already exists with content: follow merge semantics from the conflict-resolution section — add new entries, update changed entries, preserve existing entries. Never perform a destructive overwrite.</action>
|
|
167
|
+
|
|
168
|
+
<!-- Summary report (AC6) -->
|
|
169
|
+
<action>After all Tier 1 extractions complete, output a summary report:
|
|
170
|
+
"Seeded {N} entries for Theo, {M} entries for Derek, {K} entries for Nate"
|
|
171
|
+
If sprint data was absent for Nate, append a note: "(sprint data absent — velocity entries omitted)"
|
|
172
|
+
Include token budget status for each agent (GREEN/YELLOW/RED).</action>
|
|
105
173
|
</step>
|
|
106
174
|
|
|
107
175
|
<next-step command="/gaia-review-api">
|
|
@@ -106,24 +106,14 @@
|
|
|
106
106
|
</step>
|
|
107
107
|
|
|
108
108
|
<step n="7" title="Token Budget Reporting">
|
|
109
|
-
<action>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
- Tier 1
|
|
115
|
-
- Tier
|
|
116
|
-
|
|
117
|
-
- Tier 3: no budget enforced
|
|
118
|
-
- Untiered: no budget enforced</action>
|
|
119
|
-
<action>Apply threshold status indicators per archival config:
|
|
120
|
-
- OK: below 80% of budget
|
|
121
|
-
- warning: at or above 80% but below 90%
|
|
122
|
-
- critical: at or above 90% but below 100%
|
|
123
|
-
- over-budget: at or above 100%</action>
|
|
124
|
-
<action>Build Token Budget Table with columns:
|
|
125
|
-
| Agent | Tier | Files Scanned | Token Usage | Session Budget | GT Budget | % Used | Status |
|
|
126
|
-
For Tier 3 and untiered agents: budget column shows "no budget enforced" with actual token count reported</action>
|
|
109
|
+
<action>JIT-load the budget-monitoring section from {project-root}/_gaia/lifecycle/skills/memory-management.md
|
|
110
|
+
Load only the content between <!-- SECTION: budget-monitoring --> and <!-- END SECTION --> markers</action>
|
|
111
|
+
<action>Apply the budget-monitoring skill procedure using file sizes from Step 2 inventory and tier budgets from {memory_path}/config.yaml:
|
|
112
|
+
- Calculate token usage per agent (sum sidecar file sizes, convert via skill formula)
|
|
113
|
+
- Classify each agent by threshold status (OK / warning / critical / over-budget)
|
|
114
|
+
- For Tier 1 agents: also report ground truth budget usage separately
|
|
115
|
+
- For Tier 3 / untiered: report actual tokens with "no budget enforced"</action>
|
|
116
|
+
<action>Build Token Budget Table per the skill's output format</action>
|
|
127
117
|
</step>
|
|
128
118
|
|
|
129
119
|
<step n="8" title="Archival Recommendations">
|
package/gaia-install.sh
CHANGED
|
@@ -6,7 +6,7 @@ set -euo pipefail
|
|
|
6
6
|
# Installs, updates, validates, and reports on GAIA installations.
|
|
7
7
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
8
8
|
|
|
9
|
-
readonly VERSION="1.
|
|
9
|
+
readonly VERSION="1.63.0"
|
|
10
10
|
readonly GITHUB_REPO="https://github.com/jlouage/Gaia-framework.git"
|
|
11
11
|
readonly MANIFEST_REL="_gaia/_config/manifest.yaml"
|
|
12
12
|
|