@magnusekdahl/parallix 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/config/integration-pipelines.json +9 -0
  2. package/docs/adr/0032-mission-refinement-state-and-usage-budget-signals.md +10 -8
  3. package/docs/adr/0036-mission-sizing-and-dependency-wave-heuristics.md +14 -12
  4. package/docs/adr/0041-integration-pipeline-gates.md +1 -1
  5. package/lib/agents/agents.js +737 -838
  6. package/lib/agents/agents.ts +930 -0
  7. package/lib/agents/claude-telemetry.js +149 -154
  8. package/lib/agents/claude-telemetry.ts +233 -0
  9. package/lib/agents/claude.js +121 -131
  10. package/lib/agents/claude.ts +156 -0
  11. package/lib/agents/codex-telemetry.js +176 -164
  12. package/lib/agents/codex-telemetry.ts +205 -0
  13. package/lib/agents/codex.js +168 -201
  14. package/lib/agents/codex.ts +236 -0
  15. package/lib/agents/limit-hit.js +216 -226
  16. package/lib/agents/limit-hit.ts +262 -0
  17. package/lib/agents/mistral-telemetry.js +7 -10
  18. package/lib/agents/mistral-telemetry.ts +44 -0
  19. package/lib/agents/mistral.js +40 -58
  20. package/lib/agents/mistral.ts +84 -0
  21. package/lib/agents/opencode-export.js +126 -127
  22. package/lib/agents/opencode-export.ts +160 -0
  23. package/lib/agents/opencode-telemetry.js +282 -261
  24. package/lib/agents/opencode-telemetry.ts +350 -0
  25. package/lib/agents/opencode.js +263 -305
  26. package/lib/agents/opencode.ts +370 -0
  27. package/lib/agents/stage-telemetry.js +23 -24
  28. package/lib/agents/stage-telemetry.ts +47 -0
  29. package/lib/commands/handoff.js +94 -0
  30. package/lib/commands/integrate.js +10 -4
  31. package/lib/core/fmt.js +140 -211
  32. package/lib/core/fmt.ts +189 -0
  33. package/lib/core/git.js +121 -102
  34. package/lib/core/git.ts +146 -0
  35. package/lib/core/gitignore.js +59 -106
  36. package/lib/core/gitignore.ts +103 -0
  37. package/lib/core/mission-utils.js +833 -875
  38. package/lib/core/mission-utils.ts +998 -0
  39. package/lib/core/nels.js +199 -0
  40. package/lib/core/persistent-data-migration.js +247 -205
  41. package/lib/core/persistent-data-migration.ts +255 -0
  42. package/lib/core/product-config.js +400 -476
  43. package/lib/core/product-config.ts +518 -0
  44. package/lib/core/runtime-matrix.js +41 -87
  45. package/lib/core/runtime-matrix.ts +84 -0
  46. package/lib/core/spawn-tee.js +152 -192
  47. package/lib/core/spawn-tee.ts +202 -0
  48. package/lib/core/state-map.js +92 -92
  49. package/lib/core/state-map.ts +115 -0
  50. package/lib/core/storage.js +101 -129
  51. package/lib/core/storage.ts +182 -0
  52. package/lib/core/verification.js +148 -138
  53. package/lib/core/verification.ts +200 -0
  54. package/package.json +4 -2
  55. package/prompts/draft.md +1 -0
  56. package/prompts/portfolio.md +1 -1
  57. package/px.js +0 -2
  58. package/templates/mission-scaffold.md +1 -1
@@ -0,0 +1,9 @@
1
+ {
2
+ "gates": {
3
+ "lib": {
4
+ "command": "./scripts/verify-local.sh static-analysis",
5
+ "order": 1,
6
+ "run_last": false
7
+ }
8
+ }
9
+ }
@@ -55,22 +55,23 @@ Also adopt one explicit place for selection metadata:
55
55
 
56
56
  `## Refinement Signals` must contain:
57
57
 
58
- - `Estimated agent % usage limit`: one of `0-25%`, `25-50%`, `50-75%`, `75-100%`, `100%+`
58
+ - `Predicted NEL bucket`: one of `Small (0–80)`, `Medium (81–235)`, `Large (235+)` per ADR 0047
59
59
  - `Confidence`: `High`, `Medium`, or `Low`
60
60
  - `Selection note`: `activate as-is`, `split first`, or `defer`, with one short reason
61
61
  - `Main drivers`: the 2-4 factors driving the estimate
62
62
 
63
- Interpretation rule for `% usage limit`:
63
+ Interpretation rule for NEL bucket:
64
64
 
65
- - it is an approximate share of a meaningful AI-assisted execution budget under the current repo workflow
65
+ - it is an approximate measure of engineering change volume (insertions + deletions, whitespace-ignored) for the mission's merge diff against the primary branch
66
66
  - it may reflect scope breadth, trust-tier sensitivity, validation burden, review/handoff overhead, context churn, and cross-surface coupling
67
67
  - it is a selection aid, not a delivery promise or pseudo-scientific schedule estimate
68
+ - NEL is computed by the reusable `nels` module (`lib/core/nels.js`) which excludes workflow/bookkeeping files per ADR 0047
68
69
 
69
70
  Default activation guidance:
70
71
 
71
- - `0-25%` or `25-50%`: normally safe to activate as-is when confidence is not low
72
- - `50-75%`: split first unless the mission is unusually high leverage and already sharply bounded
73
- - `75-100%` or `100%+`: defer or split before activation under normal conditions
72
+ - `Small (0–80)`: normally safe to activate as-is when confidence is not low
73
+ - `Medium (81–235)`: split first unless the mission is unusually high leverage and already sharply bounded
74
+ - `Large (235+)`: defer or split before activation under normal conditions
74
75
  - if confidence is `Low`, keep refining instead of treating the estimate as reliable enough for pickup
75
76
 
76
77
  Current rollout blocker:
@@ -84,14 +85,14 @@ Current rollout blocker:
84
85
 
85
86
  - The workflow now distinguishes "not ready yet" from "ready, but not yet started."
86
87
  - Mission comparison becomes more deliberate because shovel-ready candidates can be compared without immediately activating them.
87
- - The `% usage limit` signal is lightweight enough to aid selection without creating a second planning system.
88
+ - The NEL bucket signal is lightweight enough to aid selection without creating a second planning system.
88
89
  - `MISSION.md` remains the detailed execution contract while Backlog stays the current-state surface.
89
90
 
90
91
  ### Negative
91
92
 
92
93
  - The lifecycle gains one more state conceptually, so operators must learn one more transition.
93
94
  - Some older workflow docs and historical artifacts will continue to mention the earlier five-state model.
94
- - `% usage limit` still depends on judgment and may drift if agents stop recording the main drivers behind the estimate.
95
+ - NEL bucket estimates still depend on judgment and may drift if agents stop recording the main drivers behind the estimate.
95
96
 
96
97
  ## Alternatives Considered
97
98
 
@@ -132,4 +133,5 @@ Negative:
132
133
  ## Links
133
134
 
134
135
  - [ADR 0026](0026-ai-task-state-and-agent-recovery-surface.md)
136
+ - [ADR 0047: Per-Mission Change Size Budget](0047-per-mission-change-size-budget.md) — NEL bucket definitions and exclusion globs
135
137
  - [Mission](../missions/2026/task-024-mission-complexity-estimation/MISSION.md)
@@ -18,21 +18,21 @@ Introduce three sizing tracks and a dependency-wave planning heuristic.
18
18
 
19
19
  ### 1. Sizing Tracks
20
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) |
21
+ | Track | Scope | Process | NEL 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. | 0–80 NEL (Small) |
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). | 81–235 NEL (Medium) |
25
+ | **Multi-Wave** | Very large, high risk, or complex dependencies. | Split into multiple `Full Method` missions (waves). | 235+ NEL (Large) |
26
26
 
27
- ### 2. "Too Large" Thresholds by Agent
27
+ ### 2. "Too Large" Thresholds
28
28
 
29
- A mission is "Too Large" if its `Estimated agent % usage limit` exceeds the following thresholds per session/work-unit:
29
+ A mission is "Too Large" for single-wave execution when its predicted NEL bucket exceeds the following thresholds:
30
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).
31
+ - **Small (0–80 NEL)**: suitable for Quick Flow; no decomposition needed.
32
+ - **Medium (81–235 NEL)**: suitable for Full Method; consider splitting if dependencies are complex.
33
+ - **Large (235+ NEL)**: MUST be split into dependency waves before activation.
34
34
 
35
- Missions exceeding these thresholds MUST be split into dependency waves before activation.
35
+ These thresholds are derived from empirical terciles in task-1355 data (n=29 missions) as documented in ADR 0047. Missions exceeding these thresholds MUST be split into dependency waves before activation.
36
36
 
37
37
  ### 3. Dependency-Wave Heuristic
38
38
 
@@ -70,10 +70,12 @@ Agents MUST assign themselves to a task in `Backlog.md` before beginning work in
70
70
  - Improved visibility of parallel work via mandatory assignment.
71
71
 
72
72
  ### Negative
73
+
73
74
  - Requires upfront estimation effort during the `draft` phase.
74
- - Agents must learn to judge their own usage limits accurately.
75
+ - Agents must estimate NEL buckets, which requires understanding the exclusion rules from ADR 0047.
75
76
 
76
77
  ## Links
77
78
  - [ADR 0032](0032-mission-refinement-state-and-usage-budget-signals.md)
79
+ - [ADR 0047: Per-Mission Change Size Budget](0047-per-mission-change-size-budget.md) — NEL bucket definitions and exclusion globs
78
80
  - [MISSION_FLOW.md](../../MISSION_FLOW.md)
79
81
  - [AGENTS.md](../../AGENTS.md)
@@ -145,7 +145,7 @@ Option B (Forgejo Actions) would require runner credentials for docker push and
145
145
 
146
146
  ## Deliverables
147
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`
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`. Task-1362 added a `lib` entry mapping to `./scripts/verify-local.sh static-analysis` as a required gate for `lib/` changes.
149
149
  2. **Change detection:** Compute the set of top-level dirs touched by `mission/<slug>` vs the primary branch
150
150
  3. **Dispatch in `scripts/verify-local.sh`:** New `gate_integrate()` function and `integrate` area in the case statement
151
151
  4. **`node workflow integrate` preflight:** Calls the new `integrate` area as part of `printIntegrationPreflight`