harness-everything 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build-multi-agent-system/SKILL.md +68 -68
  3. package/create-agent-launcher/SKILL.md +48 -48
  4. package/docs/workflows/build-multi-agent-system.md +62 -62
  5. package/docs/workflows/create-agent-launcher.md +62 -62
  6. package/docs/workflows/environment-detection.md +63 -63
  7. package/docs/workflows/eval-harness.md +57 -57
  8. package/docs/workflows/fable-discipline.md +59 -59
  9. package/docs/workflows/fable-mode.md +32 -32
  10. package/docs/workflows/git-commit.md +62 -62
  11. package/docs/workflows/grill-me.md +62 -62
  12. package/docs/workflows/grill-with-docs.md +62 -62
  13. package/docs/workflows/improve-codebase-architecture.md +60 -60
  14. package/docs/workflows/repo-docs.md +59 -59
  15. package/docs/workflows/rewrite-commits.md +60 -60
  16. package/docs/workflows/security-review.md +58 -58
  17. package/docs/workflows/self-evolve.md +59 -59
  18. package/docs/workflows/tdd.md +39 -39
  19. package/docs/workflows/todo-driven-workflow.md +36 -36
  20. package/docs/workflows/using-git-worktrees.md +63 -63
  21. package/docs/workflows/verification-loop.md +69 -69
  22. package/docs/workflows/verify-before-claim.md +60 -60
  23. package/docs/workflows/zoom-out.md +62 -62
  24. package/environment-detection/SKILL.md +77 -77
  25. package/eval-framework/behavioral-test.js +105 -105
  26. package/eval-framework/mechanism-test.js +251 -251
  27. package/eval-harness/SKILL.md +59 -59
  28. package/fable-discipline/SKILL.md +38 -38
  29. package/fable-mode/SKILL.md +51 -51
  30. package/git-commit/SKILL.md +55 -55
  31. package/grill-me/SKILL.md +36 -36
  32. package/grill-with-docs/SKILL.md +99 -99
  33. package/harness-everything/SKILL.md +141 -141
  34. package/harness-everything/examples/README.md +9 -9
  35. package/harness-everything/examples/todo-workflow.md +22 -22
  36. package/harness-everything/scripts/todo-cli.js +157 -157
  37. package/harness-everything/scripts/verify-gate.js +31 -31
  38. package/hooks/scripts/atomic-commit-check.js +68 -68
  39. package/hooks/scripts/context-compact.js +114 -114
  40. package/hooks/scripts/lib/harness-state.js +29 -3
  41. package/hooks/scripts/lib/platforms/claude.js +42 -42
  42. package/hooks/scripts/lib/platforms/codex.js +46 -46
  43. package/hooks/scripts/lib/platforms/continue.js +41 -41
  44. package/hooks/scripts/lib/platforms/copilot.js +41 -41
  45. package/hooks/scripts/lib/platforms/cursor.js +41 -41
  46. package/hooks/scripts/rule-of-3.js +176 -176
  47. package/improve-codebase-architecture/SKILL.md +44 -44
  48. package/install-cognitive-os/SKILL.md +95 -95
  49. package/package.json +1 -1
  50. package/repo-docs/SKILL.md +45 -45
  51. package/rewrite-commits/SKILL.md +32 -32
  52. package/scripts/installer.js +649 -649
  53. package/scripts/lib/advisory-text.js +163 -163
  54. package/scripts/lib/claude-hooks.js +71 -71
  55. package/scripts/lib/gitignore.js +80 -58
  56. package/scripts/lib/manifest.js +82 -82
  57. package/scripts/lib/prompts.js +241 -241
  58. package/scripts/lib/skills.js +172 -172
  59. package/scripts/lib/workspace.js +28 -28
  60. package/security-review/SKILL.md +510 -510
  61. package/self-evolve/SKILL.md +54 -54
  62. package/skill-creator/SKILL.md +91 -91
  63. package/skill-creator/references/testing-workflow.md +32 -32
  64. package/skill-style/SKILL.md +48 -48
  65. package/tdd/SKILL.md +53 -53
  66. package/todo-driven-workflow/SKILL.md +54 -54
  67. package/using-git-worktrees/SKILL.md +161 -161
  68. package/verification-loop/SKILL.md +138 -138
  69. package/verify-before-claim/SKILL.md +86 -86
  70. package/zoom-out/SKILL.md +90 -90
@@ -1,141 +1,141 @@
1
- ---
2
- name: harness-everything
3
- description: The single entry point and dynamic router for the Harness ecosystem. Triage tasks into Tier 1, 2, or 3.
4
- author: Miya Daniel | Harness Core Team
5
- version: 0.2.0
6
- ---
7
-
8
- # Harness Everything (System Main Entry & Dynamic Router)
9
-
10
- ## 📋 Skill Contract
11
-
12
- | Component | Specification |
13
- | :--- | :--- |
14
- | **Trigger / Input** | Every new user request where no specific skill is already indicated — the mandatory first load, run via `scripts/tier-router.js "<prompt>"`. |
15
- | **Expected Output** | A Tier determination (1/2/3) and a mandatory "🚦 Harness OS Routing Checkpoint" block at the very start of the response, listing the tier, rationale, and routed skills/guides. |
16
- | **State Mutations** | None directly — orchestrates which other skills/guides get loaded and, for Tier 2/3, triggers `todo-driven-workflow` checklist initialization. |
17
- | **Enforcement Gate** | **MUST** run `scripts/tier-router.js` (or reuse the `UserPromptSubmit` hook's output for the same turn) before deciding the tier — the routing checkpoint output is mandatory, not optional. Rule of 3: 3 consecutive failed fix attempts on the same signature **MUST** stop further edits and force `zoom-out`. |
18
-
19
- This is the single entry point for the entire Harness Skills ecosystem. When you receive a new request from the user and no specific Skill is indicated, you **MUST** prioritize loading this Skill to perform Task Triage.
20
-
21
- ## 1. Core Rule: Global Underlying OS & Base Execution Loop
22
- Before taking any action, you must awaken and load the principles of `install-cognitive-os`.
23
- No matter how simple the task is, your behavior must comply with the **Discover > Think > Try > Summarize > Record** cognitive loop.
24
- Never rush to act before understanding the environment; establish contextual awareness first.
25
-
26
- **Base Execution Loop (`todo-driven-workflow`)**: The cognitive loop above defines *how you think*; `todo-driven-workflow` defines *how you execute*. For every **Tier 2 and Tier 3** task, you MUST load `todo-driven-workflow` and initialize its checklist BEFORE editing any file — it is the foundational step-by-step execution layer of this harness (break down into 3-7 verifiable sub-tasks, one `in-progress` at a time, verify with real evidence before marking `completed`). Tier 1 tasks are exempt to avoid checklist bloat.
27
-
28
- **Always-On Disciplines** (apply on every tier, alongside the loops above):
29
- - `fable-mode/execution-guardrails` — verify-before-flag, warning batching, find-and-replace safety. These are behavioral contracts, not Tier-3-only rules.
30
- - `verify-before-claim` — never assert external framework/API behavior or unmeasured performance numbers from training memory; verify against an authoritative source first.
31
- - `install-cognitive-os`'s Global Output Normalization — lead with direct answers, suppress preambles/recaps/pleasantries, and enforce natural locale terminology (§6).
32
-
33
- **Self-Healing Toolchain (工欲善其事,必先利其器)**: The harness may have been installed from a different editor than the one currently running (e.g., installed via Claude Code, now opened in Copilot). During the `[Discover]` phase, audit the workspace's integration touchpoints and repair any that are missing — the script is idempotent and delegates to the installer, so re-running is always safe:
34
- ```bash
35
- node "<this-skill-dir>/scripts/self-heal.js" # audit + auto-repair missing touchpoints
36
- node "<this-skill-dir>/scripts/self-heal.js" --check # audit only, never writes
37
- ```
38
- Also run this immediately whenever the `bootstrap.js` SessionStart output shows a `[Self-Heal] Missing integration touchpoints` warning. Exception: if the user says they intentionally removed one of these files, respect that and do not re-create it.
39
-
40
- ## 2. Task Triage
41
- To avoid "over-engineering" and maximize efficiency, you must categorize the user's task during the `[Think]` phase and take the corresponding action path.
42
- - **MANDATORY**: Run the Tier Router script before deciding the tier. The script lives at `scripts/tier-router.js` **inside this skill's own directory** — resolve the path from wherever this SKILL.md was loaded (do not guess a hard-coded location):
43
- ```bash
44
- node "<this-skill-dir>/scripts/tier-router.js" "<Brief summary of the user's prompt>"
45
- ```
46
- - You MUST follow the `REQUIRED TIER` output by the script.
47
- - If a `UserPromptSubmit` hook already ran the router this turn (its `[Tier Routing Pre-check]` output is visible in context), reuse that output instead of running it again.
48
-
49
- ### Mandated Routing Checkpoint Output
50
- At the very beginning of your response to the user, you **MUST** output a clear, stylized routing report. This report is mandatory for all entries via `harness-everything`. It must list the determined Tier and the exact routing targets:
51
- ```markdown
52
- ## 🚦 Harness OS Routing Checkpoint
53
- - **Active Tier**: Tier X (Tier Name)
54
- - **Rationale**: Short 1-sentence reason from the tier router.
55
- - **Routed Skills, Guides & Actions**:
56
- - `path/to/skill/or/guide.md` (Brief description of why this applies)
57
- - ...
58
- ```
59
-
60
- ### Proactive Copilot & VS Code Instruction (Avoid Silent Degrades)
61
- If you are running in VS Code or GitHub Copilot, you do not have automated hooks to run scripts on your behalf.
62
- - You **MUST** proactively run the tier-router script (`node harness-everything/scripts/tier-router.js "<prompt>"`) or simulate its routing logic manually at the start.
63
- - **NEVER degrade newly added features or structural extensions to Tier 1.** Copilot is highly prone to treating new feature requests as trivial Tier 1 direct edits. If the request adds *any* new logic, a new API endpoint, or a new file/module, it **MUST** be triaged as **Tier 2 (Standard Task)** or **Tier 3 (Macro Task)**. This activates:
64
- 1. The `todo-driven-workflow` checklist (mandatory step-by-step progress tracking).
65
- 2. Multi-agent spawning / sub-agents via `create-agent-launcher` or macro plan orchestration via `fable-mode`.
66
- 3. The memory summarization & evolution sequence via `self-evolve` upon completion, ensuring new knowledge is registered in workspace memory.
67
-
68
- ### Tier 1: Trivial Tasks & Daily Chores
69
- - **Characteristics**: Fixing typos, simple modifications to a single function, asking/explaining code, syntax adjustments. Or simple `git-commit` and `rewrite-commits`.
70
- - **Action Strategy (Direct Execution)**:
71
- - **PROHIBITED** from writing large plans.
72
- - **PROHIBITED** from calling `create-agent-launcher` or `fable-mode`.
73
- - Execute the modification directly based on requirements, or load `git-commit` / `rewrite-commits`. Perform a simple `[Record]` after modifying.
74
-
75
- ### Tier 2: Standard Tasks & Architectural Review
76
- - **Characteristics**: Adding a single API endpoint, fixing a specific bug, modifications requiring coordination across 2-3 files. Or requiring stress testing and benchmark evaluation for specific designs.
77
- - **Action Strategy (TDD, Deep Context & Domain Expertise)**:
78
- - **Initialize the Base Execution Loop**: Load `todo-driven-workflow` and lay out the checklist first (the TDD Red/Green/Refactor phases map naturally onto todo items).
79
- - **Information Depth Requirement**: Before entering TDD, you MUST perform a deep context trace (find references, call sites, and related interfaces). Superficial fixes that break dependencies are strictly forbidden.
80
- - **Load Domain Experts (領域專家召喚)**: Based on the tech stack detected in Tier 1, explicitly search for and load the corresponding **Domain Skills** (e.g., `security-review` from this repo, or `frontend-patterns` / `api-design` from the user's legacy skill library) to inject robust expert knowledge into your context.
81
- - Development tasks: Automatically load and follow the `tdd` (Test-Driven Development) skill. Write tests first (Red) -> Implement (Green) -> Refactor.
82
- - Before starting feature work on a busy repository, consider loading `using-git-worktrees` to isolate your workspace and prevent workspace pollution.
83
- - If the user requests grilling or refactoring a plan, load `grill-me` (pure Q&A) or `improve-codebase-architecture` (deep architectural analysis).
84
- - If the user requests "scoring" or "benchmark comparison", load `eval-harness` for quantitative scoring and summarization.
85
- - **Pre-Delivery Gate**: Before declaring the task done or creating a PR, load `verification-loop` (build / types / lint / tests / security scan / diff review). For changes touching auth, input handling, secrets, or network boundaries, additionally load `security-review`.
86
-
87
- ### Tier 3: Macro Tasks & Documentation
88
- - **Characteristics**: New project initialization, low-level architecture refactoring, vague and massive requirements (e.g., "Help me write a user login system"). Or lack of global documentation.
89
- - **Action Strategy (Multi-Agent Orchestration & Domain Infusion)**:
90
- - If initializing a multi-agent system workspace, load `build-multi-agent-system` to scaffold the 6 functional zones, memory relational indexes, and immutable routing laws.
91
- - If project-level documentation needs to be created, load `repo-docs`.
92
- - If establishing a large system design, strongly recommend loading `grill-with-docs` first to document decisions (ADR, CONTEXT) before proceeding.
93
- - **Sub-Agent Specialization**: When calling `create-agent-launcher`, you MUST inject robust Domain Skills into the sub-agent's persona (e.g., passing `database-reviewer` and `backend-patterns` to a Backend Sub-Agent). Do not create generic, empty-shell agents.
94
- - Development execution: Automatically load `fable-mode` and `fable-discipline`. The macro plan produced in fable-mode's Discovery phase MUST be materialized as the `todo-driven-workflow` checklist — sub-agent handoffs and milestone checks are tracked there, not in prose.
95
- - **Pre-Delivery Gate**: Same as Tier 2 — run `verification-loop` (and `security-review` where applicable) before the final handoff.
96
-
97
- ## 3. Foolproofing & Circuit Breaker Mechanism
98
- LLMs have a Reasoning Ceiling. To avoid invalid infinite retries, you must strictly obey the following limits:
99
- - **Rule of 3**: If attempting to fix the same Bug or test failure fails 3 times consecutively, **STOP modifying code immediately**.
100
- - **Trigger Circuit Breaker**: Forcefully call the `zoom-out` skill — rebuild the full picture, fact-check the assumption behind each failed attempt with read-only tools, and write the reflection report. Most trips should end in **self-recovery on a fresh diagnosis**, not a cry for help.
101
- - **Seek Human Help — only for genuine decisions**: Escalate when zoom-out concludes the blocker is a human call (requirement conflict, architecture trade-off, destructive action, missing access), or when the breaker hard-locks on a second trip of the same signature. Present verified facts and 2-3 options with a recommendation — never a bare "I'm stuck".
102
-
103
- ## 4. Evolution Loop
104
- - When the circuit breaker is triggered and the problem is ultimately solved — whether by post-reflection self-recovery or with human intervention.
105
- - Or, when you have expended great effort to overcome difficulties and complete a complex task.
106
- - You **MUST** automatically call the `self-evolve` skill to write "human key insights" or "successfully avoided traps" into system memory, ensuring the same blind spots are bypassed next time.
107
-
108
- ## 6. Always-On ADHD-Friendly Output Shaping
109
- This is the same always-on discipline `install-cognitive-os` defines under its own §"Global Output Normalization" — this router doesn't restate it (that duplication was flagged in a skill quality audit §1.1 and has been removed). Since §1 already sends every task through `install-cognitive-os` before any action, its output-shaping rules are already in effect by the time this router does anything — apply them as written there, on every response, regardless of tier.
110
-
111
- ## 5. Skill Registry (Full Activation Map)
112
- Every skill in this repository is reachable from this router. If a task matches a trigger below and the skill is not yet loaded, load it.
113
-
114
- | Skill | Layer | Activated when |
115
- | :--- | :--- | :--- |
116
- | `install-cognitive-os` | Foundation | Always, before any action (§1). |
117
- | `todo-driven-workflow` | Foundation | Every Tier 2/3 task — the base execution loop (§1). |
118
- | `environment-detection` | Foundation | Session start / `[Discover]` phase, before running shell commands. |
119
- | `fable-mode/execution-guardrails` | Always-on discipline | Every tier: flagging problems, batching warnings, find-and-replace edits (§1). |
120
- | `verify-before-claim` | Always-on discipline | Before asserting external-system behavior or unmeasured numbers (§1). |
121
- | `git-commit` / `rewrite-commits` | Tier 1 | Commit creation / history rewriting. |
122
- | `tdd` | Tier 2 | Feature/bugfix development (Red-Green-Refactor). |
123
- | `using-git-worktrees` | Tier 2 | Isolating feature work on a busy repository. |
124
- | `grill-me` | Tier 2 | User asks to be grilled on a plan (pure Q&A). |
125
- | `improve-codebase-architecture` | Tier 2 | Deep architectural analysis / refactor planning. |
126
- | `eval-harness` | Tier 2 | Scoring, stress testing, benchmark comparison. |
127
- | `verification-loop` | Tier 2/3 gate | Before declaring done or creating a PR. |
128
- | `security-review` | Tier 2/3 gate | Changes touching auth, input handling, secrets, network boundaries. |
129
- | `fable-mode` | Tier 3 | Macro task planning & execution engine. |
130
- | `fable-discipline` | Tier 3 | Risk control paired with fable-mode. |
131
- | `fable-mode/fable-haiku` | Tier 3 (opt-in) | User explicitly asks for staged execution run cheaply on Haiku. |
132
- | `create-agent-launcher` | Tier 3 | Spawning specialized sub-agents. |
133
- | `build-multi-agent-system` | Tier 3 | Scaffolding a multi-agent workspace. |
134
- | `repo-docs` | Tier 3 | Creating project-level documentation. |
135
- | `grill-with-docs` | Tier 3 | Documenting decisions (ADR / CONTEXT) before large designs. |
136
- | `zoom-out` | Circuit breaker | Rule of 3 trips (§3). |
137
- | `self-evolve` | Evolution | Post-breaker resolution or major breakthrough (§4). |
138
- | `skill-style` | Meta | Authoring or modifying any SKILL.md in this repository — the terse Skill Contract format spec. |
139
- | `skill-creator` | Meta | Creating a new skill from scratch, auditing/refactoring an existing SKILL.md, or `self-evolve`'s dynamic skill generation step (§4) — the fuller authoring, quality-checklist, and testing workflow built on `skill-style`. |
140
-
141
- (`eval-framework/` is internal CI for the router itself — run `node eval-framework/runner.js` after modifying `tier-router.js`; it is not a routable skill. Likewise `scripts/self-heal.js` in this skill is infrastructure, invoked during `[Discover]` per §1.)
1
+ ---
2
+ name: harness-everything
3
+ description: The single entry point and dynamic router for the Harness ecosystem. Triage tasks into Tier 1, 2, or 3.
4
+ author: Miya Daniel | Harness Core Team
5
+ version: 0.2.0
6
+ ---
7
+
8
+ # Harness Everything (System Main Entry & Dynamic Router)
9
+
10
+ ## 📋 Skill Contract
11
+
12
+ | Component | Specification |
13
+ | :--- | :--- |
14
+ | **Trigger / Input** | Every new user request where no specific skill is already indicated — the mandatory first load, run via `scripts/tier-router.js "<prompt>"`. |
15
+ | **Expected Output** | A Tier determination (1/2/3) and a mandatory "🚦 Harness OS Routing Checkpoint" block at the very start of the response, listing the tier, rationale, and routed skills/guides. |
16
+ | **State Mutations** | None directly — orchestrates which other skills/guides get loaded and, for Tier 2/3, triggers `todo-driven-workflow` checklist initialization. |
17
+ | **Enforcement Gate** | **MUST** run `scripts/tier-router.js` (or reuse the `UserPromptSubmit` hook's output for the same turn) before deciding the tier — the routing checkpoint output is mandatory, not optional. Rule of 3: 3 consecutive failed fix attempts on the same signature **MUST** stop further edits and force `zoom-out`. |
18
+
19
+ This is the single entry point for the entire Harness Skills ecosystem. When you receive a new request from the user and no specific Skill is indicated, you **MUST** prioritize loading this Skill to perform Task Triage.
20
+
21
+ ## 1. Core Rule: Global Underlying OS & Base Execution Loop
22
+ Before taking any action, you must awaken and load the principles of `install-cognitive-os`.
23
+ No matter how simple the task is, your behavior must comply with the **Discover > Think > Try > Summarize > Record** cognitive loop.
24
+ Never rush to act before understanding the environment; establish contextual awareness first.
25
+
26
+ **Base Execution Loop (`todo-driven-workflow`)**: The cognitive loop above defines *how you think*; `todo-driven-workflow` defines *how you execute*. For every **Tier 2 and Tier 3** task, you MUST load `todo-driven-workflow` and initialize its checklist BEFORE editing any file — it is the foundational step-by-step execution layer of this harness (break down into 3-7 verifiable sub-tasks, one `in-progress` at a time, verify with real evidence before marking `completed`). Tier 1 tasks are exempt to avoid checklist bloat.
27
+
28
+ **Always-On Disciplines** (apply on every tier, alongside the loops above):
29
+ - `fable-mode/execution-guardrails` — verify-before-flag, warning batching, find-and-replace safety. These are behavioral contracts, not Tier-3-only rules.
30
+ - `verify-before-claim` — never assert external framework/API behavior or unmeasured performance numbers from training memory; verify against an authoritative source first.
31
+ - `install-cognitive-os`'s Global Output Normalization — lead with direct answers, suppress preambles/recaps/pleasantries, and enforce natural locale terminology (§6).
32
+
33
+ **Self-Healing Toolchain (工欲善其事,必先利其器)**: The harness may have been installed from a different editor than the one currently running (e.g., installed via Claude Code, now opened in Copilot). During the `[Discover]` phase, audit the workspace's integration touchpoints and repair any that are missing — the script is idempotent and delegates to the installer, so re-running is always safe:
34
+ ```bash
35
+ node "<this-skill-dir>/scripts/self-heal.js" # audit + auto-repair missing touchpoints
36
+ node "<this-skill-dir>/scripts/self-heal.js" --check # audit only, never writes
37
+ ```
38
+ Also run this immediately whenever the `bootstrap.js` SessionStart output shows a `[Self-Heal] Missing integration touchpoints` warning. Exception: if the user says they intentionally removed one of these files, respect that and do not re-create it.
39
+
40
+ ## 2. Task Triage
41
+ To avoid "over-engineering" and maximize efficiency, you must categorize the user's task during the `[Think]` phase and take the corresponding action path.
42
+ - **MANDATORY**: Run the Tier Router script before deciding the tier. The script lives at `scripts/tier-router.js` **inside this skill's own directory** — resolve the path from wherever this SKILL.md was loaded (do not guess a hard-coded location):
43
+ ```bash
44
+ node "<this-skill-dir>/scripts/tier-router.js" "<Brief summary of the user's prompt>"
45
+ ```
46
+ - You MUST follow the `REQUIRED TIER` output by the script.
47
+ - If a `UserPromptSubmit` hook already ran the router this turn (its `[Tier Routing Pre-check]` output is visible in context), reuse that output instead of running it again.
48
+
49
+ ### Mandated Routing Checkpoint Output
50
+ At the very beginning of your response to the user, you **MUST** output a clear, stylized routing report. This report is mandatory for all entries via `harness-everything`. It must list the determined Tier and the exact routing targets:
51
+ ```markdown
52
+ ## 🚦 Harness OS Routing Checkpoint
53
+ - **Active Tier**: Tier X (Tier Name)
54
+ - **Rationale**: Short 1-sentence reason from the tier router.
55
+ - **Routed Skills, Guides & Actions**:
56
+ - `path/to/skill/or/guide.md` (Brief description of why this applies)
57
+ - ...
58
+ ```
59
+
60
+ ### Proactive Copilot & VS Code Instruction (Avoid Silent Degrades)
61
+ If you are running in VS Code or GitHub Copilot, you do not have automated hooks to run scripts on your behalf.
62
+ - You **MUST** proactively run the tier-router script (`node harness-everything/scripts/tier-router.js "<prompt>"`) or simulate its routing logic manually at the start.
63
+ - **NEVER degrade newly added features or structural extensions to Tier 1.** Copilot is highly prone to treating new feature requests as trivial Tier 1 direct edits. If the request adds *any* new logic, a new API endpoint, or a new file/module, it **MUST** be triaged as **Tier 2 (Standard Task)** or **Tier 3 (Macro Task)**. This activates:
64
+ 1. The `todo-driven-workflow` checklist (mandatory step-by-step progress tracking).
65
+ 2. Multi-agent spawning / sub-agents via `create-agent-launcher` or macro plan orchestration via `fable-mode`.
66
+ 3. The memory summarization & evolution sequence via `self-evolve` upon completion, ensuring new knowledge is registered in workspace memory.
67
+
68
+ ### Tier 1: Trivial Tasks & Daily Chores
69
+ - **Characteristics**: Fixing typos, simple modifications to a single function, asking/explaining code, syntax adjustments. Or simple `git-commit` and `rewrite-commits`.
70
+ - **Action Strategy (Direct Execution)**:
71
+ - **PROHIBITED** from writing large plans.
72
+ - **PROHIBITED** from calling `create-agent-launcher` or `fable-mode`.
73
+ - Execute the modification directly based on requirements, or load `git-commit` / `rewrite-commits`. Perform a simple `[Record]` after modifying.
74
+
75
+ ### Tier 2: Standard Tasks & Architectural Review
76
+ - **Characteristics**: Adding a single API endpoint, fixing a specific bug, modifications requiring coordination across 2-3 files. Or requiring stress testing and benchmark evaluation for specific designs.
77
+ - **Action Strategy (TDD, Deep Context & Domain Expertise)**:
78
+ - **Initialize the Base Execution Loop**: Load `todo-driven-workflow` and lay out the checklist first (the TDD Red/Green/Refactor phases map naturally onto todo items).
79
+ - **Information Depth Requirement**: Before entering TDD, you MUST perform a deep context trace (find references, call sites, and related interfaces). Superficial fixes that break dependencies are strictly forbidden.
80
+ - **Load Domain Experts (領域專家召喚)**: Based on the tech stack detected in Tier 1, explicitly search for and load the corresponding **Domain Skills** (e.g., `security-review` from this repo, or `frontend-patterns` / `api-design` from the user's legacy skill library) to inject robust expert knowledge into your context.
81
+ - Development tasks: Automatically load and follow the `tdd` (Test-Driven Development) skill. Write tests first (Red) -> Implement (Green) -> Refactor.
82
+ - Before starting feature work on a busy repository, consider loading `using-git-worktrees` to isolate your workspace and prevent workspace pollution.
83
+ - If the user requests grilling or refactoring a plan, load `grill-me` (pure Q&A) or `improve-codebase-architecture` (deep architectural analysis).
84
+ - If the user requests "scoring" or "benchmark comparison", load `eval-harness` for quantitative scoring and summarization.
85
+ - **Pre-Delivery Gate**: Before declaring the task done or creating a PR, load `verification-loop` (build / types / lint / tests / security scan / diff review). For changes touching auth, input handling, secrets, or network boundaries, additionally load `security-review`.
86
+
87
+ ### Tier 3: Macro Tasks & Documentation
88
+ - **Characteristics**: New project initialization, low-level architecture refactoring, vague and massive requirements (e.g., "Help me write a user login system"). Or lack of global documentation.
89
+ - **Action Strategy (Multi-Agent Orchestration & Domain Infusion)**:
90
+ - If initializing a multi-agent system workspace, load `build-multi-agent-system` to scaffold the 6 functional zones, memory relational indexes, and immutable routing laws.
91
+ - If project-level documentation needs to be created, load `repo-docs`.
92
+ - If establishing a large system design, strongly recommend loading `grill-with-docs` first to document decisions (ADR, CONTEXT) before proceeding.
93
+ - **Sub-Agent Specialization**: When calling `create-agent-launcher`, you MUST inject robust Domain Skills into the sub-agent's persona (e.g., passing `database-reviewer` and `backend-patterns` to a Backend Sub-Agent). Do not create generic, empty-shell agents.
94
+ - Development execution: Automatically load `fable-mode` and `fable-discipline`. The macro plan produced in fable-mode's Discovery phase MUST be materialized as the `todo-driven-workflow` checklist — sub-agent handoffs and milestone checks are tracked there, not in prose.
95
+ - **Pre-Delivery Gate**: Same as Tier 2 — run `verification-loop` (and `security-review` where applicable) before the final handoff.
96
+
97
+ ## 3. Foolproofing & Circuit Breaker Mechanism
98
+ LLMs have a Reasoning Ceiling. To avoid invalid infinite retries, you must strictly obey the following limits:
99
+ - **Rule of 3**: If attempting to fix the same Bug or test failure fails 3 times consecutively, **STOP modifying code immediately**.
100
+ - **Trigger Circuit Breaker**: Forcefully call the `zoom-out` skill — rebuild the full picture, fact-check the assumption behind each failed attempt with read-only tools, and write the reflection report. Most trips should end in **self-recovery on a fresh diagnosis**, not a cry for help.
101
+ - **Seek Human Help — only for genuine decisions**: Escalate when zoom-out concludes the blocker is a human call (requirement conflict, architecture trade-off, destructive action, missing access), or when the breaker hard-locks on a second trip of the same signature. Present verified facts and 2-3 options with a recommendation — never a bare "I'm stuck".
102
+
103
+ ## 4. Evolution Loop
104
+ - When the circuit breaker is triggered and the problem is ultimately solved — whether by post-reflection self-recovery or with human intervention.
105
+ - Or, when you have expended great effort to overcome difficulties and complete a complex task.
106
+ - You **MUST** automatically call the `self-evolve` skill to write "human key insights" or "successfully avoided traps" into system memory, ensuring the same blind spots are bypassed next time.
107
+
108
+ ## 6. Always-On ADHD-Friendly Output Shaping
109
+ This is the same always-on discipline `install-cognitive-os` defines under its own §"Global Output Normalization" — this router doesn't restate it (that duplication was flagged in a skill quality audit §1.1 and has been removed). Since §1 already sends every task through `install-cognitive-os` before any action, its output-shaping rules are already in effect by the time this router does anything — apply them as written there, on every response, regardless of tier.
110
+
111
+ ## 5. Skill Registry (Full Activation Map)
112
+ Every skill in this repository is reachable from this router. If a task matches a trigger below and the skill is not yet loaded, load it.
113
+
114
+ | Skill | Layer | Activated when |
115
+ | :--- | :--- | :--- |
116
+ | `install-cognitive-os` | Foundation | Always, before any action (§1). |
117
+ | `todo-driven-workflow` | Foundation | Every Tier 2/3 task — the base execution loop (§1). |
118
+ | `environment-detection` | Foundation | Session start / `[Discover]` phase, before running shell commands. |
119
+ | `fable-mode/execution-guardrails` | Always-on discipline | Every tier: flagging problems, batching warnings, find-and-replace edits (§1). |
120
+ | `verify-before-claim` | Always-on discipline | Before asserting external-system behavior or unmeasured numbers (§1). |
121
+ | `git-commit` / `rewrite-commits` | Tier 1 | Commit creation / history rewriting. |
122
+ | `tdd` | Tier 2 | Feature/bugfix development (Red-Green-Refactor). |
123
+ | `using-git-worktrees` | Tier 2 | Isolating feature work on a busy repository. |
124
+ | `grill-me` | Tier 2 | User asks to be grilled on a plan (pure Q&A). |
125
+ | `improve-codebase-architecture` | Tier 2 | Deep architectural analysis / refactor planning. |
126
+ | `eval-harness` | Tier 2 | Scoring, stress testing, benchmark comparison. |
127
+ | `verification-loop` | Tier 2/3 gate | Before declaring done or creating a PR. |
128
+ | `security-review` | Tier 2/3 gate | Changes touching auth, input handling, secrets, network boundaries. |
129
+ | `fable-mode` | Tier 3 | Macro task planning & execution engine. |
130
+ | `fable-discipline` | Tier 3 | Risk control paired with fable-mode. |
131
+ | `fable-mode/fable-haiku` | Tier 3 (opt-in) | User explicitly asks for staged execution run cheaply on Haiku. |
132
+ | `create-agent-launcher` | Tier 3 | Spawning specialized sub-agents. |
133
+ | `build-multi-agent-system` | Tier 3 | Scaffolding a multi-agent workspace. |
134
+ | `repo-docs` | Tier 3 | Creating project-level documentation. |
135
+ | `grill-with-docs` | Tier 3 | Documenting decisions (ADR / CONTEXT) before large designs. |
136
+ | `zoom-out` | Circuit breaker | Rule of 3 trips (§3). |
137
+ | `self-evolve` | Evolution | Post-breaker resolution or major breakthrough (§4). |
138
+ | `skill-style` | Meta | Authoring or modifying any SKILL.md in this repository — the terse Skill Contract format spec. |
139
+ | `skill-creator` | Meta | Creating a new skill from scratch, auditing/refactoring an existing SKILL.md, or `self-evolve`'s dynamic skill generation step (§4) — the fuller authoring, quality-checklist, and testing workflow built on `skill-style`. |
140
+
141
+ (`eval-framework/` is internal CI for the router itself — run `node eval-framework/runner.js` after modifying `tier-router.js`; it is not a routable skill. Likewise `scripts/self-heal.js` in this skill is infrastructure, invoked during `[Discover]` per §1.)
@@ -1,9 +1,9 @@
1
- # Harness Examples
2
- This directory contains concrete examples of how to use Harness tools and workflows.
3
-
4
- ## tier-router.js Quick Start
5
- If you are unsure how to use the tier router, you can call it directly:
6
- `node harness-everything/scripts/tier-router.js "YOUR PROMPT HERE"`
7
-
8
- Example:
9
- `node harness-everything/scripts/tier-router.js "Add a login page"`
1
+ # Harness Examples
2
+ This directory contains concrete examples of how to use Harness tools and workflows.
3
+
4
+ ## tier-router.js Quick Start
5
+ If you are unsure how to use the tier router, you can call it directly:
6
+ `node harness-everything/scripts/tier-router.js "YOUR PROMPT HERE"`
7
+
8
+ Example:
9
+ `node harness-everything/scripts/tier-router.js "Add a login page"`
@@ -1,22 +1,22 @@
1
- # Todo-Driven Workflow Example
2
- Here is a concrete example of how to implement the Todo-Driven Workflow using VS Code's `manage_todo_list` tool.
3
-
4
- ## The Goal: Add a User Authentication Endpoint
5
-
6
- 1. **Initialize the List**: Before writing code, call `manage_todo_list` with these items:
7
- - ID: 1, Title: "Write auth tests", Status: "not-started"
8
- - ID: 2, Title: "Implement /login API", Status: "not-started"
9
- - ID: 3, Title: "Verify DB connection", Status: "not-started"
10
-
11
- 2. **Start Task 1**: Call `manage_todo_list` to set ID 1 to "in-progress".
12
-
13
- 3. **Execute**: Create `tests/auth.test.js` and write the tests.
14
-
15
- 4. **Verify**: Run the tests using `run_in_terminal` (`npm test`). They should fail (Red).
16
-
17
- 5. **Complete Task 1**: Call `manage_todo_list` to set ID 1 to "completed".
18
-
19
- 6. **Start Task 2**: Call `manage_todo_list` to set ID 2 to "in-progress".
20
- ...and so on.
21
-
22
- **CRITICAL**: Do NOT just type out a checklist in markdown. You MUST call the `manage_todo_list` tool.
1
+ # Todo-Driven Workflow Example
2
+ Here is a concrete example of how to implement the Todo-Driven Workflow using VS Code's `manage_todo_list` tool.
3
+
4
+ ## The Goal: Add a User Authentication Endpoint
5
+
6
+ 1. **Initialize the List**: Before writing code, call `manage_todo_list` with these items:
7
+ - ID: 1, Title: "Write auth tests", Status: "not-started"
8
+ - ID: 2, Title: "Implement /login API", Status: "not-started"
9
+ - ID: 3, Title: "Verify DB connection", Status: "not-started"
10
+
11
+ 2. **Start Task 1**: Call `manage_todo_list` to set ID 1 to "in-progress".
12
+
13
+ 3. **Execute**: Create `tests/auth.test.js` and write the tests.
14
+
15
+ 4. **Verify**: Run the tests using `run_in_terminal` (`npm test`). They should fail (Red).
16
+
17
+ 5. **Complete Task 1**: Call `manage_todo_list` to set ID 1 to "completed".
18
+
19
+ 6. **Start Task 2**: Call `manage_todo_list` to set ID 2 to "in-progress".
20
+ ...and so on.
21
+
22
+ **CRITICAL**: Do NOT just type out a checklist in markdown. You MUST call the `manage_todo_list` tool.