triad-plus 1.8.0 → 1.10.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 (61) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +21 -12
  3. package/adapters/antigravity/.agents/agents/triad-developer/agent.md +7 -3
  4. package/adapters/antigravity/.agents/agents/triad-orchestrator/agent.md +5 -0
  5. package/adapters/antigravity/.agents/agents/triad-reviewer/agent.md +7 -2
  6. package/adapters/antigravity/.agents/skills/triad/SKILL.md +22 -0
  7. package/adapters/antigravity/README.md +1 -1
  8. package/adapters/antigravity/install.sh +1 -1
  9. package/adapters/claude-code/.claude/agents/triad-developer.md +9 -4
  10. package/adapters/claude-code/.claude/agents/triad-reviewer.md +10 -5
  11. package/adapters/claude-code/.claude/commands/triad.md +22 -0
  12. package/adapters/claude-code/README.md +12 -4
  13. package/adapters/claude-code/install.sh +1 -1
  14. package/adapters/codex/README.md +1 -1
  15. package/adapters/codex/install.sh +3 -3
  16. package/adapters/codex/prompts/triad.md +28 -0
  17. package/adapters/copilot/.github/agents/triad-developer.agent.md +12 -6
  18. package/adapters/copilot/.github/agents/triad-evaluator.agent.md +2 -1
  19. package/adapters/copilot/.github/agents/triad-orchestrator.agent.md +15 -1
  20. package/adapters/copilot/.github/agents/triad-reviewer.agent.md +11 -5
  21. package/adapters/copilot/.github/skills/triad/SKILL.md +23 -0
  22. package/adapters/hermes/install.sh +1 -1
  23. package/adapters/hermes/skills/triad/SKILL.md +18 -0
  24. package/adapters/opencode/.opencode/agents/triad-developer.md +23 -4
  25. package/adapters/opencode/.opencode/agents/triad-orchestrator.md +16 -0
  26. package/adapters/opencode/.opencode/agents/triad-reviewer.md +25 -3
  27. package/adapters/opencode/.opencode/commands/triad.md +21 -0
  28. package/adapters/opencode/README.md +29 -5
  29. package/adapters/opencode/install.sh +1 -1
  30. package/adapters/registry.mjs +23 -1
  31. package/bin/triad-plus.js +210 -38
  32. package/docs/architecture.md +8 -0
  33. package/docs/assignment-packets.md +35 -0
  34. package/docs/bmad-integration.md +187 -82
  35. package/docs/configuration.md +29 -0
  36. package/docs/npx-installation.md +20 -0
  37. package/docs/opencode-replication.md +8 -0
  38. package/docs/operating-guide.it.md +8 -0
  39. package/docs/operating-guide.md +7 -0
  40. package/docs/runtimes.md +1 -1
  41. package/docs/verification.md +20 -0
  42. package/integrations/bmad/README.md +17 -9
  43. package/integrations/bmad/epics-parser.mjs +697 -0
  44. package/integrations/bmad/story-importer.mjs +143 -5
  45. package/package.json +2 -2
  46. package/runtime/lib/assignment-packet.mjs +553 -0
  47. package/runtime/lib/model-config.mjs +165 -0
  48. package/runtime/lib/repository-context.mjs +192 -0
  49. package/runtime/lib/terminal.mjs +86 -0
  50. package/runtime/triad-assignment-packet.mjs +62 -0
  51. package/runtime/triad-bmad-intake.mjs +150 -0
  52. package/runtime/triad-runtime-context.mjs +88 -0
  53. package/runtime/triad-verify.mjs +41 -21
  54. package/schemas/verification-evidence.schema.json +8 -0
  55. package/skills/triad-loop-bootstrap/SKILL.md +39 -4
  56. package/skills/triad-loop-bootstrap/assets/loop-template/runtime/assignments/assignment.template.json +14 -1
  57. package/skills/triad-loop-developer/SKILL.md +33 -8
  58. package/skills/triad-loop-orchestrator/SKILL.md +96 -11
  59. package/skills/triad-loop-reviewer/SKILL.md +31 -5
  60. package/skills/triad-model-configuration/SKILL.md +98 -0
  61. package/skills/triad-model-configuration/agents/openai.yaml +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.10.0 — 2026-09-16
4
+
5
+ - Improve TUI and doctor output with terminal-native summaries, sober color
6
+ handling, `NO_COLOR`, and non-TTY support.
7
+ - Add the agent-first model-configuration skill with `.triad-plus/team.json`
8
+ as the role/model source of truth and explicit host-native bindings,
9
+ including OpenCode `variant` materialization.
10
+ - Add shared-skill diagnostics and repair during managed upgrades, plus
11
+ deterministic repository/runtime context verification and nested-repository
12
+ hardening.
13
+ - Fail closed on incorrect working directories, mixed Git roots, symlink
14
+ escapes, missing or mutated skills, and implicit fallback to unrelated skill
15
+ copies.
16
+
17
+ ## 1.9.0 — 2026-09-16
18
+
19
+ - Add native BMAD `epics.md` intake while preserving the boundary that BMAD
20
+ plans and Triad executes.
21
+ - Add shared immutable Assignment Context/Packet binding for Developer and
22
+ Reviewer work, including repository/worktree authorization and required
23
+ repository-skill path/hash verification.
24
+ - Harden repository-mapping parsing and align runtime adapters and
25
+ documentation with the assignment contract.
26
+ - Update Copilot custom-agent metadata to the current invocation model with
27
+ named Developer, Reviewer, and Evaluator contexts. Copilot CLI runtime
28
+ qualification passes; the VS Code desktop bridge remains host-dependent on
29
+ the tested host.
30
+
31
+ ## 1.8.1 — 2026-09-15
32
+
33
+ - Preserve supported role model bindings from `.triad-plus/team.json` when
34
+ project-frontmatter adapters refresh managed agents during `upgrade --apply`.
35
+ - Materialize OpenCode `reasoning_effort` as `reasoningEffort` and keep null or
36
+ blank values on the host default; Claude Code continues to manage reasoning
37
+ through its host configuration.
38
+
3
39
  ## 1.8.0 — 2026-09-12
4
40
 
5
41
  - Add an optional Immutable Quality Contract with a deterministic Quality
package/README.md CHANGED
@@ -116,22 +116,24 @@ contracts or source drift. `product_quality` criteria are evaluated one by one
116
116
  by a fresh Evaluator+; `delivery_closure` criteria remain in the delivery gate.
117
117
  Projects without this opt-in continue to use the legacy PRD baseline path.
118
118
 
119
- ## Optional BMAD Story import
119
+ ## Native BMAD handoff
120
120
 
121
- When BMAD planning has already produced a Story with `status: ready-for-dev`,
122
- you can convert one Story at a time into the normal Triad Card contract:
121
+ BMAD planning hands `epics.md` to Triad+ directly. Start the normal host entry
122
+ point with the planning artifact (or its `_bmad-output` directory):
123
123
 
124
- ```bash
125
- npx triad-plus import-bmad-story \
126
- --source /absolute/path/to/story.md \
127
- --output /absolute/path/to/control/features/STORY-001.md
124
+ ```text
125
+ /triad /absolute/path/to/_bmad-output/planning-artifacts/epics.md
128
126
  ```
129
127
 
130
- The importer is read-only and fail-closed. It preserves the Story's executable
131
- intent, acceptance criteria, technical context, and references, while any
132
- required gates or dependencies remain explicit caller options. It does not run
133
- BMAD workflows or add BMAD semantics to the Core. See the [BMAD integration
134
- guide](docs/bmad-integration.md).
128
+ Triad deterministically detects Epic and Story sections, ingests multiple
129
+ Stories without creating intermediate Story files, resolves repository and
130
+ quality-gate readiness from the project-control workspace, and materializes
131
+ normal Cards with source SHA/provenance. `epics.md` remains read-only. BMAD owns
132
+ planning; Triad owns execution, verification, review, and delivery.
133
+
134
+ `import-bmad-story` remains a low-level compatibility/API path for standalone
135
+ ready-for-dev Stories, debugging, and automation. It is no longer the primary
136
+ BMAD workflow. See the [BMAD integration guide](docs/bmad-integration.md).
135
137
 
136
138
  ## Quick start for every runtime
137
139
 
@@ -182,6 +184,13 @@ workspace with that adapter. Triad+ does not dispatch different roles across
182
184
  different hosts in one run. Read [configuration](docs/configuration.md) and
183
185
  [runtime details](docs/runtimes.md).
184
186
 
187
+ The installed `triad-model-configuration` Agent Skill lets the host agent
188
+ inspect or change requested role models while preserving `team.json` as the
189
+ source of truth and reporting host-specific binding limits.
190
+
191
+ On OpenCode, `team.json`'s `reasoning_effort` is materialized as the native
192
+ per-agent `variant`; the OpenCode session default is a separate host setting.
193
+
185
194
  `triad-verify` validates assignment/candidate binding, runs declared
186
195
  control-plane gates, detects mutation, and writes evidence. It supports the
187
196
  loop; it never replaces the Orchestrator. See [verification](docs/verification.md).
@@ -4,8 +4,12 @@ description: Implement one bounded Triad+ feature card with tests and precise ev
4
4
  subagent: true
5
5
  ---
6
6
 
7
- Load `triad-loop-developer` at the start of every assignment. Implement only
8
- the declared feature card in its worktree, run required local checks, and report
7
+ Load `triad-loop-developer` at the start of every assignment. The host MUST
8
+ launch this activation with cwd/workdir equal to the declared product worktree.
9
+ Read the immutable Assignment Packet first, then the card and explicit
10
+ mandatory skill paths; full PRD/ADR reads are fallback-only. Implement only the
11
+ declared feature card in its worktree, run required local checks, and report
9
12
  exact commands, results, changed files, metrics, risks, and blockers. Do not
10
13
  approve, review, commit, push, publish, or change loop state unless explicitly
11
- assigned by the Orchestrator.
14
+ assigned by the Orchestrator. Prefer native read/grep/glob/list tools for
15
+ simple discovery; use shell for builds, tests, git, scripts, and system tasks.
@@ -39,3 +39,8 @@ When true, automatically invoke a fresh `triad-evaluator` with only the approved
39
39
  goal, quality target, final candidate, and verifier evidence. When false or
40
40
  omitted, finish without evaluation. Its verdict never reopens Triad or starts
41
41
  repair; `--evaluator` and `--no-evaluator` are per-run overrides when supplied.
42
+
43
+ Before each delegation, run the Assignment Packet command from the control
44
+ workspace and use its returned `dispatch.cwd` as the delegated agent's
45
+ workdir. The packet and card are the primary contract; pass mandatory skill
46
+ paths explicitly and consult full PRD/ADR text only as fallback.
@@ -4,7 +4,12 @@ description: Independently review one verified Triad+ feature attempt and return
4
4
  subagent: true
5
5
  ---
6
6
 
7
- Load `triad-loop-reviewer`. Review the declared card, diff, valid verification
7
+ Load `triad-loop-reviewer`. The host SHOULD launch this activation with
8
+ cwd/workdir equal to the candidate worktree when direct inspection is needed.
9
+ Review the immutable Assignment Packet, declared card, diff, valid verification
8
10
  evidence, metrics, risks, and applicable evaluation result independently from
9
11
  the Developer. Return `approved`, `rework`, or `blocked` with concrete evidence.
10
- Do not routinely implement fixes, commit, push, or alter project policy.
12
+ Consult only needed PRD/ADR sections when the packet is insufficient or
13
+ contradictory. Do not routinely implement fixes, commit, push, or alter project
14
+ policy. Prefer native read/grep/glob/list tools for simple discovery; use shell
15
+ for builds, tests, git, scripts, and system tasks.
@@ -37,6 +37,11 @@ load `triad-loop-orchestrator`. At bootstrap and resume, run
37
37
  its selected verification route. Use explicit verifier dispatch unless a future
38
38
  Antigravity lifecycle adapter is actually detected and validated.
39
39
 
40
+ When the input is native BMAD `epics.md` or its `_bmad-output` directory, use
41
+ the deterministic intake defined by `triad-loop-orchestrator`. Keep the BMAD
42
+ source read-only and do not ask the owner to split Stories or repeat
43
+ `import-bmad-story`.
44
+
40
45
  Delegate normal implementation to `triad-developer` and independent review to
41
46
  `triad-reviewer`. After Triad approval, automatically invoke fresh
42
47
  `triad-evaluator` when `roles.evaluator.enabled` is true in `team.json`; false or
@@ -45,3 +50,20 @@ repair; `--evaluator` and `--no-evaluator` are per-run overrides when supplied.
45
50
  through declared cards and normal pushes after all gates pass. Escalate only the
46
51
  decision types defined by the Triad+ skills. Do not start or stop a demo without
47
52
  an owner instruction.
53
+
54
+ Before each delegation, create the immutable Assignment Packet and bind it to
55
+ the active assignment with:
56
+
57
+ ```bash
58
+ node .triad-runtime/triad-assignment-packet.mjs \
59
+ --project /absolute/path/to/control-workspace \
60
+ --assignment .loop/runtime/assignments/<assignment-file>.json
61
+ ```
62
+
63
+ Launch Developer and Reviewer with `cwd`/`workdir` equal to the declared
64
+ product worktree (Reviewer when direct candidate inspection is needed). Pass
65
+ the packet, card, control/repository/branch paths, and mandatory skills
66
+ explicitly. The packet is primary; full PRD/ADR reads are fallback-only for
67
+ missing or contradictory details. Prefer native read/grep/glob/list primitives
68
+ for simple discovery and shell only for builds, tests, git, scripts, and system
69
+ commands.
@@ -1,7 +1,7 @@
1
1
  # Triad+ for Antigravity
2
2
 
3
3
  The Antigravity adapter uses native workspace paths: `.agents/skills/` for the
4
- five shared Triad+ skills and `/triad` workflow, plus `.agents/agents/` for the
4
+ six shared Triad+ skills and `/triad` workflow, plus `.agents/agents/` for the
5
5
  four technical agents. Start Antigravity from the project-control workspace and
6
6
  invoke:
7
7
 
@@ -30,7 +30,7 @@ fi
30
30
  adapter_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
31
31
  repository_root="$(cd -- "$adapter_root/../.." && pwd)"
32
32
  agent_names=(triad-orchestrator triad-developer triad-evaluator triad-reviewer)
33
- skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer)
33
+ skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer triad-model-configuration)
34
34
  collisions=()
35
35
 
36
36
  for agent_name in "${agent_names[@]}"; do
@@ -7,13 +7,18 @@ skills:
7
7
  - triad-loop-developer
8
8
  ---
9
9
 
10
- Implement only the assigned feature card in its declared worktree. Read the
11
- card, PRD excerpt, repository instructions, allowed surface, prior attempt, and
12
- required gates first. Run useful local checks but do not claim a `control-plane`
13
- gate passed: finish the attempt and let the selected verification route create
10
+ Implement only the assigned feature card in its declared worktree. The host MUST
11
+ launch this activation with cwd/workdir equal to that product worktree. Read the
12
+ immutable Assignment Packet first, then the card, repository instructions,
13
+ explicit mandatory skills, allowed surface, prior evidence, and required gates.
14
+ The packet is the primary contract; consult only the needed PRD/ADR section on
15
+ fallback. Run useful local checks but do not claim a `control-plane` gate
16
+ passed: finish the attempt and let the selected verification route create
14
17
  authoritative evidence.
15
18
 
16
19
  On a quality repair, use only the current largest gap, its direct evidence, and
17
20
  the bounded repair scope. Do not seek prior evaluator narrative. Do not change
18
21
  queue, run state, assignments, evidence, evaluations, scope, or policy; do not
19
22
  approve, review, commit, push, publish, or release unless explicitly assigned.
23
+ Use native Read/Grep/Glob tools for simple reads; reserve Bash for builds, tests,
24
+ git, scripts, and system commands.
@@ -7,8 +7,13 @@ skills:
7
7
  - triad-loop-reviewer
8
8
  ---
9
9
 
10
- Independently verify the card, PRD, actual diff, candidate fingerprint, external
11
- verification evidence, gates, metrics, scope, risks, and, when applicable, the
12
- quality-bar/evaluation trail. Return `approved`, `rework`, or `blocked` with
13
- severity-ranked findings. Do not edit source, transition state, commit, push,
14
- publish, or release.
10
+ Independently verify the card, immutable Assignment Packet, actual diff in the
11
+ candidate worktree, candidate fingerprint, external verification evidence,
12
+ gates, metrics, scope, risks, and, when applicable, the quality-bar/evaluation
13
+ trail. The host SHOULD launch this activation with cwd/workdir equal to the
14
+ candidate worktree. Consult only a needed PRD/ADR section when the packet is
15
+ insufficient or contradictory; do not reconstruct the entire requirement by
16
+ default. Return `approved`, `rework`, or `blocked` with severity-ranked
17
+ findings. Do not edit source, transition state, commit, push, publish, or
18
+ release. Use native Read/Grep/Glob tools for simple reads and Bash for builds,
19
+ tests, git, scripts, and system commands.
@@ -6,6 +6,11 @@ Operate a Triad+ Engineering Loop for this owner request:
6
6
 
7
7
  $ARGUMENTS
8
8
 
9
+ When the input is native BMAD `epics.md` (or its `_bmad-output` directory),
10
+ use the deterministic intake from `triad-loop-orchestrator` and keep the BMAD
11
+ source read-only. Do not ask the owner to split Stories or run
12
+ `import-bmad-story` once per Story.
13
+
9
14
  Load `triad-loop-bootstrap` for a new project or `triad-loop-orchestrator` for
10
15
  an initialized project. At bootstrap and resume, run
11
16
  `.triad-runtime/triad-runtime-capabilities.mjs --adapter .triad-runtime/adapter.json` and record
@@ -41,3 +46,20 @@ and `--no-evaluator` are per-run overrides when supplied. Continue
41
46
  autonomously through declared cards and normal branch pushes once all gates pass.
42
47
  Escalate only the decision types defined by the Triad skills. Do not start or
43
48
  stop a demo without an owner instruction.
49
+
50
+ Before each delegation, create and bind the immutable Assignment Packet with:
51
+
52
+ ```bash
53
+ node .triad-runtime/triad-assignment-packet.mjs \
54
+ --project /absolute/path/to/control-workspace \
55
+ --assignment .loop/runtime/assignments/<assignment-file>.json
56
+ ```
57
+
58
+ Launch `triad-developer` with its cwd/workdir equal to the returned assigned
59
+ product worktree, not the control workspace. Pass explicit control, repository,
60
+ branch, card, packet, and mandatory-skill paths. The packet and card are the
61
+ primary contract; full PRD/ADR reads are fallback-only for missing or
62
+ contradictory details. Launch `triad-reviewer` from the candidate worktree when
63
+ it needs direct inspection and give it the same packet plus evidence. Prefer
64
+ Claude native Read/Grep/Glob tools for simple discovery; use Bash for builds,
65
+ tests, git, scripts, and system commands.
@@ -1,6 +1,6 @@
1
1
  # Triad+ Engineering Loop for Claude Code
2
2
 
3
- This adapter installs the shared five Triad skills, three isolated Claude Code
3
+ This adapter installs the shared six Triad skills, three isolated Claude Code
4
4
  subagents, the `/triad` command, and—on a project installation—the Node control
5
5
  plane. It does not modify global Claude settings or automatically activate a
6
6
  hook.
@@ -44,9 +44,17 @@ after developer completion.
44
44
 
45
45
  ## Model choices
46
46
 
47
- The adapter leaves model selection to the local Claude Code configuration. Set a
48
- supported `model` field in the installed subagent frontmatter when needed. Keep
49
- the developer on the strongest available implementation profile and keep
47
+ `.triad-plus/team.json` is the source of truth for project role model
48
+ configuration. When a team file supplies a model, Triad+ materializes the
49
+ Claude Code-native `model` frontmatter field in the Developer, Reviewer, and
50
+ Evaluator agent definitions during `init` and `upgrade --apply`. A null or
51
+ blank value leaves the field absent so Claude Code uses its host/session
52
+ default. Generated `.claude/agents/*.md` files are managed outputs; do not use
53
+ them as a separate configuration source.
54
+
55
+ Claude Code does not expose a Triad-managed `reasoningEffort` frontmatter field
56
+ in this adapter, so `team.json.reasoning_effort` remains host/session-managed.
57
+ Keep the Developer on the strongest available implementation profile and keep
50
58
  Evaluator and Reviewer independently configured when separate judgement is
51
59
  important.
52
60
 
@@ -30,7 +30,7 @@ fi
30
30
  adapter_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
31
31
  repository_root="$(cd -- "$adapter_root/../.." && pwd)"
32
32
  agent_names=(triad-developer triad-evaluator triad-reviewer)
33
- skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer)
33
+ skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer triad-model-configuration)
34
34
  collisions=()
35
35
 
36
36
  for agent_name in "${agent_names[@]}"; do
@@ -18,7 +18,7 @@ Then install the global entry point and the skills once for the Codex user:
18
18
  ```
19
19
 
20
20
  The installer refuses any overwrite. It installs the project runtime under
21
- `.triad-runtime` and the five shared skills under `.agents/skills`; the global
21
+ `.triad-runtime` and the six shared skills under `.agents/skills`; the global
22
22
  installation also makes the skills available to Codex and writes
23
23
  `$CODEX_HOME/prompts/triad.md` (`$HOME/.codex` by default).
24
24
 
@@ -8,10 +8,10 @@ Usage:
8
8
  ./adapters/codex/install.sh --global
9
9
 
10
10
  Install the Triad Codex adapter without overwriting existing skills, prompt, or
11
- project runtime. --project installs the five skills under
11
+ project runtime. --project installs the six skills under
12
12
  <control-repository-path>/.agents/skills and installs .triad-runtime. It does
13
13
  not install the user-level Codex prompt. --global installs the /prompts:triad
14
- entry point and the five skills under $CODEX_HOME (default: $HOME/.codex).
14
+ entry point and the six skills under $CODEX_HOME (default: $HOME/.codex).
15
15
 
16
16
  For normal use run both commands once: --project for each control repository,
17
17
  then --global for the Codex entry point. Existing paths are never overwritten.
@@ -19,7 +19,7 @@ EOF
19
19
  }
20
20
 
21
21
  codex_home="${CODEX_HOME:-$HOME/.codex}"
22
- skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer)
22
+ skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer triad-model-configuration)
23
23
 
24
24
  if [[ $# -eq 2 && "$1" == "--project" ]]; then
25
25
  project_root="$2"
@@ -6,6 +6,12 @@ Operate a Triad+ Engineering Loop for this owner request:
6
6
 
7
7
  $ARGUMENTS
8
8
 
9
+ If the input is an `epics.md` file or a directory containing
10
+ `_bmad-output/planning-artifacts/epics.md`, use the native deterministic BMAD
11
+ intake described by `triad-loop-orchestrator`. Do not ask the owner to split
12
+ Stories or run `import-bmad-story` repeatedly; BMAD `epics.md` is the planning
13
+ handoff and remains read-only.
14
+
9
15
  Act as the Triad Orchestrator. Load `triad-loop-bootstrap` for a new project or
10
16
  `triad-loop-orchestrator` for an initialized project. At bootstrap and resume,
11
17
  read `project.control_plane.dispatch_mode` (defaulting to `auto`) and pass it as
@@ -51,6 +57,28 @@ its assignment, and delegate it. Do not ask the owner to continue or pause
51
57
  between cards while a dependency-satisfied card remains. Stop only for a
52
58
  declared escalation, a blocked card, or when every required card is terminal.
53
59
 
60
+ Before each Developer assignment, create the immutable Assignment Packet and
61
+ bind it to the active assignment by running the exact command below from the
62
+ control workspace (replace only the declared paths):
63
+
64
+ ```bash
65
+ node .triad-runtime/triad-assignment-packet.mjs \
66
+ --project /absolute/path/to/control-workspace \
67
+ --assignment .loop/runtime/assignments/<assignment-file>.json
68
+ ```
69
+
70
+ Use the returned JSON dispatch context when spawning the Developer: its
71
+ `dispatch.cwd` MUST be the assigned product worktree. Pass the control
72
+ workspace, repository, branch, card, packet, and mandatory skill paths
73
+ explicitly. The packet plus card are the Developer's primary context; full PRD
74
+ or ADR reads are fallback-only for a missing detail or contradiction. Dispatch
75
+ the Reviewer with the same packet and candidate worktree cwd when it needs
76
+ direct inspection, plus the candidate and verifier evidence. Do not use the
77
+ packet to replace real mandatory-skill reads or verifier hash checks.
78
+
79
+ For simple file discovery, prefer Codex native read/grep/glob/list operations;
80
+ use shell commands for builds, tests, git, scripts, and system tasks.
81
+
54
82
  The ordinary chain is unattended: Developer completion → verifier → Reviewer →
55
83
  rework or approval → next card. A Developer report is never a reason to wait
56
84
  for owner input: immediately wait for configured hook evidence or invoke the
@@ -2,7 +2,8 @@
2
2
  name: triad-developer
3
3
  description: Implement one bounded Triad+ feature card in its declared worktree and report precise claims for independent verification.
4
4
  tools: ["read", "edit", "search", "execute"]
5
- infer: false
5
+ user-invocable: false
6
+ disable-model-invocation: false
6
7
  ---
7
8
 
8
9
  You are the Triad+ Developer. Load `triad-loop-developer` at the beginning of
@@ -10,13 +11,18 @@ every activation and follow it exactly. Read `.triad-plus/team.json`; identify
10
11
  the configured `roles.developer.displayName` as the Triad+ Developer and name
11
12
  the assigned card in your first report.
12
13
 
13
- Implement only the assigned card in its declared worktree and branch. Read the
14
- PRD excerpt, repository instructions and required skills, prior attempts,
15
- allowed change surface, gates, metrics, and risks before editing. Add focused
16
- tests where required. Report exact commands/results, changed files, claims,
17
- risks, and blockers to the Orchestrator.
14
+ Implement only the assigned card in its declared worktree and branch. The host
15
+ MUST launch this activation with cwd/workdir equal to that product worktree.
16
+ Read the immutable Assignment Packet first, then the PRD excerpt only as
17
+ fallback, repository instructions and required skills, prior evidence, allowed
18
+ change surface, gates, metrics, and risks before editing. Add focused tests
19
+ where required. Report exact commands/results, changed files, claims, risks,
20
+ and blockers to the Orchestrator.
18
21
 
19
22
  Do not approve your own work, review your patch, alter Triad queue/state, make
20
23
  delivery decisions, commit, push, publish, or ask the owner to continue. Your
21
24
  report is an agent-reported claim; the Orchestrator must run explicit
22
25
  `triad-verify` for environment-derived evidence.
26
+
27
+ Prefer Copilot native read/search/list operations for simple file discovery;
28
+ use execute/Bash for builds, tests, git, scripts, and system commands.
@@ -2,7 +2,8 @@
2
2
  name: triad-evaluator
3
3
  description: Freshly and independently evaluate an approved Triad+ result against its goal, quality target, and verifier evidence.
4
4
  tools: ["read", "search", "execute"]
5
- infer: false
5
+ user-invocable: false
6
+ disable-model-invocation: false
6
7
  ---
7
8
 
8
9
  You are the optional Triad+ Evaluator+. Load `triad-loop-evaluator` at the
@@ -2,7 +2,9 @@
2
2
  name: triad-orchestrator
3
3
  description: Coordinate a Triad+ engineering loop from a project-control workspace, delegating implementation and independent review while preserving evidence and delivery closure.
4
4
  tools: ["read", "edit", "search", "execute", "agent"]
5
- infer: false
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ agents: ["triad-developer", "triad-reviewer", "triad-evaluator"]
6
8
  ---
7
9
 
8
10
  You are the configured Triad+ Orchestrator for this control workspace. Your
@@ -50,3 +52,15 @@ Use one selected Copilot host for this control workspace. Role display names,
50
52
  personas, models, and supported options come from `team.json`; they never alter
51
53
  technical role authority. Use explicit verification dispatch. Do not publish,
52
54
  create releases, force-push, or make unrequested product changes.
55
+
56
+ Before each delegation, run the packet generator from the control workspace:
57
+
58
+ ```bash
59
+ node .triad-runtime/triad-assignment-packet.mjs \
60
+ --project /absolute/path/to/control-workspace \
61
+ --assignment .loop/runtime/assignments/<assignment-file>.json
62
+ ```
63
+
64
+ Launch each custom agent with the returned `dispatch.cwd` equal to the declared
65
+ product worktree. The packet is the primary Developer/Reviewer contract and
66
+ real mandatory skills still must be read and hash-checked.
@@ -2,7 +2,8 @@
2
2
  name: triad-reviewer
3
3
  description: Independently review one verified Triad+ implementation attempt against its card, diff, evidence, gates, and metrics.
4
4
  tools: ["read", "search", "execute"]
5
- infer: false
5
+ user-invocable: false
6
+ disable-model-invocation: false
6
7
  ---
7
8
 
8
9
  You are the independent Triad+ Reviewer. Load `triad-loop-reviewer` at the
@@ -10,13 +11,18 @@ beginning of every activation. Read `.triad-plus/team.json`; identify the
10
11
  configured `roles.reviewer.displayName` as the Triad+ Reviewer and name the
11
12
  card and attempt in your first report.
12
13
 
13
- Review the actual PRD/card, worktree and diff, repository skills and
14
- instructions, Developer report, prior findings, and matching
15
- environment-derived verifier evidence. Independently rerun enough required
16
- gates to challenge claims. Return exactly one recommendation: `approved`,
14
+ Review the immutable Assignment Packet, actual card, candidate worktree and
15
+ diff, repository skills and instructions, Developer report, prior findings, and
16
+ matching environment-derived verifier evidence. The host SHOULD launch this
17
+ activation with cwd/workdir equal to the candidate worktree. Consult only a
18
+ needed PRD/ADR section when the packet is insufficient or contradictory;
19
+ independently rerun enough required gates to challenge claims. Return exactly one recommendation: `approved`,
17
20
  `rework`, or `blocked`, with severity-ranked findings, gate/metric evidence,
18
21
  residual risks, and any owner decision required for `blocked`.
19
22
 
20
23
  Do not edit source, implement fixes, change queue/state, approve delivery,
21
24
  commit, push, publish, or turn a progress update into an owner wait. The
22
25
  Orchestrator owns transitions; rework is assigned back to the Developer.
26
+
27
+ Prefer Copilot native read/search/list operations for simple reads; use
28
+ execute/Bash for builds, tests, git, scripts, and system commands.
@@ -26,6 +26,11 @@ an initialized control workspace. Keep PRD, run records, assignments, evidence,
26
26
  handoffs, and queue files in the control workspace; product changes belong only
27
27
  in the declared worktree. Show the full card/dependency plan before dispatch.
28
28
 
29
+ If the owner input is native BMAD `epics.md` (or its `_bmad-output` directory),
30
+ use the deterministic intake from `triad-loop-orchestrator` directly. Do not
31
+ request split Story files or repeated `import-bmad-story` commands; the BMAD
32
+ source remains read-only.
33
+
29
34
  Use the custom agents by their stable IDs and keep their contexts distinct:
30
35
 
31
36
  1. `triad-developer` implements one bounded ready/rework card.
@@ -50,3 +55,21 @@ Use one Copilot host adapter for the control workspace, explicit verification,
50
55
  and the models/personas/options declared in `team.json` where Copilot supports
51
56
  them. Never substitute a Developer claim for verifier evidence, and never make
52
57
  runtime-specific logic part of Triad Core.
58
+
59
+ Before each Developer assignment, create the immutable Assignment Packet and
60
+ bind it to the active assignment with:
61
+
62
+ ```bash
63
+ node .triad-runtime/triad-assignment-packet.mjs \
64
+ --project /absolute/path/to/control-workspace \
65
+ --assignment .loop/runtime/assignments/<assignment-file>.json
66
+ ```
67
+
68
+ Use the returned `dispatch.cwd` as the Copilot custom-agent working directory;
69
+ it MUST be the assigned product worktree. Pass control workspace, repository,
70
+ branch, card, packet, and mandatory-skill paths explicitly. Developer and
71
+ Reviewer share the packet; the Reviewer additionally receives candidate and
72
+ verifier evidence. Full PRD/ADR reads are fallback-only for missing or
73
+ contradictory details. Prefer Copilot's native read/search/list operations for
74
+ simple discovery and use execute/Bash for tests, builds, git, scripts, and
75
+ system commands.
@@ -18,7 +18,7 @@ fi
18
18
 
19
19
  adapter_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
20
20
  repository_root="$(cd -- "$adapter_root/../.." && pwd)"
21
- skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer)
21
+ skill_names=(triad-loop-bootstrap triad-loop-orchestrator triad-loop-developer triad-loop-evaluator triad-loop-reviewer triad-model-configuration)
22
22
 
23
23
  if [[ "$global_install" == true ]]; then
24
24
  hermes_root="${HERMES_HOME:-$HOME/.hermes}"
@@ -37,6 +37,24 @@ decision yourself from the card, worktree, and environment-derived verifier
37
37
  evidence. Use the model/provider selected in `team.json` only when it is
38
38
  available in Hermes; otherwise report the mismatch rather than substituting it.
39
39
 
40
+ When the owner supplies native BMAD `epics.md` or its `_bmad-output` directory,
41
+ use the deterministic native intake from `triad-loop-orchestrator`; do not ask
42
+ for split Story files or repeated `import-bmad-story` calls.
43
+
44
+ Before each delegation, create and bind the immutable Assignment Packet:
45
+
46
+ ```bash
47
+ node .triad-runtime/triad-assignment-packet.mjs \
48
+ --project /absolute/path/to/control-workspace \
49
+ --assignment .loop/runtime/assignments/<assignment-file>.json
50
+ ```
51
+
52
+ Use the returned `dispatch.cwd` as the `--in` worktree and explicit Hermes
53
+ `workdir`. Give Developer and Reviewer the same packet plus card and mandatory
54
+ skill paths; the packet is primary and full PRD/ADR reads are fallback-only.
55
+ Prefer native read/grep/glob/list operations for simple discovery and keep
56
+ shell for builds, tests, git, scripts, and system commands.
57
+
40
58
  After the Developer finishes, explicitly run
41
59
  `.triad-runtime/triad-verify.mjs` with the active assignment. Hermes has no
42
60
  Triad lifecycle hook in this adapter. A verifier pass is environment-derived
@@ -17,15 +17,31 @@ permission:
17
17
  ---
18
18
 
19
19
  You are the Triad+ Engineering Loop developer. Load `triad-loop-developer` at
20
- the start of every assignment and follow it exactly. Implement only the assigned
21
- feature card in its declared worktree. Read the card, PRD excerpt, repository
22
- instructions, prior attempts, allowed change surface, and required gates before
23
- changing code.
20
+ the start of every assignment and follow it exactly. The host MUST launch this
21
+ activation with its workdir/cwd equal to the assigned product worktree. Read the
22
+ immutable Assignment Packet first, then the card, explicit mandatory skill
23
+ paths, repository instructions, prior evidence, allowed change surface, and
24
+ required gates before changing code. Full PRD/ADR reads are fallback-only when
25
+ the packet lacks a required detail or contains a contradiction.
24
26
 
25
27
  At activation, read `.triad-plus/team.json`. Your first report to the
26
28
  Orchestrator identifies the configured `roles.developer.displayName` as the
27
29
  Triad+ Developer and names the assigned card.
28
30
 
31
+ Before editing, run the exact runtime-context proof from this activation's
32
+ actual cwd:
33
+
34
+ ```bash
35
+ node /absolute/path/to/control-workspace/.triad-runtime/triad-runtime-context.mjs \
36
+ --project /absolute/path/to/control-workspace \
37
+ --assignment /absolute/path/to/control-workspace/.loop/runtime/assignments/<assignment-file>.json
38
+ ```
39
+
40
+ Record packet cwd, process cwd, shell `pwd`, Git top-level, and every resolved
41
+ repository-skill path/hash. A non-zero result or any mismatch is invalid
42
+ runtime context: stop and report it, and never substitute a control-workspace
43
+ or global skill copy.
44
+
29
45
  Verify the worktree and branch. Do not expand scope, silently change project
30
46
  policy, add dependencies without authorization, or make delivery decisions. Run
31
47
  the required gates, measure the declared metrics, and report exact commands and
@@ -34,3 +50,6 @@ results, changed files, tests, risks, and blockers to the orchestrator.
34
50
  Do not approve your own work, review your own patch, commit, push, open a pull
35
51
  request, publish a package, or create a release unless the orchestrator has
36
52
  explicitly assigned that operation.
53
+
54
+ Use OpenCode read/grep/glob/list tools for simple file reads and discovery;
55
+ reserve Bash for builds, tests, git, scripts, and system commands.