harness-everything 0.2.1 → 0.2.2
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/README.md +1 -1
- package/build-multi-agent-system/SKILL.md +68 -68
- package/create-agent-launcher/SKILL.md +48 -48
- package/docs/architecture.md +2 -2
- package/docs/workflows/build-multi-agent-system.md +62 -62
- package/docs/workflows/create-agent-launcher.md +62 -62
- package/docs/workflows/environment-detection.md +63 -63
- package/docs/workflows/eval-harness.md +57 -57
- package/docs/workflows/fable-discipline.md +59 -59
- package/docs/workflows/fable-mode.md +32 -32
- package/docs/workflows/git-commit.md +62 -62
- package/docs/workflows/grill-me.md +62 -62
- package/docs/workflows/grill-with-docs.md +62 -62
- package/docs/workflows/improve-codebase-architecture.md +60 -60
- package/docs/workflows/repo-docs.md +59 -59
- package/docs/workflows/rewrite-commits.md +60 -60
- package/docs/workflows/security-review.md +58 -58
- package/docs/workflows/self-evolve.md +59 -59
- package/docs/workflows/tdd.md +39 -39
- package/docs/workflows/todo-driven-workflow.md +36 -36
- package/docs/workflows/using-git-worktrees.md +63 -63
- package/docs/workflows/verification-loop.md +69 -69
- package/docs/workflows/verify-before-claim.md +60 -60
- package/docs/workflows/zoom-out.md +62 -62
- package/environment-detection/SKILL.md +77 -77
- package/eval-framework/behavioral-test.js +105 -105
- package/eval-framework/mechanism-test.js +251 -251
- package/eval-harness/SKILL.md +59 -59
- package/fable-discipline/SKILL.md +38 -38
- package/fable-mode/SKILL.md +51 -51
- package/git-commit/SKILL.md +55 -55
- package/grill-me/SKILL.md +36 -36
- package/grill-with-docs/SKILL.md +99 -99
- package/harness-everything/SKILL.md +141 -141
- package/harness-everything/examples/README.md +9 -9
- package/harness-everything/examples/todo-workflow.md +22 -22
- package/harness-everything/scripts/todo-cli.js +157 -157
- package/harness-everything/scripts/verify-gate.js +31 -31
- package/hooks/scripts/atomic-commit-check.js +68 -68
- package/hooks/scripts/context-compact.js +114 -114
- package/hooks/scripts/lib/platforms/claude.js +132 -42
- package/hooks/scripts/lib/platforms/codex.js +96 -46
- package/hooks/scripts/lib/platforms/continue.js +73 -41
- package/hooks/scripts/lib/platforms/copilot.js +91 -41
- package/hooks/scripts/lib/platforms/cursor.js +71 -41
- package/hooks/scripts/lib/platforms/hermes.js +25 -0
- package/hooks/scripts/rule-of-3.js +176 -176
- package/improve-codebase-architecture/SKILL.md +44 -44
- package/install-cognitive-os/SKILL.md +95 -95
- package/package.json +1 -1
- package/repo-docs/SKILL.md +45 -45
- package/rewrite-commits/SKILL.md +32 -32
- package/scripts/installer.js +57 -200
- package/scripts/lib/advisory-text.js +163 -163
- package/scripts/lib/claude-hooks.js +71 -71
- package/scripts/lib/manifest.js +82 -82
- package/scripts/lib/prompts.js +241 -241
- package/scripts/lib/skills.js +174 -172
- package/scripts/lib/workspace.js +28 -28
- package/security-review/SKILL.md +510 -510
- package/self-evolve/SKILL.md +54 -54
- package/skill-creator/SKILL.md +91 -91
- package/skill-creator/references/testing-workflow.md +32 -32
- package/skill-style/SKILL.md +48 -48
- package/tdd/SKILL.md +53 -53
- package/todo-driven-workflow/SKILL.md +54 -54
- package/using-git-worktrees/SKILL.md +161 -161
- package/verification-loop/SKILL.md +138 -138
- package/verify-before-claim/SKILL.md +86 -86
- package/zoom-out/SKILL.md +90 -90
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ Harness operates through five core cognitive concepts:
|
|
|
118
118
|
|
|
119
119
|
| AI Agent Tool | Integration Method | Local Target Location | Enforcement |
|
|
120
120
|
|---|---|---|---|
|
|
121
|
-
| **Claude Code** | Native Lifecycle Hooks (`PreToolUse`, `PostToolUse`, `SessionStart`) | `.claude/settings.json` (project) / `~/.claude/settings.json` (user) | **Hard** — hooks can block a tool call (`exit(2)`) |
|
|
121
|
+
| **Claude Code** | Native Lifecycle Hooks (`PreToolUse`, `PostToolUse`, `SessionStart`) | `.claude/settings.json` (project) / `~/.claude/settings.json` (user)<br>*.claude/skills/* (Project Skills) / *~/.claude/skills/* (Global Skills) | **Hard** — hooks can block a tool call (`exit(2)`) |
|
|
122
122
|
| **Cursor** | Native Project Rules | `.cursorrules` | Advisory only |
|
|
123
123
|
| **Copilot Chat** | Custom Instructions | `.github/copilot-instructions.md` | Advisory only |
|
|
124
124
|
| **Codex** | Custom Instructions (`AGENTS.md`, not `.codex/config.toml` — that file controls CLI/sandbox behavior, not prompt content) | `AGENTS.md` | Advisory only |
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-multi-agent-system
|
|
3
|
-
description: 'Deploy a universal, self-adapting Multi-Agent Architecture into any project. It dynamically analyzes the tech stack to scaffold a token-efficient workspace with strict physical boundaries, hybrid SQLite memory, and isomorphic alignment protocols.'
|
|
4
|
-
author: Miya Daniel | Harness Core Team
|
|
5
|
-
version: 0.2.0
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Universal Multi-Agent Workspace Installer
|
|
9
|
-
|
|
10
|
-
## 📋 Skill Contract
|
|
11
|
-
|
|
12
|
-
| Component | Specification |
|
|
13
|
-
| :--- | :--- |
|
|
14
|
-
| **Trigger / Input** | Tier 3 task requiring a multi-agent workspace to be scaffolded from scratch; explicit request to initialize a multi-agent system. |
|
|
15
|
-
| **Expected Output** | A scaffolded 6-zone folder structure, a generated `index_memory` script that builds `memory.db` (SQLite relational index), and an immutable `AGENTS.md` router (< 50 lines) at the project root. |
|
|
16
|
-
| **State Mutations** | Creates/rewrites `AGENTS.md`; creates the 6 functional zone directories; creates and runs the memory indexer script; writes `memory.db`. |
|
|
17
|
-
| **Enforcement Gate** | MUST run the generated `index_memory` script once and verify it executes cleanly before the task is considered complete. `AGENTS.md` MUST include a directive forbidding sub-agents from modifying it. |
|
|
18
|
-
|
|
19
|
-
## Core Principles
|
|
20
|
-
- MUST operate using the cognitive loop: Think > Try > Summarize > Record.
|
|
21
|
-
- [Think] Map the project state before altering it. The architecture must adapt to the project's native ecosystem, not force a rigid template.
|
|
22
|
-
- [Try] Build the architecture incrementally. Ensure all constraints are physically enforced by the file system or explicit router rules.
|
|
23
|
-
- [Summarize] Verify that the cognitive pathways (the 6 functional zones) are clearly isolated and language-appropriate.
|
|
24
|
-
- [Record] Leave behind a robust memory indexer and an immutable `AGENTS.md` router as the permanent handoff.
|
|
25
|
-
|
|
26
|
-
## Cognitive Foundation (The Meta-Framework)
|
|
27
|
-
- `install-cognitive-os` defines *how an agent thinks*. `self-evolve` defines *how an agent learns*.
|
|
28
|
-
- THIS skill defines **WHERE the agent lives**. It is the physical landing gear.
|
|
29
|
-
- Without a strict folder structure and relational index, a multi-agent team will eventually drown in its own Markdown logs, leading to massive token burn and hallucination.
|
|
30
|
-
- This skill enforces "Physical Isolation of Context" and "Cognitive Metabolism", but adapts its implementation dynamically based on the project's domain (Software, Research, Writing, etc.).
|
|
31
|
-
|
|
32
|
-
## [State Checkpoint]
|
|
33
|
-
- MUST verify the current working directory is the root of the target project.
|
|
34
|
-
- MUST verify we have read/write access to create directories and scripts.
|
|
35
|
-
|
|
36
|
-
## [Discovery Phase: Environment Audit]
|
|
37
|
-
1. Tech Stack & Domain Analysis: MUST analyze the project (e.g., read `package.json`, `pyproject.toml`, or general file extensions) to determine the primary language and domain.
|
|
38
|
-
2. Dynamic Role Deduction: MUST deduce the required sub-agent roles from a standard Archetype Pool (e.g., Frontend, Backend, Data, Writer).
|
|
39
|
-
- *Mandatory Roles:* PM (Coordinator) and Challenger (Alignment Enforcer) MUST always be included.
|
|
40
|
-
|
|
41
|
-
## [Execution Phase: Structural Scaffolding]
|
|
42
|
-
3. Isomorphic Zone Mapping: MUST implement the "6 Functional Zones", adapting the folder names/paths to the project's ecosystem if necessary (e.g., `docs/`, `.agents/`, `.cursor/`), while preserving their strict semantic purpose:
|
|
43
|
-
- `[State]`: High-frequency, volatile working state (Max 100 lines).
|
|
44
|
-
- `[Logs]`: Raw dialogue and verification outputs (Strictly excluded from default PM context).
|
|
45
|
-
- `[Decisions]`: Distilled Project Memory (ADRs, Read-on-demand via Index).
|
|
46
|
-
- `[Domain]`: Immutable product vision / core rules.
|
|
47
|
-
- `[Architecture]`: Immutable technical contracts / style guides.
|
|
48
|
-
- `[Roles]`: Individual sub-agent system prompts.
|
|
49
|
-
|
|
50
|
-
## [Execution Phase: Hybrid Memory Implementation]
|
|
51
|
-
4. Polyglot Indexer Generation: MUST generate an `index_memory` script in the project's primary language (e.g., Python, Node.js, Bash) or provide a pure CLI fallback.
|
|
52
|
-
- The script MUST parse YAML frontmatter/Markdown headers across the documentation zones.
|
|
53
|
-
- It MUST build a local SQLite database (`memory.db`) to serve as a relational index, enabling low-token historical queries.
|
|
54
|
-
|
|
55
|
-
## [Execution Phase: The Immutable Router]
|
|
56
|
-
5. Hardcoded Laws: MUST create or rewrite `AGENTS.md` at the project root. This file is the system's brain and must be strictly protected:
|
|
57
|
-
- It MUST include a directive forbidding sub-agents from modifying it.
|
|
58
|
-
- It MUST be a lightweight router (< 50 lines).
|
|
59
|
-
- It MUST define the "Bootstrap Protocol" (Read Payload -> Read State -> Delegate without reading full history).
|
|
60
|
-
- It MUST enforce "Cognitive Metabolism" (Strict line limits triggering Distillation cycles).
|
|
61
|
-
- It MUST enforce "Adaptive Alignment" (Path-based escalation matrix invoking the Challenger).
|
|
62
|
-
- It MUST explicitly state the "Non-blocking Release" rule: agents log subjective reviews asynchronously and never halt execution waiting for human input.
|
|
63
|
-
|
|
64
|
-
## [Verification Phase]
|
|
65
|
-
6. MUST run the generated `index_memory` script once to initialize the `memory.db` and verify it executes cleanly in the user's environment.
|
|
66
|
-
7. MUST summarize the deployed architecture and the dynamically deduced roles to the user.
|
|
67
|
-
|
|
68
|
-
[Exit: Await User Instruction]
|
|
1
|
+
---
|
|
2
|
+
name: build-multi-agent-system
|
|
3
|
+
description: 'Deploy a universal, self-adapting Multi-Agent Architecture into any project. It dynamically analyzes the tech stack to scaffold a token-efficient workspace with strict physical boundaries, hybrid SQLite memory, and isomorphic alignment protocols.'
|
|
4
|
+
author: Miya Daniel | Harness Core Team
|
|
5
|
+
version: 0.2.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Universal Multi-Agent Workspace Installer
|
|
9
|
+
|
|
10
|
+
## 📋 Skill Contract
|
|
11
|
+
|
|
12
|
+
| Component | Specification |
|
|
13
|
+
| :--- | :--- |
|
|
14
|
+
| **Trigger / Input** | Tier 3 task requiring a multi-agent workspace to be scaffolded from scratch; explicit request to initialize a multi-agent system. |
|
|
15
|
+
| **Expected Output** | A scaffolded 6-zone folder structure, a generated `index_memory` script that builds `memory.db` (SQLite relational index), and an immutable `AGENTS.md` router (< 50 lines) at the project root. |
|
|
16
|
+
| **State Mutations** | Creates/rewrites `AGENTS.md`; creates the 6 functional zone directories; creates and runs the memory indexer script; writes `memory.db`. |
|
|
17
|
+
| **Enforcement Gate** | MUST run the generated `index_memory` script once and verify it executes cleanly before the task is considered complete. `AGENTS.md` MUST include a directive forbidding sub-agents from modifying it. |
|
|
18
|
+
|
|
19
|
+
## Core Principles
|
|
20
|
+
- MUST operate using the cognitive loop: Think > Try > Summarize > Record.
|
|
21
|
+
- [Think] Map the project state before altering it. The architecture must adapt to the project's native ecosystem, not force a rigid template.
|
|
22
|
+
- [Try] Build the architecture incrementally. Ensure all constraints are physically enforced by the file system or explicit router rules.
|
|
23
|
+
- [Summarize] Verify that the cognitive pathways (the 6 functional zones) are clearly isolated and language-appropriate.
|
|
24
|
+
- [Record] Leave behind a robust memory indexer and an immutable `AGENTS.md` router as the permanent handoff.
|
|
25
|
+
|
|
26
|
+
## Cognitive Foundation (The Meta-Framework)
|
|
27
|
+
- `install-cognitive-os` defines *how an agent thinks*. `self-evolve` defines *how an agent learns*.
|
|
28
|
+
- THIS skill defines **WHERE the agent lives**. It is the physical landing gear.
|
|
29
|
+
- Without a strict folder structure and relational index, a multi-agent team will eventually drown in its own Markdown logs, leading to massive token burn and hallucination.
|
|
30
|
+
- This skill enforces "Physical Isolation of Context" and "Cognitive Metabolism", but adapts its implementation dynamically based on the project's domain (Software, Research, Writing, etc.).
|
|
31
|
+
|
|
32
|
+
## [State Checkpoint]
|
|
33
|
+
- MUST verify the current working directory is the root of the target project.
|
|
34
|
+
- MUST verify we have read/write access to create directories and scripts.
|
|
35
|
+
|
|
36
|
+
## [Discovery Phase: Environment Audit]
|
|
37
|
+
1. Tech Stack & Domain Analysis: MUST analyze the project (e.g., read `package.json`, `pyproject.toml`, or general file extensions) to determine the primary language and domain.
|
|
38
|
+
2. Dynamic Role Deduction: MUST deduce the required sub-agent roles from a standard Archetype Pool (e.g., Frontend, Backend, Data, Writer).
|
|
39
|
+
- *Mandatory Roles:* PM (Coordinator) and Challenger (Alignment Enforcer) MUST always be included.
|
|
40
|
+
|
|
41
|
+
## [Execution Phase: Structural Scaffolding]
|
|
42
|
+
3. Isomorphic Zone Mapping: MUST implement the "6 Functional Zones", adapting the folder names/paths to the project's ecosystem if necessary (e.g., `docs/`, `.agents/`, `.cursor/`), while preserving their strict semantic purpose:
|
|
43
|
+
- `[State]`: High-frequency, volatile working state (Max 100 lines).
|
|
44
|
+
- `[Logs]`: Raw dialogue and verification outputs (Strictly excluded from default PM context).
|
|
45
|
+
- `[Decisions]`: Distilled Project Memory (ADRs, Read-on-demand via Index).
|
|
46
|
+
- `[Domain]`: Immutable product vision / core rules.
|
|
47
|
+
- `[Architecture]`: Immutable technical contracts / style guides.
|
|
48
|
+
- `[Roles]`: Individual sub-agent system prompts.
|
|
49
|
+
|
|
50
|
+
## [Execution Phase: Hybrid Memory Implementation]
|
|
51
|
+
4. Polyglot Indexer Generation: MUST generate an `index_memory` script in the project's primary language (e.g., Python, Node.js, Bash) or provide a pure CLI fallback.
|
|
52
|
+
- The script MUST parse YAML frontmatter/Markdown headers across the documentation zones.
|
|
53
|
+
- It MUST build a local SQLite database (`memory.db`) to serve as a relational index, enabling low-token historical queries.
|
|
54
|
+
|
|
55
|
+
## [Execution Phase: The Immutable Router]
|
|
56
|
+
5. Hardcoded Laws: MUST create or rewrite `AGENTS.md` at the project root. This file is the system's brain and must be strictly protected:
|
|
57
|
+
- It MUST include a directive forbidding sub-agents from modifying it.
|
|
58
|
+
- It MUST be a lightweight router (< 50 lines).
|
|
59
|
+
- It MUST define the "Bootstrap Protocol" (Read Payload -> Read State -> Delegate without reading full history).
|
|
60
|
+
- It MUST enforce "Cognitive Metabolism" (Strict line limits triggering Distillation cycles).
|
|
61
|
+
- It MUST enforce "Adaptive Alignment" (Path-based escalation matrix invoking the Challenger).
|
|
62
|
+
- It MUST explicitly state the "Non-blocking Release" rule: agents log subjective reviews asynchronously and never halt execution waiting for human input.
|
|
63
|
+
|
|
64
|
+
## [Verification Phase]
|
|
65
|
+
6. MUST run the generated `index_memory` script once to initialize the `memory.db` and verify it executes cleanly in the user's environment.
|
|
66
|
+
7. MUST summarize the deployed architecture and the dynamically deduced roles to the user.
|
|
67
|
+
|
|
68
|
+
[Exit: Await User Instruction]
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-agent-launcher
|
|
3
|
-
description: Sub-agent generator for orchestrating multi-domain specialized agents to avoid token waste.
|
|
4
|
-
author: Miya Daniel | Harness Core Team
|
|
5
|
-
version: 0.2.0
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Create Agent Launcher
|
|
9
|
-
|
|
10
|
-
## 📋 Skill Contract
|
|
11
|
-
|
|
12
|
-
| Component | Specification |
|
|
13
|
-
| :--- | :--- |
|
|
14
|
-
| **Trigger / Input** | Invoked by `fable-mode` for Tier 3 tasks needing domain-specific division of labor — task complexity exceeds a single context, or spans disjoint tech stacks. |
|
|
15
|
-
| **Expected Output** | One or more sub-agents launched with an explicit persona, a resource-isolated scope (only the file paths relevant to their task), and a model-tier assignment (Haiku / Sonnet / Opus by sub-task complexity). |
|
|
16
|
-
| **State Mutations** | None directly to files — mutates the active session's delegation state (which sub-agents are live, what each was briefed to touch). |
|
|
17
|
-
| **Enforcement Gate** | Every sub-agent MUST return a structured handoff report (files modified, new APIs/interfaces exposed, downstream concerns) before its output is trusted. Creating a sub-agent is **PROHIBITED** if the task fits in ≤2 files / ≤300 lines — resolve directly under `tdd` instead. |
|
|
18
|
-
|
|
19
|
-
This skill is automatically invoked by `fable-mode` when handling Tier 3 (Macro Tasks) that require domain-specific division of labor.
|
|
20
|
-
Its purpose is to avoid wasting Tokens and losing attention caused by a single General Agent handling everything, by creating highly specialized Sub-agents to solve complex problems.
|
|
21
|
-
|
|
22
|
-
## 1. Responsibilities and Use Cases
|
|
23
|
-
Launch this skill when the task complexity exceeds what a single context can handle, or when switching between entirely different tech stacks is necessary (e.g., the same feature requires modifying Postgres Schema, Node.js Backend, and React Frontend).
|
|
24
|
-
|
|
25
|
-
## 2. Standard Procedure for Creating Sub-agents
|
|
26
|
-
|
|
27
|
-
### Step 1: Persona Definition
|
|
28
|
-
Before calling a secondary model (or instantiating a new Agent), you MUST explicitly give it a specialized persona definition.
|
|
29
|
-
- **Bad Example**: "Help me fix these frontend and backend codes."
|
|
30
|
-
- **Good Example**: "You are now a Senior Database Architect. Your sole task is to optimize the indexing and write performance of the User Table for this requirement. You are PROHIBITED from modifying any frontend code."
|
|
31
|
-
|
|
32
|
-
### Step 2: Resource Isolation
|
|
33
|
-
- Limit the Sub-agent's field of view. Only provide it with the file paths and Context necessary to complete its task.
|
|
34
|
-
- Do not feed the entire project structure to an Agent that is only responsible for writing a single SQL Migration.
|
|
35
|
-
|
|
36
|
-
### Step 3: Model Selection Strategy
|
|
37
|
-
Based on the complexity of the sub-task, select the most cost-effective model (assuming the underlying Harness supports switching):
|
|
38
|
-
- **Exploration/Finding Files/Simple Edits**: Assign to a fast, low-cost small model (like Claude 3.5 Haiku).
|
|
39
|
-
- **Multi-file Implementation/General Logic**: Assign to a medium-sized main model (like Claude 3.5 Sonnet).
|
|
40
|
-
- **Extremely Complex Algorithms/Security Audits**: Assign to a deep reasoning model (like Claude 3 Opus).
|
|
41
|
-
|
|
42
|
-
### Step 4: Handoff Contract
|
|
43
|
-
- Tell the Sub-agent that once it completes its task, it MUST output a report in a specific format to the main Orchestrator (`fable-mode`).
|
|
44
|
-
- The report MUST include: which files were modified, what new APIs/interfaces were exposed, and what downstream Agents need to pay attention to.
|
|
45
|
-
|
|
46
|
-
## 3. Foolproofing Mechanism
|
|
47
|
-
- Avoid over-segmentation: If a cross-stack task can be resolved within 2 files and 300 lines of code, establishing a Sub-agent is **PROHIBITED**. Resolve it directly in the current Context using `tdd` mode.
|
|
48
|
-
- Sub-agents are also Agents, equally bound by the `install-cognitive-os` physical laws and the `zoom-out` circuit breaker.
|
|
1
|
+
---
|
|
2
|
+
name: create-agent-launcher
|
|
3
|
+
description: Sub-agent generator for orchestrating multi-domain specialized agents to avoid token waste.
|
|
4
|
+
author: Miya Daniel | Harness Core Team
|
|
5
|
+
version: 0.2.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Create Agent Launcher
|
|
9
|
+
|
|
10
|
+
## 📋 Skill Contract
|
|
11
|
+
|
|
12
|
+
| Component | Specification |
|
|
13
|
+
| :--- | :--- |
|
|
14
|
+
| **Trigger / Input** | Invoked by `fable-mode` for Tier 3 tasks needing domain-specific division of labor — task complexity exceeds a single context, or spans disjoint tech stacks. |
|
|
15
|
+
| **Expected Output** | One or more sub-agents launched with an explicit persona, a resource-isolated scope (only the file paths relevant to their task), and a model-tier assignment (Haiku / Sonnet / Opus by sub-task complexity). |
|
|
16
|
+
| **State Mutations** | None directly to files — mutates the active session's delegation state (which sub-agents are live, what each was briefed to touch). |
|
|
17
|
+
| **Enforcement Gate** | Every sub-agent MUST return a structured handoff report (files modified, new APIs/interfaces exposed, downstream concerns) before its output is trusted. Creating a sub-agent is **PROHIBITED** if the task fits in ≤2 files / ≤300 lines — resolve directly under `tdd` instead. |
|
|
18
|
+
|
|
19
|
+
This skill is automatically invoked by `fable-mode` when handling Tier 3 (Macro Tasks) that require domain-specific division of labor.
|
|
20
|
+
Its purpose is to avoid wasting Tokens and losing attention caused by a single General Agent handling everything, by creating highly specialized Sub-agents to solve complex problems.
|
|
21
|
+
|
|
22
|
+
## 1. Responsibilities and Use Cases
|
|
23
|
+
Launch this skill when the task complexity exceeds what a single context can handle, or when switching between entirely different tech stacks is necessary (e.g., the same feature requires modifying Postgres Schema, Node.js Backend, and React Frontend).
|
|
24
|
+
|
|
25
|
+
## 2. Standard Procedure for Creating Sub-agents
|
|
26
|
+
|
|
27
|
+
### Step 1: Persona Definition
|
|
28
|
+
Before calling a secondary model (or instantiating a new Agent), you MUST explicitly give it a specialized persona definition.
|
|
29
|
+
- **Bad Example**: "Help me fix these frontend and backend codes."
|
|
30
|
+
- **Good Example**: "You are now a Senior Database Architect. Your sole task is to optimize the indexing and write performance of the User Table for this requirement. You are PROHIBITED from modifying any frontend code."
|
|
31
|
+
|
|
32
|
+
### Step 2: Resource Isolation
|
|
33
|
+
- Limit the Sub-agent's field of view. Only provide it with the file paths and Context necessary to complete its task.
|
|
34
|
+
- Do not feed the entire project structure to an Agent that is only responsible for writing a single SQL Migration.
|
|
35
|
+
|
|
36
|
+
### Step 3: Model Selection Strategy
|
|
37
|
+
Based on the complexity of the sub-task, select the most cost-effective model (assuming the underlying Harness supports switching):
|
|
38
|
+
- **Exploration/Finding Files/Simple Edits**: Assign to a fast, low-cost small model (like Claude 3.5 Haiku).
|
|
39
|
+
- **Multi-file Implementation/General Logic**: Assign to a medium-sized main model (like Claude 3.5 Sonnet).
|
|
40
|
+
- **Extremely Complex Algorithms/Security Audits**: Assign to a deep reasoning model (like Claude 3 Opus).
|
|
41
|
+
|
|
42
|
+
### Step 4: Handoff Contract
|
|
43
|
+
- Tell the Sub-agent that once it completes its task, it MUST output a report in a specific format to the main Orchestrator (`fable-mode`).
|
|
44
|
+
- The report MUST include: which files were modified, what new APIs/interfaces were exposed, and what downstream Agents need to pay attention to.
|
|
45
|
+
|
|
46
|
+
## 3. Foolproofing Mechanism
|
|
47
|
+
- Avoid over-segmentation: If a cross-stack task can be resolved within 2 files and 300 lines of code, establishing a Sub-agent is **PROHIBITED**. Resolve it directly in the current Context using `tdd` mode.
|
|
48
|
+
- Sub-agents are also Agents, equally bound by the `install-cognitive-os` physical laws and the `zoom-out` circuit breaker.
|
package/docs/architecture.md
CHANGED
|
@@ -60,10 +60,10 @@ Harness is designed to align with the unique capabilities of various AI IDEs and
|
|
|
60
60
|
|
|
61
61
|
**Placement rule:** a platform's own native file/folder (`.claude/settings.json`, `.cursorrules`, `.cursor/skills/`, …) is never moved — it lives exactly where that platform expects it. Anything Harness itself needs that has no native home converges into one exclusively-owned subfolder per platform: `<platform-dir>/harness-everything/`. Nothing else ever creates a directory literally named `harness-everything`, which is what lets the installer add or remove it as a unit — including on uninstall — without touching anything else already in that platform's directory (another tool's files, or skills the user installed by hand).
|
|
62
62
|
|
|
63
|
-
**Runtime state vs. installed skill content:** `<platform-dir>/harness-everything/` holds
|
|
63
|
+
**Runtime state vs. installed skill content:** `<platform-dir>/harness-everything/` holds runtime state (pure runtime state: hook JSON, circuit-breaker counters, handoff/verification timestamps) kept apart in the `state/` subfolder. On the other hand, the actual installed skills go to each platform's native/expected skills directories (e.g., `.claude/skills/` for Claude, `.cursor/skills/` for Cursor, `.github/skills/` for Copilot, `.codex/skills/` for Codex, `.continue/skills/` for Continue, and `~/.agents/skills/` or `~/.claude/skills/` for Global scope) where they are dynamically discovered and processed. A `manifest.json` under `<platform-dir>/harness-everything/` (or global home) records exactly what the installer put where, per platform, so uninstall can match against the manifest files and perform precise cleanup without guessing. Both runtime state and skills directories are gitignored.
|
|
64
64
|
|
|
65
65
|
### 1. Claude Code (hook-enforced)
|
|
66
|
-
Our installer configures native lifecycle hooks inside `.claude/settings.json
|
|
66
|
+
Our installer configures native lifecycle hooks inside `.claude/settings.json`, and places project-level skills inside the native `.claude/skills/` directory where Claude Code natively auto-discovers and registers them.
|
|
67
67
|
* `SessionStart`: Runs `bootstrap.js` to restore previous handoffs, check environment variables, and initialize session state.
|
|
68
68
|
* `PreToolUse`: Triggers `rule-of-3.js`, `boundary-guard.js`, `depth-guard.js`, `context-compact.js`, and `subagent-scope-guard.js` to intercept tool invocations before they run, and can actually block one (`exit(2)`) — e.g. the Rule of 3 circuit breaker.
|
|
69
69
|
* `PostToolUse`: Records tool outcomes, updates the persistent transaction log (WAL) via `state-persist.js`, tracks repeat failures, and can only add advisory context back (the tool already ran; nothing here blocks it).
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# Workflow: Build Multi-Agent System
|
|
2
|
-
|
|
3
|
-
> Deploys an industrial-grade, self-adapting Multi-Agent Workspace architecture, scaffolding physical boundaries and relational SQLite context indexes.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Skill Behavior Workflow
|
|
8
|
-
|
|
9
|
-
This section visualizes how the `build-multi-agent-system` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
-
|
|
11
|
-
```mermaid
|
|
12
|
-
graph TD
|
|
13
|
-
Start([Workspace Scaffolding Requested]) --> DiscoverStack["Analyze project package.json/runtimes"]
|
|
14
|
-
DiscoverStack --> DeduceRoles["Deduce required specialist roles & PM / Challenger"]
|
|
15
|
-
DeduceRoles --> ScaffoldZones["Scaffold '6 Functional Zones' directories: State, Decisions, Logs, etc."]
|
|
16
|
-
ScaffoldZones --> GenMemoryIndexer["Generate language-appropriate index_memory script"]
|
|
17
|
-
GenMemoryIndexer --> GenAgentsRouter["Generate AGENTS.md routing brain"]
|
|
18
|
-
GenAgentsRouter --> RunIndexer["Execute memory indexer to initialize local memory.db SQLite index"]
|
|
19
|
-
RunIndexer --> VerifyExecution["Verify schema, tables, and execution status"]
|
|
20
|
-
VerifyExecution --> End([Scaffolding and hybrid relational memory initialized])
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 2. Triggering and Routing Path
|
|
26
|
-
|
|
27
|
-
This diagram illustrates how the `build-multi-agent-system` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
28
|
-
|
|
29
|
-
```mermaid
|
|
30
|
-
graph LR
|
|
31
|
-
Router["harness-everything / tier-router.js"] -->|Keyword: agent / workspace / multi-agent| BMAS["build-multi-agent-system / SKILL.md"]
|
|
32
|
-
BMAS -->|Works hand-in-hand with spawning tool| CAL["create-agent-launcher / SKILL.md"]
|
|
33
|
-
BMAS -->|Stores architectural contracts in| GWD["grill-with-docs / SKILL.md"]
|
|
34
|
-
BMAS -->|Initializes memory rules via| Evolve["self-evolve / SKILL.md"]
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## 3. Real-World Use Case Flowchart
|
|
40
|
-
|
|
41
|
-
Here we model concrete real-world scenarios and use cases of the `build-multi-agent-system` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
42
|
-
|
|
43
|
-
```mermaid
|
|
44
|
-
graph TD
|
|
45
|
-
Start["User asks to set up an AI developer workspace for a Python backend"] --> Trigger["Invoke build-multi-agent-system"]
|
|
46
|
-
Trigger --> DetectStack["Identifies Python/Django stack"]
|
|
47
|
-
DetectStack --> BuildDirs["Creates .agents/, docs/decisions/, docs/architecture/, state/ folders"]
|
|
48
|
-
BuildDirs --> WriteIndexer["Creates python indexer script parsing markdown frontmatter"]
|
|
49
|
-
WriteIndexer --> CreateDB["Runs indexer, generating SQLite memory.db schema"]
|
|
50
|
-
CreateDB --> WriteAgentsRouter["Generates AGENTS.md with routing matrix"]
|
|
51
|
-
WriteAgentsRouter --> Done([Professional Multi-Agent Workspace deployed and indexed])
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 4. Verification Check
|
|
57
|
-
|
|
58
|
-
To ensure that the `build-multi-agent-system` skill is operating in strict compliance with Harness OS design laws, verify the following:
|
|
59
|
-
|
|
60
|
-
- [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
|
|
61
|
-
- [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
|
|
62
|
-
- [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
|
|
1
|
+
# Workflow: Build Multi-Agent System
|
|
2
|
+
|
|
3
|
+
> Deploys an industrial-grade, self-adapting Multi-Agent Workspace architecture, scaffolding physical boundaries and relational SQLite context indexes.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Skill Behavior Workflow
|
|
8
|
+
|
|
9
|
+
This section visualizes how the `build-multi-agent-system` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
graph TD
|
|
13
|
+
Start([Workspace Scaffolding Requested]) --> DiscoverStack["Analyze project package.json/runtimes"]
|
|
14
|
+
DiscoverStack --> DeduceRoles["Deduce required specialist roles & PM / Challenger"]
|
|
15
|
+
DeduceRoles --> ScaffoldZones["Scaffold '6 Functional Zones' directories: State, Decisions, Logs, etc."]
|
|
16
|
+
ScaffoldZones --> GenMemoryIndexer["Generate language-appropriate index_memory script"]
|
|
17
|
+
GenMemoryIndexer --> GenAgentsRouter["Generate AGENTS.md routing brain"]
|
|
18
|
+
GenAgentsRouter --> RunIndexer["Execute memory indexer to initialize local memory.db SQLite index"]
|
|
19
|
+
RunIndexer --> VerifyExecution["Verify schema, tables, and execution status"]
|
|
20
|
+
VerifyExecution --> End([Scaffolding and hybrid relational memory initialized])
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Triggering and Routing Path
|
|
26
|
+
|
|
27
|
+
This diagram illustrates how the `build-multi-agent-system` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
graph LR
|
|
31
|
+
Router["harness-everything / tier-router.js"] -->|Keyword: agent / workspace / multi-agent| BMAS["build-multi-agent-system / SKILL.md"]
|
|
32
|
+
BMAS -->|Works hand-in-hand with spawning tool| CAL["create-agent-launcher / SKILL.md"]
|
|
33
|
+
BMAS -->|Stores architectural contracts in| GWD["grill-with-docs / SKILL.md"]
|
|
34
|
+
BMAS -->|Initializes memory rules via| Evolve["self-evolve / SKILL.md"]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 3. Real-World Use Case Flowchart
|
|
40
|
+
|
|
41
|
+
Here we model concrete real-world scenarios and use cases of the `build-multi-agent-system` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
42
|
+
|
|
43
|
+
```mermaid
|
|
44
|
+
graph TD
|
|
45
|
+
Start["User asks to set up an AI developer workspace for a Python backend"] --> Trigger["Invoke build-multi-agent-system"]
|
|
46
|
+
Trigger --> DetectStack["Identifies Python/Django stack"]
|
|
47
|
+
DetectStack --> BuildDirs["Creates .agents/, docs/decisions/, docs/architecture/, state/ folders"]
|
|
48
|
+
BuildDirs --> WriteIndexer["Creates python indexer script parsing markdown frontmatter"]
|
|
49
|
+
WriteIndexer --> CreateDB["Runs indexer, generating SQLite memory.db schema"]
|
|
50
|
+
CreateDB --> WriteAgentsRouter["Generates AGENTS.md with routing matrix"]
|
|
51
|
+
WriteAgentsRouter --> Done([Professional Multi-Agent Workspace deployed and indexed])
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 4. Verification Check
|
|
57
|
+
|
|
58
|
+
To ensure that the `build-multi-agent-system` skill is operating in strict compliance with Harness OS design laws, verify the following:
|
|
59
|
+
|
|
60
|
+
- [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
|
|
61
|
+
- [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
|
|
62
|
+
- [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# Workflow: Create Agent Launcher
|
|
2
|
-
|
|
3
|
-
> Sub-agent generator for orchestrating multi-domain specialized agents to avoid token context waste and preserve developer focus.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Skill Behavior Workflow
|
|
8
|
-
|
|
9
|
-
This section visualizes how the `create-agent-launcher` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
-
|
|
11
|
-
```mermaid
|
|
12
|
-
graph TD
|
|
13
|
-
Start([Complex Task Demands Division of Labor]) --> AssessComplexity{Too complex for 1 context?}
|
|
14
|
-
AssessComplexity -->|No| Reject["Reject creation, resolve in current context via TDD"]
|
|
15
|
-
AssessComplexity -->|Yes| DefinePersona["Define highly restrictive specialized sub-agent persona"]
|
|
16
|
-
DefinePersona --> IsolateResources["Map exact, minimum file paths needed for sub-task"]
|
|
17
|
-
IsolateResources --> SelectModel["Select cost-effective model based on task weight"]
|
|
18
|
-
SelectModel --> WriteHandoff["Define strict input/output contract for sub-agent return report"]
|
|
19
|
-
WriteHandoff --> LaunchAgent["Launch specialized sub-agent under isolated sandbox"]
|
|
20
|
-
LaunchAgent --> MergeReport["Validate and merge sub-agent findings into main orchestrator"]
|
|
21
|
-
MergeReport --> End([Sub-agent work verified and closed])
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. Triggering and Routing Path
|
|
27
|
-
|
|
28
|
-
This diagram illustrates how the `create-agent-launcher` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
29
|
-
|
|
30
|
-
```mermaid
|
|
31
|
-
graph LR
|
|
32
|
-
Router["harness-everything / tier-router.js"] -->|Requires agent specialization| CAL["create-agent-launcher / SKILL.md"]
|
|
33
|
-
CAL -->|Spawns agent on scaffolding provided by| BMAS["build-multi-agent-system / SKILL.md"]
|
|
34
|
-
CAL -->|Plans agent tasks using macro planner| Fable["fable-mode / SKILL.md"]
|
|
35
|
-
CAL -->|Limits child memory to prevent bloat via| FD["fable-discipline / SKILL.md"]
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 3. Real-World Use Case Flowchart
|
|
41
|
-
|
|
42
|
-
Here we model concrete real-world scenarios and use cases of the `create-agent-launcher` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
43
|
-
|
|
44
|
-
```mermaid
|
|
45
|
-
graph TD
|
|
46
|
-
Start["Refactoring task involves SQL Schema migrations, Node endpoints, and React forms"] --> Trigger["create-agent-launcher skill executed"]
|
|
47
|
-
Trigger --> SpawnDB["Spawn 'Database Architect': Only views 'schema.sql' and outputs raw SQL migration"]
|
|
48
|
-
Trigger --> SpawnFE["Spawn 'Frontend Specialist': Only views 'Login.tsx' and outputs validated form code"]
|
|
49
|
-
SpawnDB & SpawnFE --> Collect["Main orchestrator receives isolated, highly focused diff reports from both"]
|
|
50
|
-
Collect --> Merge["Integrate changes and run integration testing"]
|
|
51
|
-
Merge --> Done([Complex task completed with 70% lower token cost and zero context confusion])
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 4. Verification Check
|
|
57
|
-
|
|
58
|
-
To ensure that the `create-agent-launcher` skill is operating in strict compliance with Harness OS design laws, verify the following:
|
|
59
|
-
|
|
60
|
-
- [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
|
|
61
|
-
- [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
|
|
62
|
-
- [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
|
|
1
|
+
# Workflow: Create Agent Launcher
|
|
2
|
+
|
|
3
|
+
> Sub-agent generator for orchestrating multi-domain specialized agents to avoid token context waste and preserve developer focus.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Skill Behavior Workflow
|
|
8
|
+
|
|
9
|
+
This section visualizes how the `create-agent-launcher` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
graph TD
|
|
13
|
+
Start([Complex Task Demands Division of Labor]) --> AssessComplexity{Too complex for 1 context?}
|
|
14
|
+
AssessComplexity -->|No| Reject["Reject creation, resolve in current context via TDD"]
|
|
15
|
+
AssessComplexity -->|Yes| DefinePersona["Define highly restrictive specialized sub-agent persona"]
|
|
16
|
+
DefinePersona --> IsolateResources["Map exact, minimum file paths needed for sub-task"]
|
|
17
|
+
IsolateResources --> SelectModel["Select cost-effective model based on task weight"]
|
|
18
|
+
SelectModel --> WriteHandoff["Define strict input/output contract for sub-agent return report"]
|
|
19
|
+
WriteHandoff --> LaunchAgent["Launch specialized sub-agent under isolated sandbox"]
|
|
20
|
+
LaunchAgent --> MergeReport["Validate and merge sub-agent findings into main orchestrator"]
|
|
21
|
+
MergeReport --> End([Sub-agent work verified and closed])
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Triggering and Routing Path
|
|
27
|
+
|
|
28
|
+
This diagram illustrates how the `create-agent-launcher` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
graph LR
|
|
32
|
+
Router["harness-everything / tier-router.js"] -->|Requires agent specialization| CAL["create-agent-launcher / SKILL.md"]
|
|
33
|
+
CAL -->|Spawns agent on scaffolding provided by| BMAS["build-multi-agent-system / SKILL.md"]
|
|
34
|
+
CAL -->|Plans agent tasks using macro planner| Fable["fable-mode / SKILL.md"]
|
|
35
|
+
CAL -->|Limits child memory to prevent bloat via| FD["fable-discipline / SKILL.md"]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. Real-World Use Case Flowchart
|
|
41
|
+
|
|
42
|
+
Here we model concrete real-world scenarios and use cases of the `create-agent-launcher` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
graph TD
|
|
46
|
+
Start["Refactoring task involves SQL Schema migrations, Node endpoints, and React forms"] --> Trigger["create-agent-launcher skill executed"]
|
|
47
|
+
Trigger --> SpawnDB["Spawn 'Database Architect': Only views 'schema.sql' and outputs raw SQL migration"]
|
|
48
|
+
Trigger --> SpawnFE["Spawn 'Frontend Specialist': Only views 'Login.tsx' and outputs validated form code"]
|
|
49
|
+
SpawnDB & SpawnFE --> Collect["Main orchestrator receives isolated, highly focused diff reports from both"]
|
|
50
|
+
Collect --> Merge["Integrate changes and run integration testing"]
|
|
51
|
+
Merge --> Done([Complex task completed with 70% lower token cost and zero context confusion])
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 4. Verification Check
|
|
57
|
+
|
|
58
|
+
To ensure that the `create-agent-launcher` skill is operating in strict compliance with Harness OS design laws, verify the following:
|
|
59
|
+
|
|
60
|
+
- [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
|
|
61
|
+
- [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
|
|
62
|
+
- [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
|