create-harness-vibe-coding 0.6.2 → 0.6.4
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/package.json +1 -1
- package/src/generator.js +466 -466
- package/src/index.js +355 -355
- package/templates/common/.claude/agents/architect.md +31 -35
- package/templates/common/.claude/agents/context-master.md +0 -1
- package/templates/common/.claude/agents/debugger.md +0 -1
- package/templates/common/.claude/agents/docs-researcher.md +41 -43
- package/templates/common/.claude/agents/implementer.md +0 -1
- package/templates/common/.claude/agents/memory-master.md +0 -1
- package/templates/common/.claude/agents/planner.md +0 -1
- package/templates/common/.claude/agents/researcher.md +0 -1
- package/templates/common/.claude/agents/reviewer.md +34 -35
- package/templates/common/.claude/agents/test-writer.md +0 -1
- package/templates/common/.claude/agents/verifier.md +0 -1
- package/templates/common/.claude/commands/wf-max.md +7 -0
- package/templates/common/.claude/commands/{update.md → wf-update.md} +4 -0
- package/templates/common/.claude/commands/wf.md +10 -3
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +2 -1
- package/templates/common/.claude/skills/wf-max/SKILL.md +29 -70
- package/templates/common/.claude/skills/{readme-optimizer → wf-readme}/SKILL.md +1 -1
- package/templates/common/.claude/skills/wf-review/SKILL.md +50 -50
- package/templates/common/.claude/skills/wf-update/SKILL.md +58 -58
- package/templates/common/CLAUDE.md +77 -76
- package/templates/common/MEMORY.md +73 -76
- package/templates/common/README.md +1 -1
- package/templates/common/SETUP.md +273 -341
- package/templates/common/docs/README.md +131 -145
- package/templates/common/docs/harness/WF.md +13 -1
- package/templates/common/docs/harness/agent-workflow.md +94 -94
- package/templates/common/docs/harness/architecture.md +1 -1
- package/templates/common/docs/harness/context-loading.md +104 -108
- package/templates/common/docs/harness/extension.md +70 -79
- package/templates/common/docs/harness/lifecycle.md +33 -33
- package/templates/common/docs/harness/subagents.md +1 -1
- package/templates/common/docs/research/PRD.md +65 -65
- package/templates/common/docs/research/README.md +169 -169
- package/templates/common/scripts/validate-harness.mjs +439 -460
- package/templates/optional/skills/browser-e2e/.claude/commands/wf-browser.md +25 -0
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -42
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -0
- package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +55 -34
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -40
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -40
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -43
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -40
- package/templates/common/.claude/skills/harness-build-loop/SKILL.md +0 -23
- package/templates/common/.claude/skills/harness-context/SKILL.md +0 -26
- package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +0 -20
- package/templates/common/.claude/skills/harness-research/SKILL.md +0 -30
- package/templates/common/.claude/skills/harness-router/SKILL.md +0 -16
- package/templates/common/.claude/skills/wf-mode/SKILL.md +0 -55
- package/templates/common/docs/domain/ports.md +0 -76
- package/templates/common/docs/features/_template.md +0 -177
- package/templates/common/docs/harness/PLAN.md +0 -52
- package/templates/common/docs/harness/data-flow.md +0 -59
- package/templates/common/docs/harness/state-machines.md +0 -58
- /package/templates/common/.claude/commands/{learn.md → wf-learn.md} +0 -0
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ui-ux-review
|
|
3
|
-
description: Screenshot-driven UI and UX review for responsive behavior, accessibility, visual polish, and task clarity.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# UI/UX Review
|
|
7
|
-
|
|
8
|
-
## When To Use
|
|
9
|
-
|
|
10
|
-
Use this skill when reviewing or changing user-facing screens, layouts, visual hierarchy, interaction states, accessibility, or responsive behavior.
|
|
11
|
-
|
|
12
|
-
## Docs To Load
|
|
13
|
-
|
|
14
|
-
- `Harness/workflows/ui-ux-review.md`
|
|
15
|
-
- `Harness/PLAN.md`
|
|
16
|
-
- Existing design system, component, or style documentation.
|
|
17
|
-
|
|
18
|
-
## Required Inputs
|
|
19
|
-
|
|
20
|
-
- Screens, routes, or components under review.
|
|
21
|
-
- Target users and primary tasks.
|
|
22
|
-
- Breakpoints, themes, and accessibility expectations.
|
|
23
|
-
|
|
24
|
-
## Allowed Writes
|
|
25
|
-
|
|
26
|
-
- UI code and style files already in scope for the task.
|
|
27
|
-
- Screenshot or audit artifacts in existing evidence folders.
|
|
28
|
-
- `
|
|
29
|
-
|
|
30
|
-
## Output Format
|
|
31
|
-
|
|
32
|
-
Return prioritized findings with file or screen references, evidence, recommended fixes, commands run, and residual risks.
|
|
33
|
-
|
|
34
|
-
## PLAN.md Updates
|
|
35
|
-
|
|
36
|
-
Update `
|
|
37
|
-
|
|
38
|
-
## dispatch.md Usage
|
|
39
|
-
|
|
40
|
-
Use `Harness/dispatch.md` only for independent review streams such as separate routes or breakpoints.
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-review
|
|
3
|
+
description: Screenshot-driven UI and UX review for responsive behavior, accessibility, visual polish, and task clarity.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI/UX Review
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when reviewing or changing user-facing screens, layouts, visual hierarchy, interaction states, accessibility, or responsive behavior.
|
|
11
|
+
|
|
12
|
+
## Docs To Load
|
|
13
|
+
|
|
14
|
+
- `Harness/workflows/ui-ux-review.md`
|
|
15
|
+
- `Harness/PROGRESS.md` and current task `tasks/<id>/PLAN.md`
|
|
16
|
+
- Existing design system, component, or style documentation.
|
|
17
|
+
|
|
18
|
+
## Required Inputs
|
|
19
|
+
|
|
20
|
+
- Screens, routes, or components under review.
|
|
21
|
+
- Target users and primary tasks.
|
|
22
|
+
- Breakpoints, themes, and accessibility expectations.
|
|
23
|
+
|
|
24
|
+
## Allowed Writes
|
|
25
|
+
|
|
26
|
+
- UI code and style files already in scope for the task.
|
|
27
|
+
- Screenshot or audit artifacts in existing evidence folders.
|
|
28
|
+
- Current task `tasks/<id>/PLAN.md` when the review is part of a tracked plan.
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
Return prioritized findings with file or screen references, evidence, recommended fixes, commands run, and residual risks.
|
|
33
|
+
|
|
34
|
+
## PROGRESS.md & Task PLAN.md Updates
|
|
35
|
+
|
|
36
|
+
Update current task `tasks/<id>/PLAN.md` only for tracked review tasks or when recording required evidence.
|
|
37
|
+
|
|
38
|
+
## dispatch.md Usage
|
|
39
|
+
|
|
40
|
+
Use `Harness/dispatch.md` only for independent review streams such as separate routes or breakpoints.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-build-loop
|
|
3
|
-
description: Use for implementation, review, debugging, verification, and closing a feature.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Harness Build Loop
|
|
7
|
-
|
|
8
|
-
Load:
|
|
9
|
-
|
|
10
|
-
- `Harness/agent-workflow.md`
|
|
11
|
-
- `Harness/subagents.md` when more than one agent, reviewer, or recovery pass is useful
|
|
12
|
-
- `Harness/dispatch.md` when more than one agent is useful
|
|
13
|
-
- `Harness/PROGRESS.md`
|
|
14
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
|
|
15
|
-
- current feature doc if present
|
|
16
|
-
|
|
17
|
-
Follow:
|
|
18
|
-
|
|
19
|
-
```text
|
|
20
|
-
acceptance criteria -> failing test/manual check -> implementation -> verify -> review -> docs sync
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Close only with recorded verification evidence.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-context
|
|
3
|
-
description: Use before spawning subagents, splitting work, or when context is growing.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Harness Context
|
|
7
|
-
|
|
8
|
-
Load:
|
|
9
|
-
|
|
10
|
-
- `Harness/subagents.md`
|
|
11
|
-
- `Harness/context-loading.md`
|
|
12
|
-
- `Harness/dispatch.md` when more than one agent is useful
|
|
13
|
-
- `Harness/PROGRESS.md`
|
|
14
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
|
|
15
|
-
- current feature doc if present
|
|
16
|
-
|
|
17
|
-
For each subagent or bounded pass, provide:
|
|
18
|
-
|
|
19
|
-
- role
|
|
20
|
-
- task
|
|
21
|
-
- mode
|
|
22
|
-
- read boundary
|
|
23
|
-
- write boundary
|
|
24
|
-
- dependency
|
|
25
|
-
- injected docs
|
|
26
|
-
- return format
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-lifecycle
|
|
3
|
-
description: Use for raw ideas, vague product requests, 0-1 planning, PRD work, scope decisions, or feedback loops.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Harness Lifecycle
|
|
7
|
-
|
|
8
|
-
Load:
|
|
9
|
-
|
|
10
|
-
- `Harness/lifecycle.md`
|
|
11
|
-
- `Harness/research/PRD.md`
|
|
12
|
-
- `Harness/PROGRESS.md`
|
|
13
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
|
|
14
|
-
|
|
15
|
-
Output:
|
|
16
|
-
|
|
17
|
-
- current phase
|
|
18
|
-
- blocking questions or recorded assumptions
|
|
19
|
-
- next artifact to fill
|
|
20
|
-
- gate before coding
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-research
|
|
3
|
-
description: Use for market, product, stack, dependency, API, pricing, legal, security, or open-source research before PRD or architecture decisions.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Harness Research
|
|
7
|
-
|
|
8
|
-
Load:
|
|
9
|
-
|
|
10
|
-
- `Harness/research/README.md`
|
|
11
|
-
- `Harness/research/research-results.md`
|
|
12
|
-
- `Harness/PROGRESS.md`
|
|
13
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
|
|
14
|
-
|
|
15
|
-
Define:
|
|
16
|
-
|
|
17
|
-
- research question
|
|
18
|
-
- decision needed
|
|
19
|
-
- source boundaries
|
|
20
|
-
- tool choice: local / GitHub / Tavily / TinyFish / built-in web search / user-provided sources
|
|
21
|
-
- fallback when the preferred tool is unavailable
|
|
22
|
-
- return format
|
|
23
|
-
|
|
24
|
-
Return:
|
|
25
|
-
|
|
26
|
-
- queries and tools used
|
|
27
|
-
- sources with links and source type
|
|
28
|
-
- adopted / rejected / watch decisions
|
|
29
|
-
- risks and unknowns
|
|
30
|
-
- patch-ready `Harness/research/research-results.md` update
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: harness-router
|
|
3
|
-
description: Use at the start of any task, or when unsure which harness document applies. Keeps context small by routing to one primary doc.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Harness Router
|
|
7
|
-
|
|
8
|
-
1. Read `Harness/README.md`.
|
|
9
|
-
2. Identify the current situation from "Load By Task".
|
|
10
|
-
3. Apply routing priority before loading extra files:
|
|
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
|
-
- Bounded subagent-only coordination routes to `subagent-orchestrator`.
|
|
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/tasks/<task-id>/PROGRESS.md` and use `harness-context`.
|
|
15
|
-
|
|
16
|
-
Do not bulk-read `Harness/`.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: wf-mode
|
|
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
|
-
---
|
|
5
|
-
|
|
6
|
-
# WF Mode
|
|
7
|
-
|
|
8
|
-
Load:
|
|
9
|
-
|
|
10
|
-
- `Harness/WF.md`
|
|
11
|
-
- `Harness/PROGRESS.md`
|
|
12
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
|
|
13
|
-
- `Harness/agent-workflow.md` when implementation, review, or verification starts
|
|
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
|
|
15
|
-
- current feature doc when one exists
|
|
16
|
-
- `Harness/workflows/browser-e2e.md` when browser-visible behavior is affected and the workflow is installed
|
|
17
|
-
|
|
18
|
-
Follow:
|
|
19
|
-
|
|
20
|
-
```text
|
|
21
|
-
intake + 95% confidence gate
|
|
22
|
-
-> parallel read-only exploration
|
|
23
|
-
-> synthesis and second plan
|
|
24
|
-
-> failing test or manual check
|
|
25
|
-
-> bounded implementation
|
|
26
|
-
-> review
|
|
27
|
-
-> verification
|
|
28
|
-
-> debugger recovery loop when verification fails (dispatch context-master then memory-master, or use /wf-learn)
|
|
29
|
-
-> context-master session analysis + knowledge extraction
|
|
30
|
-
-> memory-master consolidation
|
|
31
|
-
-> close with evidence
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Rules:
|
|
35
|
-
|
|
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.
|
|
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.
|
|
41
|
-
- If subagents are unavailable, emulate the same roles as separate bounded passes.
|
|
42
|
-
- Do not claim browser/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
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.
|
|
44
|
-
- Before closeout, dispatch `context-master` then `memory-master` (or use `/wf-learn`) to extract and consolidate lessons. Do not skip — the auto-trigger is unreliable; make this a mandatory gate.
|
|
45
|
-
|
|
46
|
-
Return:
|
|
47
|
-
|
|
48
|
-
- changed files
|
|
49
|
-
- agents or bounded passes used
|
|
50
|
-
- memory-master / context-master dispatches
|
|
51
|
-
- commands run
|
|
52
|
-
- browser/API evidence when applicable
|
|
53
|
-
- review findings
|
|
54
|
-
- remaining risks
|
|
55
|
-
- updated heartbeat status
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Port Contracts — {{projectName}}
|
|
2
|
-
|
|
3
|
-
> **Responsibility**: Define cross-layer interface contracts. These are the "legal contracts" of a layered architecture. Each port documents not only its signature, but also preconditions, postconditions, and error semantics.
|
|
4
|
-
>
|
|
5
|
-
> **Principle**: Port documentation != API reference documentation. It is a contract that specifies caller obligations and implementer guarantees.
|
|
6
|
-
>
|
|
7
|
-
> Philosophical origins: Bertrand Meyer's Design by Contract (Eiffel) + Alistair Cockburn's hexagonal architecture port documentation.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 1. Port Classification
|
|
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
|
-
|
|
15
|
-
### 1.1 Driving Ports (Inbound — external calls application)
|
|
16
|
-
|
|
17
|
-
| Port | Definition Location | Purpose |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| `{{INBOUND_PORT_1}}` | `{{LOCATION}}` | {{DESCRIPTION}} |
|
|
20
|
-
|
|
21
|
-
### 1.2 Driven Ports (Outbound — application calls external)
|
|
22
|
-
|
|
23
|
-
| Port | Definition Location | Purpose |
|
|
24
|
-
| --- | --- | --- |
|
|
25
|
-
| `{{OUTBOUND_PORT_1}}` | `{{LOCATION}}` | {{DESCRIPTION}} |
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 2. Port Definition Template
|
|
30
|
-
|
|
31
|
-
Fill in each port using the format below:
|
|
32
|
-
|
|
33
|
-
- **Category**: Driving / Driven
|
|
34
|
-
- **Definition Location**: `{{FILE_PATH}}`
|
|
35
|
-
- **Contract Class**: `{{CLASS_OR_INTERFACE}}`
|
|
36
|
-
|
|
37
|
-
### Purpose
|
|
38
|
-
|
|
39
|
-
{{WHAT_THIS_PORT_DOES}}
|
|
40
|
-
|
|
41
|
-
### Methods
|
|
42
|
-
|
|
43
|
-
**Preconditions** (caller must guarantee):
|
|
44
|
-
- {{PRECONDITION_1}}
|
|
45
|
-
- {{PRECONDITION_2}}
|
|
46
|
-
|
|
47
|
-
**Postconditions** (implementer guarantees):
|
|
48
|
-
- {{POSTCONDITION_1}}
|
|
49
|
-
- {{POSTCONDITION_2}}
|
|
50
|
-
|
|
51
|
-
**Error Semantics**:
|
|
52
|
-
|
|
53
|
-
| Exception Type | Trigger Condition | Caller Should |
|
|
54
|
-
| --- | --- | --- |
|
|
55
|
-
| `{{EXCEPTION_TYPE}}` | {{CONDITION}} | {{CALLER_ACTION}} |
|
|
56
|
-
|
|
57
|
-
**Idempotency**: {{YES_NO_AND_DETAILS}}
|
|
58
|
-
|
|
59
|
-
### Known Implementations
|
|
60
|
-
|
|
61
|
-
| Adapter | Location | Purpose |
|
|
62
|
-
| --- | --- | --- |
|
|
63
|
-
| `{{ADAPTER_NAME}}` | `{{LOCATION}}` | {{PURPOSE}} |
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 3. Cross-Port Invariants
|
|
68
|
-
|
|
69
|
-
- {{INVARIANT_1}}
|
|
70
|
-
- {{INVARIANT_2}}
|
|
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.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
> **Note**: The current ports.md is a template. Replace `{{...}}` placeholders with your project's domain details. Refer to `Harness/data-flow.md` to understand how ports are orchestrated.
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# {{FEATURE_NAME}}
|
|
2
|
-
|
|
3
|
-
> **When to use**: Every PRD scope item in `Harness/research/PRD.md` Section 2 must have a feature doc — either a new one from this template, or an iteration on an existing one. Do not code a PRD scope item without a corresponding features doc.
|
|
4
|
-
>
|
|
5
|
-
> **New vs iterate**: If the scope item has ≥85% overlap with an existing feature doc, iterate the existing doc (bump `Version`, add a `## Changelog` entry). If overlap is below 85%, create a new file from this template. When in doubt, ask the user.
|
|
6
|
-
|
|
7
|
-
> **Status**: Draft / In Progress / Blocked / Done
|
|
8
|
-
> **Created**: {{YYYY-MM-DD}}
|
|
9
|
-
> **Version**: 1
|
|
10
|
-
> **Owner**: {{OWNER_OR_AGENT}}
|
|
11
|
-
> **Related Docs**: {{PRD_OR_ARCH_DOC_LINKS}}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. Requirements
|
|
16
|
-
|
|
17
|
-
### 1.1 Background
|
|
18
|
-
|
|
19
|
-
{{WHY_THIS_FEATURE_EXISTS}}
|
|
20
|
-
|
|
21
|
-
### 1.2 Goals
|
|
22
|
-
|
|
23
|
-
- {{GOAL_1}}
|
|
24
|
-
- {{GOAL_2}}
|
|
25
|
-
|
|
26
|
-
### 1.3 Non-Goals
|
|
27
|
-
|
|
28
|
-
- {{NON_GOAL_1}}
|
|
29
|
-
- {{NON_GOAL_2}}
|
|
30
|
-
|
|
31
|
-
### 1.4 Acceptance Criteria
|
|
32
|
-
|
|
33
|
-
- [ ] {{ACCEPTANCE_CRITERION_1}}
|
|
34
|
-
- [ ] {{ACCEPTANCE_CRITERION_2}}
|
|
35
|
-
- [ ] {{ACCEPTANCE_CRITERION_3}}
|
|
36
|
-
|
|
37
|
-
### 1.5 Optimistic UI Rollback
|
|
38
|
-
|
|
39
|
-
If any UI mutation happens before an async operation completes (DOM replacement,
|
|
40
|
-
state update, visual feedback), list the rollback path for when the operation fails:
|
|
41
|
-
|
|
42
|
-
| Mutation | Failure Recovery |
|
|
43
|
-
|----------|-----------------|
|
|
44
|
-
| {{MUTATION_1}} | {{ROLLBACK_1}} |
|
|
45
|
-
| Not applicable — no optimistic mutations are used. | |
|
|
46
|
-
|
|
47
|
-
### 1.6 UI Automation Hooks
|
|
48
|
-
|
|
49
|
-
For TS/React or browser workflows, define required stable accessible labels/roles and stable test hooks such as `data-testid` before implementation. These selectors must cover critical UI controls and states so CDP, Playwright, and manual verification can target inputs, buttons, filters, rows, empty/error/loading states, dialogs, navigation, and submitted/saved/error feedback without brittle DOM paths.
|
|
50
|
-
|
|
51
|
-
| Element / State | Accessible Role / Label | `data-testid` | Verification Target |
|
|
52
|
-
| --- | --- | --- | --- |
|
|
53
|
-
| {{INPUT_OR_CONTROL}} | {{ROLE_OR_LABEL}} | {{DATA_TESTID}} | {{PLAYWRIGHT_OR_MANUAL_CHECK}} |
|
|
54
|
-
| {{EMPTY_ERROR_LOADING_OR_ROW_STATE}} | {{ROLE_OR_LABEL}} | {{DATA_TESTID}} | {{PLAYWRIGHT_OR_MANUAL_CHECK}} |
|
|
55
|
-
| Not UI-facing | N/A | N/A | N/A |
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 2. Design
|
|
60
|
-
|
|
61
|
-
### 2.1 Impact Scope
|
|
62
|
-
|
|
63
|
-
| Area | Impacted? | Notes |
|
|
64
|
-
| --- | --- | --- |
|
|
65
|
-
| `Harness/architecture.md` | {{YES_NO}} | {{NOTE}} |
|
|
66
|
-
| `Harness/domain/ports.md` | {{YES_NO}} | {{NOTE}} |
|
|
67
|
-
| `Harness/data-flow.md` | {{YES_NO}} | {{NOTE}} |
|
|
68
|
-
| `Harness/state-machines.md` | {{YES_NO}} | {{NOTE}} |
|
|
69
|
-
| tests | {{YES_NO}} | {{NOTE}} |
|
|
70
|
-
|
|
71
|
-
### 2.2 Allowed Write Set
|
|
72
|
-
|
|
73
|
-
- `{{PATH_OR_GLOB_1}}`
|
|
74
|
-
- `{{PATH_OR_GLOB_2}}`
|
|
75
|
-
|
|
76
|
-
### 2.3 Forbidden Scope
|
|
77
|
-
|
|
78
|
-
- `{{PATH_OR_BEHAVIOR_1}}`
|
|
79
|
-
- `{{PATH_OR_BEHAVIOR_2}}`
|
|
80
|
-
|
|
81
|
-
### 2.4 Approach
|
|
82
|
-
|
|
83
|
-
#### Candidate Approaches
|
|
84
|
-
|
|
85
|
-
| Approach | Pros | Cons | Decision |
|
|
86
|
-
| --- | --- | --- | --- |
|
|
87
|
-
| {{OPTION_A}} | {{PROS_A}} | {{CONS_A}} | {{ACCEPT_REJECT}} |
|
|
88
|
-
| {{OPTION_B}} | {{PROS_B}} | {{CONS_B}} | {{ACCEPT_REJECT}} |
|
|
89
|
-
|
|
90
|
-
#### Rationale
|
|
91
|
-
|
|
92
|
-
{{SELECTED_DESIGN_AND_RATIONALE}}
|
|
93
|
-
|
|
94
|
-
### 2.5 Edge Cases
|
|
95
|
-
|
|
96
|
-
- {{EDGE_CASE_1}} -> {{EXPECTED_BEHAVIOR_1}}
|
|
97
|
-
- {{EDGE_CASE_2}} -> {{EXPECTED_BEHAVIOR_2}}
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## 3. Tasks
|
|
102
|
-
|
|
103
|
-
> Every task must have a verification method. When a subagent is needed, define its role and write set first.
|
|
104
|
-
|
|
105
|
-
| # | Task | Owner | Write Set | Verify |
|
|
106
|
-
| --- | --- | --- | --- | --- |
|
|
107
|
-
| 1 | {{WRITE_FAILING_TEST_OR_DOC_CHECK}} | {{OWNER}} | `{{PATH}}` | `{{COMMAND_OR_CHECK}}` |
|
|
108
|
-
| 2 | {{IMPLEMENT_MINIMAL_CHANGE}} | {{OWNER}} | `{{PATH}}` | `{{COMMAND_OR_CHECK}}` |
|
|
109
|
-
| 3 | {{SYNC_DOCS_OR_BOUNDARIES}} | {{OWNER}} | `{{PATH}}` | `{{COMMAND_OR_CHECK}}` |
|
|
110
|
-
|
|
111
|
-
### Subagent Plan (required — justify if all No)
|
|
112
|
-
|
|
113
|
-
Estimate the context budget for this feature. If the main agent would need to read >5 files or modify >3 files, subagents are mandatory per `.claude/rules/ecc/common.md`.
|
|
114
|
-
|
|
115
|
-
| Agent / Pass | Required? | Mode | Read Boundary | Write Set | Verify |
|
|
116
|
-
| --- | --- | --- | --- | --- | --- |
|
|
117
|
-
| Planner | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{CHECK}}` |
|
|
118
|
-
| Researcher / Docs Researcher | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{CHECK}}` |
|
|
119
|
-
| Architect | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{CHECK}}` |
|
|
120
|
-
| Explorer Pass | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{CHECK}}` |
|
|
121
|
-
| Test Writer | {{YES_NO}} | Serial Write | `{{SCOPE}}` | `{{PATH}}` | `{{COMMAND}}` |
|
|
122
|
-
| Implementer / Debugger | {{YES_NO}} | Serial Write | `{{SCOPE}}` | `{{PATH}}` | `{{COMMAND}}` |
|
|
123
|
-
| Reviewer | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{CHECK}}` |
|
|
124
|
-
| Verifier | {{YES_NO}} | Parallel Read | `{{SCOPE}}` | none | `{{COMMANDS}}` |
|
|
125
|
-
|
|
126
|
-
**If all roles are No, justify:** {{WHY_MAIN_AGENT_CAN_HANDLE_ALONE}}
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 4. Verification
|
|
131
|
-
|
|
132
|
-
### 4.1 Test Results
|
|
133
|
-
|
|
134
|
-
| Command | Result | Notes |
|
|
135
|
-
| --- | --- | --- |
|
|
136
|
-
| `{{TEST_COMMAND}}` | {{PASS_FAIL_NOT_RUN}} | {{NOTES}} |
|
|
137
|
-
| `{{OTHER_COMMAND}}` | {{PASS_FAIL_NOT_RUN}} | {{NOTES}} |
|
|
138
|
-
|
|
139
|
-
### 4.2 Review Findings
|
|
140
|
-
|
|
141
|
-
- {{FINDING_OR_NONE}}
|
|
142
|
-
|
|
143
|
-
### 4.3 Docs Sync
|
|
144
|
-
|
|
145
|
-
- [ ] `Harness/architecture.md`
|
|
146
|
-
- [ ] `Harness/domain/ports.md`
|
|
147
|
-
- [ ] `Harness/data-flow.md`
|
|
148
|
-
- [ ] `Harness/state-machines.md`
|
|
149
|
-
- [ ] `Harness/research/research-results.md`
|
|
150
|
-
- [ ] Not needed because {{REASON}}
|
|
151
|
-
|
|
152
|
-
### 4.4 Decision Log
|
|
153
|
-
|
|
154
|
-
| Date | Decision | Reason |
|
|
155
|
-
| --- | --- | --- |
|
|
156
|
-
| {{YYYY-MM-DD}} | {{DECISION}} | {{REASON}} |
|
|
157
|
-
|
|
158
|
-
### 4.5 Closeout
|
|
159
|
-
|
|
160
|
-
- [ ] Acceptance criteria satisfied.
|
|
161
|
-
- [ ] Tests or manual verification recorded.
|
|
162
|
-
- [ ] Boundary impact documented.
|
|
163
|
-
- [ ] Remaining risks listed or explicitly none.
|
|
164
|
-
- [ ] If docs/code/tests conflicted, Decision Log records how it was resolved.
|
|
165
|
-
|
|
166
|
-
Remaining risks:
|
|
167
|
-
- {{RISK_OR_NONE}}
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## 5. Changelog
|
|
172
|
-
|
|
173
|
-
> Only populate when iterating an existing feature doc (Version ≥ 2).
|
|
174
|
-
|
|
175
|
-
| Version | Date | What Changed | Reason |
|
|
176
|
-
| --- | --- | --- | --- |
|
|
177
|
-
| 1 | {{YYYY-MM-DD}} | Initial version | — |
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# PLAN.md — DEPRECATED
|
|
2
|
-
|
|
3
|
-
Workflow state has moved to task-capsule structure. Do not append new content here.
|
|
4
|
-
|
|
5
|
-
Active state:
|
|
6
|
-
- `Harness/PROGRESS.md` — global task index and cross-task decisions
|
|
7
|
-
- `Harness/tasks/<task-id>/PROGRESS.md` — per-task progress, phase, heartbeat
|
|
8
|
-
- `Harness/tasks/<task-id>/PLAN.md` — per-task implementation plan, verification evidence
|
|
9
|
-
|
|
10
|
-
Templates:
|
|
11
|
-
- `Harness/tasks/_template/` — copy this directory to create a new task
|
|
12
|
-
|
|
13
|
-
## Legacy Content (historical reference only)
|
|
14
|
-
|
|
15
|
-
The sections below are archived from the monolithic PLAN.md era. Active task data has been migrated to `Harness/tasks/`.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
### Historical: Dogfood Bootstrap
|
|
20
|
-
|
|
21
|
-
Goal: Dogfood the generated Harness scaffold inside this repository so future agents use root `Harness/` routing instead of stale `docs/harness/` guidance.
|
|
22
|
-
|
|
23
|
-
**Success Criteria** (all verified):
|
|
24
|
-
- [x] Root `CLAUDE.md` routes through `Harness/MEMORY.md` and `Harness/README.md`
|
|
25
|
-
- [x] Root `MEMORY.md` no longer contains stale `docs/harness/` paths or template placeholders
|
|
26
|
-
- [x] Root `Harness/` and `.claude/` dogfood runtime assets exist
|
|
27
|
-
- [x] Harness strict validation passes
|
|
28
|
-
- [x] Repository tests pass
|
|
29
|
-
|
|
30
|
-
**Decisions:**
|
|
31
|
-
| Date | Decision | Reason |
|
|
32
|
-
|------|----------|--------|
|
|
33
|
-
| 2026-06-24 | Dogfood root `Harness/` while keeping templates under `templates/` | Separate package source from operating harness |
|
|
34
|
-
| 2026-06-24 | memory-master + context-master added to commonAgents | Global memory and context management |
|
|
35
|
-
|
|
36
|
-
### Historical: WF Conflict Fix
|
|
37
|
-
|
|
38
|
-
Goal: Fix WF-mode orphaned files and conflicts: align commands/wf.md, resolve subagent count tension, fix README "may" vs "MUST", add memory-master and context-master agents.
|
|
39
|
-
|
|
40
|
-
**Subagent Dispatch:**
|
|
41
|
-
| Agent | Mode | Purpose | Status |
|
|
42
|
-
|-------|------|---------|--------|
|
|
43
|
-
| Subagent 1 | Serial Write | Create memory-master.md, context-master.md, update commands/wf.md | Verified |
|
|
44
|
-
| Subagent 2 | Serial Write | Fix agent-workflow.md, dispatch.md, README.md conflicts | Verified |
|
|
45
|
-
| Subagent 3 | Serial Write | Update WF.md, wf-mode/SKILL.md, subagents.md, MEMORY.md, context-loading.md, CLAUDE.md, validate-harness.mjs | Verified |
|
|
46
|
-
| Subagent 4 | Serial Write | Sync template changes to dogfood runtime files | Verified |
|
|
47
|
-
|
|
48
|
-
**Verification:**
|
|
49
|
-
| Check | Result | Notes |
|
|
50
|
-
|-------|--------|-------|
|
|
51
|
-
| `node Harness/scripts/validate-harness.mjs --strict` | Pass | all invariants preserved |
|
|
52
|
-
| `npm test` | Pass | 58/58 tests passed |
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Data Flow — {{projectName}}
|
|
2
|
-
|
|
3
|
-
> **Purpose**: Define the complete lifecycle of each event/request — happy path + all failure branches.
|
|
4
|
-
> **This is the most important runtime-flow file in `Harness/`** — what AI most often invents during implementation is failure-path behavior. Write it clearly and it won't.
|
|
5
|
-
>
|
|
6
|
-
> Philosophy source: EventCatalog pattern + arc42 Chapter 6 (Runtime View).
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## 1. Event Catalog
|
|
11
|
-
|
|
12
|
-
| Event Type | Producer | Consumer | Payload Key Fields | Delivery Semantics | Ordering Requirements |
|
|
13
|
-
| --- | --- | --- | --- | --- | --- |
|
|
14
|
-
| `{{EVENT_1}}` | `{{PRODUCER}}` | `{{CONSUMERS}}` | `{{KEY_FIELDS}}` | {{SEMANTICS}} | {{ORDERING}} |
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## 2. Core Flows
|
|
19
|
-
|
|
20
|
-
### 2.1 Happy Path
|
|
21
|
-
|
|
22
|
-
```mermaid
|
|
23
|
-
sequenceDiagram
|
|
24
|
-
participant Caller
|
|
25
|
-
participant Runner
|
|
26
|
-
participant Bus as EventBus/Audit
|
|
27
|
-
participant Port1 as {{PORT_NAME_1}}
|
|
28
|
-
participant Port2 as {{PORT_NAME_2}}
|
|
29
|
-
|
|
30
|
-
Caller->>Runner: {{ENTRY_POINT}}
|
|
31
|
-
Runner->>Bus: publish {{START_EVENT}}
|
|
32
|
-
Runner->>Port1: {{ACTION_1}}
|
|
33
|
-
Port1-->>Runner: {{RESULT_1}}
|
|
34
|
-
Runner->>Port2: {{ACTION_2}}
|
|
35
|
-
Port2-->>Runner: {{RESULT_2}}
|
|
36
|
-
Runner->>Bus: publish {{END_EVENT}}
|
|
37
|
-
Runner-->>Caller: {{FINAL_RESULT}}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### 2.2 Failure Paths
|
|
41
|
-
|
|
42
|
-
Each failure point must clearly document:
|
|
43
|
-
- **Trigger condition**
|
|
44
|
-
- **System behavior**
|
|
45
|
-
- **Event publishing**
|
|
46
|
-
- **Caller perception**
|
|
47
|
-
- **Recovery method**
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 3. Error Handling Conventions
|
|
52
|
-
|
|
53
|
-
- **Retryable errors**: {{POLICY}}
|
|
54
|
-
- **Non-retryable errors**: {{POLICY}}
|
|
55
|
-
- **Silent ignore**: {{POLICY}}
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
> **Note**: This data-flow.md is currently an empty template. Fill it in according to your project's actual flows. For format reference, see real project examples in the ECC repository.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# State Machines — {{projectName}}
|
|
2
|
-
|
|
3
|
-
> **Responsibility**: Define the states, transitions, guard conditions, and boundary behaviors for every stateful component. The majority of bugs in long-running harness pipelines originate from illegal state transitions.
|
|
4
|
-
>
|
|
5
|
-
> Philosophical source: UML 2.5.1 Section 15.3.14 + "The transition table is the single most important artifact in the document."
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## State Machine Template
|
|
10
|
-
|
|
11
|
-
Fill out each stateful component using this format:
|
|
12
|
-
|
|
13
|
-
Before defining states, name the state owner and persistence level. State that crosses agent handoff, retry, browser session, API workflow, or release boundary must have explicit transitions; temporary derived state should stay local and should not become a new state machine.
|
|
14
|
-
|
|
15
|
-
### State Ownership
|
|
16
|
-
|
|
17
|
-
| State Slice | Owner | Persistence | Notes |
|
|
18
|
-
| --- | --- | --- | --- |
|
|
19
|
-
| `{{STATE_SLICE}}` | `{{OWNER}}` | durable / runtime / derived / external | {{NOTES}} |
|
|
20
|
-
|
|
21
|
-
### State Enumeration
|
|
22
|
-
|
|
23
|
-
| State | Description | Entry Condition | Exit Condition |
|
|
24
|
-
| --- | --- | --- | --- |
|
|
25
|
-
| `{{STATE_1}}` | {{DESCRIPTION}} | {{CONDITION}} | {{CONDITION}} |
|
|
26
|
-
| `{{STATE_2}}` | {{DESCRIPTION}} | {{CONDITION}} | {{CONDITION}} |
|
|
27
|
-
|
|
28
|
-
### State Transition Diagram
|
|
29
|
-
|
|
30
|
-
```mermaid
|
|
31
|
-
stateDiagram-v2
|
|
32
|
-
[*] --> {{INITIAL_STATE}}
|
|
33
|
-
{{INITIAL_STATE}} --> {{STATE_2}} : {{TRIGGER}}
|
|
34
|
-
{{STATE_2}} --> {{INITIAL_STATE}} : {{TRIGGER}}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Transition Table (Most Important)
|
|
38
|
-
|
|
39
|
-
| Current State ↓ / Event → | `{{EVENT_1}}` | `{{EVENT_2}}` | `{{EVENT_3}}` |
|
|
40
|
-
| --- | --- | --- | --- |
|
|
41
|
-
| **`{{STATE_1}}`** | {{TARGET}} | {{TARGET}} | {{TARGET}} |
|
|
42
|
-
| **`{{STATE_2}}`** | {{TARGET}} | {{TARGET}} | {{TARGET}} |
|
|
43
|
-
|
|
44
|
-
### Guard Conditions
|
|
45
|
-
|
|
46
|
-
| Transition | Guard Condition | Notes |
|
|
47
|
-
| --- | --- | --- |
|
|
48
|
-
| `{{SOURCE}} -> {{TARGET}}` | {{GUARD}} | {{NOTE}} |
|
|
49
|
-
|
|
50
|
-
### Illegal Transitions
|
|
51
|
-
|
|
52
|
-
| Transition | Why Illegal |
|
|
53
|
-
| --- | --- |
|
|
54
|
-
| `{{SOURCE}} -> {{TARGET}}` | {{REASON}} |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
> **Note**: The current state-machines.md is an empty template. Please fill it in according to the project's actual stateful components.
|
|
File without changes
|