create-harness-vibe-coding 0.2.0 → 0.3.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/README-CN.md +94 -0
- package/README.md +104 -21
- package/package.json +3 -2
- package/src/generator.js +2 -0
- package/templates/common/.claude/agents/context-master.md +78 -0
- package/templates/common/.claude/agents/debugger.md +1 -1
- package/templates/common/.claude/agents/docs-researcher.md +1 -1
- package/templates/common/.claude/agents/implementer.md +1 -1
- package/templates/common/.claude/agents/memory-master.md +67 -0
- package/templates/common/.claude/agents/planner.md +1 -1
- package/templates/common/.claude/agents/researcher.md +1 -1
- package/templates/common/.claude/agents/test-writer.md +1 -1
- package/templates/common/.claude/agents/verifier.md +1 -1
- package/templates/common/.claude/commands/update.md +11 -0
- package/templates/common/.claude/commands/wf.md +10 -4
- package/templates/common/.claude/rules/ecc/common.md +2 -2
- package/templates/common/.claude/skills/harness-build-loop/SKILL.md +2 -1
- package/templates/common/.claude/skills/harness-context/SKILL.md +2 -1
- package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +2 -1
- package/templates/common/.claude/skills/harness-research/SKILL.md +2 -1
- package/templates/common/.claude/skills/harness-router/SKILL.md +2 -2
- package/templates/common/.claude/skills/readme-optimizer/SKILL.md +3 -2
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +9 -4
- package/templates/common/.claude/skills/wf-mode/SKILL.md +13 -6
- package/templates/common/.claude/skills/wf-update/SKILL.md +58 -0
- package/templates/common/.harness-version +8 -0
- package/templates/common/CLAUDE.md +15 -5
- package/templates/common/MEMORY.md +6 -1
- package/templates/common/README.md +2 -2
- package/templates/common/SETUP.md +34 -20
- package/templates/common/docs/README.md +24 -17
- package/templates/common/docs/domain/ports.md +3 -0
- package/templates/common/docs/features/_template.md +11 -1
- package/templates/common/docs/harness/PLAN.md +37 -88
- package/templates/common/docs/harness/PROGRESS.md +17 -0
- package/templates/common/docs/harness/WF.md +32 -14
- package/templates/common/docs/harness/agent-workflow.md +19 -7
- package/templates/common/docs/harness/architecture.md +31 -7
- package/templates/common/docs/harness/context-loading.md +17 -5
- package/templates/common/docs/harness/dispatch.md +9 -6
- package/templates/common/docs/harness/extension.md +4 -4
- package/templates/common/docs/harness/lifecycle.md +2 -2
- package/templates/common/docs/harness/state-machines.md +8 -0
- package/templates/common/docs/harness/subagents.md +50 -9
- package/templates/common/docs/research/README.md +3 -3
- package/templates/common/docs/tasks/_template/ARTIFACTS.md +3 -0
- package/templates/common/docs/tasks/_template/NOTES.md +3 -0
- package/templates/common/docs/tasks/_template/PLAN.md +40 -0
- package/templates/common/docs/tasks/_template/PROGRESS.md +29 -0
- package/templates/common/scripts/validate-harness.mjs +78 -7
|
@@ -8,9 +8,9 @@ description: Use at the start of any task, or when unsure which harness document
|
|
|
8
8
|
1. Read `Harness/README.md`.
|
|
9
9
|
2. Identify the current situation from "Load By Task".
|
|
10
10
|
3. Apply routing priority before loading extra files:
|
|
11
|
-
- `/wf`, long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work routes to `wf-mode` first.
|
|
11
|
+
- `/wf`, `wf mode`, `workflow mode`, `wk mode`, long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work routes to `wf-mode` first.
|
|
12
12
|
- Bounded subagent-only coordination routes to `subagent-orchestrator`.
|
|
13
13
|
4. Load only the listed primary doc(s). Let `wf-mode` decide when to load subagent docs.
|
|
14
|
-
5. If the task grows, update `Harness/
|
|
14
|
+
5. If the task grows, update `Harness/tasks/<task-id>/PROGRESS.md` and use `harness-context`.
|
|
15
15
|
|
|
16
16
|
Do not bulk-read `Harness/`.
|
|
@@ -12,7 +12,8 @@ Improve `README.md` without breaking project-owned public docs.
|
|
|
12
12
|
- root `README.md`
|
|
13
13
|
- package files and scripts (`package.json`, `pyproject.toml`, `go.mod`, etc.)
|
|
14
14
|
- CI files when present
|
|
15
|
-
- `Harness/
|
|
15
|
+
- `Harness/PROGRESS.md`
|
|
16
|
+
- `Harness/tasks/<task-id>/PLAN.md` when available
|
|
16
17
|
- `Harness/architecture.md` only when an architecture summary or diagram is requested
|
|
17
18
|
|
|
18
19
|
## Mode
|
|
@@ -35,7 +36,7 @@ If unanswered, use Preserve + append.
|
|
|
35
36
|
- Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
|
|
36
37
|
- Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
|
|
37
38
|
- Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
|
|
38
|
-
- Record the chosen mode and any skipped README improvements in `Harness/PLAN.md
|
|
39
|
+
- Record the chosen mode and any skipped README improvements in `Harness/tasks/<task-id>/PLAN.md` when available.
|
|
39
40
|
|
|
40
41
|
## Output
|
|
41
42
|
|
|
@@ -10,20 +10,25 @@ Load:
|
|
|
10
10
|
- `Harness/subagents.md`
|
|
11
11
|
- `Harness/dispatch.md`
|
|
12
12
|
- `Harness/context-loading.md`
|
|
13
|
-
- `Harness/
|
|
13
|
+
- `Harness/PROGRESS.md`
|
|
14
|
+
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
|
|
14
15
|
- `Harness/agent-workflow.md`
|
|
15
|
-
- `Harness/WF.md` when in `/wf`, wf mode
|
|
16
|
+
- `Harness/WF.md` when in `/wf`, `wf mode`, `workflow mode`, `wk mode`, or recovery loop
|
|
17
|
+
- `.claude/agents/` roster names before choosing roles
|
|
16
18
|
|
|
17
19
|
Follow:
|
|
18
20
|
|
|
19
|
-
- The main agent is the controller. It decomposes work, writes `Harness/PLAN.md`, integrates returns, and owns final verification.
|
|
21
|
+
- The main agent is the controller. It decomposes work, writes `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, integrates returns, and owns final verification.
|
|
22
|
+
- Subagents are readers and reporters. Only the controller writes to task state files.
|
|
20
23
|
- Use the efficiency ladder in `Harness/subagents.md`: solo pass -> single reviewer -> parallel read-only -> serial build lane -> isolated lanes.
|
|
24
|
+
- Explicit WF/WK mode requires at least 3 distinct agents from `.claude/agents/` before second planning.
|
|
25
|
+
- Prefer the built-in roles `planner`, `researcher`, `docs-researcher`, `architect`, `test-writer`, `implementer`, `reviewer`, `debugger`, and `verifier` before inventing custom roles.
|
|
21
26
|
- Every subagent dispatch needs a complete dispatch pack: role, goal, mode, read set, write set, forbidden scope, injected docs, dependencies, expected evidence, stop condition, and return format.
|
|
22
27
|
- Prefer parallel read-only exploration first. Run writing agents serially unless write sets are disjoint and isolated.
|
|
23
28
|
- Use two review gates after implementation: spec review first, then code-quality or architecture review.
|
|
24
29
|
- If verification fails, dispatch debugger/fixer with the smallest reproduced failure, then re-review and re-verify.
|
|
25
30
|
- If subagents are unavailable, emulate the same roles as separate bounded passes and record that fallback.
|
|
26
|
-
- When used outside `wf-mode`, update `Harness/PLAN.md#
|
|
31
|
+
- When used outside `wf-mode`, update `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`; update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` only if an active heartbeat/recovery loop exists.
|
|
27
32
|
|
|
28
33
|
Return:
|
|
29
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wf-mode
|
|
3
|
-
description: Use for /wf, wf mode, workflow mode, long difficult tasks, multi-file or multi-agent work, low-confidence decisions, repeated failures, migrations, architecture-heavy changes, browser-visible work, or any task that needs exploration -> second plan -> implementation -> review -> verification -> recovery.
|
|
3
|
+
description: Use for /wf, wf mode, workflow mode, wk mode, long difficult tasks, multi-file or multi-agent work, low-confidence decisions, repeated failures, migrations, architecture-heavy changes, browser-visible work, or any task that needs exploration -> second plan -> implementation -> review -> verification -> recovery.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# WF Mode
|
|
@@ -8,9 +8,10 @@ description: Use for /wf, wf mode, workflow mode, long difficult tasks, multi-fi
|
|
|
8
8
|
Load:
|
|
9
9
|
|
|
10
10
|
- `Harness/WF.md`
|
|
11
|
-
- `Harness/
|
|
11
|
+
- `Harness/PROGRESS.md`
|
|
12
|
+
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
|
|
12
13
|
- `Harness/agent-workflow.md` when implementation, review, or verification starts
|
|
13
|
-
- `Harness/subagents.md`, `Harness/dispatch.md`, and `Harness/context-loading.md` only when coordinating subagents or bounded role passes
|
|
14
|
+
- `Harness/subagents.md`, `Harness/dispatch.md`, and `Harness/context-loading.md` immediately for explicit WF/WK mode; otherwise only when coordinating subagents or bounded role passes
|
|
14
15
|
- current feature doc when one exists
|
|
15
16
|
- `Harness/workflows/browser-e2e.md` when browser-visible behavior is affected and the workflow is installed
|
|
16
17
|
|
|
@@ -24,23 +25,29 @@ intake + 95% confidence gate
|
|
|
24
25
|
-> bounded implementation
|
|
25
26
|
-> review
|
|
26
27
|
-> verification
|
|
27
|
-
-> debugger recovery loop when verification fails
|
|
28
|
+
-> debugger recovery loop when verification fails (dispatch memory-master after 3 same-class failures)
|
|
29
|
+
-> context-master session analysis + knowledge extraction
|
|
30
|
+
-> memory-master consolidation
|
|
28
31
|
-> close with evidence
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
Rules:
|
|
32
35
|
|
|
33
|
-
- Update `Harness/
|
|
36
|
+
- Update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` before long commands, after failures, before handoff, and at closeout.
|
|
37
|
+
- Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST use `subagent-orchestrator` and spawn at least 3 distinct subagents from `.claude/agents/` before second planning.
|
|
38
|
+
- Use the 7:3 collaboration bias from `Harness/WF.md`: default to multi-agent collaboration for substantial work; use solo mode only for clearly small/local tasks outside explicit WF/WK mode.
|
|
34
39
|
- Use `subagent-orchestrator` and `Harness/subagents.md` when the task has broad reading, cross-layer impact, independent review needs, or repeated failures.
|
|
40
|
+
- Subagents return findings and PLAN patch suggestions. Only the main agent writes to task PROGRESS.md and PLAN.md.
|
|
35
41
|
- If subagents are unavailable, emulate the same roles as separate bounded passes.
|
|
36
42
|
- Do not claim browser/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
37
43
|
- If `Harness/workflows/browser-e2e.md` is not installed, use `Harness/WF.md#Browser And API Evidence` as the fallback evidence contract or ask the user before adding the optional workflow.
|
|
38
|
-
- If the same failure class happens three times,
|
|
44
|
+
- If the same failure class happens three times, dispatch `memory-master` to record the failure pattern first, then ask the user with evidence-backed options.
|
|
39
45
|
|
|
40
46
|
Return:
|
|
41
47
|
|
|
42
48
|
- changed files
|
|
43
49
|
- agents or bounded passes used
|
|
50
|
+
- memory-master / context-master dispatches
|
|
44
51
|
- commands run
|
|
45
52
|
- browser/API evidence when applicable
|
|
46
53
|
- review findings
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wf-update
|
|
3
|
+
description: Use when the user says /wf update, wf update, update harness, or check for updates. Fetches latest template files from GitHub, compares against stored checksums, and applies incremental updates safely.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WF Update
|
|
7
|
+
|
|
8
|
+
GitHub-based incremental harness update. Pulls latest template files and compares against stored checksums in `Harness/.harness-version`.
|
|
9
|
+
|
|
10
|
+
## Load
|
|
11
|
+
|
|
12
|
+
- `Harness/.harness-version`
|
|
13
|
+
- `Harness/README.md#Update Mechanism` row (when available)
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
1. Read `Harness/.harness-version` -- get current `generator` version and stored `checksums`.
|
|
18
|
+
2. Fetch the latest template file list from GitHub:
|
|
19
|
+
- Base URL: `https://raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/`
|
|
20
|
+
- Fetch `.harness-version` from the repo first to get the latest version and expected file list.
|
|
21
|
+
- If the repo version equals the local version, report "Already up to date."
|
|
22
|
+
3. For each file in the repo's checksums map:
|
|
23
|
+
- Compute SHA-256 of the fetched file content (normalize line endings to LF).
|
|
24
|
+
- Compare against the local stored checksum in `Harness/.harness-version`.
|
|
25
|
+
4. Classify each difference:
|
|
26
|
+
- **SAFE** (TIER 1): Harness runtime files. If local checksum matches stored -> file is unmodified -> safe to overwrite with fetched version.
|
|
27
|
+
- **PRESERVE** (TIER 2): User data files. Never overwrite. (`Harness/PROGRESS.md`, `Harness/tasks/**`, `Harness/memory/**`, `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md`, `Harness/domain/ports.md`, `Harness/features/**`, root `README.md`, `.gitignore`)
|
|
28
|
+
- **MERGE** (TIER 3): Dual-purpose files. If local checksum matches stored -> safe to overwrite. If mismatch -> user modified -> report as merge candidate, never auto-overwrite. (`CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`)
|
|
29
|
+
5. For files in the GitHub repo NOT in local checksums: classify as NEW, plan to create.
|
|
30
|
+
6. Report update plan: `updated/N, merge/N, created/N, skipped/N`
|
|
31
|
+
7. If `--check` flag: report only, do not write.
|
|
32
|
+
8. Apply updates:
|
|
33
|
+
- SAFE files: overwrite with fetched content.
|
|
34
|
+
- NEW files: create.
|
|
35
|
+
- MERGE files with matching checksums: overwrite.
|
|
36
|
+
- MERGE files with mismatched checksums: skip, warn user.
|
|
37
|
+
- PRESERVE files: never touched.
|
|
38
|
+
9. Update `Harness/.harness-version`:
|
|
39
|
+
- Update `generator` to latest version.
|
|
40
|
+
- Update `generated` timestamp.
|
|
41
|
+
- Recompute and store checksums for all updated files.
|
|
42
|
+
10. Record update in `Harness/tasks/harness-update/PROGRESS.md` (create task capsule if needed).
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- Never overwrite PRESERVE files.
|
|
47
|
+
- Never auto-overwrite MERGE files with mismatched checksums.
|
|
48
|
+
- If offline (cannot reach GitHub), report and exit cleanly.
|
|
49
|
+
- After update, suggest running `node Harness/scripts/validate-harness.mjs`.
|
|
50
|
+
- Subagents are readers and reporters. Only the main agent writes updated files.
|
|
51
|
+
|
|
52
|
+
## Return
|
|
53
|
+
|
|
54
|
+
- Update plan summary
|
|
55
|
+
- Files updated
|
|
56
|
+
- Files skipped (with reasons)
|
|
57
|
+
- New version
|
|
58
|
+
- Validation suggestion
|
|
@@ -6,12 +6,17 @@ Root entry for Claude Code. Keep this file short.
|
|
|
6
6
|
|
|
7
7
|
- If `Harness/` exists, this repository is governed by the Harness contract. Treat these files as mandatory operating instructions, not optional references.
|
|
8
8
|
- Every session: load `Harness/MEMORY.md` first, then `Harness/README.md`.
|
|
9
|
-
- If `Harness/SETUP.md` exists, follow it before normal project work; it is the install/bootstrap contract and may be deleted
|
|
9
|
+
- If `Harness/SETUP.md` exists, follow it before normal project work; it is the install/bootstrap contract and may be deleted after setup is complete.
|
|
10
10
|
- `Harness/MEMORY.md` is the memory/resource router: agents, skills, durable memories, and cross-session lessons. Follow its registrations when selecting agents/skills or recording memory.
|
|
11
11
|
- `Harness/README.md` is the task router. For every request, check `Harness/README.md#Load By Task`; if a row matches, read and follow those docs before acting.
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
|
|
13
|
+
- If work spans more than one step, create a task capsule from `Harness/tasks/_template/` and update `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
14
|
+
- Use `/wf`, `wf-mode`, `wf mode`, `workflow mode`, `wk mode`, or `Harness/WF.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
|
|
14
15
|
- Use `subagent-orchestrator` and `Harness/subagents.md` when coordinating multiple subagents.
|
|
16
|
+
- Use `/wf update` to check for and apply scaffold updates from GitHub. See `.claude/skills/wf-update/SKILL.md`.
|
|
17
|
+
- Subagents are readers and reporters. Only the main agent writes to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`.
|
|
18
|
+
- For memory writing and consolidation (repeated failures, user corrections, closeout), dispatch `memory-master`.
|
|
19
|
+
- For context analysis and compression alerts (~85% window), dispatch `context-master`.
|
|
15
20
|
- Universal rules live in `.claude/rules/ecc/common.md`.
|
|
16
21
|
- Never bulk-read `Harness/`; route through `Harness/README.md` and `Harness/MEMORY.md`.
|
|
17
22
|
|
|
@@ -20,7 +25,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
20
25
|
- You must have **>=95% confidence** in user intent before writing implementation code.
|
|
21
26
|
- If confidence is below 95%, stop and ask up to 3 blocking questions.
|
|
22
27
|
- If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
|
|
23
|
-
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/PLAN.md`.
|
|
28
|
+
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
24
29
|
- If something is unclear, stop. Name what is unclear and ask instead of guessing.
|
|
25
30
|
|
|
26
31
|
## 3. Simplicity First
|
|
@@ -28,6 +33,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
28
33
|
- No features beyond what was asked.
|
|
29
34
|
- No abstractions for single-use code.
|
|
30
35
|
- No unrequested flexibility, configurability, or speculative error handling.
|
|
36
|
+
- Use explicit interfaces or state models only when they protect a real boundary, clarify ownership, or make verification/recovery simpler.
|
|
31
37
|
- If a simpler approach exists, say so and prefer the smallest change that satisfies the request.
|
|
32
38
|
- If the solution is growing faster than the problem, reduce scope before coding more.
|
|
33
39
|
|
|
@@ -43,7 +49,8 @@ Root entry for Claude Code. Keep this file short.
|
|
|
43
49
|
|
|
44
50
|
- Define verifiable success criteria before implementation.
|
|
45
51
|
- For bugs, reproduce the failure or document why reproduction is impossible before fixing.
|
|
46
|
-
- For multi-step work, keep `Harness/PLAN.md` current
|
|
52
|
+
- For multi-step work, keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current. The main agent is the only state committer; subagents return suggestions only.
|
|
53
|
+
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
47
54
|
- Every task needs a test, build check, validator run, or recorded manual check.
|
|
48
55
|
- Do not claim web/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
49
56
|
- Do not place project build scripts, git conventions, run commands, or release process in this file. Put them in `README.md`.
|
|
@@ -56,4 +63,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
56
63
|
- **Tool reflection trigger**: record a lightweight reflection when the same tool/use pattern fails 3+ times, or when a better command pattern/environment fix is found. Write it newest-first in `Harness/memory/tool-usage-reflections.md`.
|
|
57
64
|
- **User correction trigger**: record a lightweight preference/correction when the user asks to remember it, or when the user corrects the same assumption/pattern 2+ times. Write it newest-first in `Harness/memory/user-corrections-preferences.md`.
|
|
58
65
|
- **Agent lesson trigger**: record reusable lessons from review/debug loops in `Harness/memory/agent-lessons-patterns.md` when they would prevent recurrence.
|
|
66
|
+
- **WF auto-trigger**: when the same failure class happens 3+ times in a WF recovery loop, dispatch `memory-master` to record the failure pattern to `Harness/memory/agent-lessons-patterns.md` before asking the user.
|
|
67
|
+
- **Context threshold trigger**: when context approaches ~85% of the window, dispatch `context-master` to analyze and write a non-blocking compression suggestion to `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`.
|
|
68
|
+
- **Closeout trigger**: during WF closeout, dispatch `context-master` to extract durable knowledge, then `memory-master` to consolidate into `Harness/memory/*`.
|
|
59
69
|
- Never record secrets, credentials, tokens, or private data.
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
- [debugger](../.claude/agents/debugger.md) — smallest fix for a reproduced failure.
|
|
15
15
|
- [reviewer](../.claude/agents/reviewer.md) — read-only diff review and closeout risk.
|
|
16
16
|
- [verifier](../.claude/agents/verifier.md) — verification commands and evidence.
|
|
17
|
+
- [memory-master](../.claude/agents/memory-master.md) — memory writing, dedup, consolidation, and cross-project knowledge extraction.
|
|
18
|
+
- [context-master](../.claude/agents/context-master.md) — context analysis, compression alerts, and session knowledge extraction for memory-master.
|
|
17
19
|
|
|
18
20
|
Stack-specific agents can be added after the product shape is known.
|
|
19
21
|
|
|
@@ -27,6 +29,7 @@ Stack-specific agents can be added after the product shape is known.
|
|
|
27
29
|
- [wf-mode](../.claude/skills/wf-mode/SKILL.md) — long-task workflow: exploration, second plan, implementation, review, verification, heartbeat, and recovery loop.
|
|
28
30
|
- [subagent-orchestrator](../.claude/skills/subagent-orchestrator/SKILL.md) — controller-led subagent orchestration, parallel read-only passes, review gates, and recovery handoffs.
|
|
29
31
|
- [readme-optimizer](../.claude/skills/readme-optimizer/SKILL.md) — README preservation, append-only development sections, structured tables, and approved architecture diagrams.
|
|
32
|
+
- [wf-update](../.claude/skills/wf-update/SKILL.md) — GitHub-based incremental harness update, checksum comparison, and safe in-place updates.
|
|
30
33
|
|
|
31
34
|
Stack-specific skills can be added after the product shape is known.
|
|
32
35
|
|
|
@@ -39,7 +42,8 @@ Located under `.claude/rules/ecc/`, auto-loaded by the CC engine:
|
|
|
39
42
|
|
|
40
43
|
## Harness (Runtime)
|
|
41
44
|
|
|
42
|
-
- [
|
|
45
|
+
- [Global progress](PROGRESS.md)
|
|
46
|
+
- [Task directory](tasks/)
|
|
43
47
|
- [Docs router](README.md)
|
|
44
48
|
- [WF mode](WF.md)
|
|
45
49
|
- [0-1 lifecycle](lifecycle.md)
|
|
@@ -51,6 +55,7 @@ Located under `.claude/rules/ecc/`, auto-loaded by the CC engine:
|
|
|
51
55
|
- [Architecture docs](architecture.md)
|
|
52
56
|
- [Agent workflow](agent-workflow.md)
|
|
53
57
|
- [Harness validator](scripts/validate-harness.mjs)
|
|
58
|
+
- [Version file](.harness-version)
|
|
54
59
|
|
|
55
60
|
## Memory Folder
|
|
56
61
|
|
|
@@ -20,7 +20,7 @@ Record the real project commands after bootstrap:
|
|
|
20
20
|
# e.g. npm run build
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Replace the examples with the real commands discovered from this project. If a command is unknown, record the open question in `Harness/
|
|
23
|
+
Replace the examples with the real commands discovered from this project. If a command is unknown, record the open question in `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
24
24
|
|
|
25
25
|
## Git And Release Notes
|
|
26
26
|
|
|
@@ -36,6 +36,6 @@ The agentic engineering harness lives in `Harness/`.
|
|
|
36
36
|
- Follow `Harness/SETUP.md` before normal work while it exists.
|
|
37
37
|
- Start at `Harness/README.md`.
|
|
38
38
|
- Load memory and resource registrations from `Harness/MEMORY.md`.
|
|
39
|
-
- Track active work in `Harness/
|
|
39
|
+
- Track active work in `Harness/PROGRESS.md` and `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
40
40
|
- Use `Harness/WF.md` or `/wf` for long, difficult, multi-agent work.
|
|
41
41
|
- Use `Harness/subagents.md` when coordinating multiple agents.
|
|
@@ -9,7 +9,7 @@ This scaffold is a 0-1 product harness:
|
|
|
9
9
|
- short agent entry files
|
|
10
10
|
- dynamic docs router
|
|
11
11
|
- PRD, research protocol, architecture, ports, data-flow, state templates
|
|
12
|
-
- active `Harness/
|
|
12
|
+
- active `Harness/PROGRESS.md`
|
|
13
13
|
- `Harness/MEMORY.md` plus a `Harness/memory/` folder for durable self-learning, user corrections, and tool reflections
|
|
14
14
|
- built-in common agents
|
|
15
15
|
- subagent orchestration and context-loading protocol
|
|
@@ -26,7 +26,7 @@ Start Claude Code, then say:
|
|
|
26
26
|
```text
|
|
27
27
|
Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
28
28
|
Use Harness/README.md as the router. Keep context small.
|
|
29
|
-
First clarify the idea, then create PRD, research, architecture, Harness/
|
|
29
|
+
First clarify the idea, then create PRD, research, architecture, Harness/PROGRESS.md and the first per-task plan, and the first vertical-slice task.
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Required Bootstrap Sequence
|
|
@@ -34,23 +34,23 @@ First clarify the idea, then create PRD, research, architecture, Harness/PLAN.md
|
|
|
34
34
|
Claude must follow this order:
|
|
35
35
|
|
|
36
36
|
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, and `Harness/lifecycle.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
|
|
37
|
-
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/PLAN.md`.
|
|
37
|
+
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
38
38
|
3. Fill `Harness/research/PRD.md` with MVP, non-goals, and acceptance criteria.
|
|
39
39
|
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
40
40
|
5. Fill minimum architecture: `Harness/architecture.md` and one port in `Harness/domain/ports.md`.
|
|
41
|
-
6. Create the first vertical-slice plan in `Harness/PLAN.md`.
|
|
42
|
-
7. Use `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when
|
|
41
|
+
6. Create a task capsule from `Harness/tasks/_template/` and fill the first vertical-slice plan in `Harness/tasks/<task-id>/PLAN.md`.
|
|
42
|
+
7. Use `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
|
|
43
43
|
8. Fill `Harness/data-flow.md` or `Harness/state-machines.md` only when the slice changes runtime flow, failure behavior, or state.
|
|
44
44
|
9. Implement only after a failing test or manual verification step is defined.
|
|
45
45
|
10. Run `node Harness/scripts/validate-harness.mjs --strict`.
|
|
46
|
-
11. Record final verification and next feedback step in `Harness/
|
|
46
|
+
11. Record final verification and next feedback step in `Harness/tasks/<task-id>/PROGRESS.md`. If repeated tool failures, repeated user corrections, or reusable review/debug lessons appeared, record the concise reflection in the relevant `Harness/memory/` file.
|
|
47
47
|
|
|
48
48
|
## Existing Project Bootstrap Sequence
|
|
49
49
|
|
|
50
50
|
When adding this harness to a project that already has source code, docs, CI, or tool configuration, treat the existing project as the source of truth before filling harness docs.
|
|
51
51
|
|
|
52
52
|
1. Scan existing project facts first: `README.md`, package files (`package.json`, `pyproject.toml`, `go.mod`, etc.), test commands, app entry points, CI files, existing docs, and current run/build scripts.
|
|
53
|
-
2. Record discovered facts and open questions in `Harness/
|
|
53
|
+
2. Record discovered facts and open questions in `Harness/tasks/<task-id>/PROGRESS.md` before changing harness docs.
|
|
54
54
|
3. Fill `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md`, and `Harness/domain/ports.md` from observed project facts plus explicit user input.
|
|
55
55
|
4. Existing configuration is project fact. Do not overwrite `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.gitignore`, settings, hooks, package files, CI, docs routers, or workflow docs unless the user explicitly approves that exact overwrite.
|
|
56
56
|
5. When a harness file conflicts with an existing file, preserve the existing file and register any missing harness guidance manually using `Harness/extension.md`.
|
|
@@ -116,12 +116,16 @@ The harness validator checks for specific structural invariants. When comparing
|
|
|
116
116
|
| `README.md` | Existing README is project-owned. Preserve by default; ask whether to append only Development notes or run `readme-optimizer` for a structure pass with tables/diagrams before broad edits |
|
|
117
117
|
| `Harness/MEMORY.md` | All 9 common agents registered under `## Agents`; all common harness skills registered under `## Skills`; all 3 `Harness/memory/` files registered under `## Memory Folder`; `Harness/memory/` folder usage guidance; `Project Resource Index` in title |
|
|
118
118
|
| `.claude/rules/ecc/common.md` | `## Context` section with the durable communication invariant (`project files are the only durable communication channel`); `## Memory` section with three reflection file entries; `## Security` section |
|
|
119
|
-
| `Harness/README.md` | `## Keyword Routing` heading; `## Load By Task` table with at minimum the rows: "Adding harness to existing project", "Need implementation plan", "Need parallel agents", "Need subagents", "Need durable memory or reflection"; `## Doc Map` with `memory/` and `subagents.md` entries; the durable communication invariant text; `Harness/README.md is the primary router` |
|
|
119
|
+
| `Harness/README.md` | `## Keyword Routing` heading; `## Load By Task` table with at minimum the rows: "Need WF mode", "Adding harness to existing project", "Need implementation plan", "Need parallel agents", "Need subagents", "Need durable memory or reflection"; WF routing keywords include `/wf`, `wf mode`, `workflow mode`, and `wk mode`; explicit WF/WK output says subagent docs load immediately; `## Doc Map` with `memory/` and `subagents.md` entries; the durable communication invariant text; `Harness/README.md is the primary router` |
|
|
120
|
+
| `Harness/WF.md` | `WF mode requires multi-subagent orchestration by default`; explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` requires at least 3 distinct `.claude/agents/` subagents before second planning; `7:3 collaboration bias`; `Heartbeat Protocol` |
|
|
120
121
|
| `Harness/extension.md` | `## Non-Invasive Extension Rules` section with the "Preserve existing" rule; `## Agent Contract` section; `## Registration` section |
|
|
121
122
|
| `Harness/dispatch.md` | The durable communication invariant; common agent entries for all 9 agents; `## Handoff Format` heading |
|
|
122
123
|
| `Harness/context-loading.md` | The durable communication invariant; `Harness/README.md is the primary router`; all 10 subagent context packs (Explorer Pass, Planner, Researcher, Docs Researcher, Architect, Test Writer, Implementer, Reviewer, Debugger, Verifier) |
|
|
123
|
-
| `Harness/subagents.md` | `## Source Attribution`; `Controller Role`; `Efficiency Ladder`; `Review Gates`; source markers for `npx skills find`, `dispatching-parallel-agents`, and `subagent-driven-development` |
|
|
124
|
-
| `Harness/
|
|
124
|
+
| `Harness/subagents.md` | `## Source Attribution`; `## Built-in Agent Roster`; `## WF Default Fan-Out`; `Controller Role`; `Efficiency Ladder`; `Review Gates`; `7:3 collaboration bias`; source markers for `npx skills find`, `dispatching-parallel-agents`, and `subagent-driven-development` |
|
|
125
|
+
| `Harness/architecture.md` | `## 2. Interface Decoupling`; `## 3. State Design`; `Avoid speculative abstraction`; layer constraints derived from actual project facts |
|
|
126
|
+
| `Harness/PROGRESS.md` | global task index with Active Task and task history; cross-task decisions |
|
|
127
|
+
| `Harness/tasks/<id>/PROGRESS.md` | `## Current Goal`, `## Phase`, `## Heartbeat`, `## Loaded Context` headings |
|
|
128
|
+
| `Harness/tasks/<id>/PLAN.md` | `## Tasks`, `## Parallel Dispatch`, `## Subagent Synthesis`, `## Verification` headings |
|
|
125
129
|
| `Harness/SETUP.md` | Only meaningful for fresh projects. If the project has its own onboarding docs, skip this file entirely (it is temporary). If kept, ensure the "Existing Project Bootstrap Sequence" is present. |
|
|
126
130
|
| `Harness/workflows/browser-e2e.md` (if installed as optional) | `data-testid`, `accessible labels/roles`, and `inputs, buttons, filters, rows, empty/error/loading states` requirement |
|
|
127
131
|
| `Harness/workflows/ts-react-frontend.md` (if installed as optional) | Same UI selector contract as above |
|
|
@@ -131,10 +135,11 @@ The harness validator checks for specific structural invariants. When comparing
|
|
|
131
135
|
|
|
132
136
|
- `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` — these are new empty files
|
|
133
137
|
- `.claude/agents/*.md` — all 9 common agents
|
|
134
|
-
- `.claude/skills/harness-*/SKILL.md`, `.claude/skills/wf-mode/SKILL.md`, and `.claude/skills/subagent-orchestrator/SKILL.md` — core harness skills, WF mode, and subagent orchestration
|
|
138
|
+
- `.claude/skills/harness-*/SKILL.md`, `.claude/skills/wf-mode/SKILL.md`, `.claude/skills/wf-update/SKILL.md`, and `.claude/skills/subagent-orchestrator/SKILL.md` — core harness skills, WF mode, and subagent orchestration
|
|
139
|
+
- `.claude/commands/update.md` — /wf update command bridge
|
|
135
140
|
- `.claude/rules/ecc/common.md` — universal rules (unless the project has custom rules in this file)
|
|
136
141
|
- `.claude/settings.json` — harness settings
|
|
137
|
-
- `Harness/lifecycle.md`, `Harness/subagents.md`, `Harness/agent-workflow.md`, `Harness/architecture.md`, `Harness/data-flow.md`, `Harness/state-machines.md` — harness runtime docs
|
|
142
|
+
- `Harness/WF.md`, `Harness/lifecycle.md`, `Harness/subagents.md`, `Harness/agent-workflow.md`, `Harness/architecture.md`, `Harness/data-flow.md`, `Harness/state-machines.md` — harness runtime docs
|
|
138
143
|
- `Harness/research/*.md` — research protocol and templates
|
|
139
144
|
- `Harness/domain/ports.md` — port contract template
|
|
140
145
|
- `AGENTS.md` — agent registry; if it already exists, ask for user consent before merging or replacing it
|
|
@@ -149,7 +154,7 @@ npx create-harness-vibe-coding@latest my-app ./my-app -y --preset web-app
|
|
|
149
154
|
|
|
150
155
|
### Template Fill Guide
|
|
151
156
|
|
|
152
|
-
Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeholder expects. Replace all markers in the doc before moving to the next doc. If a section does not apply yet, leave the `{{...}}` but record why in `Harness/PLAN.md`.
|
|
157
|
+
Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeholder expects. Replace all markers in the doc before moving to the next doc. If a section does not apply yet, leave the `{{...}}` but record why in `Harness/tasks/<task-id>/PLAN.md`.
|
|
153
158
|
|
|
154
159
|
**`Harness/research/PRD.md`** — Product scope. Fill with product facts from user input, not guesses:
|
|
155
160
|
- `{{WHY_THIS_PROJECT_EXISTS}}`: one-sentence motivation
|
|
@@ -168,8 +173,10 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
|
|
|
168
173
|
|
|
169
174
|
**`Harness/architecture.md`** — Layer structure. Derive from research-results:
|
|
170
175
|
- Fill the ASCII layer diagram with actual layer names. Do NOT add layers without a proven need.
|
|
171
|
-
- `
|
|
172
|
-
- `
|
|
176
|
+
- `Interface Decoupling`: document only real boundaries and ports. Do not add speculative factories, plugin systems, generic repositories, or config layers.
|
|
177
|
+
- `State Design`: name state owners, persistence level, legal transitions, and recovery behavior for long-running workflows.
|
|
178
|
+
- `Harness Core Components`: describe each core component (Runner, Permission Policy, Event Bus, State Store, Tool Registry) in project-specific terms.
|
|
179
|
+
- `Architectural Constraints`: add project-specific non-negotiables. Keep the domain/harness purity rules.
|
|
173
180
|
|
|
174
181
|
**`Harness/domain/ports.md`** — Cross-layer contracts. One driving port + one driven port from the first slice:
|
|
175
182
|
- `{{INBOUND_PORT_1}}`: the first inbound port (e.g., "CreateOrderPort").
|
|
@@ -177,9 +184,16 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
|
|
|
177
184
|
- For each port: fill Purpose, Preconditions, Postconditions, Error Semantics, Idempotency.
|
|
178
185
|
- Leave remaining rows as `{{...}}` until more slices add ports.
|
|
179
186
|
|
|
180
|
-
**`Harness/
|
|
187
|
+
**`Harness/PROGRESS.md`** — Global task index. Update at session start and task closeout:
|
|
188
|
+
- `## Active Task`: current active task ID.
|
|
189
|
+
- `## Task History`: closed tasks with date, result, and archive path.
|
|
190
|
+
|
|
191
|
+
**`Harness/tasks/<id>/PROGRESS.md`** — Per-task progress state. Update continuously:
|
|
181
192
|
- `## Current Goal`: one sentence, what this iteration achieves.
|
|
182
193
|
- `## Phase`: current lifecycle phase (Idea/Research/PRD/Architecture/Plan/Build/Verify/Feedback).
|
|
194
|
+
- `## Heartbeat`: last beat time, mode, blocker, recovery action.
|
|
195
|
+
|
|
196
|
+
**`Harness/tasks/<id>/PLAN.md`** — Per-task implementation plan and evidence. Update continuously:
|
|
183
197
|
- `## Success Criteria`: verifiable outcomes for this iteration.
|
|
184
198
|
- `## Tasks`: numbered tasks with owner, write set, and verify command.
|
|
185
199
|
- `## Parallel Dispatch`: only when spawning subagents — fill agent roles, read/write boundaries.
|
|
@@ -194,11 +208,11 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
|
|
|
194
208
|
- `{{EVENT_1}}`: the first event type with producer, consumers, payload fields, delivery semantics.
|
|
195
209
|
- Happy Path: fill the Mermaid sequence diagram with actual ports and actions.
|
|
196
210
|
- Failure Paths: for each failure point, document trigger, system behavior, event, caller perception, recovery.
|
|
197
|
-
- If the first slice is synchronous and stateless, leave this doc as `{{...}}` and note in PLAN.md
|
|
211
|
+
- If the first slice is synchronous and stateless, leave this doc as `{{...}}` and note in `Harness/tasks/<task-id>/PLAN.md`.
|
|
198
212
|
|
|
199
213
|
**`Harness/state-machines.md`** — State transitions (only when first slice has stateful entities):
|
|
200
214
|
- Define states, transitions, guards, and illegal transitions for the first stateful entity.
|
|
201
|
-
- If no stateful entity exists in the first slice, leave as `{{...}}` and note in PLAN.md
|
|
215
|
+
- If no stateful entity exists in the first slice, leave as `{{...}}` and note in `Harness/tasks/<task-id>/PLAN.md`.
|
|
202
216
|
|
|
203
217
|
**General rules for all templates**:
|
|
204
218
|
- Replace `{{projectName}}` with the actual project name immediately.
|
|
@@ -230,7 +244,7 @@ After research, fill these docs in order:
|
|
|
230
244
|
3. `Harness/domain/ports.md` — Define ONE driving port and ONE driven port from the first vertical slice. More ports come with more slices.
|
|
231
245
|
4. `Harness/data-flow.md` — Fill the happy path for the first slice only. Add failure paths when they differ from the happy path.
|
|
232
246
|
|
|
233
|
-
**Constraint**: If the research does not give you enough confidence to fill a section, leave the `{{...}}` placeholder and record the open question in `Harness/PLAN.md`. The strict validator will catch it.
|
|
247
|
+
**Constraint**: If the research does not give you enough confidence to fill a section, leave the `{{...}}` placeholder and record the open question in `Harness/tasks/<task-id>/PLAN.md`. The strict validator will catch it.
|
|
234
248
|
|
|
235
249
|
## User Confirmation Protocol (Non-Negotiable)
|
|
236
250
|
|
|
@@ -241,7 +255,7 @@ When user intent is unclear or ambiguous:
|
|
|
241
255
|
- **Maximum 3 blocking questions per decision point.** Ask the highest-impact questions first.
|
|
242
256
|
- **Do not act on assumptions that affect architecture, scope, stack, or user-facing behavior.**
|
|
243
257
|
- **You must have ≥95% confidence before writing implementation code.** If below that threshold, stop and ask.
|
|
244
|
-
- **Record every assumption explicitly** in `Harness/PLAN.md` so the user can correct it later.
|
|
258
|
+
- **Record every assumption explicitly** in `Harness/tasks/<task-id>/PLAN.md` so the user can correct it later.
|
|
245
259
|
- **Silent picks are forbidden.** If two valid approaches exist and you cannot decide with high confidence, present both to the user with trade-offs.
|
|
246
260
|
|
|
247
261
|
False confidence is worse than a question. If you catch yourself thinking "this is probably what they want," stop and ask.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Purpose: route humans and agents to the smallest useful context. `Harness/README.md` is the primary router.
|
|
4
4
|
|
|
5
|
-
Default load: `CLAUDE.md`, `Harness/MEMORY.md`, this file, and `Harness/
|
|
5
|
+
Default load: `CLAUDE.md`, `Harness/MEMORY.md`, this file, and `Harness/PROGRESS.md` when work is active. Do not read the whole `Harness/` tree.
|
|
6
6
|
|
|
7
7
|
## 0-1 Flow
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ For the full phase contract, load [lifecycle.md](lifecycle.md).
|
|
|
17
17
|
- This file is a router, not a full spec.
|
|
18
18
|
- If the task does not clearly match a row below, search by keywords before loading more docs.
|
|
19
19
|
- project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
|
|
20
|
-
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to
|
|
20
|
+
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
21
21
|
- Build commands, git conventions, and release notes belong in root `README.md`, not `CLAUDE.md`.
|
|
22
22
|
- README rewrites are optional project-doc work. Use `readme-optimizer` and preserve existing public docs unless the user approves a broader restructure.
|
|
23
23
|
- Code architecture belongs in [architecture.md](architecture.md) or the current feature doc, not `CLAUDE.md`.
|
|
@@ -29,7 +29,7 @@ For the full phase contract, load [lifecycle.md](lifecycle.md).
|
|
|
29
29
|
- Subagent orchestration methodology lives in [subagents.md](subagents.md).
|
|
30
30
|
- Extension rules live in [extension.md](extension.md).
|
|
31
31
|
- Context-loading rules live in [context-loading.md](context-loading.md).
|
|
32
|
-
- Progress lives in
|
|
32
|
+
- Progress lives in `Harness/PROGRESS.md`, `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, and the current feature doc.
|
|
33
33
|
|
|
34
34
|
## Keyword Routing
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ rg -n "keyword1|keyword2|keyword3" CLAUDE.md README.md Harness
|
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
3. Load only the top matching doc or the smallest matching doc pair.
|
|
46
|
-
4. If keyword search conflicts with the table below, follow the table and record the assumption in `Harness/
|
|
46
|
+
4. If keyword search conflicts with the table below, follow the table and record the assumption in `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
47
47
|
|
|
48
48
|
Keywords are retrieval hints, not project facts.
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ Keywords are retrieval hints, not project facts.
|
|
|
51
51
|
|
|
52
52
|
Load the matching row only. Add adjacent docs only when the loaded doc directly names them.
|
|
53
53
|
|
|
54
|
-
Routing priority: if a request is long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work, choose the WF row first. `wf-mode`
|
|
54
|
+
Routing priority: if a request explicitly says `/wf`, `wf mode`, `workflow mode`, or `wk mode`, or is long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work, choose the WF row first. `wf-mode` MUST then delegate subagent coordination to `subagent-orchestrator`.
|
|
55
55
|
|
|
56
56
|
| When to Read | Keywords | Load | Output |
|
|
57
57
|
| --- | --- | --- | --- |
|
|
@@ -59,13 +59,13 @@ Routing priority: if a request is long, difficult, uncertain, repeated-failure,
|
|
|
59
59
|
| Need market/tech direction | research, market, competitor, stack, library, pricing, policy | [research/README.md](research/README.md), [research/research-results.md](research/research-results.md) | research protocol, adopted/rejected choices |
|
|
60
60
|
| Need MVP/spec | PRD, MVP, scope, requirement, acceptance, non-goal | [research/PRD.md](research/PRD.md) | one-page PRD with verifiable acceptance criteria |
|
|
61
61
|
| Need architecture or boundaries | architecture, boundary, layer, domain, port, adapter, dependency | [architecture.md](architecture.md), [domain/ports.md](domain/ports.md) | layer map, ports, constraints |
|
|
62
|
-
| Need WF mode | wf, /wf, workflow mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [
|
|
63
|
-
| Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](extension.md), [
|
|
64
|
-
| README optimization | README, docs, quickstart, install docs, architecture diagram, command table, documentation polish | root `README.md`, `.claude/skills/readme-optimizer/SKILL.md`, [
|
|
65
|
-
| Need implementation plan | plan, task, write set, verify, milestone, progress | [
|
|
66
|
-
| Need parallel agents | parallel, dispatch, handoff, write set, dependency, status | [subagents.md](subagents.md), [dispatch.md](dispatch.md), [context-loading.md](context-loading.md),
|
|
62
|
+
| Need WF mode | wf, /wf, wf mode, workflow mode, wk mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | exploration plan, second plan, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
|
|
63
|
+
| Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](extension.md), [PROGRESS.md](PROGRESS.md), root `README.md` and package/CI files | discovered project facts, preserved config, manual registration plan |
|
|
64
|
+
| README optimization | README, docs, quickstart, install docs, architecture diagram, command table, documentation polish | root `README.md`, `.claude/skills/readme-optimizer/SKILL.md`, [PROGRESS.md](PROGRESS.md), [architecture.md](architecture.md) as needed | approved README mode, preserved sections, proposed diff plan |
|
|
65
|
+
| Need implementation plan | plan, task, write set, verify, milestone, progress | [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, [agent-workflow.md](agent-workflow.md) | tasks, write set, verification commands |
|
|
66
|
+
| Need parallel agents | parallel, dispatch, handoff, write set, dependency, status | [subagents.md](subagents.md), [dispatch.md](dispatch.md), [context-loading.md](context-loading.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | orchestration plan, dispatch table, agent roles, read/write sets |
|
|
67
67
|
| Adding stack-specific agents/skills | extension, agent, skill, rule, hook, stack-specific, compatibility | [extension.md](extension.md), [dispatch.md](dispatch.md) | compatible agents, skills, rules, hooks |
|
|
68
|
-
| Optional workflow installed | workflow, optional, browser-e2e, ui-ux-review, github-pr-review, python-backend, ts-react-frontend | matching `workflows/*.md
|
|
68
|
+
| Optional workflow installed | workflow, optional, browser-e2e, ui-ux-review, github-pr-review, python-backend, ts-react-frontend | matching `workflows/*.md` (if installed), [extension.md](extension.md) | workflow-specific evidence, commands, fallback path |
|
|
69
69
|
| Need durable memory or reflection | memory, remember, preference, correction, tool failure, lesson, reflection | [MEMORY.md](MEMORY.md), `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` | concise newest-first memory entry or no-op rationale |
|
|
70
70
|
| Need subagents | subagent, role pack, context, inject, return format, orchestrator | [subagents.md](subagents.md), [context-loading.md](context-loading.md), [dispatch.md](dispatch.md) | controller plan, role-specific context pack, dispatch pack |
|
|
71
71
|
| Need feature work | feature, implementation, TDD, test, review, closeout | [features/_template.md](features/_template.md), [agent-workflow.md](agent-workflow.md) | feature doc, tests, implementation loop |
|
|
@@ -73,11 +73,12 @@ Routing priority: if a request is long, difficult, uncertain, repeated-failure,
|
|
|
73
73
|
| Stateful behavior changes | state, transition, guard, illegal transition, state machine | [state-machines.md](state-machines.md) | states, transitions, illegal transitions |
|
|
74
74
|
| Review or release check | review, release, finding, risk, evidence, verification | [agent-workflow.md](agent-workflow.md), current feature doc | findings, verification evidence |
|
|
75
75
|
| Harness readiness check | validate, readiness, placeholder, missing file, release gate | `Harness/scripts/validate-harness.mjs`, `Harness/scripts/validate-harness.mjs --strict` | missing files and unresolved project placeholders |
|
|
76
|
+
| Need harness update | update, /wf update, check for updates, harness version | `.claude/skills/wf-update/SKILL.md`, `Harness/.harness-version` | update plan, safe incremental update, merge candidates |
|
|
76
77
|
|
|
77
78
|
## Gates
|
|
78
79
|
|
|
79
80
|
- Move phases in order unless the user asks for a fast lane.
|
|
80
|
-
- Use `/wf` when a task is long, difficult, uncertain, multi-file, or repeatedly failing.
|
|
81
|
+
- Use `/wf`, `wf mode`, `workflow mode`, or `wk mode` when a task is long, difficult, uncertain, multi-file, or repeatedly failing.
|
|
81
82
|
- Do not code before the PRD has MVP, non-goals, and acceptance criteria.
|
|
82
83
|
- Do not cross a layer boundary without reading `domain/ports.md` and updating architecture or ports.
|
|
83
84
|
- Before adding failure paths, read `data-flow.md`.
|
|
@@ -85,11 +86,11 @@ Routing priority: if a request is long, difficult, uncertain, repeated-failure,
|
|
|
85
86
|
- Unsure whether to open a feature doc? Read `agent-workflow.md` Section 1.
|
|
86
87
|
- Do not spawn a subagent without a role, read boundary, write boundary, and return contract.
|
|
87
88
|
- Do not run writing agents in parallel unless write sets are disjoint.
|
|
88
|
-
- Before coordinating multiple agents, fill `PLAN.md#
|
|
89
|
-
- In WF mode, update `
|
|
89
|
+
- Before coordinating multiple agents, fill `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch` and follow `subagents.md` plus `dispatch.md`; if the work also matches WF triggers, enter WF mode first.
|
|
90
|
+
- In WF mode, update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` before long commands, after failures, and at closeout.
|
|
90
91
|
- Do not add stack-specific agents or skills without following `extension.md`.
|
|
91
92
|
- Do not close work without tests or recorded manual verification.
|
|
92
|
-
- Do not mark work `Verified` until evidence is recorded in `PLAN.md` or the feature doc.
|
|
93
|
+
- Do not mark work `Verified` until evidence is recorded in the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` or the feature doc.
|
|
93
94
|
- Run `node Harness/scripts/validate-harness.mjs` for scaffold structure; run `node Harness/scripts/validate-harness.mjs --strict` after bootstrap and before release.
|
|
94
95
|
- If a doc still has `{{...}}`, treat that section as a template, not project fact.
|
|
95
96
|
|
|
@@ -98,7 +99,10 @@ Routing priority: if a request is long, difficult, uncertain, repeated-failure,
|
|
|
98
99
|
```text
|
|
99
100
|
Harness/README.md router only
|
|
100
101
|
Harness/MEMORY.md resource index
|
|
101
|
-
Harness/
|
|
102
|
+
Harness/PROGRESS.md global task index and cross-task decisions
|
|
103
|
+
Harness/tasks/<id>/PROGRESS.md per-task progress, phase, heartbeat
|
|
104
|
+
Harness/tasks/<id>/PLAN.md per-task implementation plan and evidence
|
|
105
|
+
Harness/tasks/_template/ task capsule template (copy to create new task)
|
|
102
106
|
Harness/WF.md long-task workflow and recovery loop
|
|
103
107
|
Harness/lifecycle.md 0-1 product flow
|
|
104
108
|
Harness/subagents.md controller-led subagent orchestration
|
|
@@ -114,7 +118,7 @@ Harness/features/_template.md feature work packet
|
|
|
114
118
|
Harness/research/README.md research protocol
|
|
115
119
|
Harness/research/PRD.md product scope
|
|
116
120
|
Harness/research/research-results.md research results
|
|
117
|
-
Harness/workflows/*.md optional workflow evidence rules
|
|
121
|
+
Harness/workflows/*.md optional workflow evidence rules (if installed)
|
|
118
122
|
Harness/memory/tool-usage-reflections.md repeated tool failures and better command patterns
|
|
119
123
|
Harness/memory/user-corrections-preferences.md durable user corrections and preferences
|
|
120
124
|
Harness/memory/agent-lessons-patterns.md reusable review/debug lessons
|
|
@@ -123,4 +127,7 @@ Harness/scripts/validate-harness.mjs lightweight harness gate
|
|
|
123
127
|
.claude/skills/* skill-style dynamic loaders
|
|
124
128
|
.claude/skills/readme-optimizer/SKILL.md README preservation and optional structure pass
|
|
125
129
|
.claude/commands/wf.md slash command bridge into wf-mode
|
|
130
|
+
.claude/skills/wf-update/SKILL.md GitHub-based harness update
|
|
131
|
+
.claude/commands/update.md /wf update slash command bridge
|
|
132
|
+
Harness/.harness-version scaffold version and file checksums
|
|
126
133
|
```
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
## 1. Port Classification
|
|
12
12
|
|
|
13
|
+
Create a port only for a real boundary: external service, storage, SDK, process, browser/API boundary, permission boundary, or cross-layer dependency. Do not create a port only because an interface might be useful someday.
|
|
14
|
+
|
|
13
15
|
### 1.1 Driving Ports (Inbound — external calls application)
|
|
14
16
|
|
|
15
17
|
| Port | Definition Location | Purpose |
|
|
@@ -67,6 +69,7 @@ Fill in each port using the format below:
|
|
|
67
69
|
- {{INVARIANT_1}}
|
|
68
70
|
- {{INVARIANT_2}}
|
|
69
71
|
- New ports must be defined in `domain/ports`; adapters go in `infrastructure/`.
|
|
72
|
+
- Each port needs one clear owner and at least one real caller. Avoid speculative ports without a concrete adapter or testability need.
|
|
70
73
|
|
|
71
74
|
---
|
|
72
75
|
|