@magnusekdahl/parallix 1.0.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/CHANGELOG.md +140 -0
- package/LICENSE +661 -0
- package/README.md +196 -0
- package/config/agents.json +25 -0
- package/config/agents.local.json.template +8 -0
- package/config/state-map.json +4 -0
- package/config/state-map.json.template +31 -0
- package/config/workflow.config.schema.json +98 -0
- package/data/.gitkeep +0 -0
- package/docs/adr/0031-ai-agent-instruction-boundary-and-command-floor.md +114 -0
- package/docs/adr/0032-mission-refinement-state-and-usage-budget-signals.md +135 -0
- package/docs/adr/0034-module-and-skill-invocation-model.md +202 -0
- package/docs/adr/0036-mission-sizing-and-dependency-wave-heuristics.md +79 -0
- package/docs/adr/0037-ai-workflow-coordination-architecture.md +162 -0
- package/docs/adr/0041-integration-pipeline-gates.md +165 -0
- package/docs/adr/0042-workflow-cli-color-rendering-approach.md +106 -0
- package/docs/adr/0043-git-target-resolution-strategy.md +185 -0
- package/docs/adr/0044-workflow-distribution-model.md +277 -0
- package/docs/adr/0045-parallax-branch-model.md +182 -0
- package/docs/adr/0046-npm-publish-process-and-security.md +138 -0
- package/docs/adr/index.md +20 -0
- package/docs/agents.md +212 -0
- package/docs/authority-reference.md +298 -0
- package/docs/forgejo-setup.md +31 -0
- package/docs/migration/extraction.md +61 -0
- package/docs/migration/task-classification.md +36 -0
- package/docs/operator-setup.md +76 -0
- package/docs/readme-rewrite-benchmark.md +188 -0
- package/docs/use-cases.md +105 -0
- package/examples/README.md +62 -0
- package/examples/run-enterprise-tarball-workflow-smoke.sh +257 -0
- package/examples/run-verify-env-smoke.sh +40 -0
- package/index.js +250 -0
- package/lib/README.md +13 -0
- package/lib/agents/agents.js +867 -0
- package/lib/agents/claude-telemetry.js +233 -0
- package/lib/agents/claude.js +139 -0
- package/lib/agents/codex-telemetry.js +202 -0
- package/lib/agents/codex.js +219 -0
- package/lib/agents/limit-hit.js +252 -0
- package/lib/agents/mistral-telemetry.js +44 -0
- package/lib/agents/mistral.js +68 -0
- package/lib/agents/opencode-export.js +110 -0
- package/lib/agents/opencode-telemetry.js +356 -0
- package/lib/agents/opencode.js +218 -0
- package/lib/agents/stage-telemetry.js +37 -0
- package/lib/commands/active.js +625 -0
- package/lib/commands/checkpoint.js +76 -0
- package/lib/commands/config.js +39 -0
- package/lib/commands/coverage-gate.js +358 -0
- package/lib/commands/diff.js +119 -0
- package/lib/commands/draft.js +854 -0
- package/lib/commands/handoff.js +501 -0
- package/lib/commands/integrate.js +1528 -0
- package/lib/commands/mission-start.js +246 -0
- package/lib/commands/rebase.js +597 -0
- package/lib/commands/repair-handoff.js +227 -0
- package/lib/commands/resolve-conflict.js +109 -0
- package/lib/commands/review.js +13 -0
- package/lib/commands/setup-review.js +13 -0
- package/lib/commands/setup.js +3 -0
- package/lib/commands/stats-backfill.js +395 -0
- package/lib/commands/stats.js +1601 -0
- package/lib/commands/status.js +183 -0
- package/lib/commands/verify.js +1 -0
- package/lib/core/fmt.js +202 -0
- package/lib/core/git.js +73 -0
- package/lib/core/gitignore.js +110 -0
- package/lib/core/mission-utils.js +1017 -0
- package/lib/core/persistent-data-migration.js +201 -0
- package/lib/core/product-config.js +508 -0
- package/lib/core/runtime-matrix.js +82 -0
- package/lib/core/spawn-tee.js +173 -0
- package/lib/core/state-map.js +89 -0
- package/lib/core/storage.js +165 -0
- package/lib/core/verification.js +149 -0
- package/lib/index.js +77 -0
- package/lib/review/rebase.js +163 -0
- package/lib/review/review-adapter.js +135 -0
- package/lib/review/review-artifacts.js +619 -0
- package/lib/review/review-commands.js +1375 -0
- package/lib/review/review-events.js +1007 -0
- package/lib/review/review-loop.js +1004 -0
- package/lib/review/review-polling.js +141 -0
- package/lib/review/review-prompts.js +212 -0
- package/lib/review/review-state.js +280 -0
- package/lib/review/review.js +96 -0
- package/lib/tools/backlog.js +680 -0
- package/lib/tools/forgejo.js +1585 -0
- package/lib/tools/gatekeeper.js +106 -0
- package/lib/tools/sessions.js +74 -0
- package/lib/tools/setup-review.js +1053 -0
- package/package.json +56 -0
- package/prompts/act-on-review-verbose.md +20 -0
- package/prompts/act-on-review.md +22 -0
- package/prompts/draft.md +20 -0
- package/prompts/execute.md +24 -0
- package/prompts/portfolio.md +30 -0
- package/prompts/review-verbose.md +20 -0
- package/prompts/review.md +17 -0
- package/px.js +236 -0
- package/templates/AGENTS-snippet.md +14 -0
- package/templates/AGENTS.md.template +34 -0
- package/templates/CLAUDE.md.template +27 -0
- package/templates/CODEX.md.template +38 -0
- package/templates/MISTRAL.md.template +24 -0
- package/templates/claude-commands/act-on-review.md +3 -0
- package/templates/claude-commands/area-review.md +3 -0
- package/templates/claude-commands/draft.md +6 -0
- package/templates/claude-commands/execute.md +6 -0
- package/templates/claude-commands/integrate.md +4 -0
- package/templates/claude-commands/portfolio.md +5 -0
- package/templates/claude-commands/review.md +4 -0
- package/templates/codex/config.toml +6 -0
- package/templates/mission-scaffold.md +39 -0
- package/templates/vibe/skills/act-on-review/SKILL.md +16 -0
- package/templates/vibe/skills/area-review/SKILL.md +16 -0
- package/templates/vibe/skills/draft/SKILL.md +16 -0
- package/templates/vibe/skills/execute/SKILL.md +16 -0
- package/templates/vibe/skills/integrate/SKILL.md +16 -0
- package/templates/vibe/skills/portfolio/SKILL.md +21 -0
- package/templates/vibe/skills/review/SKILL.md +16 -0
- package/tools/setup-forgejo-docker.sh +84 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# ADR 0034 — Module and Skill Invocation Model
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-05
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
The repo already has:
|
|
9
|
+
|
|
10
|
+
- `AGENTS.md` as the authority for hard rules, trust tiers, and verification commands
|
|
11
|
+
- `MISSION_FLOW.md` plus mode prompts as the lifecycle and execution surface
|
|
12
|
+
- `MISSION.md` as the per-mission execution contract
|
|
13
|
+
- `Backlog.md` as the current-state layer
|
|
14
|
+
- a Skills layer documented in `docs/ai-workflow/SKILLS_ARCHITECTURE.md`
|
|
15
|
+
|
|
16
|
+
That architecture made the workflow modular, but it left one governance gap unresolved: how agents should select and re-select workflow modules and skills during execution.
|
|
17
|
+
|
|
18
|
+
The current state had three weaknesses:
|
|
19
|
+
|
|
20
|
+
1. the workflow rejected always-loaded optional context, but did not fully define the replacement model
|
|
21
|
+
2. some documents implied explicit invocation, but the repo did not yet decide how much should be phase-driven versus self-invoked versus registry-driven
|
|
22
|
+
3. no durable decision explained how autonomy, explicitness, debuggability, and validation guarantees should coexist
|
|
23
|
+
|
|
24
|
+
This matters because the repo is intentionally multi-agent and tool-agnostic. A hidden or runtime-specific invocation model would undermine portability and make debugging difficult. A manual-only model would undermine autonomy. An always-loaded model would grow the default context surface every time the workflow added a new capability.
|
|
25
|
+
|
|
26
|
+
## Decision Drivers
|
|
27
|
+
|
|
28
|
+
- Keep default context bounded as the workflow gains more modules
|
|
29
|
+
- Preserve autonomy for normal mission execution
|
|
30
|
+
- Keep invocation behavior explicit and inspectable
|
|
31
|
+
- Avoid hidden runtime-specific or wrapper-specific attachment logic
|
|
32
|
+
- Guarantee that validation and review-critical modules cannot be silently skipped
|
|
33
|
+
- Keep the model teachable across Claude, Codex, Gemini, and future runtimes
|
|
34
|
+
- Avoid introducing a heavier registry/control-plane mechanism before it is justified
|
|
35
|
+
|
|
36
|
+
## Considered Options
|
|
37
|
+
|
|
38
|
+
### A. Manual human-triggered invocation
|
|
39
|
+
|
|
40
|
+
Human explicitly names each optional module or skill to load.
|
|
41
|
+
|
|
42
|
+
### B. Fully implicit model-driven auto-loading
|
|
43
|
+
|
|
44
|
+
Runtime heuristics or the model silently decide which modules to attach.
|
|
45
|
+
|
|
46
|
+
### C. Rule-based self-invocation with explicit declaration
|
|
47
|
+
|
|
48
|
+
The agent loads optional modules using explicit repo rules and declares each load.
|
|
49
|
+
|
|
50
|
+
### D. Phase-bound invocation
|
|
51
|
+
|
|
52
|
+
Lifecycle stage determines which modules are used by default.
|
|
53
|
+
|
|
54
|
+
### E. Registry-driven invocation
|
|
55
|
+
|
|
56
|
+
A central registry maps task shape or triggers to module selection.
|
|
57
|
+
|
|
58
|
+
### F. Context-splitting or subagent invocation
|
|
59
|
+
|
|
60
|
+
When task shape changes materially, a new context or subagent handles the new slice.
|
|
61
|
+
|
|
62
|
+
### G. Hybrid of C and D, with stronger guarantees for validation-critical modules
|
|
63
|
+
|
|
64
|
+
Stage/mode establishes the baseline; the agent may explicitly add modules when trigger rules fire; validation and review-critical modules become mandatory once relevant.
|
|
65
|
+
|
|
66
|
+
### H. GSD-style harness-mediated architecture
|
|
67
|
+
|
|
68
|
+
Command entrypoints dispatch into workflow orchestrators, which load template-backed state, helper tooling, and specialized agents behind a compact command façade.
|
|
69
|
+
|
|
70
|
+
## Comparison Summary
|
|
71
|
+
|
|
72
|
+
The mission-local analysis artifact contains the full matrix and measurement evidence:
|
|
73
|
+
|
|
74
|
+
- [Task 019 invocation analysis](../missions/2026/task-019/INVOCATION_MODEL_ANALYSIS.md)
|
|
75
|
+
|
|
76
|
+
Summary outcome:
|
|
77
|
+
|
|
78
|
+
- A is explicit but too dependent on the human
|
|
79
|
+
- B is flexible but too opaque and runtime-sensitive
|
|
80
|
+
- C is strong, but by itself does not give enough stage-level predictability
|
|
81
|
+
- D is strong, but by itself is too rigid for real mid-flight shape changes
|
|
82
|
+
- E is viable later, but too heavy for the current workflow maturity
|
|
83
|
+
- F is a useful secondary tactic, not a good primary invocation model
|
|
84
|
+
- H is credible and has real ergonomic strengths, but adopting it here would imply a broader workflow-architecture migration rather than a bounded invocation-governance decision
|
|
85
|
+
- G best balances autonomy, boundedness, explicitness, and validation integrity
|
|
86
|
+
|
|
87
|
+
## Decision
|
|
88
|
+
|
|
89
|
+
Adopt this invocation model for the repo AI workflow:
|
|
90
|
+
|
|
91
|
+
**Phase-bound default invocation with rule-based self-invocation, explicit declaration, and mandatory validation-module loading.**
|
|
92
|
+
|
|
93
|
+
The model works as follows:
|
|
94
|
+
|
|
95
|
+
1. **Stage-bound baseline**
|
|
96
|
+
- Mode, mission contract, and current checkpoint establish the mandatory baseline context.
|
|
97
|
+
- The baseline includes the relevant authority docs, the current mode prompt, and only the inventory-level visibility needed to discover optional modules.
|
|
98
|
+
|
|
99
|
+
2. **Rule-based optional expansion**
|
|
100
|
+
- The agent may load additional modules or skills only when explicit trigger conditions are met.
|
|
101
|
+
- Trigger conditions include phase change, checkpoint change, entering a new restricted subsystem, failed verification, review feedback, blocked evidence path, or a material task-shape shift.
|
|
102
|
+
|
|
103
|
+
3. **Explicit declaration**
|
|
104
|
+
- Optional module loads must be declared at load time.
|
|
105
|
+
- The declaration must make visible:
|
|
106
|
+
- what is being loaded
|
|
107
|
+
- what triggered the load
|
|
108
|
+
- why the already-loaded set is insufficient
|
|
109
|
+
|
|
110
|
+
4. **Validation and review guarantees**
|
|
111
|
+
- Validation, gate, review, and integration-critical modules are not optional once their gate or handoff point is active.
|
|
112
|
+
- They may still be loaded on demand, but they cannot be skipped silently or replaced by vague "best effort" reasoning.
|
|
113
|
+
|
|
114
|
+
5. **Fallback rule**
|
|
115
|
+
- If no existing module fits, the agent falls back to canonical authorities plus an explicit local plan.
|
|
116
|
+
- The agent does not invent hidden attachment behavior.
|
|
117
|
+
- If the gap is recurring and reusable, it becomes follow-up workflow work rather than an undocumented convention.
|
|
118
|
+
|
|
119
|
+
6. **Context-splitting is secondary**
|
|
120
|
+
- New contexts or subagents may still be used when task shape changes materially.
|
|
121
|
+
- They are not the primary invocation mechanism and do not replace the declaration model above.
|
|
122
|
+
|
|
123
|
+
## What Is Decided
|
|
124
|
+
|
|
125
|
+
- Invocation is not manual-only.
|
|
126
|
+
- Invocation is not hidden auto-loading.
|
|
127
|
+
- Stage and lifecycle position matter for the baseline.
|
|
128
|
+
- Optional expansion is allowed, but only through rule-bounded self-invocation with explicit declaration.
|
|
129
|
+
- Validation and review-critical capabilities must remain impossible to skip silently.
|
|
130
|
+
- The runtime-governing model is repo-defined and tool-agnostic.
|
|
131
|
+
|
|
132
|
+
## What Is Not Decided
|
|
133
|
+
|
|
134
|
+
- No registry schema or control-plane implementation is introduced here.
|
|
135
|
+
- No wrapper-level auto-loader is introduced here.
|
|
136
|
+
- No vendor-specific attachment behavior is standardized here.
|
|
137
|
+
- No new subagent orchestration policy is introduced here beyond keeping it secondary.
|
|
138
|
+
- No new skill inventory expansion is required by this ADR.
|
|
139
|
+
|
|
140
|
+
## Consequences
|
|
141
|
+
|
|
142
|
+
### Positive
|
|
143
|
+
|
|
144
|
+
- The workflow gets an explicit answer for how invocation works without requiring always-loaded detail.
|
|
145
|
+
- Agents retain autonomy during normal execution.
|
|
146
|
+
- Invocation decisions become inspectable and teachable.
|
|
147
|
+
- The Skills layer remains modular without drifting into hidden behavior.
|
|
148
|
+
- The model scales to more modules without forcing them into the default read surface.
|
|
149
|
+
|
|
150
|
+
### Negative
|
|
151
|
+
|
|
152
|
+
- Agents must now follow declaration discipline when adding optional modules.
|
|
153
|
+
- Some prompt and workflow docs need maintenance to keep trigger rules visible and aligned.
|
|
154
|
+
- The model still relies on human-readable rule quality; poor trigger wording would weaken it.
|
|
155
|
+
- Registry-driven automation is deferred, so repeated manual declaration patterns may still exist for a while.
|
|
156
|
+
|
|
157
|
+
## Rejected Options And Why
|
|
158
|
+
|
|
159
|
+
### Manual-only invocation
|
|
160
|
+
|
|
161
|
+
Rejected because it makes autonomous execution too dependent on human prompting quality and handles mid-flight change poorly.
|
|
162
|
+
|
|
163
|
+
### Fully implicit auto-loading
|
|
164
|
+
|
|
165
|
+
Rejected because it weakens explicitness, portability, and debuggability, and creates silent validation risk.
|
|
166
|
+
|
|
167
|
+
### Pure phase-bound invocation
|
|
168
|
+
|
|
169
|
+
Rejected because it is too rigid for real checkpoint and evidence-path changes during execution.
|
|
170
|
+
|
|
171
|
+
### Registry-driven invocation as the primary model
|
|
172
|
+
|
|
173
|
+
Rejected for now because it adds control-plane and maintenance complexity before the governance model itself needs that weight.
|
|
174
|
+
|
|
175
|
+
### Context-splitting or subagent-first invocation
|
|
176
|
+
|
|
177
|
+
Rejected as the primary model because it is too heavy for routine execution and should remain a secondary tactic.
|
|
178
|
+
|
|
179
|
+
### GSD-style harness-mediated architecture
|
|
180
|
+
|
|
181
|
+
Rejected for this mission's target decision because it solves the invocation problem partly by changing a broader set of workflow assumptions:
|
|
182
|
+
|
|
183
|
+
- command façade becomes the dominant entry surface
|
|
184
|
+
- more workflow behavior moves behind installed harness files, templates, and helper tooling
|
|
185
|
+
- the repo's current authority-first visibility would give way to a more orchestration-first model
|
|
186
|
+
|
|
187
|
+
Those are real strengths in GSD, and this ADR does not dismiss them. But adopting that architecture here would exceed the scope of a bounded invocation-governance mission and would effectively reopen larger decisions about authority layout, state ownership, and workflow packaging.
|
|
188
|
+
|
|
189
|
+
## Follow-On Implications
|
|
190
|
+
|
|
191
|
+
- `docs/ai-workflow/CORE_WORKFLOW.md` should explain the invocation loop and re-evaluation triggers explicitly.
|
|
192
|
+
- `docs/ai-workflow/SKILLS_ARCHITECTURE.md` should define the new invocation contract in operational terms.
|
|
193
|
+
- Mode prompts should reference declaration and re-evaluation expectations where needed.
|
|
194
|
+
- Future implementation missions may add metadata or registry support only if they preserve this ADR's explicit declaration and validation guarantees.
|
|
195
|
+
|
|
196
|
+
## Links
|
|
197
|
+
|
|
198
|
+
- [ADR 0023](0023-ai-sdlc-configuration.md)
|
|
199
|
+
- [ADR 0026](0026-ai-task-state-and-agent-recovery-surface.md)
|
|
200
|
+
- [ADR 0032](0032-mission-refinement-state-and-usage-budget-signals.md)
|
|
201
|
+
- [Task 019 mission](../missions/2026/task-019/MISSION.md)
|
|
202
|
+
- [Task 019 invocation analysis](../missions/2026/task-019/INVOCATION_MODEL_ANALYSIS.md)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# ADR 0036: Mission Sizing and Dependency-Wave Heuristics
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-05
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
As the number of concurrent missions and agents increases, the repository requires a standardized way to:
|
|
9
|
+
1. Prevent missions from hitting agent limits (token/usage budgets) midway through implementation.
|
|
10
|
+
2. Enable safe parallel work by managing dependencies.
|
|
11
|
+
3. Optimize the use of finite token budgets across the mission portfolio.
|
|
12
|
+
|
|
13
|
+
Previously, all missions followed the same full `MISSION.md` + checkpoint sequence, regardless of size. This created unnecessary ceremony for small fixes and led to "over-budget" failures for large ones.
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
Introduce three sizing tracks and a dependency-wave planning heuristic.
|
|
18
|
+
|
|
19
|
+
### 1. Sizing Tracks
|
|
20
|
+
|
|
21
|
+
| Track | Scope | Process | Agent Budget |
|
|
22
|
+
|-------|-------|---------|--------------|
|
|
23
|
+
| **Quick Flow** | < 3 files, < 2h estimated, or docs-only. | Minimal `MISSION.md` (Goal, Why Now, Refinement Signals, Gates). Skip detailed checkpoints if straightforward. | < 10% of agent limit |
|
|
24
|
+
| **Full Method** | > 3 files, complex logic, or > 2h. | Standard `MISSION.md` with all sections. Detailed checkpoints. Mandatory external review (C2 review remains required for sensitive scopes per AGENTS.md). | 10-50% of agent limit |
|
|
25
|
+
| **Multi-Wave** | Very large, high risk, or complex dependencies. | Split into multiple `Full Method` missions (waves). | Total > 50% (requiring split) |
|
|
26
|
+
|
|
27
|
+
### 2. "Too Large" Thresholds by Agent
|
|
28
|
+
|
|
29
|
+
A mission is "Too Large" if its `Estimated agent % usage limit` exceeds the following thresholds per session/work-unit:
|
|
30
|
+
|
|
31
|
+
- **Claude**: > 50% of daily limit.
|
|
32
|
+
- **Codex**: > 25% of weekly limit.
|
|
33
|
+
- **Gemini**: > 50% of the reasonable session/context budget (approx. 50k-100k tokens for execution).
|
|
34
|
+
|
|
35
|
+
Missions exceeding these thresholds MUST be split into dependency waves before activation.
|
|
36
|
+
|
|
37
|
+
### 3. Dependency-Wave Heuristic
|
|
38
|
+
|
|
39
|
+
When a mission is too large or has complex dependencies, it must be planned in "waves":
|
|
40
|
+
|
|
41
|
+
- **Wave 1: Foundation**: Infrastructure, core logic, or data models that other parts depend on.
|
|
42
|
+
- **Wave 2: Implementation**: Main features or integration logic.
|
|
43
|
+
- **Wave 3: Polish & Verification**: Advanced UI, edge cases, and final E2E validation.
|
|
44
|
+
|
|
45
|
+
**Wave Execution Rules:**
|
|
46
|
+
1. **Upfront Sequence**: The full sequence of waves must be defined during the `draft` phase of Wave 1.
|
|
47
|
+
2. **Sequential Integration**: Each wave MUST reach `done` status (merged into `master`) before the next dependent wave can transition from `ready` to `active`. Parallel execution of dependent waves is NOT permitted.
|
|
48
|
+
3. **Production Readiness**: Per trunk-based development, each wave MUST be production-ready, functional, and safe for production use upon integration into `master`. No "broken" or "partially-functional" states are permitted in the main branch.
|
|
49
|
+
4. **Integration Boundary**: Each wave is a separate mission. Upon completion, its branch is merged into `master` via a single squash/merge commit.
|
|
50
|
+
5. **Mandatory Review**: Each wave MUST pass its own external review (and C2 review if the scope is sensitive per AGENTS.md) before integration into `master`.
|
|
51
|
+
6. **Context Clearing**: Each subsequent wave MUST be executed in a fresh agent session/context. This prevents context bloat and ensures the previous wave's outcomes are documented well enough for a "new" agent to resume work.
|
|
52
|
+
7. **Context Carryover**: Each subsequent wave's `MISSION.md` must explicitly reference the completed mission and outcomes of the previous wave in its `## Why Now` or `## Context` section.
|
|
53
|
+
8. **Verification Boundary**: Each wave must pass its own validation gates. Wave 3 (or the final wave) must include a full E2E validation of the entire multi-wave feature set.
|
|
54
|
+
|
|
55
|
+
**Parallelism Rules:**
|
|
56
|
+
- Missions can run in parallel ONLY if they do not touch the same files or shared logic.
|
|
57
|
+
- If a dependency exists, the dependent mission must wait until the parent mission is `done` (merged to `master`).
|
|
58
|
+
- Use the `dependencies` field in `Backlog.md` tasks to track these relationships.
|
|
59
|
+
|
|
60
|
+
### 4. Mandatory Task Assignment
|
|
61
|
+
|
|
62
|
+
Agents MUST assign themselves to a task in `Backlog.md` before beginning work in `active` mode. This provides immediate visibility into who is working on what across parallel worktrees.
|
|
63
|
+
|
|
64
|
+
## Consequences
|
|
65
|
+
|
|
66
|
+
### Positive
|
|
67
|
+
- Reduced ceremony for small, straightforward changes.
|
|
68
|
+
- Predictable mission completion within agent limits.
|
|
69
|
+
- Clearer path for splitting large work into manageable units.
|
|
70
|
+
- Improved visibility of parallel work via mandatory assignment.
|
|
71
|
+
|
|
72
|
+
### Negative
|
|
73
|
+
- Requires upfront estimation effort during the `draft` phase.
|
|
74
|
+
- Agents must learn to judge their own usage limits accurately.
|
|
75
|
+
|
|
76
|
+
## Links
|
|
77
|
+
- [ADR 0032](0032-mission-refinement-state-and-usage-budget-signals.md)
|
|
78
|
+
- [MISSION_FLOW.md](../../MISSION_FLOW.md)
|
|
79
|
+
- [AGENTS.md](../../AGENTS.md)
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# ADR 0037: AI Workflow Coordination Architecture
|
|
2
|
+
|
|
3
|
+
Status: Proposed
|
|
4
|
+
Date: 2026-04-06
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
The repo's AI SDLC has a coordination problem that plays out at two points in every mission:
|
|
9
|
+
|
|
10
|
+
**At session start:** A fresh agent must reconstruct the current mission state from multiple sources before doing any useful work. This reconstruction fails systematically — enough to have generated dedicated remediation missions (`backlog-sdlc-instructions-fix`, `repair-autonomous-review-launcher`, `fix-codex-crashes`). See `ARCHITECTURE_PROPOSAL.md §1.2` (task-068) for the full failure enumeration.
|
|
11
|
+
|
|
12
|
+
**At session end or mid-session limit:** An agent hitting a usage limit needs to persist state so the next agent can resume. Currently this relies on checkpoint commits + git log inspection, which agents get wrong under pressure.
|
|
13
|
+
|
|
14
|
+
The workflow already has scripted coordination for review and integration: `node workflow`, `scripts/autonomous-review.sh`, `scripts/verify-local.sh`, `scripts/cleanup-mission-worktree.sh`. Each replaced a documented procedure that agents were failing to follow. The pattern is established: **code beats documentation for coordination steps**.
|
|
15
|
+
|
|
16
|
+
This ADR decides which architectural approach should extend that pattern to the remaining coordination gaps (startup, checkpoint persistence, session handoff).
|
|
17
|
+
|
|
18
|
+
### State layer clarification
|
|
19
|
+
|
|
20
|
+
The repo already has two layers of mission state that do not need to change:
|
|
21
|
+
|
|
22
|
+
**Coarse task lifecycle state:** the Backlog task `status` field (`backlog/tasks/<task-id>*.md`, actual values in `backlog/config.yml`). The workflow uses virtual state names (`backlog | ready | active | review | approved | done`) mapped to actual backlog.md values via `workflow/config/state-map.json`. Authoritative task lifecycle per ADR 0026.
|
|
23
|
+
|
|
24
|
+
**Session handover state:** checkpoint artifact files committed to the mission branch under `docs/missions/2026/<slug>/` (e.g. `CHECKPOINT_3_GSD_COMPARISON.md`). Existing practice for mid-mission handover between agents or sessions.
|
|
25
|
+
|
|
26
|
+
No new state mechanism is needed. The coordination CLI reads these existing surfaces.
|
|
27
|
+
|
|
28
|
+
### GSD CLI tools layer (reference architecture)
|
|
29
|
+
|
|
30
|
+
GSD's `gsd-tools.cjs` is a Node.js CLI with 19 domain modules, handling state, config, phase operations, git commits, and verification. It replaces "repetitive inline bash patterns across ~50 GSD command/workflow/agent files." The architectural separation: agents call the CLI tools; they do not shell out to bash or parse files directly.
|
|
31
|
+
|
|
32
|
+
The selected option below adapts this pattern to this repo's artifacts (MISSION.md, Backlog, Forgejo) instead of GSD's (.planning/, STATE.md, ROADMAP.md).
|
|
33
|
+
|
|
34
|
+
## Decision
|
|
35
|
+
|
|
36
|
+
**Adopt Option C' (Lightweight Node.js Harness, Repo-Adapted).**
|
|
37
|
+
|
|
38
|
+
### Implementation contract
|
|
39
|
+
|
|
40
|
+
- **Package:** `workflow/` directory at project root; entry point `workflow/index.js`; invoked as `node workflow <command> [args]`
|
|
41
|
+
- **Module structure:** each command in its own module under `workflow/lib/` from the start — no accumulation in a single file
|
|
42
|
+
- **Three initial commands:** `mission-start`, `checkpoint`, `status`
|
|
43
|
+
- **State inputs:** Backlog task `status` field + existing checkpoint docs in `docs/missions/2026/<slug>/` — no new state store
|
|
44
|
+
- **Integrates with:** calls Forgejo API via `workflow/lib/forgejo.js`, `scripts/verify-local.sh`, Backlog MCP
|
|
45
|
+
- **New commands:** go in new `workflow/lib/<command>.js` files, not appended to `index.js`
|
|
46
|
+
- **Grows only** when a new coordination gap is identified
|
|
47
|
+
|
|
48
|
+
### Commands
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
node workflow mission-start <slug>
|
|
52
|
+
— verifies directory, branch, reads Backlog task status,
|
|
53
|
+
reads most recent checkpoint doc in docs/missions/2026/<slug>/,
|
|
54
|
+
reads Forgejo PR state, outputs structured PASS/WARN/FAIL report
|
|
55
|
+
|
|
56
|
+
node workflow checkpoint <slug> <cp-name> "<next-action>"
|
|
57
|
+
— runs verify gate, stages all changes including checkpoint doc the agent
|
|
58
|
+
wrote under docs/missions/2026/<slug>/, commits, pushes
|
|
59
|
+
|
|
60
|
+
node workflow status [<slug>]
|
|
61
|
+
— reads Backlog task status, most recent checkpoint doc, last 3 commits,
|
|
62
|
+
Forgejo PR state, uncommitted files; outputs human-readable summary
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Directory layout (initial)
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
workflow/
|
|
69
|
+
index.js — CLI entry, command dispatch
|
|
70
|
+
lib/
|
|
71
|
+
mission-start.js
|
|
72
|
+
checkpoint.js
|
|
73
|
+
status.js
|
|
74
|
+
git.js — shared git helpers
|
|
75
|
+
backlog.js — Backlog task file reader
|
|
76
|
+
forgejo.js — the Forgejo API client
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Fallback
|
|
80
|
+
|
|
81
|
+
Option B (bash scripts) if the Node.js investment is deferred. The architectural principle — scripted coordination layer, agents do not follow documented procedures — is the same.
|
|
82
|
+
|
|
83
|
+
## Decision matrix
|
|
84
|
+
|
|
85
|
+
| Option | Coord. automation | Agent-agnostic | Adoption cost | Compatibility | State quality | Reversibility | Total |
|
|
86
|
+
|---|---|---|---|---|---|---|---|
|
|
87
|
+
| A: Extend instructions | 1 | 5 | 5 | 5 | 1 | 5 | 22 |
|
|
88
|
+
| B: Bash scripts | 4 | 5 | 4 | 5 | 3 | 5 | 26 |
|
|
89
|
+
| C: Full GSD | 5 | 3 | 1 | 3 | 5 | 2 | 19 |
|
|
90
|
+
| **C': Lightweight Node.js** | **4** | **5** | **3** | **5** | **5** | **5** | **27** |
|
|
91
|
+
| D: BMAD-like | 4 | 5 | 1 | 2 | 5 | 2 | 19 |
|
|
92
|
+
| E: Gemini CLI-like | 3 | 3 | 3 | 4 | 3 | 5 | 21 |
|
|
93
|
+
|
|
94
|
+
Scoring: 5 = strongest fit / 1 = weakest fit. Adoption cost scored inversely (5 = lowest cost).
|
|
95
|
+
|
|
96
|
+
## Consequences
|
|
97
|
+
|
|
98
|
+
### Positive
|
|
99
|
+
|
|
100
|
+
- `node workflow` entry point replaces ad-hoc bash coordination across 50+ agent-followed steps
|
|
101
|
+
- No new state store — reads existing Backlog task `status` + checkpoint docs in `docs/missions/2026/<slug>/`
|
|
102
|
+
- Multi-file structure from the start prevents single-file accumulation; module boundaries set before complexity arrives
|
|
103
|
+
- Extends the proven harness pattern (`node workflow`, `scripts/autonomous-review.sh`, `scripts/verify-local.sh`, `scripts/cleanup-mission-worktree.sh`)
|
|
104
|
+
- Node.js handles JSON/YAML parsing, error handling, and testability natively
|
|
105
|
+
|
|
106
|
+
### Negative
|
|
107
|
+
|
|
108
|
+
- Node.js knowledge required for `workflow/` maintenance
|
|
109
|
+
- `node workflow checkpoint` must be called by agents — behavior change from current manual commit practice
|
|
110
|
+
- Module boundary decisions needed as new commands are added
|
|
111
|
+
|
|
112
|
+
## Alternatives considered
|
|
113
|
+
|
|
114
|
+
### Option A: Extend Current Instructions
|
|
115
|
+
|
|
116
|
+
More documentation in AGENTS.md, MISSION_FLOW.md, execute.md.
|
|
117
|
+
|
|
118
|
+
Positive: near-zero adoption cost, trivially reversible.
|
|
119
|
+
|
|
120
|
+
Negative: all observed startup failures happen despite existing documentation. Adding more documentation extends the surface that can fail. Ruled out as primary approach.
|
|
121
|
+
|
|
122
|
+
### Option B: Extend Scripting Support (Bash)
|
|
123
|
+
|
|
124
|
+
Bash scripts in `scripts/`: `mission-start.sh`, `mission-checkpoint.sh`, `mission-status.sh`.
|
|
125
|
+
|
|
126
|
+
Positive: proven pattern in this repo, no new dependencies, simple.
|
|
127
|
+
|
|
128
|
+
Negative: bash quoting and error handling become fragile at scale. JSON/Markdown parsing in bash is error-prone. GSD's experience: gsd-tools.cjs replaced 50+ bash patterns precisely because bash at scale was unmaintainable. Retained as fallback if Node.js investment is deferred.
|
|
129
|
+
|
|
130
|
+
### Option C: Full GSD-like Architecture
|
|
131
|
+
|
|
132
|
+
Install `get-shit-done-cc` npm package; adopt full .planning/ file tree, 60+ commands, 21 specialist agents.
|
|
133
|
+
|
|
134
|
+
Positive: very high coordination automation, excellent state quality.
|
|
135
|
+
|
|
136
|
+
Negative: very high adoption cost, low compatibility (MISSION.md vs .planning/ authority conflict, low reversibility). Full adoption reopens authority questions without new evidence. The CLI tools layer concept is the one adoptable element — extracted as C'.
|
|
137
|
+
|
|
138
|
+
### Option D: BMAD-like Architecture
|
|
139
|
+
|
|
140
|
+
`_bmad/` directory, YAML state machine, 6 agent personas, 34+ workflow files.
|
|
141
|
+
|
|
142
|
+
Positive: high coordination automation, excellent YAML-typed state.
|
|
143
|
+
|
|
144
|
+
Negative: very high adoption cost, low compatibility with existing AGENTS.md + MISSION.md. Tier-1 ideas (readiness gate, adversarial review) already adopted via ADR 0033/TASK-055. Full framework disproportionate for a 5-8h/week personal project.
|
|
145
|
+
|
|
146
|
+
### Option E: Gemini CLI-like Architecture
|
|
147
|
+
|
|
148
|
+
Per-CLI config files (`~/.gemini/settings.json`, `.gemini/settings.json`) plus MCP server integration.
|
|
149
|
+
|
|
150
|
+
Positive: correct for per-CLI workspace configuration (already in use).
|
|
151
|
+
|
|
152
|
+
Negative: per-CLI config is correct for workspace scope, not session handoff. Session state must be git-native (on the mission branch) to be accessible to all agents. Wrong layer for this problem.
|
|
153
|
+
|
|
154
|
+
## Links
|
|
155
|
+
|
|
156
|
+
- [ADR 0026](0026-ai-task-state-and-agent-recovery-surface.md) — Backlog as current-state layer
|
|
157
|
+
- [ADR 0030](0030-selective-gsd-strategy.md) — Selective GSD strategy
|
|
158
|
+
- [ADR 0033](0033-workflow-toolkit-comparative-scan.md) — Toolkit scan (BMAD, Aider)
|
|
159
|
+
- [ADR 0034](0034-module-and-skill-invocation-model.md) — Invocation model
|
|
160
|
+
- [ARCHITECTURE_PROPOSAL.md](../missions/2026/task-068/ARCHITECTURE_PROPOSAL.md) §6 — Harness-first analysis
|
|
161
|
+
- [FOLLOW_UP_MISSIONS.md](../missions/2026/task-068/FOLLOW_UP_MISSIONS.md) — F0 implements this ADR
|
|
162
|
+
- GSD architecture: `/tmp/gsd-harness/docs/ARCHITECTURE.md` (cloned 2026-04-06, v1.33.0)
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# ADR 0041: Integration-time pipeline gates + per-area gate dehallucination
|
|
2
|
+
|
|
3
|
+
Status: Accepted
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
The repo runs integration via `node workflow integrate`, which currently performs only preflight checks and squash-merge operations. There are two active problems:
|
|
8
|
+
|
|
9
|
+
1. **Missing integration-time gates:** Staging deploy and e2e validation do not run as part of integration. task-1093 recorded that "I have not been running the full e2e web tests flows as part of the mission integration, as a result of this the store tests have been failing." This creates a gap where integration can land code that breaks staging.
|
|
10
|
+
|
|
11
|
+
2. **Hallucinated per-area web gate:** `scripts/verify-local.sh:41` (inside `gate_web()`) invokes `web-client/scripts/run-playwright-stage.sh` against `https://staging.wrgroceries.com` on every `./scripts/verify-local.sh web` call. The help banner at `scripts/verify-local.sh:196` says `web` covers only "lint + tsc + jest + coverage (85% gate) + Next.js build" — implementation and documentation disagree. Since staging is not redeployed on every agent edit, this gate silently validates the agent's local diff against a stale, unrelated environment, producing **green false positives when the diff is broken** and noise when stage is sick for unrelated reasons.
|
|
12
|
+
|
|
13
|
+
ADR 0028 (line 58) explicitly noted "the current CI lane currently proves wiring and review visibility more than full clean-checkout confidence; broader PR-time gates remain a follow-up tradeoff decision." This ADR addresses that follow-up.
|
|
14
|
+
|
|
15
|
+
Task-1063 is extracting `workflow/` as a standalone product. Any integration pipeline must therefore read visualBoard-specific paths from a **repo-side config file**, not hardcode them into `workflow/lib/*.js`.
|
|
16
|
+
|
|
17
|
+
## Options Evaluated
|
|
18
|
+
|
|
19
|
+
| Option | Local-first fit | Config seam | Credentials burden | Visibility | Abort-before-merge | Reusability |
|
|
20
|
+
|--------|-----------------|-------------|-------------------|------------|-------------------|-------------|
|
|
21
|
+
| **A. CLI preflight (in `node workflow integrate`)** | High | Repo config | None (workstation) | CLI output | Yes | Single path |
|
|
22
|
+
| **B. Forgejo Actions / runner-side** | Medium | Repo config | Runner: docker push + kustomize | PR UI | Yes | PR-time + manual |
|
|
23
|
+
| **C. Hybrid via new `integrate` area in `verify-local.sh`** | High | Repo config | None (workstation) | CLI output | Yes | Both `integrate` CLI and future Actions |
|
|
24
|
+
|
|
25
|
+
### Option A: CLI preflight (in `node workflow integrate`)
|
|
26
|
+
|
|
27
|
+
Extend `buildIntegrationContext` / `printIntegrationPreflight` (`workflow/lib/integrate.js:400`) to read a repo-side config and dispatch area gates before the dry-merge step.
|
|
28
|
+
|
|
29
|
+
**Pros:**
|
|
30
|
+
- Same process as the squash; easy abort before merge
|
|
31
|
+
- No new runner credentials needed
|
|
32
|
+
- No new services to maintain
|
|
33
|
+
|
|
34
|
+
**Cons:**
|
|
35
|
+
- Long-running build/deploy becomes part of a CLI command on the workstation
|
|
36
|
+
- Progress/visibility limited to terminal output
|
|
37
|
+
|
|
38
|
+
### Option B: Forgejo Actions / runner-side
|
|
39
|
+
|
|
40
|
+
Create new `.forgejo/workflows/integrate.yml` triggered on `mission/**` branch updates or PR open.
|
|
41
|
+
|
|
42
|
+
**Pros:**
|
|
43
|
+
- Visible in PR UI
|
|
44
|
+
- Reproducible runner environment
|
|
45
|
+
- Matches ADR 0028's broader-PR-gate trigger
|
|
46
|
+
|
|
47
|
+
**Cons:**
|
|
48
|
+
- Requires runner to hold docker push + kustomize credentials
|
|
49
|
+
- Longer feedback loop (runner availability, queue time)
|
|
50
|
+
- Grows ops surface (runner lifecycle, secrets management)
|
|
51
|
+
|
|
52
|
+
### Option C: Hybrid via a new `integrate` area in `scripts/verify-local.sh`
|
|
53
|
+
|
|
54
|
+
Add an `integrate` area to `scripts/verify-local.sh` (today's areas: `docs|workflow|web|server|auth|android|k8s|deps|all` per `scripts/verify-local.sh:172-189`) that performs change-detection + per-area dispatch. Both `node workflow integrate` and a future Forgejo workflow file invoke it.
|
|
55
|
+
|
|
56
|
+
**Pros:**
|
|
57
|
+
- One dispatch surface, no duplication
|
|
58
|
+
- `workflow/lib/*` stays generic (config in repo)
|
|
59
|
+
- Reusable by both CLI and future runner-based CI
|
|
60
|
+
|
|
61
|
+
**Cons:**
|
|
62
|
+
- Still requires gating `node workflow integrate` to require it
|
|
63
|
+
- Needs an executable spec for the area-key\u21a6command map
|
|
64
|
+
|
|
65
|
+
## Decision
|
|
66
|
+
|
|
67
|
+
**Choose Option C: Hybrid via new `integrate` area in `scripts/verify-local.sh`**, with `node workflow integrate` invoking it as a preflight step.
|
|
68
|
+
|
|
69
|
+
**Rationale:**
|
|
70
|
+
|
|
71
|
+
- **Local-first preservation:** Option C keeps execution on the workstation without introducing new credentials or services. Option B would require docker push + kustomize credentials on the runner, which is a material ops burden not justified by current signal.
|
|
72
|
+
- **Workflow-product boundary:** The area-key\u21a6command map lives in a repo-side config file (`config/integration-pipelines.json`). This preserves the task-1063 workflow-product boundary — no visualBoard-specific paths appear in `workflow/lib/*.js`.
|
|
73
|
+
- **Future extensibility:** Once Option C is proven locally, a Forgejo Actions workflow can invoke the same `integrate` area. This defers the runner credential question until we have evidence that the local workstation cannot handle the load.
|
|
74
|
+
- **Abort-before-merge invariant:** The dispatch runs as part of `printIntegrationPreflight` (before the squash-merge at `workflow/lib/integrate.js:319`), so any gate failure aborts before the merge lands.
|
|
75
|
+
|
|
76
|
+
### Follow-up trigger
|
|
77
|
+
|
|
78
|
+
Revisit Option B (Forgejo Actions) when the median `pr_fix_rounds` across a trailing 20-mission window exceeds 2, **or** when the local workstation proves unable to complete integration gates within 30 minutes wall-time for a typical single-area mission. This trigger is grounded in the available `workflow/data/stats.csv` signal.
|
|
79
|
+
|
|
80
|
+
## Data and Evidence
|
|
81
|
+
|
|
82
|
+
### 1. Originating incident
|
|
83
|
+
|
|
84
|
+
> task-1093 (`backlog/completed/task-1093 - The-end-to-end-tests-are-broken.md:18`, closed 2026-05-16):
|
|
85
|
+
> > "I have not been running the full e2e web tests flows as part of the mission integration, as a result of this the store tests have been failing."
|
|
86
|
+
|
|
87
|
+
This mission (task-1094) was filed 9 minutes later (`backlog/tasks/task-1094 ...md:6`, `2026-05-16 17:45`). The incident directly links missing integration-time e2e execution to production failures.
|
|
88
|
+
|
|
89
|
+
### 2. Help/implementation drift
|
|
90
|
+
|
|
91
|
+
The `gate_web` function at `scripts/verify-local.sh:36-42` includes:
|
|
92
|
+
```bash
|
|
93
|
+
run_gate "web:e2e" sh -c "cd web-client && ./scripts/run-playwright-stage.sh"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The help banner at `scripts/verify-local.sh:196` states:
|
|
97
|
+
```
|
|
98
|
+
web — lint + tsc + jest + coverage (85% gate) + Next.js build
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The help text **excludes** e2e. This is evidence that the stage-e2e line (line 41) is unintentional drift, not a designed gate.
|
|
102
|
+
|
|
103
|
+
### 3. Per-area gate audit
|
|
104
|
+
|
|
105
|
+
Inspection of all other `gate_*` functions (`scripts/verify-local.sh:145-170`) found **no** equivalent network-dependent hallucination:
|
|
106
|
+
|
|
107
|
+
- `gate_server` (lines 145-148): checkstyle, spotbugs, compile, test — all local
|
|
108
|
+
- `gate_auth` (lines 150-153): checkstyle, spotbugs, compile, test — all local
|
|
109
|
+
- `gate_android` (lines 155-157): detekt, unit-jacoco — all local
|
|
110
|
+
- `gate_k8s` (lines 159-160): validate-k8s.sh — local dry-run validation
|
|
111
|
+
- `gate_deps` (lines 162-163): dependency-vuln-gate.sh — local scanning
|
|
112
|
+
|
|
113
|
+
**Result:** The hallucination is isolated to `gate_web:web:e2e`.
|
|
114
|
+
|
|
115
|
+
### 4. Available rate signal from `workflow/data/stats.csv`
|
|
116
|
+
|
|
117
|
+
The stats file contains 54 rows as of 2026-05-22 with columns: `date,mission,classification,implementer,pr_fix_rounds`.
|
|
118
|
+
|
|
119
|
+
For the last 20 missions (rows 35-54):
|
|
120
|
+
- `pr_fix_rounds` sorted: `[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8]`
|
|
121
|
+
- **Median:** 1.0
|
|
122
|
+
- **Max:** 8
|
|
123
|
+
- **Count with `pr_fix_rounds >= 3`:** 2 (missions with 4 and 8 rounds)
|
|
124
|
+
|
|
125
|
+
**Interpretation:** The current median of 1.0 suggests most missions do not require multiple fix rounds. However, the presence of outliers (max=8) indicates that some missions do benefit from earlier detection. This is an imperfect proxy for "would integration-time gates have caught the regression earlier" because it measures review rounds, not integration failures. The limitation is acknowledged.
|
|
126
|
+
|
|
127
|
+
### 5. Reasoning chain
|
|
128
|
+
|
|
129
|
+
Option B (Forgejo Actions) would require runner credentials for docker push and kustomize. The only data point that would justify that ops cost is **sustained `pr_fix_rounds >= N` after Option C lands**, demonstrating that local-first execution is insufficient. We adopt **Option C now** — which needs no new credentials and preserves the local-first model — and set the follow-up trigger at `pr_fix_rounds median >= 2 over a trailing 20-mission window`. This threshold is above the current median (1.0) and would be crossed if integration-time gates become systematically necessary.
|
|
130
|
+
|
|
131
|
+
## Consequences
|
|
132
|
+
|
|
133
|
+
### Positive
|
|
134
|
+
|
|
135
|
+
- Integration-time staging deploys and e2e run **before** the squash-merge lands, catching regressions earlier
|
|
136
|
+
- Per-area `web` gate becomes deterministic against local source (no false positives from stale staging)
|
|
137
|
+
- Workflow-product boundary preserved: visualBoard-specific paths live in repo config, not in `workflow/lib/*`
|
|
138
|
+
- One dispatch surface (`integrate` area) reusable by CLI and future CI
|
|
139
|
+
|
|
140
|
+
### Negative
|
|
141
|
+
|
|
142
|
+
- Integration (`node workflow integrate`) wall-time increases by minutes for missions touching multiple areas
|
|
143
|
+
- New config file (`config/integration-pipelines.json`) requires maintenance
|
|
144
|
+
- Agents must learn a new area (`integrate`) and its opt-out flag (`--no-integration-gates`)
|
|
145
|
+
|
|
146
|
+
## Deliverables
|
|
147
|
+
|
|
148
|
+
1. **Repo-side config:** `config/integration-pipelines.json` with entries for `server`, `auth-server`, `web-client`, `web-e2e`; `web-e2e` carries `run_last: true`
|
|
149
|
+
2. **Change detection:** Compute the set of top-level dirs touched by `mission/<slug>` vs the primary branch
|
|
150
|
+
3. **Dispatch in `scripts/verify-local.sh`:** New `gate_integrate()` function and `integrate` area in the case statement
|
|
151
|
+
4. **`node workflow integrate` preflight:** Calls the new `integrate` area as part of `printIntegrationPreflight`
|
|
152
|
+
5. **`--no-integration-gates` flag:** Explicit opt-out for emergencies (Hard Rule #2 preserved)
|
|
153
|
+
6. **`--dry-run` enhancement:** Prints the resolved gate plan (ordered list) and exits without executing
|
|
154
|
+
7. **`gate_web()` fix:** Remove the `web:e2e` line (scripts/verify-local.sh:41)
|
|
155
|
+
8. **Tests:** Unit tests in `scripts/test/` for change-detection, ordering, missing/empty config, command failure abort, dry-run
|
|
156
|
+
9. **ADR update:** This document, added to `docs/adr/index.md`
|
|
157
|
+
10. **Docs:** Update `AGENTS.md` Section 2 and `workflow/README.md`
|
|
158
|
+
|
|
159
|
+
## See Also
|
|
160
|
+
|
|
161
|
+
- ADR 0028: Integration review surface and CI posture
|
|
162
|
+
- ADR 0039: Draft phase discipline and requirements language
|
|
163
|
+
- task-1063: Workflow product extraction
|
|
164
|
+
- task-1093: Originating incident (e2e tests broken)
|
|
165
|
+
- `workflow/data/stats.csv`: Mission stats with `pr_fix_rounds`
|