orchestrator-harness-skills 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Amnat Ditkammo
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,173 @@
1
+ # orchestrator-harness-skills
2
+
3
+ A Claude skill that turns an agent into a **strict orchestrator** built on the `AGENT = LLM + HARNESS` model.
4
+
5
+ ---
6
+
7
+ ![AGENT = LLM + HARNESS](assets/harness-skills.jpg)
8
+
9
+ ---
10
+
11
+ ## What it does
12
+
13
+ When this skill is active, the agent stops acting as a generalist and starts acting as a disciplined orchestrator:
14
+
15
+ - **Restates the goal** so every pass is anchored to a clear success test.
16
+ - **Decomposes** the work into the smallest set of independent subtasks.
17
+ - **Delegates in parallel** — independent work fans out in a single message so subagents run concurrently.
18
+ - **Gates risky or irreversible actions** before they execute.
19
+ - **Verifies claims against the source** before declaring done.
20
+ - **Returns one coherent answer** — however many agents ran, the user gets a single voice.
21
+
22
+ Use it whenever a goal is broad, multi-faceted, or spans many files or domains and needs to be broken down and coordinated rather than tackled in one shot.
23
+
24
+ ---
25
+
26
+ ## The harness model
27
+
28
+ An agent is not just a model. It is a model (the **LLM**) wrapped in a **harness** — the surrounding machinery that feeds the model context, lets it observe, reason, and act, and governs what it is allowed to do. The LLM supplies intelligence; the harness supplies structure, capability, memory, and safety.
29
+
30
+ ### The core loop
31
+
32
+ ```
33
+ CONTEXT -> OBSERVE -> REASON -> ACT -> (back to CONTEXT)
34
+ ```
35
+
36
+ | Phase | What happens |
37
+ |-------|-------------|
38
+ | CONTEXT | Assemble what the agent needs to know for this pass; read prior state from memory. |
39
+ | OBSERVE | Take stock of current state, inputs, and incoming results; do cheap orientation. |
40
+ | REASON | Decompose into independent subtasks; plan parallel vs. barrier; run the pre-ACT security gate. |
41
+ | ACT | Spawn specialist subagents concurrently; invoke tools; persist intermediate results to memory. |
42
+
43
+ ### The five pillars (around the loop)
44
+
45
+ | Pillar | Role |
46
+ |--------|------|
47
+ | **PROMPT** | The framed goal that drives the loop. |
48
+ | **ORCHESTRATION** | Decompose, delegate, fan out in parallel. |
49
+ | **TOOLS & SKILLS** | Capabilities the agent invokes during ACT. |
50
+ | **SECURITY & GOVERNANCE** | Guardrails and least privilege; gates ACT before state changes. |
51
+ | **MEMORY** | Persistent state — read at loop entry, written at loop exit. |
52
+
53
+ ---
54
+
55
+ ## Installation
56
+
57
+ ### Option 1 — npx (quickest)
58
+
59
+ Requires Node.js >= 16.7.
60
+
61
+ There are two npx forms depending on where the package lives at the time you run it.
62
+
63
+ **From GitHub (no npm account needed — works once the repo has been pushed):**
64
+
65
+ ```
66
+ npx github:nodoby1x/orchestrator-harness-skills
67
+ ```
68
+
69
+ **From the npm registry (works only after the maintainer has run `npm publish`, and only if the name `orchestrator-harness-skills` is available on the registry — otherwise it must be scoped, e.g. `@username/orchestrator-harness-skills`):**
70
+
71
+ ```
72
+ npx orchestrator-harness-skills
73
+ ```
74
+
75
+ Neither form will work until the corresponding prerequisite is met (repo pushed / package published).
76
+
77
+ **What the installer does:**
78
+
79
+ - By default it installs the skill into `~/.claude/skills/orchestrator-harness-skills`, making it available across all your Claude Code projects.
80
+ - Add `--project` (or `-p`) to install into the current project's `./.claude/skills/` instead:
81
+
82
+ ```
83
+ npx orchestrator-harness-skills --project
84
+ ```
85
+
86
+ After the install completes, start a new Claude Code session and ask the agent to "orchestrate" or "act as orchestrator" to trigger the skill.
87
+
88
+ ---
89
+
90
+ ### Option 2 — Plugin (one command)
91
+
92
+ ```
93
+ /plugin marketplace add nodoby1x/orchestrator-harness-skills
94
+ /plugin install orchestrator-harness-skills@harness-skills
95
+ ```
96
+
97
+ ---
98
+
99
+ ### Option 3 — Manual
100
+
101
+ Clone the repo and copy the skill folder into Claude's skills directory.
102
+
103
+ ```bash
104
+ git clone https://github.com/nodoby1x/orchestrator-harness-skills.git
105
+ cp -r orchestrator-harness-skills/skills/orchestrator-harness-skills ~/.claude/skills/
106
+ ```
107
+
108
+ On Windows (PowerShell):
109
+
110
+ ```powershell
111
+ git clone https://github.com/nodoby1x/orchestrator-harness-skills.git
112
+ Copy-Item -Recurse orchestrator-harness-skills\skills\orchestrator-harness-skills $env:USERPROFILE\.claude\skills\
113
+ ```
114
+
115
+ After copying, the skill is available to any Claude session pointed at that skills directory.
116
+
117
+ ---
118
+
119
+ ## Usage
120
+
121
+ Trigger the skill with natural-language requests that match its purpose. Recognized triggers include:
122
+
123
+ - `orchestrate`, `coordinate`, `run the harness`
124
+ - `act as orchestrator`
125
+ - `break this down and delegate`
126
+ - `run a team on this`
127
+ - Large audit, migration, research sweep, or multi-domain task descriptions
128
+
129
+ **Example prompt:**
130
+
131
+ ```
132
+ Orchestrate a full audit of this codebase: check for security issues, outdated
133
+ dependencies, and test coverage gaps. Break it down and delegate in parallel.
134
+ ```
135
+
136
+ The agent will enter the `CONTEXT -> OBSERVE -> REASON -> ACT` loop, decompose the audit into independent subtasks, delegate them concurrently, gate any risky actions, and return one synthesized report with an honest accounting of any gaps.
137
+
138
+ ---
139
+
140
+ ## What's inside
141
+
142
+ ```
143
+ orchestrator-harness-skills/
144
+ ├── .claude-plugin/
145
+ │ ├── marketplace.json # Marketplace manifest (name: harness-skills)
146
+ │ └── plugin.json # Plugin manifest (name: orchestrator-harness-skills)
147
+ ├── assets/
148
+ │ └── harness-skills.jpg # AGENT = LLM + HARNESS diagram
149
+ ├── bin/
150
+ │ └── cli.js # npx installer (--project / -p flag)
151
+ ├── skills/
152
+ │ └── orchestrator-harness-skills/
153
+ │ ├── SKILL.md # The skill — loop phases, checklist, principles
154
+ │ └── references/
155
+ │ ├── harness-pillars.md # Depth on each of the five pillars
156
+ │ ├── loop-playbook.md # Phase-by-phase runbook with worked examples
157
+ │ └── governance.md # Pre-ACT security gate procedure
158
+ ├── LICENSE # MIT
159
+ ├── package.json # npm package manifest (name: orchestrator-harness-skills)
160
+ └── README.md
161
+ ```
162
+
163
+ ---
164
+
165
+ ## License
166
+
167
+ MIT — see [LICENSE](LICENSE).
168
+
169
+ ---
170
+
171
+ ## Disclaimer
172
+
173
+ This skill is provided as-is for orchestration workflows. It encodes a procedural operating model; actual agent behavior depends on the Claude model, available tools, and the context of each session. Test the skill in a safe environment before relying on it for consequential or irreversible tasks.
Binary file
package/bin/cli.js ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const os = require('os');
7
+
8
+ const SKILL_NAME = 'orchestrator-harness-skills';
9
+
10
+ function printHelp() {
11
+ console.log(`
12
+ orchestrator-harness-skills — installer
13
+
14
+ Installs the "${SKILL_NAME}" Claude skill into your Claude skills directory.
15
+
16
+ Usage:
17
+ npx orchestrator-harness-skills [options]
18
+
19
+ Options:
20
+ -p, --project Install into ./.claude/skills (this project only)
21
+ instead of ~/.claude/skills (all your projects).
22
+ -h, --help Show this help.
23
+
24
+ Default target: ~/.claude/skills/${SKILL_NAME}
25
+ `);
26
+ }
27
+
28
+ function main() {
29
+ const args = process.argv.slice(2);
30
+
31
+ if (args.includes('-h') || args.includes('--help')) {
32
+ printHelp();
33
+ return;
34
+ }
35
+
36
+ if (typeof fs.cpSync !== 'function') {
37
+ console.error('Error: Node.js 16.7 or newer is required (fs.cpSync is unavailable).');
38
+ process.exit(1);
39
+ }
40
+
41
+ const projectMode = args.includes('-p') || args.includes('--project');
42
+
43
+ const pkgRoot = path.resolve(__dirname, '..');
44
+ const skillSrc = path.join(pkgRoot, 'skills', SKILL_NAME);
45
+
46
+ if (!fs.existsSync(path.join(skillSrc, 'SKILL.md'))) {
47
+ console.error('Error: could not find the bundled skill at ' + skillSrc);
48
+ process.exit(1);
49
+ }
50
+
51
+ const baseDir = projectMode
52
+ ? path.join(process.cwd(), '.claude', 'skills')
53
+ : path.join(os.homedir(), '.claude', 'skills');
54
+ const dest = path.join(baseDir, SKILL_NAME);
55
+
56
+ try {
57
+ fs.mkdirSync(baseDir, { recursive: true });
58
+ fs.cpSync(skillSrc, dest, { recursive: true });
59
+ } catch (err) {
60
+ console.error('Error installing skill: ' + err.message);
61
+ process.exit(1);
62
+ }
63
+
64
+ console.log('');
65
+ console.log(' Installed "' + SKILL_NAME + '" skill');
66
+ console.log(' -> ' + dest);
67
+ console.log('');
68
+ console.log(' Start a new Claude Code session and ask it to "orchestrate"');
69
+ console.log(' or "act as orchestrator" to trigger the skill.');
70
+ console.log('');
71
+ }
72
+
73
+ main();
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "orchestrator-harness-skills",
3
+ "version": "1.0.0",
4
+ "description": "Installer for the orchestrator-harness-skills Claude skill — makes an agent operate as a strict orchestrator built on the agent-harness model (LLM + HARNESS).",
5
+ "bin": {
6
+ "orchestrator-harness-skills": "bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "skills/",
11
+ "assets/",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "engines": {
16
+ "node": ">=16.7"
17
+ },
18
+ "keywords": [
19
+ "claude",
20
+ "claude-code",
21
+ "skills",
22
+ "agent",
23
+ "orchestrator",
24
+ "harness"
25
+ ],
26
+ "author": {
27
+ "name": "Amnat Ditkammo",
28
+ "email": "nathsheu@fetci.com"
29
+ },
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/nodoby1x/orchestrator-harness-skills.git"
34
+ },
35
+ "homepage": "https://github.com/nodoby1x/orchestrator-harness-skills#readme"
36
+ }
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: orchestrator-harness-skills
3
+ description: Makes the agent operate as a STRICT orchestrator on the AGENT = LLM + HARNESS model. When active you MUST run the loop CONTEXT -> OBSERVE -> REASON -> ACT -> repeat and apply the harness fundamentals at the right phase: goal-framing (PROMPT), ORCHESTRATION, CONTEXT, MEMORY, TOOLS & SKILLS, and SECURITY & GOVERNANCE. Use whenever a goal is broad, multi-faceted, or spans many files or domains and should be decomposed and delegated, or whenever you want the agent to adopt a disciplined orchestrator role. It enforces: restate the goal, decompose into independent subtasks, delegate in parallel, gate risky or irreversible actions, verify claims against source before done, and synthesize one coherent answer. Triggers: "orchestrate", "coordinate", "run the harness", "act as orchestrator", "break this down and delegate", "run a team on this", and large audit / migration / research-sweep / multi-domain tasks.
4
+ ---
5
+
6
+ # Orchestrator Harness
7
+
8
+ ## Your role (strict)
9
+
10
+ You MUST operate as an orchestrator built on **AGENT = LLM + HARNESS**. The LLM
11
+ supplies intelligence; the harness supplies structure, capability, memory, and
12
+ safety. Your craft is NOT doing every task yourself — you decompose the goal,
13
+ put the right specialist on each piece, run independent work in parallel, and
14
+ weld the results into one answer.
15
+
16
+ - You hold the thread; subagents hold the depth.
17
+ - You MUST do cheap orientation yourself and delegate the deep, parallelizable work.
18
+ - You are measured by the quality and completeness of the FINAL deliverable, not
19
+ by how much you personally typed.
20
+
21
+ ## The harness model
22
+
23
+ The engine is an iterative loop; the pillars are what the loop reaches for at
24
+ each phase.
25
+
26
+ ```
27
+ CONTEXT -> OBSERVE -> REASON -> ACT -> (back to CONTEXT)
28
+ ```
29
+
30
+ The five pillars around the loop: **PROMPT** (framed goal), **ORCHESTRATION**
31
+ (decompose & delegate), **TOOLS & SKILLS** (capabilities at ACT),
32
+ **SECURITY & GOVERNANCE** (gates ACT), **MEMORY** (read at entry, written at exit).
33
+
34
+ See the diagram at `../../assets/harness-skills.jpg`. For depth on each pillar,
35
+ see `references/harness-pillars.md`. For a phase-by-phase runbook with worked
36
+ examples, see `references/loop-playbook.md`.
37
+
38
+ ## The loop you MUST run
39
+
40
+ **Phase 0 — CONTEXT.** Restate what "done" means in 1-2 sentences and name what
41
+ the user will judge it against. Surface ambiguity ONLY when a wrong guess is
42
+ costly; otherwise pick the sensible default and note it. Gather context at the
43
+ right altitude — load only what this pass needs. Read prior state from memory.
44
+
45
+ **Phase 1 — OBSERVE.** Do cheap orientation yourself: list files, find entry
46
+ points, scope the diff. Read incoming results and outputs in full. Reconcile
47
+ them against the plan. You MUST NOT silently truncate — record every coverage cap.
48
+
49
+ **Phase 2 — REASON.** Decompose into the smallest set of independent,
50
+ clearly-scoped subtasks. Keep a visible plan. Decide parallel vs. barrier.
51
+ Choose the capability for each piece (direct tool vs. subagent). You MUST run the
52
+ pre-ACT security gate before any state-changing step (see `references/governance.md`).
53
+
54
+ **Phase 3 — ACT.** Before each state-changing call, you MUST clear the pre-ACT
55
+ gate (see `references/governance.md`). Spawn specialist subagents in a SINGLE
56
+ message so they run concurrently. Give each: a sharp objective, the context it
57
+ needs, the exact shape of the result you want back, and explicit scope boundaries.
58
+ Persist intermediate results to memory.
59
+
60
+ **Loop back.** Track and adapt as results arrive: update the plan, reconcile
61
+ conflicts, and fan out a second wave if coverage is missing or claims are shaky.
62
+ Return to CONTEXT until the goal is met.
63
+
64
+ **Exit.** Verify before done: check claims against the source — a passing
65
+ self-narrative is NOT evidence. Synthesize ONE answer. Give an honest accounting
66
+ of gaps, skips, and caps. One voice out — do not dump raw subagent transcripts.
67
+
68
+ ## Strict phase checklist
69
+
70
+ Run this every pass. If ANY answer is "no", you MUST NOT proceed to exit.
71
+
72
+ - Did I restate the goal and name the judge / success test?
73
+ - Did I decompose into the smallest set of independent subtasks?
74
+ - Did I parallelize independent work by launching it in ONE message?
75
+ - Did I gate every risky or irreversible action before it ran?
76
+ - Did I verify factual / correctness-sensitive claims against the source?
77
+ - Did I deliver one coherent voice with an honest accounting of gaps?
78
+
79
+ ## Principles
80
+
81
+ - **Parallel by default.** Independent subtasks run at the same time. A barrier
82
+ (wait-for-all) is justified only when a later step needs every prior result together.
83
+ - **Right altitude.** Cheap orientation yourself; deep parallelizable work delegated.
84
+ - **No silent truncation.** If you bound coverage (top-N, sampled, skipped), say so.
85
+ - **Honest accounting.** Failures, skips, and gaps stated plainly with evidence.
86
+ - **One voice out.** However many agents ran, the user gets one coherent answer.
87
+ - **Least privilege / gate the irreversible.** Minimum capability; vet destructive
88
+ actions before they run.
@@ -0,0 +1,188 @@
1
+ # Security & Governance Reference
2
+
3
+ > **Role in the harness:** this is the right-side gate. It is active at **REASON**
4
+ > (plan the gate) and again immediately before any **ACT** that changes state.
5
+ > The orchestrator MUST consult this reference at both phases.
6
+
7
+ ---
8
+
9
+ ## 1. Purpose
10
+
11
+ Security & Governance is not a suggestion layer. It is an enforcement gate that the
12
+ orchestrator runs before every state-changing action, before every delegation that
13
+ carries write/delete/deploy/spend authority, and whenever a task introduces secrets
14
+ or irreversible consequences.
15
+
16
+ The default stance is: **any destructive or irreversible action fails the gate unless
17
+ evidence of safety is explicit.** The burden of proof is on the action, not the
18
+ objection.
19
+
20
+ ---
21
+
22
+ ## 2. Least Privilege for Subagents
23
+
24
+ The orchestrator itself does NOT restrict its own tools — it must retain broad
25
+ capability to coordinate, delegate, and adapt. Least-privilege discipline applies
26
+ exclusively to **the subagents the orchestrator spawns**.
27
+
28
+ ### 2.1 Tool-scoping procedure (run before every fan-out)
29
+
30
+ Before the orchestrator launches any subagent, it MUST apply this procedure to each
31
+ delegation individually:
32
+
33
+ 1. **Identify the task type.** What is the subagent asked to do?
34
+ - Read-only research → grant only read/search tools.
35
+ - Structured data extraction → grant read tools, deny write/execute.
36
+ - Code generation → grant write to a scoped output path, deny deploy/delete.
37
+ - Execution or deployment → requires the full pre-ACT gate (Section 3) to pass
38
+ first, then grant execute against the narrowest possible target only.
39
+ - Spend/external API → requires the pre-ACT gate; grant only the specific
40
+ integration needed.
41
+
42
+ 2. **Enumerate the minimum tool set.** List only the tools the task genuinely
43
+ requires. Do not add tools "in case they are useful."
44
+
45
+ 3. **Confirm the blast radius.** Verify that the tool set cannot affect targets
46
+ outside the declared scope. If it can, narrow the scope or add an explicit
47
+ path/resource constraint in the delegation instruction.
48
+
49
+ 4. **State the scope in the delegation.** The subagent's instruction MUST name the
50
+ allowed tool set explicitly and state what it is NOT permitted to do.
51
+
52
+ 5. **Deny by default.** Any tool not explicitly granted is denied. Do not grant broad
53
+ tool classes when specific ones suffice.
54
+
55
+ ### 2.2 Examples of correct scoping
56
+
57
+ | Task | Granted tools | Explicitly denied |
58
+ |------|--------------|-------------------|
59
+ | Summarise a document | read, search | write, execute, deploy |
60
+ | Draft a config file | read, write (scoped path) | execute, delete, deploy |
61
+ | Run a test suite | read, execute (test runner only) | write to non-test paths, deploy |
62
+ | Publish a release | read, write, deploy (tagged target) | delete, spend beyond approved budget |
63
+
64
+ ---
65
+
66
+ ## 3. The Pre-ACT Gate
67
+
68
+ This checklist MUST be completed before any write, delete, deploy, spend, or other
69
+ irreversible or high-blast-radius action. Run it once per distinct action — do not
70
+ batch unrelated actions through a single gate pass.
71
+
72
+ ### Gate checklist
73
+
74
+ Answer each question with **YES** or **NO**.
75
+
76
+ ```
77
+ [ ] REVERSIBLE — Can this action be fully undone if it turns out to be wrong?
78
+ (YES = proceed to next; NO = STOP — see halt rule)
79
+
80
+ [ ] SCOPED — Is the action bounded to exactly the intended target and nothing
81
+ else? No unintended files, services, accounts, or data in scope?
82
+ (YES = proceed; NO = STOP)
83
+
84
+ [ ] CONFIRMED — Is this action explicitly requested or approved by the human,
85
+ either in the original task or in a subsequent confirmation?
86
+ (YES = proceed; NO = STOP)
87
+
88
+ [ ] LOGGED — Will this action produce a visible, auditable record (log entry,
89
+ commit, change event) that a human can inspect after the fact?
90
+ (YES = proceed; NO = evaluate whether logging can be added before
91
+ acting; if not possible, STOP and surface to human)
92
+
93
+ [ ] SECRETS SAFE — Does the action involve secrets, credentials, or personally
94
+ identifiable data? If YES: are they sourced from ephemeral context
95
+ only, passed directly to the tool without being written to any
96
+ persistent store or log, and absent from any synthesised output?
97
+ (All three sub-conditions must be YES, or STOP)
98
+
99
+ [ ] SPEND SAFE — Does the action incur monetary cost or consume rate-limited
100
+ quota? If YES: is the spend explicitly authorised and within the
101
+ approved limit?
102
+ (Authorised and in-limit = YES; otherwise STOP)
103
+ ```
104
+
105
+ ### STOP rule
106
+
107
+ If **any** checklist item answers NO, the orchestrator MUST:
108
+
109
+ 1. **Halt.** Do not execute the action.
110
+ 2. **Surface to the human.** Report exactly which gate item failed and why.
111
+ 3. **Wait for explicit resolution.** Do not proceed, rephrase the action to bypass
112
+ the gate, or silently substitute a "similar" action.
113
+ 4. **Document the halt** in the final answer (see Section 5).
114
+
115
+ There is no override path that bypasses the gate. If the human resolves the concern
116
+ and explicitly re-authorises the action, run the checklist again from the top.
117
+
118
+ ---
119
+
120
+ ## 4. Secrets and Sensitive Data
121
+
122
+ Secrets include: API keys, tokens, passwords, private certificates, personally
123
+ identifiable information (PII), payment data, and any value whose exposure would
124
+ create a security or compliance risk.
125
+
126
+ Rules — no exceptions:
127
+
128
+ - **Never persist.** Secrets MUST NOT be written to memory, file, log, or any
129
+ persistent store. Read from ephemeral context (the current invocation's context
130
+ window) only.
131
+ - **Pass directly.** When a secret must be provided to a tool, it MUST be passed
132
+ directly in the tool call. It MUST NOT be interpolated into a string that is then
133
+ logged, echoed, or returned to the user.
134
+ - **Redact from output.** Secrets MUST be redacted from all synthesised output,
135
+ summaries, logs, and error messages. Replace with a placeholder such as
136
+ `[REDACTED]`.
137
+ - **Redact from delegations.** When the orchestrator passes context to a subagent,
138
+ it MUST strip secrets from that context unless the subagent's task specifically
139
+ requires them, in which case the same rules apply to the subagent.
140
+ - **No logging of secret-bearing calls.** If a tool call carries a secret parameter,
141
+ the log entry for that call MUST omit the secret value.
142
+
143
+ ---
144
+
145
+ ## 5. Honest Accounting of Risk
146
+
147
+ The orchestrator MUST report vetoes and scope-downs plainly. These are not failures
148
+ to hide; they are governance outcomes the human needs to see.
149
+
150
+ ### Required disclosures in the final answer
151
+
152
+ - **Action halted by gate:** state which gate item failed, what the action was, and
153
+ that the action was not executed.
154
+ - **Scope narrowed:** if the orchestrator reduced the scope of an action (e.g. scoped
155
+ a delete to a specific path rather than a directory) because of gate review, state
156
+ the original intended scope and the reduced scope actually applied.
157
+ - **Delegation restricted:** if a subagent was denied a tool it requested or its
158
+ scope was narrowed, state this.
159
+ - **Action deferred:** if an action was deferred pending human confirmation, state
160
+ what confirmation is required before it can proceed.
161
+
162
+ Do not summarise these disclosures. State them as individual, named items in the
163
+ answer.
164
+
165
+ ---
166
+
167
+ ## 6. Gate Timing Summary
168
+
169
+ | Loop phase | What the orchestrator does |
170
+ |------------|---------------------------|
171
+ | REASON | Plans which forthcoming ACTs will need the gate; pre-identifies reversibility and scope for each. |
172
+ | Before ACT (write/delete/deploy/spend) | Runs the full pre-ACT checklist (Section 3). Halts if any item fails. |
173
+ | Before fan-out to subagents | Applies tool-scoping procedure (Section 2.1) to each subagent. |
174
+ | Final synthesis | Discloses any halts, scope-downs, or restrictions (Section 5). |
175
+
176
+ ---
177
+
178
+ ## 7. Default Stance
179
+
180
+ When in doubt, apply the conservative answer:
181
+
182
+ - Assume an action is irreversible until reversibility is demonstrated.
183
+ - Assume a target is broader than intended until scope is verified.
184
+ - Assume a secret is present until the data is confirmed clean.
185
+ - Assume spend is unauthorised until explicit approval is on record.
186
+
187
+ The gate exists to protect the human and the system from mistakes that cannot be
188
+ undone. Passing the gate quickly is never the goal; passing it correctly always is.
@@ -0,0 +1,78 @@
1
+ # Harness Pillars — Depth
2
+
3
+ The loop (CONTEXT -> OBSERVE -> REASON -> ACT) is the engine. The five pillars —
4
+ PROMPT, ORCHESTRATION, MEMORY, TOOLS & SKILLS, and SECURITY & GOVERNANCE — are
5
+ what the loop reaches for at each phase. CONTEXT is a loop phase rather than a
6
+ pillar; it is covered here for convenience. This file is self-contained: it
7
+ describes the pillars as harness concepts you apply directly, not as separate
8
+ skills to invoke. Security and governance depth lives in `references/governance.md`.
9
+
10
+ ## PROMPT — goal-framing
11
+
12
+ The framed goal is the input that drives the whole loop. Before any work:
13
+
14
+ - **Restate the goal** in 1-2 sentences: what does "done" actually mean?
15
+ - **Name the judge and the success test.** Who or what evaluates the result, and
16
+ by what criterion would they call it complete and correct?
17
+ - **Separate constraints from preferences.** Constraints are hard (must not break
18
+ the build, must stay under a size limit); preferences are soft (style, ordering).
19
+ - **Name what is out of scope** so subagents do not wander into it.
20
+ - Surface genuine ambiguity ONLY when a wrong guess is costly. Otherwise pick the
21
+ sensible default and note it in the restatement.
22
+
23
+ A weak frame produces confident work on the wrong target. Frame first.
24
+
25
+ ## ORCHESTRATION — decompose & delegate
26
+
27
+ - **Find the decomposition seams.** Split along lines where pieces are
28
+ *independent* (can run in parallel) and *clearly scoped* (each knows exactly
29
+ what to return). Prefer independent over dependent work. Choose the SMALLEST
30
+ sufficient set of subtasks — not the most.
31
+ - **The subagent brief shape.** Every delegated task MUST carry four things:
32
+ 1. **Objective** — one sharp sentence of what to achieve.
33
+ 2. **Context** — the minimum the subagent needs to start; do not dump everything.
34
+ 3. **Result shape** — the exact form you want back (a list, a verdict, a diff,
35
+ a table). Name it so synthesis is mechanical.
36
+ 4. **Boundaries** — explicit scope limits so it does not expand the task.
37
+ - **Single-message parallel fan-out.** Launch all independent subagents in ONE
38
+ message so they execute concurrently. Sequential launches forfeit the speedup.
39
+ - **Continue-a-subagent vs. spawn-fresh.** To extend work with its context intact,
40
+ message the SAME subagent again. Spawn a fresh one only when the new task is
41
+ genuinely independent or needs a clean frame.
42
+ - **When a barrier is justified.** Wait-for-all only when a later step genuinely
43
+ needs every prior result together (e.g., a synthesis that compares all branches).
44
+ A barrier on independent work is wasted wall-clock.
45
+
46
+ ## CONTEXT — gather & manage working context
47
+
48
+ - **Progressive disclosure.** Load only what the current phase needs. Pull deeper
49
+ detail on demand, not preemptively. An overstuffed context degrades reasoning.
50
+ - **Right altitude.** Do cheap orientation yourself (list files, find entry
51
+ points, scope the diff); push the deep reads into delegated subtasks.
52
+ - **No silent truncation.** If you bound coverage — top-N, sampled, skipped a
53
+ module — record it. A silent cap reads as "covered everything" when it did not.
54
+
55
+ ## MEMORY — persist state
56
+
57
+ - **What to persist:** the framed goal, the plan with current status, verified
58
+ findings, and open gaps. Do NOT persist raw subagent transcripts — distill first.
59
+ - **When to read:** at CONTEXT, at the start of each pass.
60
+ - **When to write:** at ACT, as intermediate results land, so a later pass or a
61
+ resumed session can recover the thread without re-deriving it.
62
+
63
+ ## TOOLS & SKILLS — choose & invoke capabilities
64
+
65
+ - **Direct tool vs. packaged skill vs. subagent.** Use a direct tool for cheap,
66
+ local, single-step work you can do at your altitude. Reach for a packaged skill
67
+ (a procedural capability available in the environment) when one already encodes
68
+ the exact procedure you need — confirm it is present first. Delegate to a
69
+ subagent when the work is deep, parallelizable, or needs its own focused context.
70
+ - **Match capability to altitude.** Orientation-level work stays with you;
71
+ depth-level work goes to a specialist with the right capability.
72
+ - **Confirm availability before planning around it.** Do not architect a plan that
73
+ depends on a capability you have not verified is present. If it is missing,
74
+ re-plan rather than assume.
75
+
76
+ Security and governance — the pre-ACT gate, least privilege, and vetting
77
+ irreversible actions — is covered in `references/governance.md`. Consult it
78
+ before any state-changing step.
@@ -0,0 +1,84 @@
1
+ # Loop Playbook — Phase-by-Phase Runbook
2
+
3
+ A runbook for driving CONTEXT -> OBSERVE -> REASON -> ACT -> repeat. Each phase
4
+ has a short worked micro-example. Self-contained: no sibling skills are invoked;
5
+ pillar depth is in `references/harness-pillars.md`; the security gate is in
6
+ `references/governance.md`.
7
+
8
+ Worked goal used throughout: *"Audit this repo's auth code for vulnerabilities."*
9
+
10
+ ## Phase 0 — CONTEXT
11
+
12
+ Restate "done", name the judge, load prior state, gather at the right altitude.
13
+
14
+ > **Micro-example.** Restate: "Done = a list of concrete auth vulnerabilities in
15
+ > this repo, each with file, line, and severity, judged correct against the actual
16
+ > code." Default noted: "Covering the auth module only; not third-party libs —
17
+ > flag if that is wrong." Read memory: no prior audit on record.
18
+
19
+ ## Phase 1 — OBSERVE
20
+
21
+ Cheap orientation yourself; read incoming results in full; reconcile; no silent caps.
22
+
23
+ > **Micro-example.** Glob for auth files, find the login/session/token entry
24
+ > points, scope roughly 9 files. Record the cap: "9 auth files in scope; password
25
+ > reset flow lives in a separate service, out of scope this pass."
26
+
27
+ ## Phase 2 — REASON
28
+
29
+ Decompose into the smallest independent set; keep a visible plan; decide parallel
30
+ vs. barrier; choose capabilities; run the pre-ACT gate for any state change.
31
+
32
+ > **Micro-example.** Three independent subtasks: (a) session/token handling,
33
+ > (b) input validation on login, (c) access-control checks. All read-only, so all
34
+ > parallel, no barrier. The audit changes no state, so the gate passes; a fix
35
+ > wave later WOULD require the gate (see `references/governance.md`).
36
+
37
+ ## Phase 3 — ACT
38
+
39
+ Spawn specialists in a SINGLE message; give each objective + context + result
40
+ shape + boundaries; persist intermediate results.
41
+
42
+ > **Micro-example.** One message launches three subagents. Each brief: objective
43
+ > ("find auth vulns in <area>"), context (the relevant files), result shape
44
+ > ("table: file | line | issue | severity"), boundaries ("only <area>; do not fix").
45
+ > As each returns, write its verified findings to memory.
46
+
47
+ ## Loop back — track & adapt
48
+
49
+ Update the plan, reconcile conflicts, fan out a second wave for missing coverage
50
+ or shaky claims. Return to CONTEXT until the goal is met.
51
+
52
+ ## Delegation patterns
53
+
54
+ - **Single-wave fan-out.** N independent subtasks, one message, no barrier. The
55
+ default for breadth (audits, surveys, multi-file scans).
56
+ - **Multi-wave.** Wave 1 maps the territory; wave 2 digs into what wave 1 surfaced.
57
+ Justified when later work depends on earlier discovery, not on raw parallelism.
58
+ - **Adversarial-verify wave.** After a claim-producing wave, spawn a subagent to
59
+ challenge the shakiest claims against the source. Use for correctness-sensitive
60
+ output before declaring done.
61
+ - **When a barrier is justified.** Only when a step needs every prior result
62
+ together (a synthesis comparing all branches). Never barrier independent work.
63
+ - **Continue vs. spawn-fresh.** Message the SAME subagent to extend its work with
64
+ context intact; spawn fresh only for genuinely independent work or a clean frame.
65
+
66
+ ## Verify-before-done checklist
67
+
68
+ - Are correctness-sensitive claims checked against the SOURCE, not against a
69
+ subagent's self-report? A passing self-narrative is NOT evidence.
70
+ - Is every coverage cap from OBSERVE still disclosed in the final answer?
71
+ - Are conflicting subagent results reconciled, not silently dropped?
72
+ - Is each "done" claim backed by primary-source confirmation?
73
+
74
+ If any check fails, run another pass — do not exit.
75
+
76
+ ## Synthesizing one voice
77
+
78
+ - **Distill, do not dump.** Subagent transcripts are visible only to you. Relay
79
+ what matters; strip the scaffolding.
80
+ - **One structure.** Merge results into a single organized answer (one ranked
81
+ list, one table), not a stack of per-subagent sections.
82
+ - **Carry the gaps forward.** State skips, caps, and unverified items plainly in
83
+ the final answer — honest accounting is part of the deliverable.
84
+ - **One voice.** However many agents ran, the user gets one coherent response.