solmate-skills 2.0.12 → 2.0.13

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 (36) hide show
  1. package/AGENTS.md +9 -0
  2. package/CLAUDE.md +13 -3
  3. package/README.md +91 -5
  4. package/USAGE.md +118 -12
  5. package/bin/cli.js +171 -1
  6. package/bin/harness-artifact.js +621 -0
  7. package/bin/harness-artifact.test.js +520 -0
  8. package/bin/harness-check.js +373 -0
  9. package/bin/harness-check.test.js +159 -0
  10. package/bin/test.js +2 -0
  11. package/docs/01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md +162 -0
  12. package/docs/03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md +376 -0
  13. package/docs/03_Technical_Specs/assets/01_agent_harness_data_flow.svg +94 -0
  14. package/docs/04_Logic_Progress/00_BACKLOG.md +339 -0
  15. package/docs/04_Logic_Progress/01_EXECUTION_PLAN.md +160 -0
  16. package/docs/04_Logic_Progress/03_DECISION_LOG.md +98 -0
  17. package/docs/05_QA_Validation/01_TEST_SCENARIOS.md +313 -0
  18. package/docs/05_QA_Validation/02_AGENT_HARNESS_DESIGN_REVIEW.md +100 -0
  19. package/docs/05_QA_Validation/03_AGENT_HARNESS_CONTRACT_QA.md +96 -0
  20. package/manage-collaboration/SKILL.md +2 -0
  21. package/package.json +6 -4
  22. package/rules-docs/SKILL.md +15 -1
  23. package/rules-product/SKILL.md +30 -6
  24. package/rules-product/agents/openai.yaml +2 -2
  25. package/rules-workflow/SKILL.md +32 -7
  26. package/rules-workflow/adapters/claude/solmate-context-reader.md +17 -0
  27. package/rules-workflow/adapters/claude/solmate-implementer.md +20 -0
  28. package/rules-workflow/adapters/claude/solmate-verifier.md +21 -0
  29. package/rules-workflow/agents/openai.yaml +2 -2
  30. package/rules-workflow/resources/agent-harness-contract.md +187 -0
  31. package/rules-workflow/resources/agent-harness-v1.schema.json +432 -0
  32. package/verify-docs/SKILL.md +33 -6
  33. package/verify-docs/agents/openai.yaml +2 -2
  34. package/verify-implementation/SKILL.md +14 -2
  35. package/verify-implementation/agents/openai.yaml +2 -2
  36. package/verify-skills/SKILL.md +27 -0
@@ -0,0 +1,339 @@
1
+ # Agent Harness Backlog
2
+ > Created: 2026-07-17 01:04
3
+ > Last Updated: 2026-07-17 02:44
4
+
5
+ ## Done
6
+
7
+ ### [x] TASK-HARNESS-001: Establish The Enhanced Harness Design Baseline
8
+
9
+ - Status: Done
10
+ - Work Type: docs
11
+ - Related Concept Docs:
12
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - approved user needs, scope, and acceptance criteria
13
+ - Related UI Docs: N/A - this scope introduces no user-facing screen or interaction
14
+ - Related HTML Preview: N/A - a browser UI preview would not validate a runtime-neutral agent protocol
15
+ - Related Technical Docs:
16
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - role, state, message, artifact, error, and adapter design
17
+ - Related QA Docs:
18
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - design traceability and future implementation checks
19
+ - [Agent Harness Design Review](../05_QA_Validation/02_AGENT_HARNESS_DESIGN_REVIEW.md) - structural validation results and residual risks
20
+ - Implementation Preconditions:
21
+ - [x] User approved the design direction
22
+ - [x] Current Agent Harness Contract and machine validator were inspected
23
+ - [x] External comparative source and generated examples were analyzed
24
+ - [x] UI and HTML Preview were classified as not applicable with reason
25
+ - [x] Existing Context, Change, and Verification Receipt semantics remain canonical inputs
26
+ - Context Receipt:
27
+ - Status: PASS
28
+ - Required References Read:
29
+ - `rules-workflow/resources/agent-harness-contract.md` - current role and receipt contract
30
+ - `bin/harness-check.js` - current machine-enforced fields and exit behavior
31
+ - Constraints:
32
+ - Design documents only; no skill, CLI, installer, publish, or deploy changes
33
+ - Conflicts: None
34
+ - Acceptance Criteria:
35
+ - [x] Requirements Analysis contains FR, NFR, scope, acceptance, and risks
36
+ - [x] Architecture defines roles, activation, topology, permissions, messages, states, errors, artifacts, and adapters
37
+ - [x] Decision Log records approved choices, alternatives, and reconsideration conditions
38
+ - [x] Execution Plan separates design, implementation, QA, pilot, and release phases
39
+ - [x] QA scenarios map P0 requirements and failure paths
40
+ - [x] Documentation structure, metadata, links, and SVG validate successfully
41
+ - [x] User reviews the completed design baseline
42
+ - Change Receipt:
43
+ - Files Changed:
44
+ - `docs/01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md`
45
+ - `docs/03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md`
46
+ - `docs/03_Technical_Specs/assets/01_agent_harness_data_flow.svg`
47
+ - `docs/04_Logic_Progress/00_BACKLOG.md`
48
+ - `docs/04_Logic_Progress/01_EXECUTION_PLAN.md`
49
+ - `docs/04_Logic_Progress/03_DECISION_LOG.md`
50
+ - `docs/05_QA_Validation/01_TEST_SCENARIOS.md`
51
+ - `docs/05_QA_Validation/02_AGENT_HARNESS_DESIGN_REVIEW.md`
52
+ - Requirements Covered:
53
+ - Design coverage for FR-001 through FR-015 and NFR-001 through NFR-010
54
+ - Excluded Scope:
55
+ - Code implementation, runtime adapter creation, release, and deployment
56
+ - Basic Checks:
57
+ - `git diff --check` - PASS - no whitespace errors
58
+ - relative-link validation - PASS - all local document links resolve
59
+ - requirement/scenario trace validation - PASS - 25 requirements and 35 scenarios checked
60
+ - `xmllint --noout` - PASS - data-flow SVG is valid XML
61
+ - `npm test` - PASS - `harness checks ok`
62
+ - Remaining Risks:
63
+ - Implementation feasibility and runtime capability parity require later code-stage evidence
64
+ - Verification Receipt:
65
+ - Status: PASS - structural design verification and user review complete
66
+ - Commands and Results:
67
+ - `git diff --check` - PASS
68
+ - relative-link validation - PASS
69
+ - requirement/scenario trace validation - PASS
70
+ - `xmllint --noout` - PASS
71
+ - `npm test` - PASS - `harness checks ok`
72
+ - Unrun Checks:
73
+ - Runtime adapter, schema validator, orchestration, recovery, pilot, and release checks are unrun because implementation is outside this approved docs scope
74
+ - Detailed Evidence:
75
+ - [Agent Harness Design Review](../05_QA_Validation/02_AGENT_HARNESS_DESIGN_REVIEW.md) - commands, findings, corrections, and residual risks
76
+ - Document Sync Check:
77
+ - [x] Requirements, architecture, decisions, plan, backlog, and QA files cross-link each other
78
+ - [x] Structural verification findings are reflected in the design documents
79
+ - [x] User design review is recorded before the task moves to Done
80
+
81
+ ### [x] TASK-HARNESS-002: Implement Versioned Contracts And Machine Validation
82
+
83
+ - Status: Done
84
+ - Work Type: code
85
+ - Related Concept Docs:
86
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - FR-001, FR-003, FR-006, FR-007, FR-011, FR-012, and compatibility requirements
87
+ - Related UI Docs: N/A - no user-facing UI is introduced by contract validation
88
+ - Related HTML Preview: N/A - CLI and schema behavior is verified with fixtures and command output
89
+ - Related Technical Docs:
90
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - persona, manifest, message, event, state, error, and receipt contracts
91
+ - Related QA Docs:
92
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - schema, transition, compatibility, and security scenarios
93
+ - Implementation Preconditions:
94
+ - [x] User approves code implementation after design review
95
+ - [x] Context Reader records every linked document as read
96
+ - [x] Existing parser and fixture behavior is baselined
97
+ - [x] Schema storage path is `rules-workflow/resources/agent-harness-v1.schema.json`; existing backlog receipts remain the compatibility boundary
98
+ - [x] Node standard-library parsing and the existing test runner are sufficient; no dependency is added
99
+ - Context Receipt:
100
+ - Status: PASS
101
+ - Required References Read:
102
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - FR-001, FR-003, FR-006, FR-007, FR-011, FR-012, and NFR-006/NFR-007 extracted
103
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - manifest, message, event, state, permission, and compatibility contracts extracted
104
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - schema, state, ownership, evidence, and compatibility cases extracted
105
+ - `rules-workflow/resources/agent-harness-contract.md` - current Receipt and exit-mode contract baselined
106
+ - `bin/harness-check.js` - current backlog parser and validation behavior baselined
107
+ - `bin/harness-check.test.js` - existing fixture and CLI exit behavior baselined
108
+ - Constraints:
109
+ - Preserve existing `preflight` and `verify` compatibility and fixture text
110
+ - Keep structured artifacts opt-in and warning by default during migration
111
+ - Use one canonical versioned schema and no new third-party dependency
112
+ - Do not implement personas, runtime orchestration, recovery, blocking rollout, merge, publish, or deploy in this task
113
+ - Conflicts: None
114
+ - Component & Library Plan:
115
+ - N/A - Node standard-library parsing and existing test infrastructure are preferred; this is not React work
116
+ - Acceptance Criteria:
117
+ - [x] Versioned manifest, message, and event schemas validate through structured parsing
118
+ - [x] Legal and illegal state transitions have automated tests
119
+ - [x] Role activation and exclusive write ownership are validated
120
+ - [x] Current receipt tests continue to pass without fixture rewrites
121
+ - [x] Invalid schema, unauthorized transition, and missing evidence produce deterministic exit behavior
122
+ - [x] No new third-party dependency is added without a documented necessity
123
+ - Change Receipt:
124
+ - Files Changed:
125
+ - `README.md`
126
+ - `USAGE.md`
127
+ - `bin/cli.js`
128
+ - `bin/harness-check.test.js`
129
+ - `bin/harness-artifact.js`
130
+ - `bin/harness-artifact.test.js`
131
+ - `bin/test.js`
132
+ - `package.json`
133
+ - `rules-workflow/SKILL.md`
134
+ - `rules-workflow/resources/agent-harness-contract.md`
135
+ - `rules-workflow/resources/agent-harness-v1.schema.json`
136
+ - `verify-skills/SKILL.md`
137
+ - `docs/01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md`
138
+ - `docs/03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md`
139
+ - `docs/04_Logic_Progress/00_BACKLOG.md`
140
+ - `docs/04_Logic_Progress/01_EXECUTION_PLAN.md`
141
+ - `docs/05_QA_Validation/01_TEST_SCENARIOS.md`
142
+ - `docs/05_QA_Validation/03_AGENT_HARNESS_CONTRACT_QA.md`
143
+ - Requirements Covered:
144
+ - FR-004, FR-006, FR-007, FR-011 foundation, FR-012 evidence fields, NFR-003, NFR-006, and NFR-007
145
+ - Excluded Scope:
146
+ - Persona/runtime adapters, orchestration and recovery runtime, pilot, blocking rollout, version bump, PR, merge, publish, and deploy
147
+ - Basic Checks:
148
+ - `npm test` - PASS - existing Receipt and new artifact suites
149
+ - Node 16 `bin/test.js` - PASS - older ARM-compatible runtime
150
+ - Acorn ECMAScript 2020 parse - PASS - Node 14 syntax range
151
+ - Ajv Draft 2020 compile and top-level rejection - PASS
152
+ - `npm pack --dry-run --json` - PASS - 454 packaged files and all expected artifacts included
153
+ - document and trace validation - PASS - 25 requirements and 36 scenarios
154
+ - `git diff --check` - PASS
155
+ - Remaining Risks:
156
+ - Actual Node 14 ARM runtime was unavailable; Node 16 and ECMAScript 2020 checks passed
157
+ - Persona parity, runtime permissions, recovery, pilot, and release remain later tasks
158
+ - Verification Receipt:
159
+ - Status: PASS - final independent QA found no P0, P1, or P2 issue
160
+ - Commands and Results:
161
+ - `npm test` - PASS - `harness checks ok`; `harness artifact checks ok`
162
+ - `node --check` on changed/new JavaScript - PASS
163
+ - `node bin/cli.js preflight TASK-HARNESS-002 --strict` - PASS
164
+ - independent adversarial contract review - PASS - prior findings rechecked after correction
165
+ - `git diff --check` - PASS
166
+ - Unrun Checks:
167
+ - Actual Node 14 execution unavailable because no matching npm macOS ARM binary exists; Node 16 and ECMAScript 2020 checks passed
168
+ - Persona, orchestration, recovery, warning pilot, blocking rollout, publish, and deploy checks are outside this task
169
+ - Detailed Evidence:
170
+ - [Agent Harness Contract Implementation QA](../05_QA_Validation/03_AGENT_HARNESS_CONTRACT_QA.md) - commands, independent findings, corrections, final PASS, and residual risks
171
+ - Document Sync Check:
172
+ - [x] Implemented schema fields match the architecture specification
173
+ - [x] CLI, workflow contract, README, USAGE, and verification guidance reflect actual command behavior
174
+
175
+ ## ToDo
176
+
177
+ ### [ ] TASK-HARNESS-003: Add Specialist Personas And Runtime Adapters
178
+
179
+ - Status: ToDo
180
+ - Work Type: code
181
+ - Related Concept Docs:
182
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - role, portability, cost, and independence requirements
183
+ - Related UI Docs: N/A - persona adapters have no application screen
184
+ - Related HTML Preview: N/A - adapter behavior is verified through installation and role fixtures
185
+ - Related Technical Docs:
186
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - core/optional roles, persona contract, permissions, and capability negotiation
187
+ - Related QA Docs:
188
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - permission, parity, preservation, and degraded-mode checks
189
+ - Implementation Preconditions:
190
+ - [ ] TASK-HARNESS-002 schema contracts are stable
191
+ - [ ] User approves the exact installed persona set
192
+ - [ ] Context Reader records every linked document as read
193
+ - [ ] Claude Code supported agent fields are reverified against current official behavior
194
+ - [ ] Codex adapter avoids unsupported project-agent formats
195
+ - Context Receipt:
196
+ - Status: PENDING
197
+ - Required References Read:
198
+ - Pending
199
+ - Constraints:
200
+ - Unrelated user-defined agents must remain untouched
201
+ - Conflicts: Pending review
202
+ - Component & Library Plan:
203
+ - N/A - Markdown/YAML adapter files and existing installer code; no React component work
204
+ - Acceptance Criteria:
205
+ - [ ] Every persona implements all mandatory persona-contract fields
206
+ - [ ] QA Inspector and Context Reader are non-writing where runtime enforcement exists
207
+ - [ ] Implementer write scope is explicit
208
+ - [ ] Optional specialists have machine-readable activation or skip reasons
209
+ - [ ] Claude and Codex fixtures produce equivalent canonical handoff fields
210
+ - [ ] Installation preserves unrelated project agents and files
211
+ - [ ] Model policy is task-sensitive and not globally fixed
212
+ - Change Receipt:
213
+ - Files Changed: Pending
214
+ - Requirements Covered: Pending
215
+ - Excluded Scope: Full orchestration and blocking rollout
216
+ - Basic Checks: Pending
217
+ - Remaining Risks: Pending
218
+ - Verification Receipt:
219
+ - Status: PENDING
220
+ - Commands and Results: Pending
221
+ - Unrun Checks: Pending
222
+ - Detailed Evidence:
223
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - planned evidence target; replace before completion
224
+ - Document Sync Check:
225
+ - [ ] Installed adapters match the canonical persona contract
226
+ - [ ] README, USAGE, AGENTS, and workflow references remain synchronized
227
+
228
+ ### [ ] TASK-HARNESS-004: Implement Orchestration State And Recovery
229
+
230
+ - Status: ToDo
231
+ - Work Type: code
232
+ - Related Concept Docs:
233
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - workflow, communication, recovery, audit, and safety requirements
234
+ - Related UI Docs: N/A - orchestration is file and command based
235
+ - Related HTML Preview: N/A - state and recovery are verified with deterministic fixtures
236
+ - Related Technical Docs:
237
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - topology selection, state machine, workspace, routing, retry, and ownership rules
238
+ - Related QA Docs:
239
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - interruption, rework, invalid communication, and partial-output checks
240
+ - Implementation Preconditions:
241
+ - [ ] TASK-HARNESS-002 and TASK-HARNESS-003 are complete
242
+ - [ ] User approves workspace retention and ignore/commit guidance
243
+ - [ ] Context Reader records every linked document as read
244
+ - [ ] Secret and sensitive-data rejection policy is testable
245
+ - [ ] Runtime capability negotiation behavior is confirmed
246
+ - Context Receipt:
247
+ - Status: PENDING
248
+ - Required References Read:
249
+ - Pending
250
+ - Constraints:
251
+ - No new orchestration server, database, or queue in the initial implementation
252
+ - Conflicts: Pending review
253
+ - Component & Library Plan:
254
+ - N/A - standard filesystem and JSON/JSONL operations; no React component work
255
+ - Acceptance Criteria:
256
+ - [ ] Minimal linear and Expert Pool paths work without direct peer messaging
257
+ - [ ] Read-only Fan-out/Fan-in cannot introduce overlapping writes
258
+ - [ ] Producer-Reviewer rework creates a new attempt and stops after two loops
259
+ - [ ] Invalid direct decisions and illegal transitions are rejected
260
+ - [ ] Interrupted tasks resume from the last valid event and artifact set
261
+ - [ ] Critical missing artifacts block code/deploy completion
262
+ - [ ] Workspace artifacts reject secrets and prohibited raw data
263
+ - Change Receipt:
264
+ - Files Changed: Pending
265
+ - Requirements Covered: Pending
266
+ - Excluded Scope: Blocking rollout, npm publish, and deployment
267
+ - Basic Checks: Pending
268
+ - Remaining Risks: Pending
269
+ - Verification Receipt:
270
+ - Status: PENDING
271
+ - Commands and Results: Pending
272
+ - Unrun Checks: Pending
273
+ - Detailed Evidence:
274
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - planned evidence target; replace before completion
275
+ - Document Sync Check:
276
+ - [ ] Runtime behavior and state diagrams agree
277
+ - [ ] Recovery and retention guidance matches tested behavior
278
+
279
+ ### [ ] TASK-HARNESS-005: Run Warning Pilot And Prepare Blocking Release
280
+
281
+ - Status: ToDo
282
+ - Work Type: deploy
283
+ - Related Concept Docs:
284
+ - [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - calibration, cost, portability, and completion requirements
285
+ - Related UI Docs: N/A - rollout affects agent workflow rather than application UI
286
+ - Related HTML Preview: N/A - pilot evidence consists of task manifests, Receipts, QA reports, and package output
287
+ - Related Technical Docs:
288
+ - [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - compatibility, warning migration, and runtime capability rules
289
+ - Related QA Docs:
290
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - pilot success and release readiness criteria
291
+ - Implementation Preconditions:
292
+ - [ ] TASK-HARNESS-002 through TASK-HARNESS-004 are independently verified
293
+ - [ ] Five representative pilot tasks are selected
294
+ - [ ] Warning-mode metrics and override recording are enabled
295
+ - [ ] User approves pilot execution
296
+ - [ ] Rollback to the previous contract is documented
297
+ - Context Receipt:
298
+ - Status: PENDING
299
+ - Required References Read:
300
+ - Pending
301
+ - Constraints:
302
+ - Blocking, merge, publish, and deploy each require explicit user approval
303
+ - Conflicts: Pending review
304
+ - Component & Library Plan:
305
+ - N/A - release and package validation only
306
+ - Acceptance Criteria:
307
+ - [ ] Five pilot tasks record activation, state, retries, false positives, overrides, and verification outcomes
308
+ - [ ] Pilot review identifies no unhandled P0 failure path
309
+ - [ ] Blocking rules are limited to validated P0 evidence
310
+ - [ ] Package contents, version, changelog, README, USAGE, and installation behavior agree
311
+ - [ ] Rollback and compatibility notes are complete
312
+ - [ ] User separately approves blocking mode, merge, and npm publish
313
+ - Change Receipt:
314
+ - Files Changed: Pending
315
+ - Requirements Covered: Pending
316
+ - Excluded Scope: N/A - defined by the approved release candidate
317
+ - Basic Checks: Pending
318
+ - Remaining Risks: Pending
319
+ - Verification Receipt:
320
+ - Status: PENDING
321
+ - Commands and Results: Pending
322
+ - Unrun Checks: Pending
323
+ - Detailed Evidence:
324
+ - [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - planned evidence target; replace with pilot QA report and PR before completion
325
+ - Document Sync Check:
326
+ - [ ] Pilot outcomes update requirements, architecture, workflow, and QA documents
327
+ - [ ] Released package documentation matches installed behavior
328
+
329
+ ## Done
330
+
331
+ No completed backlog item has passed final document verification and user review yet.
332
+
333
+ ## 4. Related Documents
334
+
335
+ - **Concept_Design**: [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - backlog scope and requirement IDs
336
+ - **Technical_Specs**: [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - implementation contracts
337
+ - **Logic_Progress**: [Execution Plan](./01_EXECUTION_PLAN.md) - atomic delivery sequence
338
+ - **Logic_Progress**: [Decision Log](./03_DECISION_LOG.md) - approved choices constraining backlog execution
339
+ - **QA_Validation**: [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - acceptance and verification scenarios
@@ -0,0 +1,160 @@
1
+ # Agent Harness Execution Plan
2
+ > Created: 2026-07-17 01:04
3
+ > Last Updated: 2026-07-17 02:39
4
+
5
+ ## 1. Objective
6
+
7
+ Deliver the enhanced harness as a backward-compatible evolution of the existing Context, Implementation, and Verification flow. This plan records future work but does not authorize code changes, publishing, or deployment.
8
+
9
+ ## 2. Delivery Principles
10
+
11
+ - [ ] Preserve existing `preflight` and `verify` behavior until replacement evidence is complete.
12
+ - [ ] Implement one canonical contract and thin runtime adapters.
13
+ - [ ] Keep optional specialists conditional and measurable.
14
+ - [ ] Use standard JSON/JSONL parsing rather than ad hoc text protocols.
15
+ - [ ] Keep QA Inspector independent from implementation.
16
+ - [ ] Roll out new enforcement in warning mode for five real tasks.
17
+ - [ ] Require separate user approval before code implementation, blocking rollout, merge, publish, or deploy.
18
+
19
+ ## 3. Phase A - Design Baseline
20
+
21
+ - [x] Record the approved user requirements and scope.
22
+ - [x] Define core and optional role responsibilities.
23
+ - [x] Define topology-selection rules.
24
+ - [x] Define persona contract fields.
25
+ - [x] Define workflow states and legal transitions.
26
+ - [x] Define canonical document and execution-workspace ownership.
27
+ - [x] Define the structured message envelope and routing rules.
28
+ - [x] Define error classes, retry limits, and escalation behavior.
29
+ - [x] Define Claude Code and Codex adapter boundaries.
30
+ - [x] Define traceability and QA scenarios.
31
+ - [x] Obtain user review of the completed design baseline.
32
+
33
+ **Exit Evidence**: Requirements Analysis, Architecture, Decision Log, Backlog, this Execution Plan, and QA Test Scenarios are mutually linked and reviewed.
34
+
35
+ **Approval Record**: The user approved the design baseline and Phase B implementation on 2026-07-17. Phases C-G remain unapproved until their own gates are reached.
36
+
37
+ ## 4. Phase B - Contract And Validator Implementation
38
+
39
+ - [x] Extend the canonical harness contract with Requirements, Design, Error, and Release evidence definitions.
40
+ - [x] Define a versioned task manifest schema.
41
+ - [x] Define a versioned inter-agent message schema.
42
+ - [x] Define an append-only event schema for state transitions.
43
+ - [x] Implement structured parsing and schema validation.
44
+ - [x] Implement legal state-transition validation.
45
+ - [x] Implement role activation and `Skipped - reason` validation.
46
+ - [x] Implement exclusive write-ownership validation for parallel work.
47
+ - [x] Keep existing backlog receipt parsing backward compatible.
48
+ - [x] Add unit tests for valid and invalid manifests, messages, events, and transitions.
49
+ - [x] Add migration guidance for existing projects.
50
+
51
+ **Exit Evidence**: Automated tests prove schema versioning, transition rejection, compatibility, and no regression in current receipt checks.
52
+
53
+ **Completion Evidence**: [Agent Harness Contract Implementation QA](../05_QA_Validation/03_AGENT_HARNESS_CONTRACT_QA.md) records automated checks, external schema compilation, independent QA corrections, and the final PASS Receipt.
54
+
55
+ ## 5. Phase C - Persona And Runtime Adapters
56
+
57
+ - [ ] Create or update the Requirements Analyst persona.
58
+ - [ ] Preserve and update the Context Reader persona.
59
+ - [ ] Create the Architect persona.
60
+ - [ ] Create the Logic Builder persona.
61
+ - [ ] Update the Implementer persona with write ownership and message requirements.
62
+ - [ ] Rename or evolve Verifier semantics to QA Inspector without losing read-only enforcement.
63
+ - [ ] Create the conditional Release Guardian persona.
64
+ - [ ] Add Security Inspector routing to the existing security verification skill rather than duplicating its knowledge.
65
+ - [ ] Map Claude Code tools and permissions to each persona.
66
+ - [ ] Map Codex delegation instructions to the same persona contracts.
67
+ - [ ] Add capability negotiation and degraded-mode reporting.
68
+ - [ ] Verify that unrelated user-defined Claude agents remain untouched by installation.
69
+
70
+ **Exit Evidence**: Both runtimes can execute the same fixture task and produce equivalent contract fields despite different native tools.
71
+
72
+ ## 6. Phase D - Orchestration And Recovery
73
+
74
+ - [ ] Add minimal linear topology orchestration.
75
+ - [ ] Add conditional Expert Pool activation.
76
+ - [ ] Add read-only Fan-out/Fan-in for document search and independent test groups.
77
+ - [ ] Add Producer-Reviewer rework routing with a two-loop cap.
78
+ - [ ] Add Supervisor allocation only for tasks with declared independent ownership.
79
+ - [ ] Persist `manifest.json` and `events.jsonl` under a task workspace.
80
+ - [ ] Preserve failed attempts and create a new attempt directory on retry.
81
+ - [ ] Resume from the latest valid state after interruption.
82
+ - [ ] Reject direct peer messages that attempt to change scope or task state.
83
+ - [ ] Prevent completion from partial critical artifacts.
84
+ - [ ] Redact or reject secrets and sensitive raw data in execution artifacts.
85
+
86
+ **Exit Evidence**: Recovery fixtures prove that interruption, retry, rework, and degraded capability do not lose prior evidence or bypass a gate.
87
+
88
+ ## 7. Phase E - Incremental QA And Evaluation
89
+
90
+ - [ ] Add requirements-to-design traceability checks.
91
+ - [ ] Add design-to-change traceability checks.
92
+ - [ ] Add change-to-verification traceability checks.
93
+ - [ ] Add producer-consumer boundary checks for API, type, route, state, and persistence contracts.
94
+ - [ ] Verify QA Inspector cannot write implementation files.
95
+ - [ ] Verify Implementer cannot self-issue the final Verification Receipt.
96
+ - [ ] Test small, medium, and complex topology selection.
97
+ - [ ] Compare enhanced-harness and current-harness results on identical fixtures.
98
+ - [ ] Measure agent count, token/time proxy, retries, false positives, and escaped defects.
99
+ - [ ] Record unsupported runtime capabilities without fabricating success.
100
+
101
+ **Exit Evidence**: QA report maps every P0 requirement to passing independent evidence and records remaining risks.
102
+
103
+ ## 8. Phase F - Warning Pilot And Blocking Rollout
104
+
105
+ - [ ] Select five representative real code or deploy tasks.
106
+ - [ ] Run the enhanced contract in warning mode.
107
+ - [ ] Record false positives, missing fields, runtime gaps, and user overrides per task.
108
+ - [ ] Review whether optional roles were activated appropriately.
109
+ - [ ] Review whether retry and rework limits were sufficient.
110
+ - [ ] Correct the contract and rerun affected fixtures.
111
+ - [ ] Present pilot results and proposed blocking rules to the user.
112
+ - [ ] Obtain explicit approval for blocking mode.
113
+ - [ ] Enable blocking only for validated P0 evidence.
114
+ - [ ] Document rollback to warning mode.
115
+
116
+ **Exit Evidence**: User-approved pilot report and a reversible blocking configuration.
117
+
118
+ ## 9. Phase G - Release Readiness
119
+
120
+ - [ ] Run package-level skill verification.
121
+ - [ ] Run unit and integration tests.
122
+ - [ ] Run `npm pack --dry-run` and inspect included adapters, schemas, docs, and tests.
123
+ - [ ] Confirm README and USAGE describe the final installed behavior.
124
+ - [ ] Confirm version, changelog, package metadata, and npm contents agree.
125
+ - [ ] Confirm install and upgrade preserve unrelated project agents and files.
126
+ - [ ] Prepare rollback and compatibility notes.
127
+ - [ ] Obtain explicit merge and publish approval.
128
+
129
+ **Exit Evidence**: Passing Release Readiness Receipt with package, migration, rollback, and verification links.
130
+
131
+ ## 10. Dependency Order
132
+
133
+ ```text
134
+ Phase A
135
+ -> Phase B
136
+ -> Phase C
137
+ -> Phase D
138
+ -> Phase E
139
+ -> Phase F
140
+ -> Phase G
141
+ ```
142
+
143
+ Phase C persona drafting may begin after Phase B schemas are stable. Phase E test-fixture design may run in parallel with Phase C, but final QA execution depends on Phases C and D.
144
+
145
+ ## 11. Stop Conditions
146
+
147
+ - A new product or scope decision is required.
148
+ - A runtime cannot enforce a mandatory permission boundary.
149
+ - Existing receipt compatibility cannot be preserved without a migration decision.
150
+ - Structured artifacts would expose secrets or personal data.
151
+ - Pilot evidence shows coordination cost exceeds defect reduction for the target task class.
152
+ - The user pauses, redirects, or rejects the design.
153
+
154
+ ## 12. Related Documents
155
+
156
+ - **Concept_Design**: [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - required outcomes and constraints
157
+ - **Technical_Specs**: [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - target role, state, message, and adapter contracts
158
+ - **Logic_Progress**: [Backlog](./00_BACKLOG.md) - task status and gate evidence
159
+ - **Logic_Progress**: [Decision Log](./03_DECISION_LOG.md) - approved decisions governing the plan
160
+ - **QA_Validation**: [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - phase exit and failure-path verification
@@ -0,0 +1,98 @@
1
+ # Decision Log
2
+ > Created: 2026-07-17 01:04
3
+ > Last Updated: 2026-07-17 01:04
4
+
5
+ ## 1. Decision Scope
6
+
7
+ This log records user-approved decisions for the enhanced Solmate agent harness. Changes to these decisions require a new dated entry rather than rewriting the historical rationale.
8
+
9
+ ## 2. Decisions
10
+
11
+ ### 2026-07-17 - Core Team Plus Optional Expert Pool
12
+
13
+ - **ID**: DEC-001
14
+ - **Type**: Architecture
15
+ - **Decision**: Keep Coordinator, Context Reader, Implementer, and QA Inspector as the minimal path. Activate Requirements Analyst, Architect, Logic Builder, Security Inspector, and Release Guardian only when recorded conditions apply.
16
+ - **Reason**: This preserves role separation and independent verification without imposing a full multi-agent team on small tasks.
17
+ - **Rejected Alternative**: Always run every specialist or automatically use Agent Teams whenever two roles exist.
18
+ - **Reconsider When**: Pilot evidence shows a specialist is required in nearly all tasks or role activation itself causes repeated failures.
19
+
20
+ ### 2026-07-17 - Canonical Documents And Execution Workspace Are Separate
21
+
22
+ - **ID**: DEC-002
23
+ - **Type**: Architecture
24
+ - **Decision**: Approved requirements, architecture, logic, backlog, and QA evidence remain under the 5-Layer `docs/` structure. `_workspace/harness/<task-id>/` stores runtime manifests, messages, attempts, and temporary evidence.
25
+ - **Reason**: Project decisions must survive runtime and session changes, while execution details need an append-only recovery area.
26
+ - **Rejected Alternative**: Treat `_workspace/` as the sole source of truth or copy all intermediate messages into permanent project specifications.
27
+ - **Reconsider When**: A future runtime offers an auditable durable store that can export stable project documents without vendor lock-in.
28
+
29
+ ### 2026-07-17 - Coordinator Owns Decisions And State
30
+
31
+ - **ID**: DEC-003
32
+ - **Type**: Workflow
33
+ - **Decision**: Agents may communicate directly for bounded clarification and status, but scope, acceptance, architecture, risk, state transition, PASS, release, and completion decisions must route through Coordinator.
34
+ - **Reason**: Direct peer communication improves efficiency, but distributed decision authority makes user approval and audit trails unreliable.
35
+ - **Rejected Alternative**: Fully peer-to-peer self-governing agent decisions or Coordinator-only transport for every low-risk clarification.
36
+ - **Reconsider When**: Structured consensus and decision persistence can be independently verified across both Claude Code and Codex.
37
+
38
+ ### 2026-07-17 - Architect And Logic Builder Remain Separate Roles
39
+
40
+ - **ID**: DEC-004
41
+ - **Type**: Architecture
42
+ - **Decision**: Architect owns system boundaries, public contracts, dependencies, persistence, and deployment topology. Logic Builder owns business rules, state transitions, invariants, calculations, authorization rules, and failure behavior.
43
+ - **Reason**: Combining both roles makes architecture documents broad while leaving domain behavior implicit. Separation also enables either role to be skipped independently for small work.
44
+ - **Rejected Alternative**: A single Architect role that owns every design concern.
45
+ - **Reconsider When**: Repeated small tasks show the separation creates duplicated artifacts without improving correctness.
46
+
47
+ ### 2026-07-17 - QA Inspector Is Independent And Non-Writing
48
+
49
+ - **ID**: DEC-005
50
+ - **Type**: Quality
51
+ - **Decision**: QA Inspector inspects and executes checks but does not modify implementation files or close its own findings. Rework returns to Implementer through Coordinator.
52
+ - **Reason**: The producer cannot be the sole source of verification evidence. Direct QA fixes blur ownership and can leave changes unverified.
53
+ - **Rejected Alternative**: A general-purpose QA agent that fixes findings immediately and reports the result as verified.
54
+ - **Reconsider When**: None for final verification. A separate test-authoring role may write tests before the final independent verification attempt.
55
+
56
+ ### 2026-07-17 - Typed Failure States Replace Generic Retry
57
+
58
+ - **ID**: DEC-006
59
+ - **Type**: Reliability
60
+ - **Decision**: Classify context, decision, contract, transient, timeout, implementation, verification, critical-artifact, degraded-capability, and conflict failures. Only transient and timeout failures receive one automatic retry; implementation rework is capped at two loops before user review.
61
+ - **Reason**: “Retry once and continue without the result” is unsafe for critical code and deploy artifacts. Failure type determines whether retry can help.
62
+ - **Rejected Alternative**: One generic retry policy for all failures or unlimited producer-reviewer loops.
63
+ - **Reconsider When**: Pilot evidence supports different limits for a specific runtime or work type.
64
+
65
+ ### 2026-07-17 - One Canonical Contract With Thin Runtime Adapters
66
+
67
+ - **ID**: DEC-007
68
+ - **Type**: Technical Choice
69
+ - **Decision**: Keep role, message, state, artifact, receipt, and error semantics runtime-neutral. Claude Code and Codex adapters map only supported capabilities.
70
+ - **Reason**: Claude-only tool names and experimental APIs would make the policy brittle and duplicate behavior across runtimes.
71
+ - **Rejected Alternative**: Separate full workflow specifications for Claude Code and Codex or an invented `.codex/agents/` format.
72
+ - **Reconsider When**: Both runtimes adopt a shared, stable agent manifest standard.
73
+
74
+ ### 2026-07-17 - Machine Enforcement Extends Existing Receipts
75
+
76
+ - **ID**: DEC-008
77
+ - **Type**: Compatibility
78
+ - **Decision**: Preserve Context, Change, and Verification Receipts and existing `preflight` / `verify` commands. Add Requirements, Design, Error, and Release evidence incrementally in warning mode before blocking.
79
+ - **Reason**: The current implementation already protects the two highest-risk boundaries. Replacing it would create migration risk without user value.
80
+ - **Rejected Alternative**: Replace the receipt model with an entirely new event protocol in one release.
81
+ - **Reconsider When**: A versioned migration proves that a consolidated schema is simpler and fully backward compatible.
82
+
83
+ ### 2026-07-17 - No User-Facing UI In This Scope
84
+
85
+ - **ID**: DEC-009
86
+ - **Type**: Scope
87
+ - **Decision**: This enhancement is a skill, contract, CLI, and runtime-adapter capability. It does not introduce a user-facing application screen, so UI documents and HTML Preview are not required for this scope.
88
+ - **Reason**: Creating a decorative preview for a non-UI protocol would add ceremony without validating the actual risk.
89
+ - **Rejected Alternative**: Add a dashboard or HTML workflow viewer during the first implementation.
90
+ - **Reconsider When**: Users request interactive task-state inspection or architecture visualization as a product feature.
91
+
92
+ ## 3. Related Documents
93
+
94
+ - **Concept_Design**: [Agent Harness Requirements Analysis](../01_Concept_Design/01_AGENT_HARNESS_REQUIREMENTS_ANALYSIS.md) - user-approved needs and scope
95
+ - **Technical_Specs**: [Agent Harness Architecture](../03_Technical_Specs/01_AGENT_HARNESS_ARCHITECTURE.md) - implementation-neutral architecture resulting from these decisions
96
+ - **Logic_Progress**: [Backlog](./00_BACKLOG.md) - tasks governed by the decisions
97
+ - **Logic_Progress**: [Execution Plan](./01_EXECUTION_PLAN.md) - staged delivery and rollout
98
+ - **QA_Validation**: [Agent Harness Test Scenarios](../05_QA_Validation/01_TEST_SCENARIOS.md) - verification of decision outcomes