triad-plus 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +44 -0
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/SECURITY.md +12 -0
- package/adapters/antigravity/.agents/agents/triad-developer/agent.md +11 -0
- package/adapters/antigravity/.agents/agents/triad-evaluator/agent.md +11 -0
- package/adapters/antigravity/.agents/agents/triad-orchestrator/agent.md +19 -0
- package/adapters/antigravity/.agents/agents/triad-reviewer/agent.md +10 -0
- package/adapters/antigravity/.agents/skills/triad/SKILL.md +30 -0
- package/adapters/antigravity/.agents/skills/triad/agents/openai.yaml +4 -0
- package/adapters/antigravity/README.md +26 -0
- package/adapters/antigravity/install.sh +72 -0
- package/adapters/antigravity/runtime.json +6 -0
- package/adapters/claude-code/.claude/agents/triad-developer.md +19 -0
- package/adapters/claude-code/.claude/agents/triad-evaluator.md +17 -0
- package/adapters/claude-code/.claude/agents/triad-reviewer.md +14 -0
- package/adapters/claude-code/.claude/commands/triad.md +26 -0
- package/adapters/claude-code/README.md +60 -0
- package/adapters/claude-code/install.sh +75 -0
- package/adapters/claude-code/runtime.json +10 -0
- package/adapters/codex/README.md +39 -0
- package/adapters/codex/install.sh +78 -0
- package/adapters/codex/prompts/triad.md +25 -0
- package/adapters/codex/runtime.json +11 -0
- package/adapters/hermes/README.md +31 -0
- package/adapters/hermes/install.sh +45 -0
- package/adapters/hermes/runtime.json +7 -0
- package/adapters/hermes/skills/triad/SKILL.md +36 -0
- package/adapters/hermes/skills/triad/agents/openai.yaml +4 -0
- package/adapters/opencode/.opencode/agents/triad-developer.md +32 -0
- package/adapters/opencode/.opencode/agents/triad-evaluator.md +29 -0
- package/adapters/opencode/.opencode/agents/triad-orchestrator.md +60 -0
- package/adapters/opencode/.opencode/agents/triad-reviewer.md +32 -0
- package/adapters/opencode/.opencode/commands/triad.md +24 -0
- package/adapters/opencode/README.md +111 -0
- package/adapters/opencode/install.sh +75 -0
- package/adapters/opencode/runtime.json +6 -0
- package/adapters/registry.mjs +224 -0
- package/assets/triad-plus-engineering-loop-icon.svg +16 -0
- package/bin/triad-plus.js +311 -0
- package/docs/antigravity-replication.md +9 -0
- package/docs/architecture.md +24 -0
- package/docs/claude-code-replication.md +9 -0
- package/docs/codex-replication.md +10 -0
- package/docs/compatibility.md +13 -0
- package/docs/configuration.md +27 -0
- package/docs/evaluator-plus.md +13 -0
- package/docs/getting-started.md +33 -0
- package/docs/npx-installation.md +44 -0
- package/docs/opencode-replication.md +8 -0
- package/docs/operating-guide.it.md +49 -0
- package/docs/operating-guide.md +49 -0
- package/docs/runtimes.md +24 -0
- package/docs/troubleshooting.md +22 -0
- package/docs/verification.md +17 -0
- package/integrations/claude-code/README.md +25 -0
- package/integrations/claude-code/hooks.json +17 -0
- package/integrations/codex/README.md +61 -0
- package/integrations/codex/hooks.json +20 -0
- package/package.json +51 -0
- package/runtime/legacy-adapters.json +17 -0
- package/runtime/lib/evidence.mjs +31 -0
- package/runtime/lib/fingerprint.mjs +52 -0
- package/runtime/lib/gates.mjs +89 -0
- package/runtime/lib/process.mjs +36 -0
- package/runtime/triad-runtime-capabilities.mjs +131 -0
- package/runtime/triad-verify.mjs +152 -0
- package/schemas/evaluator-plus-result.schema.json +17 -0
- package/schemas/runtime-capabilities.schema.json +15 -0
- package/schemas/verification-evidence.schema.json +21 -0
- package/skills/triad-loop-bootstrap/SKILL.md +43 -0
- package/skills/triad-loop-bootstrap/agents/openai.yaml +4 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/decision-policy.md +22 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/feature-card.template.md +32 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/feature-plan.template.md +13 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/handoff-report.template.md +60 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/quality-gates.yaml +20 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/review-report.template.md +32 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/run-state.yaml +22 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/runtime/assignments/assignment.template.json +21 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/runtime/capabilities.template.json +27 -0
- package/skills/triad-loop-bootstrap/assets/loop-template/work-queue.yaml +28 -0
- package/skills/triad-loop-bootstrap/assets/project.yaml +55 -0
- package/skills/triad-loop-developer/SKILL.md +22 -0
- package/skills/triad-loop-developer/agents/openai.yaml +4 -0
- package/skills/triad-loop-evaluator/SKILL.md +24 -0
- package/skills/triad-loop-evaluator/agents/openai.yaml +4 -0
- package/skills/triad-loop-orchestrator/SKILL.md +54 -0
- package/skills/triad-loop-orchestrator/agents/openai.yaml +4 -0
- package/skills/triad-loop-reviewer/SKILL.md +25 -0
- package/skills/triad-loop-reviewer/agents/openai.yaml +4 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — 2026-08-24
|
|
4
|
+
|
|
5
|
+
- Public Triad+ engineering loop with Orchestrator, Developer, and Reviewer.
|
|
6
|
+
- Optional fresh post-run Evaluator+.
|
|
7
|
+
- Codex, Claude Code, OpenCode, Antigravity, and Hermes Agent adapters.
|
|
8
|
+
- Hash-bound control-plane verification evidence and package installer.
|
|
9
|
+
- Public setup, runtime, architecture, verification, and contribution guides.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
Be respectful, constructive, and precise. Discuss code and ideas rather than
|
|
4
|
+
people. Harassment, discrimination, threats, and disclosure of another person's
|
|
5
|
+
private information are not acceptable.
|
|
6
|
+
|
|
7
|
+
If a discussion needs moderation, use the repository's private reporting path
|
|
8
|
+
described in [SECURITY.md](SECURITY.md) or request a private contact channel from
|
|
9
|
+
the project owner.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Contributing to Triad+
|
|
2
|
+
|
|
3
|
+
Thank you for contributing. Triad+ is intentionally small: preserve the Core
|
|
4
|
+
roles and keep the host agent in charge of the loop.
|
|
5
|
+
|
|
6
|
+
## Local setup
|
|
7
|
+
|
|
8
|
+
Use Node.js 20 or later, then run:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm test
|
|
12
|
+
npm run pack:check
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The repository is organized as follows:
|
|
16
|
+
|
|
17
|
+
- `skills/` — role and bootstrap contracts.
|
|
18
|
+
- `runtime/` — verification and evidence utilities.
|
|
19
|
+
- `adapters/` — host-specific assets and metadata.
|
|
20
|
+
- `docs/` — public usage and architecture documentation.
|
|
21
|
+
|
|
22
|
+
## Pull requests
|
|
23
|
+
|
|
24
|
+
Keep each pull request focused. Include tests for changed behavior, update public
|
|
25
|
+
documentation when user-visible behavior changes, and avoid private paths,
|
|
26
|
+
tokens, deployment configuration, or generated smoke artifacts.
|
|
27
|
+
|
|
28
|
+
Triad+ is feature-frozen around its public Core: Orchestrator, Developer, and
|
|
29
|
+
Reviewer, with optional post-run Evaluator+. Do not add workflow engines,
|
|
30
|
+
schedulers, automatic repair, additional Core roles, or runtime-specific Core
|
|
31
|
+
branches without prior design agreement.
|
|
32
|
+
|
|
33
|
+
## Adapters
|
|
34
|
+
|
|
35
|
+
To add or modify an adapter, update its descriptor in `adapters/registry.mjs`,
|
|
36
|
+
its adapter assets, and tests. The descriptor should express only genuine host
|
|
37
|
+
differences: detection, asset locations, entry point, capabilities, and model
|
|
38
|
+
binding. Do not add `if <runtime>` behavior to Core installer or verifier code.
|
|
39
|
+
|
|
40
|
+
## Review expectations
|
|
41
|
+
|
|
42
|
+
Explain the user-facing outcome, provide test output, and call out runtime
|
|
43
|
+
limitations. Maintainers may ask for a clean package smoke when install assets
|
|
44
|
+
change.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Giovanni Delbono
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Triad+
|
|
2
|
+
|
|
3
|
+
Triad+ is a lightweight engineering loop for coding agents with three explicit roles.
|
|
4
|
+
|
|
5
|
+
> **Developer proposes. Reviewer challenges. Orchestrator governs.**
|
|
6
|
+
|
|
7
|
+
It is not a workflow engine or autonomous development platform. The coding-agent host stays in control; Triad+ provides role contracts, independent review, and verification evidence.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Orchestrator
|
|
11
|
+
/ \
|
|
12
|
+
Developer ←→ Reviewer
|
|
13
|
+
|
|
14
|
+
Triad approved → optional fresh Evaluator+
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Why Triad?
|
|
18
|
+
|
|
19
|
+
A single agent can implement, self-check, and declare success in one conversation. Triad separates those responsibilities: the Developer changes the candidate, the Reviewer looks for defects, and the Orchestrator decides rework, approval, or escalation. `triad-verify` supplies environment-derived gate evidence, distinct from an agent claim.
|
|
20
|
+
|
|
21
|
+
## Supported coding agents
|
|
22
|
+
|
|
23
|
+
| Runtime | Orchestrator | Developer | Reviewer | Evaluator+ | Verification dispatch |
|
|
24
|
+
| --- | --- | --- | --- | --- | --- |
|
|
25
|
+
| Codex | Yes | Yes | Yes | Yes | Explicit fallback; async hook when validated |
|
|
26
|
+
| Claude Code | Yes | Yes | Yes | Yes | Explicit fallback; hook when validated |
|
|
27
|
+
| OpenCode | Yes | Yes | Yes | Yes | Explicit dispatch |
|
|
28
|
+
| Antigravity | Yes | Yes | Yes | Yes | Explicit dispatch |
|
|
29
|
+
| Hermes Agent | Yes | Yes | Yes | Yes | Explicit dispatch |
|
|
30
|
+
|
|
31
|
+
Hooks are optional optimizations; they write evidence and never make a Triad state decision. See [runtime details](docs/runtimes.md).
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
Requirements: Node.js 20+ and one supported coding-agent host.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx triad-plus init --host codex --control /absolute/path/to/triad-control --global
|
|
39
|
+
npx triad-plus doctor --host codex --control /absolute/path/to/triad-control
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`init` creates a separate control workspace and refuses overwrites. Open it in the selected host, then start Triad with an absolute PRD path:
|
|
43
|
+
|
|
44
|
+
| Host | Entry point |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| Codex | `/prompts:triad /absolute/path/to/prd.md` |
|
|
47
|
+
| Claude Code | `/triad /absolute/path/to/prd.md` |
|
|
48
|
+
| OpenCode | `/triad /absolute/path/to/prd.md` |
|
|
49
|
+
| Antigravity | `/triad /absolute/path/to/prd.md` |
|
|
50
|
+
| Hermes Agent | `/triad /absolute/path/to/prd.md` |
|
|
51
|
+
|
|
52
|
+
The Orchestrator presents feature cards before implementation. Follow [Getting started](docs/getting-started.md) for the complete copy-paste walkthrough.
|
|
53
|
+
|
|
54
|
+
## Configure agents
|
|
55
|
+
|
|
56
|
+
The wizard or reviewed `team.json` configures display name/persona, model, and supported effort/options for each role. Use neutral names. The selected adapter/runtime is project-level; per-role model binding is applied only where the host supports it. [Configuration](docs/configuration.md) explains the exact contract.
|
|
57
|
+
|
|
58
|
+
## Optional Evaluator+
|
|
59
|
+
|
|
60
|
+
Evaluator+ is not a fourth member of Triad. After Reviewer approval, invoke the native command with `--evaluator` where supported:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
/triad --evaluator
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
It evaluates the completed result freshly and independently. A `FAIL` does not reopen Triad or start repair. See [Evaluator+](docs/evaluator-plus.md).
|
|
67
|
+
|
|
68
|
+
## Architecture and limits
|
|
69
|
+
|
|
70
|
+
Triad+ consists of role skills, adapters, and a verifier. Core has no runtime-specific behavior; adapters own installation, entry-point, lifecycle, and model-binding differences. The verifier validates binding, runs declared control-plane gates, detects mutation, and writes atomic evidence. It does not govern the conversation or replace the Orchestrator.
|
|
71
|
+
|
|
72
|
+
Triad+ does not provide a daemon, scheduler, dashboard, shared memory, automatic model routing, multi-reviewer voting, or evaluator-driven repair. Read [architecture](docs/architecture.md), [verification](docs/verification.md), and [troubleshooting](docs/troubleshooting.md).
|
|
73
|
+
|
|
74
|
+
## Contributing
|
|
75
|
+
|
|
76
|
+
Start with [CONTRIBUTING.md](CONTRIBUTING.md), run `npm test`, and keep runtime-specific behavior inside an adapter.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
[MIT](LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Please do not publish suspected vulnerabilities, credential exposure, or unsafe
|
|
4
|
+
verification behavior in a public issue before maintainers have assessed it.
|
|
5
|
+
|
|
6
|
+
Use GitHub's private security-advisory reporting feature for this repository if
|
|
7
|
+
it is enabled. If it is not available, open a minimal public issue requesting a
|
|
8
|
+
private contact channel and do not include exploit details, tokens, or sensitive
|
|
9
|
+
paths. The project owner will establish the appropriate channel.
|
|
10
|
+
|
|
11
|
+
When reporting, include affected version, reproduction steps, impact, and any
|
|
12
|
+
safe mitigation you have identified.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-developer
|
|
3
|
+
description: Implement one bounded Triad+ feature card with tests and precise evidence.
|
|
4
|
+
subagent: true
|
|
5
|
+
---
|
|
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
|
|
9
|
+
exact commands, results, changed files, metrics, risks, and blockers. Do not
|
|
10
|
+
approve, review, commit, push, publish, or change loop state unless explicitly
|
|
11
|
+
assigned by the Orchestrator.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-evaluator
|
|
3
|
+
description: Freshly evaluate a verified Triad+ Gauntlet candidate against its quality bar.
|
|
4
|
+
subagent: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Load `triad-loop-evaluator`. Use a fresh context and only the evaluation packet,
|
|
8
|
+
quality bar, candidate observation instructions, and valid verification summary.
|
|
9
|
+
Return `candidate_wins`, `bar_wins`, or `indeterminate`; a `bar_wins` decision
|
|
10
|
+
has exactly one evidence-based largest gap. Do not edit source, change loop
|
|
11
|
+
state, commit, push, or review delivery.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-orchestrator
|
|
3
|
+
description: Govern a Triad+ Engineering Loop, delegate normal work, and make evidence-based workflow decisions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Act as the Triad+ Orchestrator. Load `triad-loop-bootstrap` for a new project
|
|
7
|
+
and `triad-loop-orchestrator` for an initialized one. Read
|
|
8
|
+
`.triad-plus/team.json` if present and verify exposed role models against its
|
|
9
|
+
contract before starting. If the host cannot expose a model identity, say so and
|
|
10
|
+
ask the owner to confirm it; never invent a match. Keep the project-control workspace separate
|
|
11
|
+
from product repositories; delegate normal development, fresh Gauntlet
|
|
12
|
+
evaluation, and independent review to the corresponding Triad agents.
|
|
13
|
+
|
|
14
|
+
Detect the runtime with `.triad-runtime/triad-runtime-capabilities.mjs --host
|
|
15
|
+
antigravity`. Use explicit verification dispatch unless the recorded capability
|
|
16
|
+
snapshot proves a supported asynchronous route. Govern ordinary disagreements
|
|
17
|
+
from evidence and record the decision. Do not implement or review routinely,
|
|
18
|
+
and do not start demos, create pull requests, publish packages, releases, or
|
|
19
|
+
force-push without owner authorization.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-reviewer
|
|
3
|
+
description: Independently review one verified Triad+ feature attempt and return an evidence-based recommendation.
|
|
4
|
+
subagent: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Load `triad-loop-reviewer`. Review the declared card, diff, valid verification
|
|
8
|
+
evidence, metrics, risks, and applicable evaluation result independently from
|
|
9
|
+
the Developer. Return `approved`, `rework`, or `blocked` with concrete evidence.
|
|
10
|
+
Do not routinely implement fixes, commit, push, or alter project policy.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad
|
|
3
|
+
description: Start or resume a Triad+ Engineering Loop in Antigravity from a PRD source, target repositories, and measurable delivery goals. Use when the owner invokes /triad or asks Antigravity to orchestrate a Triad+ project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Triad+ workflow
|
|
7
|
+
|
|
8
|
+
Operate the current conversation as the Triad+ Orchestrator for the owner's
|
|
9
|
+
request. Read `.triad-plus/team.json` when present and use its language, owner
|
|
10
|
+
address, display names, personas, and model contract; technical role IDs remain
|
|
11
|
+
unchanged.
|
|
12
|
+
|
|
13
|
+
Before work, compare every role model that the host exposes with the recorded
|
|
14
|
+
contract. If Antigravity does not expose a model identity, say that it cannot be
|
|
15
|
+
verified and ask the owner to select or confirm it; never claim a model match
|
|
16
|
+
without evidence. An unavailable required role stops the loop rather than being
|
|
17
|
+
silently substituted.
|
|
18
|
+
|
|
19
|
+
For a new project, load `triad-loop-bootstrap`; for an initialized project,
|
|
20
|
+
load `triad-loop-orchestrator`. At bootstrap and resume, run
|
|
21
|
+
`.triad-runtime/triad-runtime-capabilities.mjs --adapter .triad-runtime/adapter.json` and follow
|
|
22
|
+
its selected verification route. Use explicit verifier dispatch unless a future
|
|
23
|
+
Antigravity lifecycle adapter is actually detected and validated.
|
|
24
|
+
|
|
25
|
+
Delegate normal implementation to `triad-developer` and independent review to
|
|
26
|
+
`triad-reviewer`. Invoke `triad-evaluator` only after Triad approval when the
|
|
27
|
+
owner requests Evaluator+; its independent report never reopens Triad. Continue
|
|
28
|
+
through declared cards and normal pushes after all gates pass. Escalate only the
|
|
29
|
+
decision types defined by the Triad+ skills. Do not start or stop a demo without
|
|
30
|
+
an owner instruction.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Triad+ for Antigravity
|
|
2
|
+
|
|
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
|
|
5
|
+
four technical agents. Start Antigravity from the project-control workspace and
|
|
6
|
+
invoke:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
/triad <PRD path or project request>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Install with the Triad+ CLI:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx triad-plus init --host antigravity --control /path/to/project-control
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Add `--global` to install the same assets under `~/.gemini/config/`. The
|
|
19
|
+
installer stores the selected role/model contract in `.triad-plus/team.json`.
|
|
20
|
+
Antigravity model selection remains a host setting; select a model through its
|
|
21
|
+
native controls. `/triad` compares the contract with any host-exposed model
|
|
22
|
+
identity and asks for owner confirmation when the host cannot expose one.
|
|
23
|
+
|
|
24
|
+
The initial adapter uses explicit verification dispatch. Background subagents
|
|
25
|
+
are useful for role separation, but they are not treated as proof of a verified
|
|
26
|
+
lifecycle hook until a versioned Antigravity control-plane adapter exists.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
./adapters/antigravity/install.sh --project <control-repository-path>
|
|
8
|
+
./adapters/antigravity/install.sh --global
|
|
9
|
+
|
|
10
|
+
Install the Triad+ Antigravity adapter without overwriting existing agents,
|
|
11
|
+
skills, workflow, or project runtime. --project installs into
|
|
12
|
+
<control-repository-path>/.agents and also installs .triad-runtime. --global
|
|
13
|
+
installs agents, skills, and /triad workflow under $HOME/.gemini/config.
|
|
14
|
+
EOF
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if [[ $# -eq 2 && "$1" == "--project" ]]; then
|
|
18
|
+
target_root="$2/.agents"
|
|
19
|
+
project_root="$2"
|
|
20
|
+
project_install=true
|
|
21
|
+
elif [[ $# -eq 1 && "$1" == "--global" ]]; then
|
|
22
|
+
target_root="$HOME/.gemini/config"
|
|
23
|
+
project_root=""
|
|
24
|
+
project_install=false
|
|
25
|
+
else
|
|
26
|
+
usage >&2
|
|
27
|
+
exit 2
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
adapter_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
31
|
+
repository_root="$(cd -- "$adapter_root/../.." && pwd)"
|
|
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)
|
|
34
|
+
collisions=()
|
|
35
|
+
|
|
36
|
+
for agent_name in "${agent_names[@]}"; do
|
|
37
|
+
[[ -e "$target_root/agents/$agent_name/agent.md" ]] && collisions+=("agents/$agent_name/agent.md")
|
|
38
|
+
done
|
|
39
|
+
for skill_name in "${skill_names[@]}"; do
|
|
40
|
+
[[ -e "$target_root/skills/$skill_name" ]] && collisions+=("skills/$skill_name")
|
|
41
|
+
done
|
|
42
|
+
[[ -e "$target_root/skills/triad" ]] && collisions+=("skills/triad")
|
|
43
|
+
if [[ "$project_install" == true && -e "$project_root/.triad-runtime" ]]; then
|
|
44
|
+
collisions+=(".triad-runtime")
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
if [[ ${#collisions[@]} -gt 0 ]]; then
|
|
48
|
+
printf 'Installation aborted; existing paths would be overwritten:\n' >&2
|
|
49
|
+
printf ' %s\n' "${collisions[@]}" >&2
|
|
50
|
+
printf 'Remove or rename those paths deliberately, then run the installer again.\n' >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
mkdir -p "$target_root/agents" "$target_root/skills"
|
|
55
|
+
for agent_name in "${agent_names[@]}"; do
|
|
56
|
+
cp -R "$adapter_root/.agents/agents/$agent_name" "$target_root/agents/$agent_name"
|
|
57
|
+
done
|
|
58
|
+
for skill_name in "${skill_names[@]}"; do
|
|
59
|
+
cp -R "$repository_root/skills/$skill_name" "$target_root/skills/$skill_name"
|
|
60
|
+
done
|
|
61
|
+
cp -R "$adapter_root/.agents/skills/triad" "$target_root/skills/triad"
|
|
62
|
+
if [[ "$project_install" == true ]]; then
|
|
63
|
+
cp -R "$repository_root/runtime" "$project_root/.triad-runtime"
|
|
64
|
+
cp -R "$repository_root/schemas" "$project_root/.triad-runtime/schemas"
|
|
65
|
+
cp "$adapter_root/runtime.json" "$project_root/.triad-runtime/adapter.json"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
printf 'Triad+ Engineering Loop installed in %s\n' "$target_root"
|
|
69
|
+
if [[ "$project_install" == true ]]; then
|
|
70
|
+
printf 'Control-plane runtime installed in %s/.triad-runtime\n' "$project_root"
|
|
71
|
+
fi
|
|
72
|
+
printf 'Start Antigravity in the target project and use /triad followed by a PRD source or project request.\n'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-developer
|
|
3
|
+
description: Implement exactly one bounded Triad feature card with focused tests and precise evidence. Use only when the orchestrator assigns a ready or quality-rework card.
|
|
4
|
+
tools: Read, Edit, Write, Bash, Glob, Grep, Skill
|
|
5
|
+
permissionMode: default
|
|
6
|
+
skills:
|
|
7
|
+
- triad-loop-developer
|
|
8
|
+
---
|
|
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
|
|
14
|
+
authoritative evidence.
|
|
15
|
+
|
|
16
|
+
On a quality repair, use only the current largest gap, its direct evidence, and
|
|
17
|
+
the bounded repair scope. Do not seek prior evaluator narrative. Do not change
|
|
18
|
+
queue, run state, assignments, evidence, evaluations, scope, or policy; do not
|
|
19
|
+
approve, review, commit, push, publish, or release unless explicitly assigned.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-evaluator
|
|
3
|
+
description: Freshly compare one verified Gauntlet candidate against a snapshotted quality bar and return one bounded largest remaining gap.
|
|
4
|
+
tools: Read, Bash, Glob, Grep, Skill
|
|
5
|
+
permissionMode: plan
|
|
6
|
+
skills:
|
|
7
|
+
- triad-loop-evaluator
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Use a fresh context for every evaluation. Read only the evaluation packet, real
|
|
11
|
+
candidate artifact, quality-bar snapshot, observation instructions, and valid
|
|
12
|
+
verification summary. Do not request or use developer reports, reasoning,
|
|
13
|
+
history, or prior evaluator/reviewer findings.
|
|
14
|
+
|
|
15
|
+
Return `candidate_wins`, `bar_wins`, or `indeterminate`. A `bar_wins` result has
|
|
16
|
+
exactly one evidence-based largest gap with one bounded repair scope. Do not edit
|
|
17
|
+
product source, change state, commit, push, or approve delivery.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triad-reviewer
|
|
3
|
+
description: Independently review one complete Triad attempt for engineering delivery readiness after verification and optional Gauntlet evaluation.
|
|
4
|
+
tools: Read, Bash, Glob, Grep, Skill
|
|
5
|
+
permissionMode: plan
|
|
6
|
+
skills:
|
|
7
|
+
- triad-loop-reviewer
|
|
8
|
+
---
|
|
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.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start or resume a Triad+ Engineering Loop from a PRD source, target repositories, and measurable goals.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Operate a Triad+ Engineering Loop for this owner request:
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Load `triad-loop-bootstrap` for a new project or `triad-loop-orchestrator` for
|
|
10
|
+
an initialized project. At bootstrap and resume, run
|
|
11
|
+
`.triad-runtime/triad-runtime-capabilities.mjs --adapter .triad-runtime/adapter.json` and record
|
|
12
|
+
the result. Follow its selected verification mode: `hook_dispatch` only when the
|
|
13
|
+
installed Claude Code SubagentStop hook has been configured and verified;
|
|
14
|
+
otherwise explicitly invoke the verifier after Developer completion.
|
|
15
|
+
|
|
16
|
+
If `.triad-plus/team.json` exists, load it before replying. Use its interaction
|
|
17
|
+
language, owner address, display names, personas, and model contract in communication;
|
|
18
|
+
technical role identifiers and authority remain unchanged. If the active
|
|
19
|
+
Orchestrator model cannot meet the recorded contract, say so before work starts.
|
|
20
|
+
|
|
21
|
+
Delegate implementation to `triad-developer` and review to `triad-reviewer`.
|
|
22
|
+
Invoke fresh `triad-evaluator` only after Triad approval and only when requested;
|
|
23
|
+
its report never reopens the completed run. Continue
|
|
24
|
+
autonomously through declared cards and normal branch pushes once all gates pass.
|
|
25
|
+
Escalate only the decision types defined by the Triad skills. Do not start or
|
|
26
|
+
stop a demo without an owner instruction.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Triad+ Engineering Loop for Claude Code
|
|
2
|
+
|
|
3
|
+
This adapter installs the shared five Triad skills, three isolated Claude Code
|
|
4
|
+
subagents, the `/triad` command, and—on a project installation—the Node control
|
|
5
|
+
plane. It does not modify global Claude settings or automatically activate a
|
|
6
|
+
hook.
|
|
7
|
+
|
|
8
|
+
## Install into a project-control repository
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
./adapters/claude-code/install.sh --project /path/to/project-control-repository
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
It creates:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
.claude/agents/triad-developer.md
|
|
18
|
+
.claude/agents/triad-evaluator.md
|
|
19
|
+
.claude/agents/triad-reviewer.md
|
|
20
|
+
.claude/commands/triad.md
|
|
21
|
+
.claude/skills/triad-loop-*/
|
|
22
|
+
.claude/triad-hooks.json
|
|
23
|
+
.triad-runtime/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The installer refuses all collisions before copying. `.claude/triad-hooks.json`
|
|
27
|
+
is an inert, reviewable fragment: merge it into the trusted Claude Code settings
|
|
28
|
+
only after replacing its paths and confirming it through `/hooks`.
|
|
29
|
+
|
|
30
|
+
## Start and verify
|
|
31
|
+
|
|
32
|
+
Launch Claude Code in the control repository, then use:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
/triad <PRD location or concise project request>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The command delegates Developer, Evaluator, and Reviewer to fresh subagents.
|
|
39
|
+
Confirm them with `/agents`; confirm skills with `/skills`. The project control
|
|
40
|
+
plane detects Claude Code and Node at bootstrap. It selects `hook_dispatch` only
|
|
41
|
+
when an actual `SubagentStop` hook is configured; otherwise it selects the
|
|
42
|
+
first-class `explicit_dispatch` route, where the orchestrator runs the verifier
|
|
43
|
+
after developer completion.
|
|
44
|
+
|
|
45
|
+
## Model choices
|
|
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
|
|
50
|
+
Evaluator and Reviewer independently configured when separate judgement is
|
|
51
|
+
important.
|
|
52
|
+
|
|
53
|
+
## Global installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
./adapters/claude-code/install.sh --global
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This installs agents, command, and skills below `~/.claude/`, but deliberately
|
|
60
|
+
does not install a project runtime or activate lifecycle hooks globally.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
./adapters/claude-code/install.sh --project <control-repository-path>
|
|
8
|
+
./adapters/claude-code/install.sh --global
|
|
9
|
+
|
|
10
|
+
Install the Triad Claude Code adapter without overwriting existing agents,
|
|
11
|
+
commands, skills, hook fragments, or project runtime. --project installs into
|
|
12
|
+
<control-repository-path>/.claude and also installs .triad-runtime. --global
|
|
13
|
+
installs only agents, command, and skills under $HOME/.claude.
|
|
14
|
+
EOF
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if [[ $# -eq 2 && "$1" == "--project" ]]; then
|
|
18
|
+
target_root="$2/.claude"
|
|
19
|
+
project_root="$2"
|
|
20
|
+
project_install=true
|
|
21
|
+
elif [[ $# -eq 1 && "$1" == "--global" ]]; then
|
|
22
|
+
target_root="$HOME/.claude"
|
|
23
|
+
project_root=""
|
|
24
|
+
project_install=false
|
|
25
|
+
else
|
|
26
|
+
usage >&2
|
|
27
|
+
exit 2
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
adapter_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
31
|
+
repository_root="$(cd -- "$adapter_root/../.." && pwd)"
|
|
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)
|
|
34
|
+
collisions=()
|
|
35
|
+
|
|
36
|
+
for agent_name in "${agent_names[@]}"; do
|
|
37
|
+
[[ -e "$target_root/agents/$agent_name.md" ]] && collisions+=("agents/$agent_name.md")
|
|
38
|
+
done
|
|
39
|
+
for skill_name in "${skill_names[@]}"; do
|
|
40
|
+
[[ -e "$target_root/skills/$skill_name" ]] && collisions+=("skills/$skill_name")
|
|
41
|
+
done
|
|
42
|
+
[[ -e "$target_root/commands/triad.md" ]] && collisions+=("commands/triad.md")
|
|
43
|
+
if [[ "$project_install" == true ]]; then
|
|
44
|
+
[[ -e "$target_root/triad-hooks.json" ]] && collisions+=("triad-hooks.json")
|
|
45
|
+
[[ -e "$project_root/.triad-runtime" ]] && collisions+=(".triad-runtime")
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
if [[ ${#collisions[@]} -gt 0 ]]; then
|
|
49
|
+
printf 'Installation aborted; existing paths would be overwritten:\n' >&2
|
|
50
|
+
printf ' %s\n' "${collisions[@]}" >&2
|
|
51
|
+
printf 'Remove or rename those paths deliberately, then run the installer again.\n' >&2
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
mkdir -p "$target_root/agents" "$target_root/commands" "$target_root/skills"
|
|
56
|
+
for agent_name in "${agent_names[@]}"; do
|
|
57
|
+
cp "$adapter_root/.claude/agents/$agent_name.md" "$target_root/agents/$agent_name.md"
|
|
58
|
+
done
|
|
59
|
+
cp "$adapter_root/.claude/commands/triad.md" "$target_root/commands/triad.md"
|
|
60
|
+
for skill_name in "${skill_names[@]}"; do
|
|
61
|
+
cp -R "$repository_root/skills/$skill_name" "$target_root/skills/$skill_name"
|
|
62
|
+
done
|
|
63
|
+
if [[ "$project_install" == true ]]; then
|
|
64
|
+
cp "$repository_root/integrations/claude-code/hooks.json" "$target_root/triad-hooks.json"
|
|
65
|
+
cp -R "$repository_root/runtime" "$project_root/.triad-runtime"
|
|
66
|
+
cp -R "$repository_root/schemas" "$project_root/.triad-runtime/schemas"
|
|
67
|
+
cp "$adapter_root/runtime.json" "$project_root/.triad-runtime/adapter.json"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
printf 'Triad+ Engineering Loop installed in %s\n' "$target_root"
|
|
71
|
+
if [[ "$project_install" == true ]]; then
|
|
72
|
+
printf 'Control-plane runtime installed in %s/.triad-runtime\n' "$project_root"
|
|
73
|
+
printf 'Review .claude/triad-hooks.json and merge it into trusted Claude settings only if hook dispatch is desired.\n'
|
|
74
|
+
fi
|
|
75
|
+
printf 'Start Claude Code in the target project and use /triad followed by a PRD source or project request.\n'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Triad+ Codex adapter
|
|
2
|
+
|
|
3
|
+
Codex custom prompts live in the user prompt directory, so its native command
|
|
4
|
+
is `/prompts:triad` rather than the un-namespaced `/triad` used by OpenCode and
|
|
5
|
+
Claude Code. The prompt places the current conversation in the Orchestrator
|
|
6
|
+
role; it does not create a hidden coordinator session.
|
|
7
|
+
|
|
8
|
+
Install a project-control repository first:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
./adapters/codex/install.sh --project /path/to/project-control-repository
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Then install the global entry point and the skills once for the Codex user:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
./adapters/codex/install.sh --global
|
|
18
|
+
```
|
|
19
|
+
|
|
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
|
|
22
|
+
installation also makes the skills available to Codex and writes
|
|
23
|
+
`$CODEX_HOME/prompts/triad.md` (`$HOME/.codex` by default).
|
|
24
|
+
|
|
25
|
+
Start Codex from the control repository and invoke:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
/prompts:triad <PRD path or project request>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Before it starts work, configure the four named role profiles described in
|
|
32
|
+
[`docs/codex-replication.md`](../../docs/codex-replication.md). The adapter
|
|
33
|
+
does not edit profile or model configuration, because their availability and
|
|
34
|
+
model routing are host-owner decisions.
|
|
35
|
+
|
|
36
|
+
At bootstrap and resume, the Orchestrator runs the runtime capability detector.
|
|
37
|
+
It chooses the configured Codex asynchronous hook only when that hook is really
|
|
38
|
+
available; otherwise it performs explicit verification dispatch. On Codex CLI
|
|
39
|
+
0.142, explicit dispatch is the safe expected route.
|