create-harness-vibe-coding 0.4.3 → 0.5.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.
- package/package.json +1 -1
- package/templates/common/.claude/commands/learn.md +17 -0
- package/templates/common/.claude/skills/wf-learn/SKILL.md +46 -0
- package/templates/common/.claude/skills/wf-mode/SKILL.md +1 -1
- package/templates/common/CLAUDE.md +2 -2
- package/templates/common/MEMORY.md +1 -0
- package/templates/common/docs/README.md +3 -1
- package/templates/common/docs/harness/WF.md +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# /wf-learn
|
|
2
|
+
|
|
3
|
+
Force a memory learning cycle. Dispatches `context-master` to analyze the session, then `memory-master` to consolidate extracted knowledge into `Harness/memory/*` (project-level) and cross-project global memory.
|
|
4
|
+
|
|
5
|
+
## Required
|
|
6
|
+
|
|
7
|
+
- Load `wf-learn` skill.
|
|
8
|
+
- MUST dispatch `context-master` first, then `memory-master`.
|
|
9
|
+
- Both agents are read-only reporters; CEO writes the final memory files.
|
|
10
|
+
|
|
11
|
+
## Flow
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
context-master (analyze)
|
|
15
|
+
→ memory-master (consolidate)
|
|
16
|
+
→ CEO writes to Harness/memory/* + global memory
|
|
17
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wf-learn
|
|
3
|
+
description: Use for /wf-learn or when the user wants to force a learning cycle from repeated errors, patterns, or session history. Dispatches context-master → memory-master pipeline to extract and consolidate durable knowledge.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WF Learn
|
|
7
|
+
|
|
8
|
+
Force a memory learning cycle. Context-master analyzes, memory-master consolidates. Writes to project-level `Harness/memory/*` and cross-project global memory.
|
|
9
|
+
|
|
10
|
+
## Load
|
|
11
|
+
|
|
12
|
+
- `Harness/MEMORY.md`
|
|
13
|
+
- `Harness/memory/tool-usage-reflections.md`
|
|
14
|
+
- `Harness/memory/user-corrections-preferences.md`
|
|
15
|
+
- `Harness/memory/agent-lessons-patterns.md`
|
|
16
|
+
- Current `Harness/PROGRESS.md` for active task context
|
|
17
|
+
|
|
18
|
+
## Flow
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
1. context-master: analyze session, extract patterns
|
|
22
|
+
2. memory-master: categorize + deduplicate + write to memory files
|
|
23
|
+
3. CEO: commit memory files
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Write Targets
|
|
27
|
+
|
|
28
|
+
| Scope | Path | When |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Project | `Harness/memory/tool-usage-reflections.md` | tool/command patterns found |
|
|
31
|
+
| Project | `Harness/memory/user-corrections-preferences.md` | user preferences found |
|
|
32
|
+
| Project | `Harness/memory/agent-lessons-patterns.md` | review/debug lessons found |
|
|
33
|
+
| Global | `<user>/.claude/projects/*/memory/` | cross-project patterns |
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- Never auto-write without context-master analysis first.
|
|
38
|
+
- Memory-master handles dedup — if existing entry covers the same ground, update instead of creating duplicate.
|
|
39
|
+
- If no new patterns found, report "nothing to learn" — don't force empty writes.
|
|
40
|
+
- Subagents are readers and reporters. CEO writes the final memory files.
|
|
41
|
+
|
|
42
|
+
## Return
|
|
43
|
+
|
|
44
|
+
- Files written or updated
|
|
45
|
+
- Patterns extracted (one-line each)
|
|
46
|
+
- Skipped (with reason)
|
|
@@ -41,7 +41,7 @@ Rules:
|
|
|
41
41
|
- If subagents are unavailable, emulate the same roles as separate bounded passes.
|
|
42
42
|
- Do not claim browser/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
43
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
|
-
-
|
|
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
45
|
|
|
46
46
|
Return:
|
|
47
47
|
|
|
@@ -11,7 +11,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
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
12
|
- `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
|
|
13
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 <task>`, `/wf-max [task]`, `wf mode`, `workflow mode`, `wk mode`, `Harness/WF.md`, or `Harness/WF-MAX.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
|
|
14
|
+
- Use `/wf <task>`, `/wf-max [task]`, `/wf-learn`, `wf mode`, `workflow mode`, `wk mode`, `Harness/WF.md`, or `Harness/WF-MAX.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
|
|
15
15
|
- Use `subagent-orchestrator` and `Harness/subagents.md` when coordinating multiple subagents.
|
|
16
16
|
- Use `/wf update` to check for and apply scaffold updates from GitHub. See `.claude/skills/wf-update/SKILL.md`.
|
|
17
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`.
|
|
@@ -63,7 +63,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
63
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`.
|
|
64
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`.
|
|
65
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**:
|
|
66
|
+
- **WF auto-trigger**: before WF closeout, dispatch `context-master` then `memory-master` (or use `/wf-learn`). The old "3x same failure" auto-trigger is unreliable — make this a mandatory closeout gate.
|
|
67
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
68
|
- **Closeout trigger**: during WF closeout, dispatch `context-master` to extract durable knowledge, then `memory-master` to consolidate into `Harness/memory/*`.
|
|
69
69
|
- Never record secrets, credentials, tokens, or private data.
|
|
@@ -29,6 +29,7 @@ Stack-specific agents can be added after the product shape is known.
|
|
|
29
29
|
- [wf-mode](../.claude/skills/wf-mode/SKILL.md) — long-task workflow: exploration, second plan, implementation, review, verification, heartbeat, and recovery loop.
|
|
30
30
|
- [subagent-orchestrator](../.claude/skills/subagent-orchestrator/SKILL.md) — controller-led subagent orchestration, parallel read-only passes, review gates, and recovery handoffs.
|
|
31
31
|
- [readme-optimizer](../.claude/skills/readme-optimizer/SKILL.md) — README preservation, append-only development sections, structured tables, and approved architecture diagrams.
|
|
32
|
+
- [wf-learn](../.claude/skills/wf-learn/SKILL.md) — force memory learning cycle: context-master → memory-master → project + global memory.
|
|
32
33
|
- [wf-update](../.claude/skills/wf-update/SKILL.md) — GitHub-based incremental harness update, checksum comparison, and safe in-place updates.
|
|
33
34
|
- [wf-max](../.claude/skills/wf-max/SKILL.md) — maximum-parallelism workflow: write-set coloring, wave dispatch, parallel review per dimension.
|
|
34
35
|
|
|
@@ -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 explicitly says `/wf <task>`, `/wf-max [task]`, `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`.
|
|
54
|
+
Routing priority: if a request explicitly says `/wf <task>`, `/wf-max [task]`, `/wf-learn`, `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
|
| --- | --- | --- | --- |
|
|
@@ -60,6 +60,7 @@ Routing priority: if a request explicitly says `/wf <task>`, `/wf-max [task]`, `
|
|
|
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
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
|
+
| Need to learn from errors | /wf-learn, wf learn, learn, remember, memory, lesson | [MEMORY.md](MEMORY.md), `.claude/skills/wf-learn/SKILL.md`, `Harness/memory/*` | context-master → memory-master → project + global memory |
|
|
63
64
|
| Need WF Max mode | /wf-max, wf max, maximum parallelism, max parallel | [WF-MAX.md](WF-MAX.md), [WF.md](WF.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | max-parallel exploration, write-set coloring, wave dispatch |
|
|
64
65
|
| 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 |
|
|
65
66
|
| 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 |
|
|
@@ -109,6 +110,7 @@ Harness/WF.md long-task workflow and recovery loop
|
|
|
109
110
|
Harness/WF-MAX.md max-parallelism workflow with wave dispatch
|
|
110
111
|
.claude/skills/wf-max/SKILL.md max-parallelism skill loader
|
|
111
112
|
.claude/commands/wf-max.md /wf-max slash command bridge
|
|
113
|
+
.claude/commands/learn.md /wf-learn slash command bridge
|
|
112
114
|
Harness/lifecycle.md 0-1 product flow
|
|
113
115
|
Harness/subagents.md controller-led subagent orchestration
|
|
114
116
|
Harness/context-loading.md dynamic loading and subagent packs
|
|
@@ -122,7 +122,7 @@ If verification fails:
|
|
|
122
122
|
5. Run verifier again.
|
|
123
123
|
6. Repeat until verified or blocked by missing user input/external state.
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
Before asking the user after repeated failures, dispatch `context-master` then `memory-master` (or use `/wf-learn`) to record the failure pattern, attempted paths, and root cause hypothesis. Present evidence-backed options to the user.
|
|
126
126
|
|
|
127
127
|
## Heartbeat Protocol
|
|
128
128
|
|