loadout-ai 0.7.0 → 0.9.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 +148 -1
- package/README.md +160 -315
- package/SECURITY.md +21 -1
- package/catalog/discovered.json +31269 -26003
- package/catalog/packages.json +4 -4
- package/dist/src/cli.js +13 -0
- package/dist/src/commands/agents.js +3 -1
- package/dist/src/commands/catalog-candidate.js +150 -0
- package/dist/src/commands/catalog-workflows.js +147 -0
- package/dist/src/commands/catalog.js +9 -367
- package/dist/src/commands/coordinate.js +586 -0
- package/dist/src/commands/coordination-discussions.js +194 -0
- package/dist/src/commands/coordination-sessions.js +197 -0
- package/dist/src/commands/inventory.js +4 -2
- package/dist/src/core/agents/agent-inspection.js +26 -4
- package/dist/src/core/{routing → agents}/model-config.js +7 -2
- package/dist/src/core/catalog/catalog.js +1 -0
- package/dist/src/core/catalog/registry.js +44 -10
- package/dist/src/core/catalog/safety.js +36 -7
- package/dist/src/core/coordination/adapters/claude-code.js +154 -0
- package/dist/src/core/coordination/adapters/codex.js +137 -0
- package/dist/src/core/coordination/adapters/types.js +64 -0
- package/dist/src/core/coordination/auth.js +59 -0
- package/dist/src/core/coordination/bridge-lease.js +79 -0
- package/dist/src/core/coordination/conflict-preview.js +167 -0
- package/dist/src/core/coordination/contract-diff.js +106 -0
- package/dist/src/core/coordination/coordinator.js +552 -0
- package/dist/src/core/coordination/crash-recovery.js +169 -0
- package/dist/src/core/coordination/daemon.js +667 -0
- package/dist/src/core/coordination/discussion.js +340 -0
- package/dist/src/core/coordination/events.js +161 -0
- package/dist/src/core/coordination/http-api.js +118 -0
- package/dist/src/core/coordination/interrupt-policy.js +89 -0
- package/dist/src/core/coordination/lock.js +110 -0
- package/dist/src/core/coordination/mcp-server.js +424 -0
- package/dist/src/core/coordination/redaction.js +85 -0
- package/dist/src/core/coordination/replay.js +188 -0
- package/dist/src/core/coordination/retention.js +128 -0
- package/dist/src/core/coordination/runtime.js +21 -0
- package/dist/src/core/coordination/session-manager.js +366 -0
- package/dist/src/core/coordination/watcher.js +128 -0
- package/dist/src/core/{routing → delegation}/first-party-skills.js +25 -13
- package/dist/src/core/{routing → delegation}/handoff.js +130 -63
- package/dist/src/core/discovery/candidate-intelligence-evidence.js +108 -0
- package/dist/src/core/discovery/candidate-intelligence-types.js +1 -0
- package/dist/src/core/discovery/candidate-intelligence-validation.js +108 -0
- package/dist/src/core/discovery/candidate-intelligence.js +3 -214
- package/dist/src/core/discovery/community.js +12 -4
- package/dist/src/core/discovery/github-discovery.js +6 -2
- package/dist/src/core/discovery/private-discovery.js +6 -2
- package/dist/src/core/install/reconcile.js +1 -1
- package/dist/src/core/install/source.js +21 -7
- package/dist/src/core/install/uninstall.js +39 -3
- package/dist/src/core/reporting/cli-guide.js +10 -6
- package/dist/src/core/reporting/completion.js +61 -109
- package/dist/src/core/reporting/doctor.js +4 -6
- package/dist/src/core/runtime/bounded-json.js +65 -0
- package/dist/src/core/runtime/github.js +30 -16
- package/dist/src/core/runtime/mcp-recipes.js +1 -1
- package/dist/src/core/workspace/active-policy.js +1 -1
- package/docs/CANDIDATE_INTELLIGENCE.md +9 -2
- package/docs/CATALOG.md +1 -1
- package/docs/CREDENTIAL_AND_UPDATE_POLICY.md +1 -1
- package/docs/DEMO_SCRIPT.md +19 -23
- package/docs/DISCOVERED.md +251 -250
- package/docs/FEATURE_TEST_MATRIX.md +10 -263
- package/docs/GITHUB_AUTHORIZATION.md +5 -0
- package/docs/LIVE_COLLABORATION.md +234 -0
- package/docs/PROVENANCE_AND_COMPARISON.md +1 -1
- package/docs/REFERENCE.md +163 -0
- package/docs/RELEASE_REVIEW.md +1 -2
- package/docs/TESTING.md +17 -1
- package/docs/USER_TEST_GUIDE.md +138 -3
- package/docs/assets/loadout-discover-activate.webp +0 -0
- package/docs/assets/loadout-handoff-coordinate.webp +0 -0
- package/docs/assets/loadout-social-preview.png +0 -0
- package/docs/decisions/001-coordination-jsonl-locking.md +35 -0
- package/docs/decisions/002-local-daemon-authentication.md +32 -0
- package/docs/decisions/003-bounded-agent-discussions.md +91 -0
- package/docs/specs/BOUNDED_AGENT_DISCUSSIONS.md +169 -0
- package/docs/superpowers/plans/2026-09-03-coordination-hardening.md +231 -0
- package/docs/superpowers/plans/2026-09-03-release-readiness.md +232 -0
- package/docs/superpowers/plans/2026-09-04-bounded-agent-discussions.md +121 -0
- package/package.json +18 -7
- package/skills/loadout-handoff/SKILL.md +238 -0
- package/MASTER_PLAN.md +0 -2207
- package/dist/src/core/routing/route.js +0 -539
- package/docs/ACTIVE_SET.md +0 -53
- package/docs/COMPATIBILITY_POLICY.md +0 -22
- package/docs/CONVERSION_AND_SANDBOX.md +0 -27
- package/docs/EVALUATION_PROTOCOL_V1.md +0 -300
- package/docs/HEAD_TO_HEAD_EVALUATION.md +0 -79
- package/docs/PROVIDER_CONFIGURATION.md +0 -45
- package/docs/README_RESEARCH.md +0 -36
- package/docs/REPOSITORY_STABILIZATION.md +0 -190
- package/docs/SAFE_UPDATE_DEMO.md +0 -25
- package/docs/SCHEMA_DECISIONS.md +0 -25
- package/docs/SUBMISSION_COPY.md +0 -90
- package/docs/TEAM_POLICY.md +0 -18
- package/docs/assets/loadout-workflow.png +0 -0
- package/docs/superpowers/plans/2026-07-19-relatable-readme-hero.md +0 -283
- package/docs/superpowers/plans/2026-07-20-loadout-readme-explainer.md +0 -116
- package/docs/superpowers/plans/2026-07-20-project-activation-safety.md +0 -469
- package/docs/superpowers/specs/2026-07-19-relatable-readme-hero-design.md +0 -80
- package/docs/superpowers/specs/2026-07-20-loadout-readme-explainer-design.md +0 -55
- package/docs/superpowers/specs/2026-07-20-project-activation-safety-design.md +0 -228
- package/skills/loadout-router/SKILL.md +0 -120
- /package/dist/src/core/{routing → agents}/credentials.js +0 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Spec: Bounded agent discussions
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Add an opt-in design room in which Claude Code and Codex can discuss one
|
|
6
|
+
technical question, challenge each other's proposals, and record a final
|
|
7
|
+
decision. The user chooses the topic, participants, round count, and provider
|
|
8
|
+
turn budget. Success means the exchange is genuinely bidirectional, bounded,
|
|
9
|
+
auditable, resumable from the coordination log, and unable to edit files merely
|
|
10
|
+
because a discussion was started.
|
|
11
|
+
|
|
12
|
+
The initial release targets two participants. One is the proposer and one is
|
|
13
|
+
the reviewer. A round gives each participant one turn; after the configured
|
|
14
|
+
rounds, the proposer receives one synthesis turn and Loadout records the final
|
|
15
|
+
decision and considered alternative.
|
|
16
|
+
|
|
17
|
+
## Assumptions approved by the user
|
|
18
|
+
|
|
19
|
+
1. `loadout coord discuss start` is explicitly opt-in and may spend paid
|
|
20
|
+
provider turns.
|
|
21
|
+
2. A discussion shares only responses produced for the public design room. It
|
|
22
|
+
does not expose hidden reasoning, unrelated chat history, or provider state.
|
|
23
|
+
3. Discussion prompts forbid code edits and command execution. Implementation
|
|
24
|
+
begins only after the discussion completes and the user acts on the result.
|
|
25
|
+
4. Exactly Claude Code and Codex are supported in the first release, using
|
|
26
|
+
either fresh sessions (`--agents`) or explicit existing sessions
|
|
27
|
+
(`--sessions`).
|
|
28
|
+
5. A discussion has 1-8 rounds and a hard turn budget. The expected budget is
|
|
29
|
+
`rounds * 2 + 1`; invalid or insufficient budgets fail before any paid turn.
|
|
30
|
+
6. Provider output is untrusted, redacted at the existing persistence boundary,
|
|
31
|
+
length-bounded, and stored only as explicit discussion events.
|
|
32
|
+
|
|
33
|
+
## Tech stack
|
|
34
|
+
|
|
35
|
+
- TypeScript 5.7, ESM, Node.js 20+
|
|
36
|
+
- Commander 12 for the public CLI
|
|
37
|
+
- Zod 4 for boundary validation
|
|
38
|
+
- Vitest 4 for unit, integration, and CLI tests
|
|
39
|
+
- Existing Claude Code CLI and official Codex SDK adapters
|
|
40
|
+
- Existing project-local `.handoff/coordination.jsonl` protocol
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Build and static checks
|
|
46
|
+
npm run build
|
|
47
|
+
npm run typecheck
|
|
48
|
+
npm run lint
|
|
49
|
+
npm run format:check
|
|
50
|
+
|
|
51
|
+
# Focused tests
|
|
52
|
+
npx vitest run tests/coordination-discussion.test.ts
|
|
53
|
+
npx vitest run tests/coordination-session-commands.test.ts
|
|
54
|
+
|
|
55
|
+
# Full release gate
|
|
56
|
+
npm run verify:full
|
|
57
|
+
|
|
58
|
+
# Start fresh provider sessions
|
|
59
|
+
loadout coord discuss start "REST or GraphQL for checkout?" \
|
|
60
|
+
--agents claude-code,codex --rounds 4 --max-turns 9
|
|
61
|
+
|
|
62
|
+
# Reuse existing provider sessions
|
|
63
|
+
loadout coord discuss start "REST or GraphQL for checkout?" \
|
|
64
|
+
--sessions claude-code:<session-id> codex:<thread-id> \
|
|
65
|
+
--rounds 4 --max-turns 9
|
|
66
|
+
|
|
67
|
+
# Inspect a discussion without spending provider turns
|
|
68
|
+
loadout coord discuss show <thread-id>
|
|
69
|
+
loadout coord discuss list
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Project structure
|
|
73
|
+
|
|
74
|
+
- `src/core/coordination/discussion.ts`: pure discussion state, prompts,
|
|
75
|
+
orchestration, result formatting, and bounded public transcript.
|
|
76
|
+
- `src/core/coordination/events.ts`: additive discussion payload schema.
|
|
77
|
+
- `src/commands/coordination-discussions.ts`: CLI registration and provider
|
|
78
|
+
session composition.
|
|
79
|
+
- `src/commands/coordinate.ts`: registers the discussion command group.
|
|
80
|
+
- `tests/coordination-discussion.test.ts`: protocol and orchestrator behavior.
|
|
81
|
+
- `tests/coordination-session-commands.test.ts`: public argument parsing.
|
|
82
|
+
- `docs/decisions/003-bounded-agent-discussions.md`: architecture rationale.
|
|
83
|
+
- `docs/LIVE_COLLABORATION.md`, `docs/USER_TEST_GUIDE.md`, `README.md`: user
|
|
84
|
+
workflow and safety language.
|
|
85
|
+
|
|
86
|
+
## Public contract and code style
|
|
87
|
+
|
|
88
|
+
Discussion events extend the existing protocol without changing old events:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
type DiscussionPayload = {
|
|
92
|
+
threadId: string;
|
|
93
|
+
kind: "started" | "proposal" | "critique" | "revision" | "summary" | "closed";
|
|
94
|
+
round: number;
|
|
95
|
+
role: "system" | "proposer" | "reviewer";
|
|
96
|
+
content: string;
|
|
97
|
+
participants?: [string, string];
|
|
98
|
+
replyTo?: string;
|
|
99
|
+
alternatives?: string[];
|
|
100
|
+
unresolved?: string[];
|
|
101
|
+
outcome?: "decided" | "failed";
|
|
102
|
+
};
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Names use current camelCase TypeScript conventions. Inputs and outputs are
|
|
106
|
+
separate interfaces. Boundary schemas are strict and descriptive. Existing
|
|
107
|
+
event error semantics and redaction are reused.
|
|
108
|
+
|
|
109
|
+
## Testing strategy
|
|
110
|
+
|
|
111
|
+
- Unit-test schemas, state reconstruction, prompt safety text, reply chains,
|
|
112
|
+
round limits, turn-budget validation, provider failure, and kill-switch
|
|
113
|
+
behavior with real coordination storage and fake participants.
|
|
114
|
+
- Integration-test a complete alternating discussion and assert the persisted
|
|
115
|
+
event order and final decision.
|
|
116
|
+
- CLI-test parsing for `--agents`, `--sessions`, rounds, and mutually exclusive
|
|
117
|
+
modes without invoking a paid provider.
|
|
118
|
+
- Extend replay/adapter formatting tests so discussion events are legible.
|
|
119
|
+
- Run all coordination suites, then `npm run verify:full`.
|
|
120
|
+
- Manually run one real Claude Code/Codex discussion before publishing 0.9.0.
|
|
121
|
+
|
|
122
|
+
## Boundaries
|
|
123
|
+
|
|
124
|
+
### Always
|
|
125
|
+
|
|
126
|
+
- Validate all CLI and persisted discussion input.
|
|
127
|
+
- Check the kill switch before every provider turn and persisted event.
|
|
128
|
+
- Emit a stable thread ID and reply ID for every public statement.
|
|
129
|
+
- Keep turns sequential so each agent sees the previous public response.
|
|
130
|
+
- Redact and bound shared responses through the canonical event store.
|
|
131
|
+
- Print the exact paid-turn count before starting fresh or resumed sessions.
|
|
132
|
+
|
|
133
|
+
### Ask first
|
|
134
|
+
|
|
135
|
+
- Adding a third provider or more than two participants.
|
|
136
|
+
- Allowing discussion prompts to edit files or execute commands.
|
|
137
|
+
- Adding remote/networked coordination or a hosted message broker.
|
|
138
|
+
- Persisting private provider transcripts or hidden reasoning.
|
|
139
|
+
|
|
140
|
+
### Never
|
|
141
|
+
|
|
142
|
+
- Start paid turns when validation or budget checks fail.
|
|
143
|
+
- Route a discussion output as an instruction outside its thread.
|
|
144
|
+
- Run an unbounded loop or retry provider turns silently.
|
|
145
|
+
- Continue after the kill switch, missing response, or provider rejection.
|
|
146
|
+
- Claim consensus when the synthesis records unresolved disagreement.
|
|
147
|
+
|
|
148
|
+
## Success criteria
|
|
149
|
+
|
|
150
|
+
- `coord discuss start` alternates Claude Code and Codex for exactly the
|
|
151
|
+
requested number of rounds and runs at most the declared turn budget.
|
|
152
|
+
- Every response is a validated `discussion` event with `threadId`, `kind`,
|
|
153
|
+
`round`, `role`, and an explicit reply chain.
|
|
154
|
+
- A successful discussion ends in `summary`, `decision`, and `closed` events;
|
|
155
|
+
a failed discussion ends in a bounded error/closed state without extra turns.
|
|
156
|
+
- `list` and `show` reconstruct bounded discussion state from the JSONL log.
|
|
157
|
+
- Both fresh sessions and explicit existing sessions are supported, but cannot
|
|
158
|
+
be selected together.
|
|
159
|
+
- The kill switch halts the exchange before the next provider turn.
|
|
160
|
+
- Each provider turn defaults to a 120-second timeout and accepts a validated
|
|
161
|
+
10-600 second override.
|
|
162
|
+
- Existing coordination consumers continue to parse and operate unchanged.
|
|
163
|
+
- Focused tests, all coordination tests, build, lint, formatting, package smoke,
|
|
164
|
+
and the complete release gate pass.
|
|
165
|
+
|
|
166
|
+
## Open questions
|
|
167
|
+
|
|
168
|
+
- None for the two-agent MVP. Multi-agent voting, remote machines, and automatic
|
|
169
|
+
implementation are intentionally deferred.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Coordination Hardening Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Make Loadout coordination safe under concurrent processes, secure on localhost, correctly packaged over MCP, truthful about provider capabilities, and releasable behind an explicit beta contract.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Keep the human-readable JSONL audit log, but serialize every state-changing operation through one project-local lock and one canonical validated/redacted write path. Treat the HTTP daemon and stdio MCP server as authenticated/validated adapters over that core. Provider adapters may submit a new turn to a resumable session; they must never claim to inject into an active turn unless the host exposes that capability.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Node.js 20+, TypeScript, Zod, Vitest, `@modelcontextprotocol/sdk` v1, `@openai/codex-sdk`.
|
|
10
|
+
|
|
11
|
+
## Global Constraints
|
|
12
|
+
|
|
13
|
+
- Preserve existing `loadout handoff` behavior and `.handoff/messages.jsonl` compatibility.
|
|
14
|
+
- Persist coordination events before notifying watchers or SSE subscribers.
|
|
15
|
+
- Every persisted event has a unique, strictly increasing sequence number across concurrent processes.
|
|
16
|
+
- Bind HTTP only to loopback and require a project-scoped bearer token for every API/SSE request.
|
|
17
|
+
- Never persist raw secrets through any CLI, HTTP, or MCP write path.
|
|
18
|
+
- Keep destructive actions, publishing, deployment, and permission expansion under user control.
|
|
19
|
+
- Mark provider-driven live turns beta until both installed-host integration tests pass.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### Task 1: Restore the quality gate
|
|
24
|
+
|
|
25
|
+
**Files:**
|
|
26
|
+
|
|
27
|
+
- Modify: `src/core/coordination/adapters/codex.ts`
|
|
28
|
+
- Modify: `src/core/coordination/daemon.ts`
|
|
29
|
+
- Modify: `src/core/coordination/retention.ts`
|
|
30
|
+
- Modify: `tests/coordination-concurrency.test.ts`
|
|
31
|
+
- Modify: `tests/coordination-crash-recovery.test.ts`
|
|
32
|
+
- Modify: `tests/coordination-interrupt-policy.test.ts`
|
|
33
|
+
|
|
34
|
+
**Interfaces:**
|
|
35
|
+
|
|
36
|
+
- Produces: a zero-error `npm run lint` baseline without weakening ESLint rules.
|
|
37
|
+
|
|
38
|
+
- [ ] Remove imports that have no runtime or type use.
|
|
39
|
+
- [ ] Rename or omit unused parameters rather than disabling lint rules.
|
|
40
|
+
- [ ] Run `npm run lint`; expect exit 0.
|
|
41
|
+
- [ ] Run `npm run typecheck`; expect exit 0.
|
|
42
|
+
- [ ] Commit as `chore: restore coordination quality gate`.
|
|
43
|
+
|
|
44
|
+
### Task 2: Serialize the coordination log and enforce invariants
|
|
45
|
+
|
|
46
|
+
**Files:**
|
|
47
|
+
|
|
48
|
+
- Create: `src/core/coordination/lock.ts`
|
|
49
|
+
- Modify: `src/core/coordination/coordinator.ts`
|
|
50
|
+
- Modify: `src/core/coordination/events.ts`
|
|
51
|
+
- Modify: `src/commands/coordinate.ts`
|
|
52
|
+
- Modify: `tests/coordination-concurrency.test.ts`
|
|
53
|
+
- Create: `tests/fixtures/coordination-writer.mjs`
|
|
54
|
+
|
|
55
|
+
**Interfaces:**
|
|
56
|
+
|
|
57
|
+
- Produces: `withCoordinationLock<T>(projectRoot, operation): Promise<T>`.
|
|
58
|
+
- Produces: `claimOwnership(projectRoot, input): Promise<CoordinationEvent>`.
|
|
59
|
+
- Produces: atomic `publishContract` revision allocation and validated `ack` watermarks.
|
|
60
|
+
|
|
61
|
+
- [ ] Add a failing multi-process test that starts independent Node writers and asserts 100 unique sequence numbers equal `0..99`.
|
|
62
|
+
- [ ] Add failing tests for overlapping ownership (`src/api` vs `src/api/user.ts`), future acknowledgements, concurrent contract revisions, stale-lock recovery, and permission errors from an existing unreadable log.
|
|
63
|
+
- [ ] Run `npx vitest run tests/coordination-concurrency.test.ts`; confirm failures describe duplicate sequences and missing validation.
|
|
64
|
+
- [ ] Implement an exclusive lock file using `open(path, "wx", 0o600)`, bounded jittered retries, owner metadata, stale-owner recovery, and `finally` cleanup.
|
|
65
|
+
- [ ] Move append, sequence allocation, contract revision allocation, ownership check/claim, and acknowledgement validation inside the lock.
|
|
66
|
+
- [ ] Normalize project-relative paths and detect equal, parent, and child overlap.
|
|
67
|
+
- [ ] Catch only `ENOENT` as an empty coordination log; propagate other I/O errors.
|
|
68
|
+
- [ ] Cap IDs/agent names at 128 characters, descriptions at 8 KiB, context at 64 KiB, path counts at 256, and paths at 1 KiB.
|
|
69
|
+
- [ ] Run the focused test until green, then run all coordination tests.
|
|
70
|
+
- [ ] Commit as `fix: make coordination state atomic across processes`.
|
|
71
|
+
|
|
72
|
+
### Task 3: Make redaction canonical
|
|
73
|
+
|
|
74
|
+
**Files:**
|
|
75
|
+
|
|
76
|
+
- Modify: `src/core/coordination/redaction.ts`
|
|
77
|
+
- Modify: `src/core/coordination/coordinator.ts`
|
|
78
|
+
- Modify: `src/core/coordination/daemon.ts`
|
|
79
|
+
- Modify: `tests/coordination-redaction.test.ts`
|
|
80
|
+
- Modify: `tests/coordination.test.ts`
|
|
81
|
+
|
|
82
|
+
**Interfaces:**
|
|
83
|
+
|
|
84
|
+
- Produces: `sanitizeEmitOptions(options): EmitOptions` used by the sole append path.
|
|
85
|
+
|
|
86
|
+
- [ ] Add failing tests that emit secrets through direct core calls, CLI-equivalent calls, nested payloads, and daemon calls.
|
|
87
|
+
- [ ] Confirm direct writes currently persist the sample secret.
|
|
88
|
+
- [ ] Apply redaction inside the canonical locked writer before schema validation and persistence.
|
|
89
|
+
- [ ] Remove adapter-specific duplicate redaction.
|
|
90
|
+
- [ ] Verify all paths persist `[REDACTED]` and preserve non-sensitive fields.
|
|
91
|
+
- [ ] Commit as `fix: redact every coordination write path`.
|
|
92
|
+
|
|
93
|
+
### Task 4: Secure the localhost daemon and stabilize its API
|
|
94
|
+
|
|
95
|
+
**Files:**
|
|
96
|
+
|
|
97
|
+
- Create: `src/core/coordination/auth.ts`
|
|
98
|
+
- Create: `src/core/coordination/http-api.ts`
|
|
99
|
+
- Modify: `src/core/coordination/daemon.ts`
|
|
100
|
+
- Modify: `src/commands/coordinate.ts`
|
|
101
|
+
- Modify: `tests/coordination-daemon.test.ts`
|
|
102
|
+
- Create: `tests/coordination-daemon-security.test.ts`
|
|
103
|
+
|
|
104
|
+
**Interfaces:**
|
|
105
|
+
|
|
106
|
+
- Produces: `ensureDaemonToken(projectRoot): Promise<string>` with a mode-0600 token file.
|
|
107
|
+
- Produces: one structured error shape `{ error: { code, message } }`.
|
|
108
|
+
- Consumes: atomic coordinator operations from Task 2.
|
|
109
|
+
|
|
110
|
+
- [ ] Add failing tests for missing/wrong bearer token, malicious `Origin`, forged `Host`, unauthenticated SSE, oversized bodies, malformed JSON, and project-root leakage.
|
|
111
|
+
- [ ] Confirm authenticated loopback requests remain possible.
|
|
112
|
+
- [ ] Generate a 32-byte random token, store it under `.handoff` with mode `0600`, and compare tokens using `timingSafeEqual`.
|
|
113
|
+
- [ ] Require `Authorization: Bearer <token>` for API requests; allow a query token only for the initial dashboard document and immediately move it to session storage/history-free state.
|
|
114
|
+
- [ ] Replace wildcard CORS with same-origin behavior and reject non-loopback Host headers.
|
|
115
|
+
- [ ] Return 400 for malformed JSON, 401 for missing authentication, 403 for origin/host rejection, 409 for ownership/revision conflict, and 413 for oversized bodies.
|
|
116
|
+
- [ ] Stop returning absolute project paths from browser-visible status payloads.
|
|
117
|
+
- [ ] Split the 700-line daemon into HTTP policy/route and lifecycle modules.
|
|
118
|
+
- [ ] Run daemon security, daemon behavior, and full coordination tests.
|
|
119
|
+
- [ ] Commit as `fix: authenticate and isolate the coordination daemon`.
|
|
120
|
+
|
|
121
|
+
### Task 5: Ship a real MCP server
|
|
122
|
+
|
|
123
|
+
**Files:**
|
|
124
|
+
|
|
125
|
+
- Modify: `package.json`
|
|
126
|
+
- Modify: `package-lock.json`
|
|
127
|
+
- Modify: `tsconfig.json`
|
|
128
|
+
- Modify: `src/core/coordination/mcp-server.ts`
|
|
129
|
+
- Create: `tests/coordination-mcp.test.ts`
|
|
130
|
+
- Modify: `scripts/package-smoke.mjs`
|
|
131
|
+
|
|
132
|
+
**Interfaces:**
|
|
133
|
+
|
|
134
|
+
- Produces: packaged `dist/src/core/coordination/mcp-server.js`.
|
|
135
|
+
- Produces: stdio tools backed only by validated coordinator operations.
|
|
136
|
+
|
|
137
|
+
- [ ] Add `@modelcontextprotocol/sdk` v1 as a runtime dependency and remove the TypeScript exclusion.
|
|
138
|
+
- [ ] Add a failing package test asserting that `mcp-server.js` exists in the tarball.
|
|
139
|
+
- [ ] Add an MCP client smoke test that initializes the server, lists tools, emits an event, and reads a snapshot in a temporary project.
|
|
140
|
+
- [ ] Update handlers to use the SDK v1 API and convert validation/conflict failures into MCP tool errors.
|
|
141
|
+
- [ ] Verify stdout contains only protocol messages and diagnostics go to stderr.
|
|
142
|
+
- [ ] Run MCP tests and `npm pack --dry-run --json`.
|
|
143
|
+
- [ ] Commit as `fix: compile and package the coordination MCP server`.
|
|
144
|
+
|
|
145
|
+
### Task 6: Replace fictional provider commands with supported adapters
|
|
146
|
+
|
|
147
|
+
**Files:**
|
|
148
|
+
|
|
149
|
+
- Modify: `package.json`
|
|
150
|
+
- Modify: `package-lock.json`
|
|
151
|
+
- Modify: `src/core/coordination/adapters/types.ts`
|
|
152
|
+
- Modify: `src/core/coordination/adapters/codex.ts`
|
|
153
|
+
- Modify: `src/core/coordination/adapters/claude-code.ts`
|
|
154
|
+
- Modify: `src/core/coordination/session-manager.ts`
|
|
155
|
+
- Create: `tests/coordination-adapter-codex.test.ts`
|
|
156
|
+
- Create: `tests/coordination-adapter-claude.test.ts`
|
|
157
|
+
- Create: `tests/coordination-session-manager.test.ts`
|
|
158
|
+
|
|
159
|
+
**Interfaces:**
|
|
160
|
+
|
|
161
|
+
- Produces: capability `canSubmitTurn`, distinct from unsupported mid-turn injection.
|
|
162
|
+
- Produces: Codex `start`, `resume`, and `submitTurn` through `@openai/codex-sdk`.
|
|
163
|
+
- Produces: Claude `start`, `resume`, and `submitTurn` through documented positional CLI prompts.
|
|
164
|
+
|
|
165
|
+
- [ ] Write adapter contract tests around injected process/SDK drivers so exact command arguments and session IDs are observable.
|
|
166
|
+
- [ ] Assert Codex never uses `--quiet` and Claude never uses `--message` or `sessions list`.
|
|
167
|
+
- [ ] Add `@openai/codex-sdk` as a runtime dependency and implement start/resume/turn using `startThread()`, `resumeThread(id)`, and `run()`.
|
|
168
|
+
- [ ] Implement Claude print-mode turns as `claude -p --output-format json [--resume id] <prompt>` and parse `session_id` from validated output.
|
|
169
|
+
- [ ] Track sessions Loadout itself creates instead of claiming to enumerate every host session.
|
|
170
|
+
- [ ] Queue relevant events until an adapter is idle; do not interrupt active work unless a future host capability explicitly supports steering.
|
|
171
|
+
- [ ] Run adapter and session-manager tests with fake drivers, followed by opt-in smoke checks against the locally installed CLIs.
|
|
172
|
+
- [ ] Commit as `fix: use supported Codex and Claude session APIs`.
|
|
173
|
+
|
|
174
|
+
### Task 7: Reconcile retention, recovery, and observability
|
|
175
|
+
|
|
176
|
+
**Files:**
|
|
177
|
+
|
|
178
|
+
- Modify: `src/core/coordination/retention.ts`
|
|
179
|
+
- Modify: `src/core/coordination/crash-recovery.ts`
|
|
180
|
+
- Modify: `src/core/coordination/replay.ts`
|
|
181
|
+
- Modify: `src/core/coordination/watcher.ts`
|
|
182
|
+
- Modify: `tests/coordination-retention.test.ts`
|
|
183
|
+
- Modify: `tests/coordination-crash-recovery.test.ts`
|
|
184
|
+
- Modify: `tests/coordination-replay.test.ts`
|
|
185
|
+
|
|
186
|
+
**Interfaces:**
|
|
187
|
+
|
|
188
|
+
- Consumes: the same lock from Task 2 for compaction and recovery.
|
|
189
|
+
- Produces: explicit health data without filesystem secrets.
|
|
190
|
+
|
|
191
|
+
- [ ] Add failing tests for append-during-compaction, truncated final lines, duplicate legacy sequences, reconnect after compaction, and backup restoration.
|
|
192
|
+
- [ ] Make compaction and recovery use the same exclusive lock as append.
|
|
193
|
+
- [ ] Preserve corrupt-line evidence rather than silently discarding it.
|
|
194
|
+
- [ ] Bound replay and snapshot queries by event count and serialized byte size.
|
|
195
|
+
- [ ] Add counters for connected clients, high watermark, corrupt records, rejected writes, and last compaction time.
|
|
196
|
+
- [ ] Run focused recovery/retention/replay tests.
|
|
197
|
+
- [ ] Commit as `fix: harden coordination recovery and retention`.
|
|
198
|
+
|
|
199
|
+
### Task 8: Make the product contract truthful and test the release artifact
|
|
200
|
+
|
|
201
|
+
**Files:**
|
|
202
|
+
|
|
203
|
+
- Create: `docs/decisions/001-coordination-jsonl-locking.md`
|
|
204
|
+
- Create: `docs/decisions/002-local-daemon-authentication.md`
|
|
205
|
+
- Modify: `README.md`
|
|
206
|
+
- Modify: `MASTERPLAN.md`
|
|
207
|
+
- Modify: `docs/LIVE_COLLABORATION.md`
|
|
208
|
+
- Modify: `docs/USER_TEST_GUIDE.md`
|
|
209
|
+
- Modify: `CHANGELOG.md`
|
|
210
|
+
- Modify: `scripts/readme-product-flow.mjs`
|
|
211
|
+
- Modify: `scripts/cli-product-flow.mjs`
|
|
212
|
+
|
|
213
|
+
**Interfaces:**
|
|
214
|
+
|
|
215
|
+
- Produces: one user-facing distinction between durable handoff, live coordination, and provider-driven beta turns.
|
|
216
|
+
|
|
217
|
+
- [ ] Document the locking and authentication decisions, rejected alternatives, limitations, and recovery behavior.
|
|
218
|
+
- [ ] Remove contradictory phase/status claims and document exact supported commands.
|
|
219
|
+
- [ ] Add a two-agent walkthrough: backend contract publish, frontend acknowledgement, revision diff, ownership conflict, reconnect, and kill switch.
|
|
220
|
+
- [ ] Add CLI/product-flow coverage for the walkthrough without invoking paid model turns.
|
|
221
|
+
- [ ] Run `npm run verify:full` from the clean branch.
|
|
222
|
+
- [ ] Run `npm pack --dry-run --json`, install the tarball in a temporary directory, and execute `loadout --version`, `loadout coordinate --help`, daemon authentication, and MCP initialization.
|
|
223
|
+
- [ ] Run opt-in real-host smoke tests with installed Codex and Claude CLIs; do not make destructive project changes.
|
|
224
|
+
- [ ] Review `git diff` for secrets and unrelated changes.
|
|
225
|
+
- [ ] Commit as `docs: define the live coordination beta contract`.
|
|
226
|
+
|
|
227
|
+
## Self-review
|
|
228
|
+
|
|
229
|
+
- Spec coverage: concurrency, authentication, MCP packaging, real provider APIs, validation, redaction, ownership overlap, acknowledgements, retention, recovery, documentation, clean-room packaging, and launch gates are each assigned to a task.
|
|
230
|
+
- Placeholder scan: no deferred implementation placeholders are used; provider mid-turn interruption is explicitly excluded until supported by a host API.
|
|
231
|
+
- Type consistency: all external adapters converge on `canSubmitTurn` and canonical coordinator operations; HTTP and MCP do not own state logic.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Loadout Release Readiness Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Resolve every actionable weakness from the 2026-09-03 audit and leave a locally testable, release-ready Loadout tree without publishing it.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Centralize bounded JSON HTTP handling, validate handoff data at its boundary, and derive CLI metadata from the Commander tree instead of parallel lists. Keep landing-page material concise while moving detailed reference content into focused documents. Reduce the two largest implementation files by extracting cohesive command and discovery responsibilities without changing their public behavior.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** TypeScript, Node.js 20+, Commander, Zod, Vitest, GitHub Actions, npm.
|
|
10
|
+
|
|
11
|
+
## Global Constraints
|
|
12
|
+
|
|
13
|
+
- Do not push, publish, tag, or create a GitHub Release; the user will test first.
|
|
14
|
+
- Preserve current user changes, including the pre-existing deletion of `loadout-ai-0.8.0.tgz`.
|
|
15
|
+
- Add no runtime dependency; use Node web streams and the existing Zod dependency.
|
|
16
|
+
- Every behavior change follows red-green TDD.
|
|
17
|
+
- Preserve Node 20, macOS, Linux, and Windows compatibility.
|
|
18
|
+
- Keep mutating CLI behavior preview-first and reversible.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Task 1: Bound JSON network responses
|
|
23
|
+
|
|
24
|
+
**Files:**
|
|
25
|
+
|
|
26
|
+
- Create: `src/core/runtime/bounded-json.ts`
|
|
27
|
+
- Create: `tests/bounded-json.test.ts`
|
|
28
|
+
- Modify: `src/core/catalog/registry.ts`
|
|
29
|
+
- Modify: `src/core/agents/model-config.ts`
|
|
30
|
+
- Modify: `src/core/discovery/community.ts`
|
|
31
|
+
- Modify: `src/core/discovery/github-discovery.ts`
|
|
32
|
+
- Modify: `src/core/discovery/private-discovery.ts`
|
|
33
|
+
- Modify: `src/core/runtime/github.ts`
|
|
34
|
+
- Test: the existing tests for each consumer above
|
|
35
|
+
|
|
36
|
+
**Interfaces:**
|
|
37
|
+
|
|
38
|
+
- Produces: `boundedJson(fetcher, input, init, limits): Promise<{ response: Response; value: unknown }>` with required timeout and byte limits.
|
|
39
|
+
- Consumes: standard `fetch`, `AbortSignal.timeout`, and `ReadableStreamDefaultReader`.
|
|
40
|
+
|
|
41
|
+
- [ ] Add tests proving declared oversize, streamed oversize, malformed JSON, timeout signal composition, and exact-limit success.
|
|
42
|
+
- [ ] Run `npx vitest run tests/bounded-json.test.ts tests/security-regressions.test.ts` and confirm the new cases fail for the missing helper/old full-buffer behavior.
|
|
43
|
+
- [ ] Implement incremental stream reads that cancel above the cap and parse only after the bounded byte array is complete.
|
|
44
|
+
- [ ] Route every listed JSON request through the helper with endpoint-appropriate caps and 30-second defaults.
|
|
45
|
+
- [ ] Run all affected unit tests and confirm they pass.
|
|
46
|
+
|
|
47
|
+
### Task 2: Validate every handoff log entry
|
|
48
|
+
|
|
49
|
+
**Files:**
|
|
50
|
+
|
|
51
|
+
- Modify: `src/core/delegation/handoff.ts`
|
|
52
|
+
- Modify: `tests/handoff.test.ts`
|
|
53
|
+
|
|
54
|
+
**Interfaces:**
|
|
55
|
+
|
|
56
|
+
- Produces: a strict internal Zod schema matching `HandoffMessage`, including the terminal type enum and ISO timestamp.
|
|
57
|
+
- Consumes: existing `readMessagesDetailed` corrupt-line reporting.
|
|
58
|
+
|
|
59
|
+
- [ ] Add tests for missing timestamp/from/to/description, unsupported type, malformed resolves, and valid legacy terminal context.
|
|
60
|
+
- [ ] Run `npx vitest run tests/handoff.test.ts` and confirm malformed-but-valid JSON reaches the old unsafe path.
|
|
61
|
+
- [ ] Parse with the complete schema and report schema failures as corrupt lines without hiding valid neighbors.
|
|
62
|
+
- [ ] Run the handoff suite and a CLI inbox formatting test.
|
|
63
|
+
|
|
64
|
+
### Task 3: Generate complete shell command metadata
|
|
65
|
+
|
|
66
|
+
**Files:**
|
|
67
|
+
|
|
68
|
+
- Modify: `src/core/reporting/completion.ts`
|
|
69
|
+
- Modify: `src/cli.ts`
|
|
70
|
+
- Modify: `tests/completion.test.ts`
|
|
71
|
+
- Modify: `scripts/check-documented-commands.mjs`
|
|
72
|
+
- Create: `tests/documented-commands-script.test.ts`
|
|
73
|
+
|
|
74
|
+
**Interfaces:**
|
|
75
|
+
|
|
76
|
+
- Produces: recursive `CommandTree` nodes and shell completion output for every registered parent/child pair.
|
|
77
|
+
- Produces: a machine-readable CLI command-path mode consumed by the documentation gate.
|
|
78
|
+
|
|
79
|
+
- [ ] Add tests requiring `skills list/install/remove` in all four shells and rejecting invalid documented parent-child combinations.
|
|
80
|
+
- [ ] Run the focused tests and capture the expected failures.
|
|
81
|
+
- [ ] Render nested cases from the command tree rather than hard-coded parent names.
|
|
82
|
+
- [ ] Change the documentation gate to compare full command paths extracted from executable snippets against registered paths.
|
|
83
|
+
- [ ] Reset completion registry state per test and run focused tests green.
|
|
84
|
+
|
|
85
|
+
### Task 4: Make release verification match the release promise
|
|
86
|
+
|
|
87
|
+
**Files:**
|
|
88
|
+
|
|
89
|
+
- Modify: `package.json`
|
|
90
|
+
- Modify: `.github/workflows/release.yml`
|
|
91
|
+
- Modify: `tests/package-release.test.ts`
|
|
92
|
+
- Modify: `CHANGELOG.md`
|
|
93
|
+
|
|
94
|
+
**Interfaces:**
|
|
95
|
+
|
|
96
|
+
- Produces: `verify:full` that runs `verify` plus `test:coverage`.
|
|
97
|
+
- Consumes: release workflow tag/version and npm provenance checks.
|
|
98
|
+
|
|
99
|
+
- [ ] Add tests requiring the release job to call `verify:full` and requiring that script to include coverage.
|
|
100
|
+
- [ ] Run `npx vitest run tests/package-release.test.ts` and confirm failure against the old release command.
|
|
101
|
+
- [ ] Update scripts/workflow, and document the post-0.8 removal of model routing under Unreleased with a 0.9 migration note.
|
|
102
|
+
- [ ] Run release contract tests green.
|
|
103
|
+
|
|
104
|
+
### Task 5: Replace stale planning and package metadata
|
|
105
|
+
|
|
106
|
+
**Files:**
|
|
107
|
+
|
|
108
|
+
- Modify: `MASTERPLAN.md`
|
|
109
|
+
- Modify: `package.json`
|
|
110
|
+
- Modify: `tests/package-release.test.ts`
|
|
111
|
+
|
|
112
|
+
**Interfaces:**
|
|
113
|
+
|
|
114
|
+
- Produces: one current roadmap that contains no fixed vulnerabilities, removed paths, or routing feature claims.
|
|
115
|
+
- Produces: npm metadata aligned with GitHub positioning and search terms.
|
|
116
|
+
|
|
117
|
+
- [ ] Add metadata assertions for the canonical description and keywords.
|
|
118
|
+
- [ ] Run the package contract test red.
|
|
119
|
+
- [ ] Rewrite `MASTERPLAN.md` around remaining post-audit work and align npm description/keywords.
|
|
120
|
+
- [ ] Run metadata and README claim tests green.
|
|
121
|
+
|
|
122
|
+
### Task 6: Complete open-source contribution scaffolding
|
|
123
|
+
|
|
124
|
+
**Files:**
|
|
125
|
+
|
|
126
|
+
- Create: `CONTRIBUTING.md`
|
|
127
|
+
- Create: `CODE_OF_CONDUCT.md`
|
|
128
|
+
- Create: `.github/ISSUE_TEMPLATE/bug_report.yml`
|
|
129
|
+
- Create: `.github/ISSUE_TEMPLATE/feature_request.yml`
|
|
130
|
+
- Create: `.github/pull_request_template.md`
|
|
131
|
+
- Create or modify: `tests/community-health.test.ts`
|
|
132
|
+
- Modify: `README.md`
|
|
133
|
+
|
|
134
|
+
**Interfaces:**
|
|
135
|
+
|
|
136
|
+
- Produces: a contributor path with exact setup, verification, security, and PR expectations.
|
|
137
|
+
|
|
138
|
+
- [ ] Add file/content contract tests and run them red.
|
|
139
|
+
- [ ] Add concise community files and link contribution guidance from the README.
|
|
140
|
+
- [ ] Run community and README tests green.
|
|
141
|
+
|
|
142
|
+
### Task 7: Make the README convert quickly
|
|
143
|
+
|
|
144
|
+
**Files:**
|
|
145
|
+
|
|
146
|
+
- Modify: `README.md`
|
|
147
|
+
- Create: `docs/REFERENCE.md`
|
|
148
|
+
- Modify: `tests/readme-product-flow.test.ts`
|
|
149
|
+
- Modify: `scripts/readme-product-flow.mjs`
|
|
150
|
+
|
|
151
|
+
**Interfaces:**
|
|
152
|
+
|
|
153
|
+
- Produces: a proof-first README under 400 lines with hero, first win, demo, install, handoff, trust, concise reference links, and contributor CTA.
|
|
154
|
+
- Produces: detailed material moved without loss to `docs/REFERENCE.md`.
|
|
155
|
+
|
|
156
|
+
- [ ] Change README structure assertions to require the demo before deep explanation and enforce the line budget.
|
|
157
|
+
- [ ] Run focused README tests red.
|
|
158
|
+
- [ ] Move detailed profiles, discovery, MCP, runtime tools, and long command tables into the reference document.
|
|
159
|
+
- [ ] Keep all material claims and generated marker blocks valid, then run README/evidence tests green.
|
|
160
|
+
|
|
161
|
+
### Task 8: Prepare a social preview asset
|
|
162
|
+
|
|
163
|
+
**Files:**
|
|
164
|
+
|
|
165
|
+
- Create: `docs/assets/loadout-social-preview.png`
|
|
166
|
+
- Modify: `tests/readme-product-flow.test.ts`
|
|
167
|
+
|
|
168
|
+
**Interfaces:**
|
|
169
|
+
|
|
170
|
+
- Produces: solid-background 1280x640 PNG under 1 MB for manual upload in GitHub Settings.
|
|
171
|
+
|
|
172
|
+
- [ ] Add dimension, format, and size assertions and run them red while the asset is absent.
|
|
173
|
+
- [ ] Generate a concise social card using the established visual language and handoff differentiator.
|
|
174
|
+
- [ ] Optimize without reducing readability and run asset tests green.
|
|
175
|
+
|
|
176
|
+
### Task 9: Split oversized modules along existing responsibilities
|
|
177
|
+
|
|
178
|
+
**Files:**
|
|
179
|
+
|
|
180
|
+
- Modify: `src/commands/catalog.ts`
|
|
181
|
+
- Create: `src/commands/catalog-skills.ts`
|
|
182
|
+
- Create: `src/commands/catalog-discovery.ts`
|
|
183
|
+
- Modify: `src/core/discovery/candidate-intelligence.ts`
|
|
184
|
+
- Create: `src/core/discovery/candidate-signals.ts`
|
|
185
|
+
- Create: `src/core/discovery/candidate-report.ts`
|
|
186
|
+
- Test: existing catalog, discovery, candidate, CLI help, and completion suites
|
|
187
|
+
|
|
188
|
+
**Interfaces:**
|
|
189
|
+
|
|
190
|
+
- Produces: command registration functions imported by `catalog.ts` with no CLI contract change.
|
|
191
|
+
- Produces: pure candidate signal/report helpers imported by candidate intelligence.
|
|
192
|
+
|
|
193
|
+
- [ ] Record current CLI/help and candidate JSON fixtures through existing behavior tests.
|
|
194
|
+
- [ ] Extract command groups without changing option names, output, or action wiring.
|
|
195
|
+
- [ ] Extract pure candidate scoring/reporting groups and keep exported compatibility.
|
|
196
|
+
- [ ] Require each former 1,000-line hotspot to fall below 850 lines.
|
|
197
|
+
- [ ] Run all catalog/discovery/CLI suites green and scan for orphaned exports.
|
|
198
|
+
|
|
199
|
+
### Task 10: Final review and local release rehearsal
|
|
200
|
+
|
|
201
|
+
**Files:**
|
|
202
|
+
|
|
203
|
+
- Review: every changed file
|
|
204
|
+
- Modify only defects found by review
|
|
205
|
+
|
|
206
|
+
**Interfaces:**
|
|
207
|
+
|
|
208
|
+
- Consumes: all previous task outputs.
|
|
209
|
+
- Produces: a local release candidate for the user to test.
|
|
210
|
+
|
|
211
|
+
- [ ] Run Prettier, lint, typecheck, dependency audit, documentation/evidence gates, all unit tests, E2E flows, package smoke, performance benchmark, and coverage.
|
|
212
|
+
- [ ] Run `npm pack --dry-run --json` and install the resulting local package in a disposable directory.
|
|
213
|
+
- [ ] Review correctness, readability, architecture, security, and performance; fix every required finding with red-green coverage.
|
|
214
|
+
- [ ] Run `loadout handoff codex`, verify no pending tasks, and report exact remaining manual steps without publishing.
|
|
215
|
+
|
|
216
|
+
## Risks and Mitigations
|
|
217
|
+
|
|
218
|
+
| Risk | Impact | Mitigation |
|
|
219
|
+
| ------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
|
|
220
|
+
| Shared working tree edits collide | High | Assign agents disjoint file sets and integrate only after reviewing diffs. |
|
|
221
|
+
| README claim markers break during shortening | High | Move content around marker blocks intact and run both claim gates after each edit. |
|
|
222
|
+
| Generic fetch helper changes mock behavior | Medium | Preserve injectable fetchers and test standard Response streams plus mocked consumers. |
|
|
223
|
+
| Command extraction changes Commander registration order | Medium | Snapshot public help/command paths before extraction and assert exact equivalence. |
|
|
224
|
+
| Social preview is not automatically active | Low | Deliver the validated file and clearly leave GitHub Settings upload as the only manual step. |
|
|
225
|
+
|
|
226
|
+
## Self-Review
|
|
227
|
+
|
|
228
|
+
- Every audit weakness maps to Tasks 1–9.
|
|
229
|
+
- No task publishes or mutates remote repository state.
|
|
230
|
+
- Each behavior change includes an explicit failing-test step and focused verification.
|
|
231
|
+
- Shared interfaces are named before parallel implementation.
|
|
232
|
+
- No placeholders or deferred implementation steps remain.
|