triad-plus 1.2.0 → 1.4.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +11 -6
  3. package/adapters/antigravity/.agents/agents/triad-evaluator/agent.md +8 -1
  4. package/adapters/antigravity/.agents/agents/triad-orchestrator/agent.md +7 -5
  5. package/adapters/antigravity/.agents/skills/triad/SKILL.md +6 -5
  6. package/adapters/claude-code/.claude/agents/triad-evaluator.md +9 -1
  7. package/adapters/claude-code/.claude/commands/triad.md +6 -5
  8. package/adapters/codex/README.md +6 -4
  9. package/adapters/codex/prompts/triad.md +27 -9
  10. package/adapters/codex/runtime.json +4 -0
  11. package/adapters/copilot/.github/agents/triad-developer.agent.md +22 -0
  12. package/adapters/copilot/.github/agents/triad-evaluator.agent.md +26 -0
  13. package/adapters/copilot/.github/agents/triad-orchestrator.agent.md +52 -0
  14. package/adapters/copilot/.github/agents/triad-reviewer.agent.md +22 -0
  15. package/adapters/copilot/.github/skills/triad/SKILL.md +52 -0
  16. package/adapters/copilot/README.md +20 -0
  17. package/adapters/copilot/runtime.json +9 -0
  18. package/adapters/hermes/skills/triad/SKILL.md +6 -5
  19. package/adapters/opencode/.opencode/agents/triad-developer.md +4 -0
  20. package/adapters/opencode/.opencode/agents/triad-evaluator.md +14 -5
  21. package/adapters/opencode/.opencode/agents/triad-orchestrator.md +7 -5
  22. package/adapters/opencode/.opencode/agents/triad-reviewer.md +4 -0
  23. package/adapters/opencode/.opencode/commands/triad.md +6 -5
  24. package/adapters/registry.mjs +42 -0
  25. package/bin/triad-plus.js +91 -18
  26. package/docs/codex-replication.md +8 -4
  27. package/docs/compatibility.md +2 -1
  28. package/docs/configuration.md +6 -5
  29. package/docs/npx-installation.md +2 -1
  30. package/docs/operating-guide.it.md +19 -1
  31. package/docs/operating-guide.md +19 -1
  32. package/docs/runtimes.md +24 -1
  33. package/docs/verification.md +25 -0
  34. package/integrations/codex/README.md +20 -12
  35. package/package.json +1 -1
  36. package/runtime/legacy-adapters.json +9 -1
  37. package/runtime/triad-runtime-capabilities.mjs +30 -2
  38. package/runtime/triad-verify.mjs +22 -0
  39. package/schemas/runtime-capabilities.schema.json +1 -1
  40. package/skills/triad-loop-bootstrap/SKILL.md +3 -1
  41. package/skills/triad-loop-bootstrap/assets/loop-template/feature-card.template.md +6 -0
  42. package/skills/triad-loop-bootstrap/assets/loop-template/handoff-report.template.md +8 -0
  43. package/skills/triad-loop-bootstrap/assets/loop-template/run-state.yaml +8 -0
  44. package/skills/triad-loop-bootstrap/assets/loop-template/runtime/assignments/assignment.template.json +10 -0
  45. package/skills/triad-loop-bootstrap/assets/project.yaml +10 -0
  46. package/skills/triad-loop-developer/SKILL.md +12 -0
  47. package/skills/triad-loop-evaluator/SKILL.md +22 -2
  48. package/skills/triad-loop-orchestrator/SKILL.md +65 -11
  49. package/skills/triad-loop-reviewer/SKILL.md +13 -0
@@ -6,7 +6,7 @@
6
6
  "required": ["schema_version", "detected_at", "host", "host_runtime", "verifier_runtime", "lifecycle_async", "verification"],
7
7
  "properties": {
8
8
  "schema_version": { "const": 1 },
9
- "host": { "enum": ["codex", "opencode", "claude-code", "antigravity"] },
9
+ "host": { "enum": ["codex", "opencode", "claude-code", "antigravity", "hermes", "copilot"] },
10
10
  "host_runtime": { "type": "object", "required": ["binary", "version", "available"] },
11
11
  "verifier_runtime": { "type": "object", "required": ["binary", "version", "available"] },
12
12
  "lifecycle_async": { "type": "object", "required": ["kind", "minimum_version", "available", "configured", "reason"] },
@@ -26,7 +26,9 @@ conditions, runnable quality gates, practical-test need, and integration need.
26
26
  6. Create `.loop/runtime/assignments/` and record the active adapter metadata in
27
27
  `.loop/runtime/capabilities.json` by running
28
28
  `.triad-runtime/triad-runtime-capabilities.mjs --adapter
29
- .triad-runtime/adapter.json`.
29
+ .triad-runtime/adapter.json --requested-mode <project.control_plane.dispatch_mode>`.
30
+ Use `auto` when the project does not declare a mode. For Codex, `auto` is
31
+ explicit dispatch; `async_hook` is an experimental opt-in only.
30
32
  7. Show the full card division before delivery work. Continue unless the owner
31
33
  changes it or an escalation condition exists.
32
34
 
@@ -24,6 +24,12 @@
24
24
  - Allowed dependencies: `<names or none>`
25
25
  - Test fixtures/examples: `<paths>`
26
26
 
27
+ ## Repository skill binding
28
+
29
+ - Repository policy/router: `<path to the repository router SKILL.md or not applicable>`
30
+ - Required skills: `<router, routed skills, and completion skill>`
31
+ - Assignment evidence: `<relative SKILL.md paths and SHA-256 values>`
32
+
27
33
  ## Integration, practical test, and risk
28
34
 
29
35
  - Local-worktree setup: `<not applicable or command>`
@@ -50,6 +50,14 @@ State: `not_applicable | ready_to_start | active | closed | start_failed`
50
50
  - Start: `<only on owner request>`
51
51
  - Stop: `<only on owner completion>`
52
52
  - Closure evidence: `<timestamp, process result, port-release check>`
53
+ - Remote access contract: `<none | declared remote URL and access mode>`.
54
+ `localhost` is local-only and must not be presented as a remote endpoint.
55
+
56
+ ## Delivery closure record
57
+
58
+ - Run record updated: `<path and final decision>`
59
+ - Final branch/commit map recorded: `<yes/no; reference>`
60
+ - Final delivery message issued: `<yes/no; timestamp or reference>`
53
61
 
54
62
  ## Practical test and follow-up
55
63
 
@@ -2,6 +2,14 @@ version: 2
2
2
  updated_at: null
3
3
  project_decision: not_started
4
4
 
5
+ delivery:
6
+ status: not_delivered # not_delivered | delivered | delivery_blocked | delivered_without_demo
7
+ handoff: null
8
+ branches: []
9
+ evaluator_report: null
10
+ delivered_at: null
11
+ owner_message: null
12
+
5
13
  feature_plan:
6
14
  path: feature-plan.md
7
15
  status: declared
@@ -16,6 +16,16 @@
16
16
  "expected_prd_sha256": "REPLACE_ME_SHA256",
17
17
  "expected_card_sha256": "REPLACE_ME_SHA256",
18
18
  "expected_gates_sha256": "REPLACE_ME_SHA256",
19
+ "required_repository_skills": [
20
+ {
21
+ "path": ".agents/skills/router/SKILL.md",
22
+ "sha256": "REPLACE_ME_SHA256"
23
+ },
24
+ {
25
+ "path": ".agents/skills/agent-completion/SKILL.md",
26
+ "sha256": "REPLACE_ME_SHA256"
27
+ }
28
+ ],
19
29
  "verification_run_id": "REPLACE_ME_UUID",
20
30
  "evidence_directory": ".loop/evidence/REPLACE_ME_FEATURE_ID/attempt-001"
21
31
  }
@@ -37,7 +37,17 @@ project:
37
37
  enabled: false
38
38
  start_policy: only_on_owner_request
39
39
  stop_policy: only_on_owner_completion
40
+ # Declare a service only when the owner needs a practical demo. A remote
41
+ # URL is optional and must never be inferred from a localhost URL.
40
42
  services: []
43
+ # Example service shape:
44
+ # - id: component-demo
45
+ # worktree: worktrees/product-repository
46
+ # start_command: npm run dev -- --host 0.0.0.0
47
+ # stop_command: <owner-completion procedure>
48
+ # local_url: http://127.0.0.1:6006
49
+ # remote_access: tailscale # none | tailscale | proxy | public
50
+ # remote_url: http://host.example:6006
41
51
 
42
52
  integration:
43
53
  enabled: false
@@ -10,6 +10,18 @@ project manifest, repository instructions, allowed surface, prior findings, and
10
10
  gates. Verify the declared worktree and branch before editing. Do not change
11
11
  scope, policy, assignments, queue, state, or evidence records.
12
12
 
13
+ At the beginning of every activation, read `.triad-plus/team.json` when it
14
+ exists. Your first report to the Orchestrator must identify you as its configured
15
+ `roles.developer.displayName` and the Triad+ Developer, then name the assigned
16
+ card. This is an attributed role-activation record, not an approval or a state
17
+ transition.
18
+
19
+ When the assignment declares `required_repository_skills`, read every bound
20
+ file from the declared worktree before editing. Include their relative paths and
21
+ SHA-256 values in the report as a **repository-skill attestation**. If a bound
22
+ skill is missing or its hash differs, stop and report the mismatch; do not
23
+ replace it with external context or a similarly named skill.
24
+
13
25
  Implement the smallest complete change and focused tests. Run useful local
14
26
  checks and measure declared criteria. Report changed files, tests, exact command
15
27
  results, metrics, worktree/branch, risks, and blockers to the Orchestrator.
@@ -11,6 +11,26 @@ artifact/observation instructions, and current verifier evidence. Do not request
11
11
  Developer reasoning, conversation history, prior Reviewer discussion, or attempt
12
12
  history unless the owner explicitly requires it.
13
13
 
14
+ The approved evaluation packet is the complete evaluation boundary. Do not
15
+ inspect queue state, delivery state, coordinator state, run-state files,
16
+ handoff files, or other control records unless their contents are explicitly
17
+ included in the approved evaluation packet. Evaluate only the supplied goal,
18
+ quality/acceptance target, final candidate or observable artifact, and
19
+ environment-derived verification evidence. Never use an out-of-packet control
20
+ record to justify a verdict.
21
+
22
+ At the beginning of every activation, read `.triad-plus/team.json` when it
23
+ exists. Your first report must identify you as its configured
24
+ `roles.evaluator.displayName` and Evaluator+, then name the completed result
25
+ being assessed. This is an attributed post-run activation record; it does not
26
+ reopen or modify Triad.
27
+
28
+ When verifier evidence declares `repository_skills`, independently read the
29
+ listed bound files from the final worktree and include their paths and SHA-256
30
+ values in the evaluation report. A missing or mismatched binding makes the
31
+ evaluation `INDETERMINATE`; it never starts repair or changes the closed Triad
32
+ result.
33
+
14
34
  Return a report conforming to `schemas/evaluator-plus-result.schema.json` and
15
35
  store it separately under `artifacts/evaluator-plus/<evaluation-id>.json`:
16
36
 
@@ -20,5 +40,5 @@ store it separately under `artifacts/evaluator-plus/<evaluation-id>.json`:
20
40
 
21
41
  Include concise rationale, direct evidence references, and confidence. Do not
22
42
  edit source, change the Triad queue/state, commit, push, approve delivery, or
23
- request automatic repair. A `FAIL` leaves the Triad run approved and closed; it
24
- may inform a new owner-requested run.
43
+ request automatic repair, and never reopen the Triad run. A `FAIL` leaves the
44
+ Triad run approved and closed; it may inform a new owner-requested run.
@@ -18,18 +18,28 @@ intermediary or another Triad role to the owner. You may report delegated roles'
18
18
  outputs, but never claim their identity. Technical role IDs and authority remain
19
19
  unchanged.
20
20
 
21
- After loading this configuration, the first owner-facing message of every Triad+
22
- run must begin with a concise introduction: "I am <displayName>, the Triad+
23
- Orchestrator for this run." Localize it to the configured interaction language,
24
- then state in one sentence whether the run is new or resumed and what input was
25
- received. Do this before delegating, discussing artifacts, or asking questions.
21
+ If the current Triad+ invocation has not yet introduced the Orchestrator, its
22
+ first owner-facing message is a presentation, not a generic acknowledgement or
23
+ bootstrap report. Before any other owner-facing content, begin with a
24
+ first-person sentence that includes `<displayName>` and "Triad+ Orchestrator",
25
+ localized to the configured interaction language; then state whether the run is
26
+ new or resumed and what input was received. If the entry point already made that
27
+ presentation for this invocation, do not repeat it.
26
28
 
27
29
  ## Run one card
28
30
 
29
31
  1. Verify the PRD hash, declared worktree/branch, repository instructions,
30
- runnable gates, and capability snapshot.
32
+ runnable gates, and capability snapshot. The snapshot must reflect
33
+ `project.control_plane.dispatch_mode` as `requested_mode` (default `auto`).
34
+ When repository instructions define
35
+ a skill router, read it, select the router, routed skills, and completion
36
+ skill required by the card, and bind their worktree-relative paths plus
37
+ SHA-256 values in `required_repository_skills` on the Developer assignment.
38
+ Do not assign the card if this binding cannot be made.
31
39
  2. Choose one dependency-approved `ready` card, mark it `in_progress`, append an
32
- attempt, and create an active assignment before delegating.
40
+ attempt, and create an active assignment before delegating. Before each
41
+ delegation, publish an owner-facing activation notice that attributes the
42
+ configured display name, technical role, and card/attempt to that role.
33
43
  3. Give the Developer the card, relevant PRD excerpt, allowed surface, gates,
34
44
  risks, and prior findings. Treat its command results and report as
35
45
  **agent-reported claims**, never as control-plane gate truth.
@@ -38,17 +48,37 @@ received. Do this before delegating, discussing artifacts, or asking questions.
38
48
  the verifier explicitly. Accept only current evidence whose assignment ID,
39
49
  feature, attempt, PRD/card/gate hashes, expected branch, and candidate
40
50
  fingerprint match the active candidate.
51
+ A Developer report is never a human-input wait condition: immediately wait
52
+ for the configured hook evidence or invoke the verifier, then immediately
53
+ dispatch the Reviewer on a verifier pass. Do not ask the owner to continue
54
+ between Developer completion, verification, and review.
41
55
  5. A passing verifier result is **environment-derived evidence**. Move only then
42
56
  to `in_review`. Missing, stale, failed, timed-out, invalid-context, or
43
57
  invalidated evidence never advances the card.
44
58
  6. Give the Reviewer the card, diff, developer report, verifier evidence, prior
45
59
  attempts, and risks. Record its recommendation:
46
- - `approved`: verify scope/evidence, commit the card locally, then select the
47
- next ready card;
60
+ - `approved`: verify scope/evidence, commit the card locally, promote every
61
+ dependency-satisfied draft card to `ready`, then immediately select and
62
+ assign the next ready card;
48
63
  - `rework`: preserve findings and return the card to `in_progress` for a new
49
64
  attempt and new verification;
50
65
  - `blocked`: record the exact external condition or owner decision required.
51
66
  7. Stop automatic retry at the declared limit and escalate the decision needed.
67
+ Do not ask the owner to continue, pause between cards, or finish the run
68
+ while a dependency-satisfied card remains `ready`; stop only for a declared
69
+ escalation, a blocked card, or when every required card is terminal.
70
+
71
+ ## Unattended continuation rule
72
+
73
+ The normal chain is unattended: Developer completion → verification → Reviewer
74
+ → rework or approval → next dependency-satisfied card. Do not stop for an
75
+ acknowledgement, progress update, or agent-reported claim. The only valid human
76
+ wait conditions are an escalation named by the policy, a `blocked` verdict, an
77
+ unrecoverable runtime error, or an explicit owner pause.
78
+
79
+ An owner-facing activation or progress update is informational output, never an
80
+ implicit pause. After sending it, continue the recorded next action without
81
+ waiting for a reply unless one of the valid human wait conditions applies.
52
82
 
53
83
  ## Authority and delivery
54
84
 
@@ -61,8 +91,30 @@ review, and restoration of normal roles.
61
91
  After all required cards and project gates pass, commit each approved card if
62
92
  needed and normally push declared branches. Never force-push, create/update a
63
93
  pull request, publish, release, or start/stop a demo without owner direction.
64
- Write a final handoff with cards, commits, pushes, verifier evidence, reviewer
65
- decisions, risks, exceptions, and practical-test instructions.
94
+
95
+ ## Delivery closure gate
96
+
97
+ `approved` is not an owner delivery. Do not declare a project delivered, closed,
98
+ or ready for owner testing until this gate has completed:
99
+
100
+ 1. Record the final commit and normal-push evidence for every declared branch.
101
+ 2. If configured, complete the isolated Evaluator+ dispatch and record its
102
+ report. Its verdict still cannot reopen Triad.
103
+ 3. Write the final handoff from the handoff template with cards, commits,
104
+ pushes, verifier evidence, reviewer decisions, risks, exceptions, and
105
+ practical-test instructions.
106
+ 4. Update the control-workspace run record with the delivery decision, handoff
107
+ reference, final branch/commit map, and optional Evaluator+ reference.
108
+ 5. Give the owner one final delivery message that links the handoff, names the
109
+ practical test, and states the demo status.
110
+
111
+ For every configured demo service, copy its declared command, local URL, remote
112
+ URL, and remote-access mode into the handoff. Never present `localhost` as a
113
+ remote endpoint. If the service is loopback-only or has no configured remote
114
+ URL, explicitly say that remote testing is unavailable. On an owner request to
115
+ start a demo, validate the declared local URL and, when a remote URL is
116
+ configured, validate that endpoint before reporting it. Keep the service running
117
+ until the owner explicitly ends the demo.
66
118
 
67
119
  Evaluator+ is outside the Triad production run. After final Triad approval,
68
120
  read `roles.evaluator.enabled` from `.triad-plus/team.json`: when it is `true`,
@@ -72,3 +124,5 @@ false or omitted, finish without evaluation. Record the report separately;
72
124
  `PASS`, `FAIL`, and `INDETERMINATE` cannot reopen, rework, assign Developer work,
73
125
  or change the already closed Triad run. A per-run `--evaluator` or
74
126
  `--no-evaluator` request may override the configuration when the host exposes it.
127
+ Before dispatching it, publish the corresponding attributed Evaluator+
128
+ activation notice.
@@ -11,6 +11,19 @@ instructions, actual diff/worktree, and verifier evidence. You may know prior
11
11
  attempts and correction history; independence means assess the artifact and
12
12
  evidence yourself, not blindness.
13
13
 
14
+ At the beginning of every activation, read `.triad-plus/team.json` when it
15
+ exists. Your first report to the Orchestrator must identify you as its configured
16
+ `roles.reviewer.displayName` and the Triad+ Reviewer, then name the feature and
17
+ attempt under review. This is an attributed role-activation record, not an
18
+ approval or a state transition.
19
+
20
+ When the assignment declares `required_repository_skills`, independently read
21
+ the same bound files from the declared worktree and compare their paths and
22
+ SHA-256 values with the Developer attestation and verifier evidence. A missing,
23
+ mismatched, or unreported required repository skill is a `blocked` result until
24
+ the Orchestrator creates a valid assignment; external context never substitutes
25
+ for the repository skill policy.
26
+
14
27
  Confirm scope, dependencies, candidate fingerprint, assignment ID, feature,
15
28
  attempt, expected branch, and PRD/card/gate hashes. Reject stale, missing,
16
29
  invalidated, or failed verifier evidence. Independently rerun enough required