@kodevibe/harness 0.11.2 β†’ 0.11.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.
@@ -20,22 +20,21 @@ This is kode:harness's memory mechanism β€” without it, the same mistakes repeat
20
20
  - After a review revealed a repeated mistake
21
21
  - When the user explicitly asks to record a lesson
22
22
 
23
- > **Timing**: Invoke this skill **once at session end**, not after each individual skill. It aggregates the entire session's work into state files.
23
+ > **Timing**: Invoke once at session end; aggregate the whole session into state files.
24
24
 
25
25
  ## Procedure
26
26
 
27
27
  ### Step 1: Review Session Activity
28
28
 
29
29
  1. Scan recent git changes: `git log --oneline -10` and `git diff --stat HEAD~3`
30
- 2. Identify what was accomplished in this session
31
- 3. Identify any errors, failures, or unexpected issues that occurred
30
+ 2. Identify accomplishments and unexpected issues
32
31
 
33
32
  **Edge Case: Zero-Change Session**
34
33
  If `git diff --stat` shows no changes and `git log` shows no new commits this session:
35
34
  - Report: "πŸ“ Quiet session β€” status checks only, no code changes."
36
35
  - Skip Step 3 (Failure Pattern Detection) β€” no code changes means no new failure patterns
37
36
  - Skip Step 5 (features.md update) and Step 5.5 (dependency-map.md verify) β€” nothing changed
38
- - Still execute Step 4 (Quick Summary update) and Step 6 (Agent Memory) if an agent was used
37
+ - Still execute Step 4 and Step 6 if an agent was used
39
38
  - Still execute Step 2 (Direction Drift Check) β€” discussion-only drift is possible
40
39
 
41
40
  ### Step 2: Direction Drift Check
@@ -49,14 +48,14 @@ Before recording failures, verify that the session's work stayed aligned with pr
49
48
  - Did the user explicitly change direction during this session? β†’ Note for pivot recommendation
50
49
  3. **If drift detected**:
51
50
  - Add a warning to the Step 7 Report: `⚠️ Direction drift: [description of misalignment]`
52
- - Recommend: "Consider running `pivot` skill to formally update project direction. You can run it AFTER this wrap-up session completes."
51
+ - Recommend `pivot` after wrap-up
53
52
  - Do NOT block β€” the wrap-up skill always completes
54
53
  4. **If no drift**: Proceed silently (no output for this step)
55
54
 
56
55
  <!-- CREW_MODE_START -->
57
56
  #### Step 2.5: Validation Tracker Update (🟣 Pipeline only) ⚠️ MANDATORY
58
57
 
59
- > **β›” Completion Gate**: Step 2.5λ₯Ό μ™„λ£Œν•΄μ•Ό Step 3 이후λ₯Ό μ§„ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€. Validation Trackerκ°€ μ‘΄μž¬ν•˜λ©΄ λ°˜λ“œμ‹œ κ°±μ‹  ν›„ λ‹€μŒ λ‹¨κ³„λ‘œ μ§„ν–‰ν•˜μ„Έμš”.
58
+ > **β›” Completion Gate**: Validation Trackerκ°€ 있으면 κ°±μ‹  ν›„ Step 3으둜 μ§„ν–‰ν•˜μ„Έμš”.
60
59
 
61
60
  If `docs/project-brief.md` contains a `## Validation Tracker` section with data:
62
61
 
@@ -70,9 +69,9 @@ If `docs/project-brief.md` contains a `## Validation Tracker` section with data:
70
69
  - Did this session produce Stories/code that don't map to any FR or KPI? β†’ warn
71
70
  - Are there KPIs/FRs with no Stories after 2+ sprints? β†’ warn as "⚠️ Unplanned KPI/FR risk"
72
71
  - Include warnings in Step 7 Report
73
- 5. **Self-check**: Validation Tracker의 KPI/FR/ARB μƒνƒœκ°€ 이 μ„Έμ…˜μ˜ μ™„λ£Œ Storyλ₯Ό μ •ν™•νžˆ λ°˜μ˜ν•˜λŠ”μ§€ 확인. λ―Έκ°±μ‹  ν•­λͺ©μ΄ 있으면 μ¦‰μ‹œ κ°±μ‹  ν›„ λ‹€μŒ λ‹¨κ³„λ‘œ μ§„ν–‰.
72
+ 5. **Self-check**: KPI/FR/ARB μƒνƒœκ°€ μ™„λ£Œ Story와 μΌμΉ˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. λˆ„λ½ μ‹œ μ¦‰μ‹œ κ°±μ‹ .
74
73
 
75
- > β›” Validation Tracker κ°±μ‹  없이 Step 3으둜 μ§„ν–‰ν•˜μ§€ λ§ˆμ„Έμš”. 이 단계λ₯Ό κ±΄λ„ˆλ›°λ©΄ FR/KPI Coverageκ°€ μ‹€μ œ μ§„ν–‰ 상황과 λΆˆμΌμΉ˜ν•©λ‹ˆλ‹€.
74
+ > β›” Tracker κ°±μ‹  없이 Step 3으둜 μ§„ν–‰ν•˜μ§€ λ§ˆμ„Έμš”.
76
75
 
77
76
  If no Validation Tracker β†’ skip this step entirely.
78
77
  <!-- CREW_MODE_END -->
@@ -83,7 +82,7 @@ For each issue/error that occurred in this session:
83
82
 
84
83
  1. Read `docs/failure-patterns.md`
85
84
  2. Check if this matches an existing pattern (FP-NNN):
86
- - **If match found AND already incremented by `debug` in this session**: Skip β€” do not double-count. Check `docs/project-state.md` Recent Changes for debug entries from this session to determine if a pattern was already recorded.
85
+ - **If match found AND already incremented by `debug` in this session**: Skip. Check Recent Changes to avoid double-count.
87
86
  - **If match found AND NOT already incremented this session**: Increment the Frequency counter, add the Sprint/Story to "Occurred"
88
87
  - **If new pattern**: Assign next FP-NNN number, create a new entry using this format:
89
88
 
@@ -100,7 +99,7 @@ For each issue/error that occurred in this session:
100
99
 
101
100
  3. If the failure relates to a specific skill or agent, note it for that skill's checklist
102
101
 
103
- > **Self-check**: Step 3 μ™„λ£Œ μ‹œ `docs/failure-patterns.md`에 μ΅œμ†Œ ν•˜λ‚˜μ˜ FP ν•­λͺ©μ΄ μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€ (이 μ„Έμ…˜μ—μ„œ μ‹€νŒ¨κ°€ μ—†μ—ˆμœΌλ©΄ κΈ°μ‘΄ ν•­λͺ© ν™•μΈλ§Œ).
102
+ > **Self-check**: `docs/failure-patterns.md` has at least one FP entry; if no new failure, existing entries are enough.
104
103
 
105
104
  ### Step 4: Update docs/project-state.md ⚠️ MANDATORY
106
105
 
@@ -116,6 +115,9 @@ For each issue/error that occurred in this session:
116
115
  ```
117
116
  - [YYYY-MM-DD] S{N}-{M}: {what was done} (STATUS: DONE)
118
117
  ```
118
+ - Append compact changelog rows only. If creating the section, place it before `## Session Handoff Protocol` or EOF.
119
+ - Never insert it inside proof/evidence sections (`Proof Ledger`, durable UI evidence, smoke/manual proof).
120
+ - Self-check: no nested headings or UI/proof checklist bullets under `## Recent Changes`.
119
121
 
120
122
  ### Step 5: Update docs/features.md (if applicable)
121
123
 
@@ -136,7 +138,23 @@ For each issue/error that occurred in this session:
136
138
  - WARN β†’ include warnings in the final wrap-up report, then proceed
137
139
  - FAIL β†’ fix the listed drift (update affected state files), then re-run state-check until PASS or WARN
138
140
 
139
- > **Self-check**: `docs/dependency-map.md`에 이 μ„Έμ…˜μ—μ„œ μƒˆλ‘œ μΆ”κ°€ν•œ λͺ¨λ“ˆμ΄ λͺ¨λ‘ λ“±λ‘λ˜μ—ˆλŠ”μ§€ 확인. λˆ„λ½ μ‹œ μ¦‰μ‹œ μΆ”κ°€. state-checkκ°€ PASS λ˜λŠ” WARN을 λ°˜ν™˜ν•΄μ•Ό λ‹€μŒ λ‹¨κ³„λ‘œ μ§„ν–‰ν•©λ‹ˆλ‹€.
141
+ > **Self-check**: New modules are registered in `docs/dependency-map.md`; state-check is PASS/WARN.
142
+
143
+ #### Step 5.5b: Guard Evidence (R16) ⚠️ MANDATORY
144
+
145
+ Before saying `state-check PASS`, `0 FAIL`, `0 WARN`, `STATUS: DONE`, or `Session Learn Complete`, run and quote one guard summary:
146
+
147
+ ```bash
148
+ HARNESS_GUARD_ROOT="$PWD" node /path/to/k-harness/scripts/harness-guard.js docs/project-state.md
149
+ ```
150
+
151
+ or installed script:
152
+
153
+ ```bash
154
+ npm run harness:guard:wrap-up
155
+ ```
156
+
157
+ Rules: paste the exact guard summary. Errors block `STATUS: DONE`; warnings must be listed. Never write `0 FAIL, 0 WARN` unless guard says no issues.
140
158
 
141
159
  ### Step 5.55: Refresh Project Docs Hub Index (if applicable)
142
160
 
@@ -145,7 +163,7 @@ Run only if user used/requested `docs-bridge`, or Project Docs Hub Index has rea
145
163
  1. For changed docs (`README*`, `docs/`, ADR/design/runbook/API specs), refresh indexed review/status.
146
164
  2. For new docs, add `proposed` rows or recommend `docs-bridge`.
147
165
  3. Never write external hubs, invent targets, change visibility, or convert `local-only` / `pending` without explicit request.
148
- 4. Keep filesystem paths, vault names, page IDs, and resolver details out of tracked state; use `.harness/docs-bridge.local.*`.
166
+ 4. Keep private paths/IDs/resolvers out of tracked state; use `.harness/docs-bridge.local.*`.
149
167
 
150
168
  ### Step 5.6: Resolve STATE-AUDIT Flags (if applicable)
151
169
 
@@ -160,8 +178,12 @@ Before session end, record the working proof that justified completion:
160
178
  1. Read reviewer output or recent terminal evidence for passing tests/smoke proof.
161
179
  2. Add one compact row to `docs/project-state.md` β†’ `## Proof Ledger` for each completed Story.
162
180
  3. Cross-check completed Stories against `## Evidence Summary` / `## Proof Ledger`.
163
- 4. If no proof exists, write `[PROOF-GAP] Proof missing` in the wrap-up report and recommend returning to `reviewer`; do not claim the Story is complete.
164
- 5. If `[PROOF-GAP]` exists, STOP before Step 5.65. Do not auto-commit state files that mark a Story done/reviewed without passing proof. Revert the Story to Proof Pending or return to `reviewer`.
181
+ 4. Check `## Story Contracts`: completed Story rows must be `βœ… pass`/`proven`; otherwise `[CONTRACT-GAP]`.
182
+ 5. UI/manual/smoke proof needs artifact/checklist or URL + exact counts/elements.
183
+ 6. Keep durable UI evidence in its own section, never under `## Recent Changes`.
184
+ 7. Split FR/KPI/ARB mappings need `Scope split approved: <reason>`.
185
+ 8. If proof is missing, write `[PROOF-GAP]` and return to `reviewer`.
186
+ 9. If `[PROOF-GAP]` or `[CONTRACT-GAP]` exists, STOP before Step 5.65.
165
187
 
166
188
  Proof rows must stay short: Date, Story, Evidence, Result, Command / Observation. Do not paste long logs.
167
189
 
@@ -171,24 +193,34 @@ State file 변경사항을 μ»€λ°‹ν•©λ‹ˆλ‹€. Learn μ‹€ν–‰ κ²°κ³Όκ°€ μ»€λ°‹λ˜μ§€
171
193
 
172
194
  1. Stage state files: `git add docs/project-state.md docs/failure-patterns.md docs/features.md docs/dependency-map.md docs/agent-memory/`
173
195
  2. Commit: `git commit -m "wrap-up: session lessons captured"`
174
- 3. If commit fails (nothing to commit), skip β€” state files were already committed
196
+ 3. If nothing to commit, skip.
175
197
 
176
198
  > **Self-check**: `git status`에 docs/ μ•„λž˜ unstaged 파일이 μ—†μ–΄μ•Ό ν•©λ‹ˆλ‹€.
177
199
 
200
+ #### Step 5.65b: Dirty Worktree Truth (R16) ⚠️ MANDATORY
201
+
202
+ Run:
203
+
204
+ ```bash
205
+ git status --short
206
+ ```
207
+
208
+ Rules: paste exact `git status --short` or `clean`. Dirty `src/`, `test/`, `public/`, or app files mean work is not fully committed. If they remain by policy, report `Session End: DIRTY WORKTREE`.
209
+
178
210
  ### Step 5.7: Git Push Check (session end)
179
211
 
180
212
  Before ending the session, check for unpushed commits:
181
213
 
182
- 1. Run `git log --oneline @{u}..HEAD 2>/dev/null || echo "no upstream"` to find unpushed commits
214
+ 1. Run `git log --oneline @{u}..HEAD 2>/dev/null || echo "no upstream"`
183
215
  2. **If unpushed commits exist**:
184
216
  - List the commits: `git log --oneline @{u}..HEAD`
185
217
  - Solo mode: Recommend push β€” `git push origin {branch}`
186
- - Team mode: **Strongly recommend** push β€” unpushed work is invisible to teammates
218
+ - Team mode: **Strongly recommend** push
187
219
  - Warn: "⚠️ {N}개의 컀밋이 pushλ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. μž‘μ—…λ¬Όμ„ 원격에 λ°±μ—…ν•˜μ„Έμš”."
188
220
  3. **If no upstream configured** (`no upstream`):
189
221
  - Check if remote exists: `git remote -v`
190
222
  - If remote exists: Suggest `git push -u origin {branch}` (first push)
191
- - If no remote: Note "원격 μ €μž₯μ†Œκ°€ μ„€μ •λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. νŒ€ ν˜‘μ—… μ‹œ remote 섀정이 ν•„μš”ν•©λ‹ˆλ‹€."
223
+ - If no remote: Note "원격 μ €μž₯μ†Œκ°€ μ„€μ •λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€."
192
224
  4. **If all commits are pushed**: Skip (no output)
193
225
 
194
226
  ### Step 6: Update Agent Memory (if applicable)
@@ -199,15 +231,15 @@ If an agent (reviewer, pm, lead, architect) was used in this session, update its
199
231
  2. **Auto-initialize if needed**: If the file only contains `<!-- Example entries` placeholder comments and no real data:
200
232
  - Replace the placeholder block with actual entries from this session
201
233
  - Initialize statistics counters with real values
202
- - If real entries already exist alongside placeholders, APPEND new entries and remove only the placeholder comments. Do not overwrite existing real data.
203
- - **When does initialization happen?**: On the FIRST session where the agent is used AND wrap-up is invoked. If an agent is never used, its memory stays as a placeholder indefinitely β€” this is expected.
234
+ - If real entries exist, APPEND and remove only placeholder comments.
235
+ - Initialize on the first wrap-up session where the agent was used.
204
236
  - Example transformation:
205
237
  ```
206
238
  Before: <!-- Example entries (replace with real findings after first review):
207
239
  After: - [S1-1] Mock sync missed for UserService interface change
208
240
  ```
209
241
  3. **Append session learnings** to the appropriate section:
210
- - **reviewer.md**: Add review patterns found, update statistics (total reviews +1, auto-fixes, escalations)
242
+ - **reviewer.md**: Add review patterns and update statistics
211
243
  - **pm.md**: Record estimation accuracy (planned vs actual), note architecture discoveries
212
244
  - **lead.md**: Update velocity (stories done/planned), record any scope drift incidents
213
245
  - **architect.md**: Record design decisions made, module boundary insights, anti-patterns observed
@@ -275,11 +307,11 @@ If crew artifacts were used this session (🟣 pipeline), also append:
275
307
  - Keep failure pattern descriptions concise (1-2 sentences for Cause and Prevention)
276
308
  - If no failures occurred, skip Step 2 and just update state files
277
309
  - Do not modify source code β€” this skill only updates state files
278
- - Quick Summary must be exactly 3 lines β€” concise enough for the next session to scan instantly
310
+ - Quick Summary must be exactly 3 lines
279
311
 
280
312
  ## Enforced Rules
281
313
 
282
- - **Session Handoff**: Before ending a session, docs/project-state.md Quick Summary MUST be updated. Never leave the project in an undocumented state.
314
+ - **Session Handoff**: Before ending, update docs/project-state.md Quick Summary.
283
315
  - **State File Size Limits**: Keep state files compact for LLM context windows:
284
316
  - docs/project-brief.md: Max 200 lines
285
317
  - docs/project-state.md: Max 300 lines (archive completed sprints)
@@ -302,7 +334,7 @@ If crew artifacts were used this session (🟣 pipeline), also append:
302
334
  ## Team Mode: Session Wrap-up
303
335
 
304
336
  ### Pre-Pull (mandatory before any shared file edit)
305
- 1. Run `git pull` on the default branch before updating docs/features.md or docs/dependency-map.md (per project-brief.md β†’ Key Technical Decisions; default: main)
337
+ 1. Run `git pull` on the default branch before updating docs/features.md or docs/dependency-map.md (default: main)
306
338
  2. If merge conflicts occur, follow the **Merge Conflict SOP** below
307
339
 
308
340
  ### Merge Conflict SOP
@@ -319,7 +351,7 @@ When `git pull` causes merge conflicts in shared state files:
319
351
  | `docs/failure-patterns.md` | Keep BOTH entries, deduplicate by FP-NNN number |
320
352
  3. **After resolving**: `git add <resolved-files> && git commit`
321
353
  4. **Verify**: Re-read the resolved file and confirm no data was lost
322
- 5. **If unsure**: Do NOT force-resolve. Ask the designated authority (per project-brief.md; default: team lead) or the Owner of the conflicting rows.
354
+ 5. **If unsure**: Do NOT force-resolve. Ask the designated authority or row Owner.
323
355
 
324
356
  ### Owner-Scoped Updates
325
357
  - **docs/features.md**: only update rows where Owner = you
@@ -327,7 +359,7 @@ When `git pull` causes merge conflicts in shared state files:
327
359
  - **Personal files** (.harness/project-state.md, .harness/failure-patterns.md, .harness/agent-memory/): update freely β€” no coordination needed
328
360
 
329
361
  ### Failure Pattern Promotion
330
- If a personal failure pattern (FP-NNN in .harness/failure-patterns.md) is likely to affect other developers:
362
+ If a personal FP in `.harness/failure-patterns.md` may affect others:
331
363
  1. Discuss with the team (Slack, PR comment, etc.)
332
- 2. If agreed, add it to a shared location (team wiki, PR description) so others can add it to their personal .harness/failure-patterns.md
364
+ 2. If agreed, add it to a shared location so others can copy it.
333
365
  <!-- TEAM_MODE_END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodevibe/harness",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "kode:harness β€” harness engineering for keeping every developer's AI aligned on one project direction.",
5
5
  "keywords": [
6
6
  "llm",