@kodevibe/harness 0.9.3 → 0.9.6
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/LICENSE +1 -1
- package/README.ko.md +11 -8
- package/README.md +11 -8
- package/harness/agent-memory/pm.md +1 -1
- package/harness/agents/pm.md +13 -24
- package/harness/agents/reviewer.md +1 -11
- package/harness/project-brief.md +3 -3
- package/harness/skills/breakdown.md +1 -1
- package/harness/skills/release.md +19 -0
- package/harness/skills/setup.md +0 -22
- package/package.json +1 -1
- package/src/init.js +86 -30
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025
|
|
3
|
+
Copyright (c) 2025 kode:harness contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.ko.md
CHANGED
|
@@ -93,7 +93,7 @@ kode:harness는 세 가지 메커니즘으로 해결합니다:
|
|
|
93
93
|
| 🧭 **Navigation Dispatcher** | 5개 파이프라인을 따라 다음 단계 프롬프트를 자동 안내 |
|
|
94
94
|
| 📝 **상태 영속성** | LLM 세션 간 프로젝트 지식을 유지하는 5개 마크다운 파일 |
|
|
95
95
|
| 🔄 **5개 파이프라인** | 🟢 신규 → 🔵 계속 → 🔴 버그 수정 → 🟡 방향 전환 → 🟣 Crew 기반 |
|
|
96
|
-
| 🛠️ **
|
|
96
|
+
| 🛠️ **11개 스킬** | 단계별 절차: setup, debug, breakdown, review, pivot, state-check 등 |
|
|
97
97
|
| 🤖 **4개 에이전트** | 역할 기반 페르소나: pm, reviewer, lead, architect |
|
|
98
98
|
| ⚠️ **실패 패턴** | 세션 간 같은 실수를 방지하는 프로젝트별 실패 기록 |
|
|
99
99
|
| 📋 **Decision Log** | 결정의 이유를 기록해 LLM이 확정된 사항을 재논의하지 않도록 방지 |
|
|
@@ -116,10 +116,10 @@ npx @kodevibe/harness validate # state 파일에 실제 내용 확인
|
|
|
116
116
|
|-----|---------------------|------|----------|
|
|
117
117
|
| **VS Code Copilot** | `.github/copilot-instructions.md` | `.github/skills/*/SKILL.md` | `.github/agents/*.agent.md` |
|
|
118
118
|
| **Claude Code** | `CLAUDE.md` (+ `.claude/rules/core.md`) | `.claude/skills/*/SKILL.md` | `.claude/agents/*.md` |
|
|
119
|
-
| **Cursor** | `.cursor/rules/core.mdc` (+ `AGENTS.md`) | `.
|
|
120
|
-
| **Codex** | `AGENTS.md` | `.agents/skills/*/SKILL.md` | `.codex/agents/*.
|
|
119
|
+
| **Cursor** | `.cursor/rules/core.mdc` (+ `AGENTS.md`) | `.agents/skills/*/SKILL.md` (cross-tool) | `.cursor/rules/<agent>.mdc` |
|
|
120
|
+
| **Codex** | `AGENTS.md` | `.agents/skills/*/SKILL.md` | `.codex/agents/*.toml` |
|
|
121
121
|
| **Windsurf** | `.windsurf/rules/core.md` | `.windsurf/skills/*/SKILL.md` | *(스킬로 설치)* |
|
|
122
|
-
| **Antigravity** | `
|
|
122
|
+
| **Antigravity** | `AGENTS.md` | `.agents/skills/*/SKILL.md` (cross-tool) | `.agents/rules/<agent>.md` |
|
|
123
123
|
|
|
124
124
|
모든 IDE에 `docs/` 디렉토리에 State 파일(`project-state.md`, `project-brief.md`, `features.md`, `failure-patterns.md`, `dependency-map.md`)도 함께 설치됩니다.
|
|
125
125
|
|
|
@@ -244,7 +244,7 @@ npx @kodevibe/harness init --team
|
|
|
244
244
|
|
|
245
245
|
## Iron Laws
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
10개 규칙이 모든 스킬과 에이전트에 적용됩니다. kode:harness로 관리되는 프로젝트의 품질 근간을 형성합니다.
|
|
248
248
|
|
|
249
249
|
| # | 규칙 | 적용 대상 |
|
|
250
250
|
|---|------|----------|
|
|
@@ -292,7 +292,7 @@ Bootstrap이 `docs/crew/`, `docs/PM/`, `docs/Analyst/`, `docs/ARB/`에서 crew
|
|
|
292
292
|
| 의존성 | Node 20+ | Bun + Node + Playwright | Node 18+ | **Zero** |
|
|
293
293
|
| IDE 지원 | 20+ (installer) | 5 (setup --host) | 13 (runtime select) | 6 (네이티브 포맷) |
|
|
294
294
|
| 방향 관리 | ❌ | ❌ | ❌ | ✅ (Direction Guard + pivot + Decision Log) |
|
|
295
|
-
| Iron Laws (코드 품질 규칙) | ❌ | ❌ | ❌ | ✅ (
|
|
295
|
+
| Iron Laws (코드 품질 규칙) | ❌ | ❌ | ❌ | ✅ (10개 규칙이 스킬에 임베딩) |
|
|
296
296
|
| Cold start | ❌ | ❌ | `/gsd-new-project` | ✅ (`setup` 스킬) |
|
|
297
297
|
| 태스크당 컨텍스트 | 4-6 파일 | 1 파일 | 매번 200k 플랜 | **2-3 파일 (136줄 디스패처)** |
|
|
298
298
|
|
|
@@ -300,7 +300,7 @@ Bootstrap이 `docs/crew/`, `docs/PM/`, `docs/Analyst/`, `docs/ARB/`에서 crew
|
|
|
300
300
|
|
|
301
301
|
## 로드맵
|
|
302
302
|
|
|
303
|
-
kode:harness는 현재 **v0.9.
|
|
303
|
+
kode:harness는 현재 **v0.9.6** — init이 덮어쓰는 IDE 파일을 `.harness/init-backups/<timestamp>/...`에 백업하고, 배포 파일의 pm 네이밍과 LICENSE 브랜딩을 정리했습니다. v0.9.5는 경량성 예산 재교정(40K/1500/2500)과 Iron Laws/디스패처 정합성 수정입니다.
|
|
304
304
|
|
|
305
305
|
| 단계 | 버전 | 상태 | 초점 |
|
|
306
306
|
|------|------|------|------|
|
|
@@ -309,7 +309,10 @@ kode:harness는 현재 **v0.9.2** — state-check 스킬, Iron Law #10 (Self-Ver
|
|
|
309
309
|
| **Flexibility** | v0.7.x | ✅ 완료 | 팀 컨벤션을 project-brief.md에 위임, prescriptive 규칙 제거 |
|
|
310
310
|
| **Navigation** | v0.8.x | ✅ 완료 | 🧭 Navigation Dispatcher, 5개 파이프라인, Crew Artifact Integration, 100점 품질 감사, Confirm-First 게이트, Wave-Level Pacing, Recalculating Mode |
|
|
311
311
|
| **Naming** | v0.9.0 | ✅ 완료 | 스킬/에이전트 네이밍 재설계 — 직관성과 발견성 강화 |
|
|
312
|
-
| **Self-Verify** | v0.9.2 | ✅
|
|
312
|
+
| **Self-Verify** | v0.9.2 | ✅ 완료 | state-check 스킬, Iron Law #10, Confirmation Gate Defaults, 멀티 IDE 수정, CI Artifact Index |
|
|
313
|
+
| **IDE Realignment** | v0.9.4 | ✅ 완료 | 6개 IDE 어댑터 공식 문서 정합; Antigravity `.agents/`, Codex `.toml`, Cursor `.cursor/rules/`; release 스킬 Step 6.5 + qa-check.sh §10 회귀 가드 |
|
|
314
|
+
| **Consistency & Budget** | v0.9.5 | ✅ 완료 | reviewer.md Iron Laws stale 수정, 디스패처 동기화, 경량성 예산 재교정(40K/1500/2500) 및 근거 기록 |
|
|
315
|
+
| **Safety & Branding** | v0.9.6 | ✅ 현재 | init overwrite 백업, 배포 파일 pm 네이밍 정리, LICENSE 브랜딩 정리 |
|
|
313
316
|
| **Validation** | v1.0 | 🔜 다음 | 실사용 검증, 사용자 피드백 수집 |
|
|
314
317
|
|
|
315
318
|
### 다음 단계
|
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ kode:harness solves this with three mechanisms:
|
|
|
93
93
|
| 🧭 **Navigation Dispatcher** | Turn-by-Turn navigation through 5 pipelines with copy-paste next-step prompts |
|
|
94
94
|
| 📝 **State Persistence** | 5 markdown files that persist project knowledge across LLM sessions |
|
|
95
95
|
| 🔄 **5 Pipelines** | 🟢 New Dev → 🔵 Continue → 🔴 Bug Fix → 🟡 Direction Change → 🟣 Crew-Driven |
|
|
96
|
-
| 🛠️ **
|
|
96
|
+
| 🛠️ **11 Skills** | Step-by-step procedures: setup, debug, breakdown, review, pivot, state-check, and more |
|
|
97
97
|
| 🤖 **4 Agents** | Role-based personas: pm, reviewer, lead, architect |
|
|
98
98
|
| ⚠️ **Failure Patterns** | Project-specific failure log that prevents repeat mistakes across sessions |
|
|
99
99
|
| 📋 **Decision Log** | Records why decisions were made so LLMs don't re-debate settled choices |
|
|
@@ -114,10 +114,10 @@ npx @kodevibe/harness validate # verify state files have real content
|
|
|
114
114
|
|-----|----------------------|--------|--------|
|
|
115
115
|
| **VS Code Copilot** | `.github/copilot-instructions.md` | `.github/skills/*/SKILL.md` | `.github/agents/*.agent.md` |
|
|
116
116
|
| **Claude Code** | `CLAUDE.md` (+ `.claude/rules/core.md`) | `.claude/skills/*/SKILL.md` | `.claude/agents/*.md` |
|
|
117
|
-
| **Cursor** | `.cursor/rules/core.mdc` (+ `AGENTS.md`) | `.
|
|
118
|
-
| **Codex** | `AGENTS.md` | `.agents/skills/*/SKILL.md` | `.codex/agents/*.
|
|
117
|
+
| **Cursor** | `.cursor/rules/core.mdc` (+ `AGENTS.md`) | `.agents/skills/*/SKILL.md` (cross-tool) | `.cursor/rules/<agent>.mdc` |
|
|
118
|
+
| **Codex** | `AGENTS.md` | `.agents/skills/*/SKILL.md` | `.codex/agents/*.toml` |
|
|
119
119
|
| **Windsurf** | `.windsurf/rules/core.md` | `.windsurf/skills/*/SKILL.md` | *(agents installed as skills)* |
|
|
120
|
-
| **Antigravity** | `
|
|
120
|
+
| **Antigravity** | `AGENTS.md` | `.agents/skills/*/SKILL.md` (cross-tool) | `.agents/rules/<agent>.md` |
|
|
121
121
|
|
|
122
122
|
All IDEs also get state files (`project-state.md`, `project-brief.md`, `features.md`, `failure-patterns.md`, `dependency-map.md`) in the `docs/` directory.
|
|
123
123
|
|
|
@@ -218,7 +218,7 @@ npx @kodevibe/harness init --team
|
|
|
218
218
|
|
|
219
219
|
## Iron Laws
|
|
220
220
|
|
|
221
|
-
These
|
|
221
|
+
These 10 rules are enforced across all skills and agents. They form the quality backbone of every kode:harness project managed with harness engineering.
|
|
222
222
|
|
|
223
223
|
| # | Law | Enforced By |
|
|
224
224
|
|---|-----|-------------|
|
|
@@ -268,13 +268,13 @@ Original crew documents are **never modified**. Only the index and tracker are c
|
|
|
268
268
|
| Dependencies | Node 20+ | Bun + Node + Playwright | Node 18+ | Zero |
|
|
269
269
|
| IDE support | 20+ (installer) | 5 (setup --host) | 13 (runtime select) | 6 (native format) |
|
|
270
270
|
| Direction management | ❌ | ❌ | ❌ | ✅ (Direction Guard + pivot + Decision Log) |
|
|
271
|
-
| Iron Laws (code quality rules) | ❌ | ❌ | ❌ | ✅ (
|
|
271
|
+
| Iron Laws (code quality rules) | ❌ | ❌ | ❌ | ✅ (10 laws embedded in skills) |
|
|
272
272
|
| Cold start | ❌ | ❌ | `/gsd-new-project` | ✅ (`setup` skill) |
|
|
273
273
|
| Context per task | 4-6 files | 1 file | Fresh 200k per plan | 2-3 files (136-line dispatcher) |
|
|
274
274
|
|
|
275
275
|
## Roadmap
|
|
276
276
|
|
|
277
|
-
kode:harness is at **v0.9.
|
|
277
|
+
kode:harness is at **v0.9.6** — init now backs up overwritten IDE files under `.harness/init-backups/<timestamp>/...`, shipped pm naming is aligned, and LICENSE branding is cleaned up. v0.9.5 recalibrated lightness budgets (40K/1500/2500) and fixed Iron Laws/dispatcher consistency.
|
|
278
278
|
|
|
279
279
|
| Phase | Version | Status | Focus |
|
|
280
280
|
|---|---|---|---|
|
|
@@ -283,7 +283,10 @@ kode:harness is at **v0.9.2** — state-check skill, Iron Law #10 (Self-Verify),
|
|
|
283
283
|
| **Flexibility** | v0.7.x | ✅ Done | Delegate team conventions to project-brief.md, remove prescriptive rules |
|
|
284
284
|
| **Navigation** | v0.8.x | ✅ Done | 🧭 Navigation Dispatcher, 5 Pipelines, Crew Artifact Integration, 100-point quality audit, Confirm-First gate, Wave-Level Pacing, Recalculating Mode |
|
|
285
285
|
| **Naming** | v0.9.0 | ✅ Done | Skill/agent naming redesign for clarity and discoverability |
|
|
286
|
-
| **Self-Verify** | v0.9.2 | ✅
|
|
286
|
+
| **Self-Verify** | v0.9.2 | ✅ Done | state-check skill, Iron Law #10, Confirmation Gate Defaults, multi-IDE fix, CI Artifact Index |
|
|
287
|
+
| **IDE Realignment** | v0.9.4 | ✅ Done | All 6 IDE adapters aligned with official docs; Antigravity `.agents/`, Codex `.toml`, Cursor `.cursor/rules/`; release skill Step 6.5 + qa-check.sh §10 regression guards |
|
|
288
|
+
| **Consistency & Budget** | v0.9.5 | ✅ Done | Iron Laws stale-copy fix (reviewer.md), dispatcher sync (core-rules.md ↔ copilot-instructions.md), lightness budgets recalibrated (40K/1500/2500) with rationale |
|
|
289
|
+
| **Safety & Branding** | v0.9.6 | ✅ Current | init overwrite backups, shipped pm naming cleanup, LICENSE branding cleanup |
|
|
287
290
|
| **Validation** | v1.0 | 🔜 Next | Real-world project adoption, user feedback collection |
|
|
288
291
|
|
|
289
292
|
### What's Next
|
package/harness/agents/pm.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# pm
|
|
2
2
|
|
|
3
3
|
## Role
|
|
4
4
|
|
|
5
5
|
Feature planning and dependency management.
|
|
6
6
|
Combines PM (what to build), Analytics (what exists), and Architecture (how it connects) into one workflow.
|
|
7
|
-
The
|
|
7
|
+
The pm agent is the entry point for new features — use it BEFORE writing code.
|
|
8
8
|
|
|
9
9
|
## Invoked By
|
|
10
10
|
|
|
@@ -61,8 +61,6 @@ Read `docs/agent-memory/pm.md` for past learnings:
|
|
|
61
61
|
|
|
62
62
|
Apply these insights when creating the implementation plan. If the memory file is empty or contains only placeholders, skip this step.
|
|
63
63
|
|
|
64
|
-
> **Team Mode**: In Team mode, agent memory is personal (`.harness/agent-memory/`). Each developer accumulates their own planning insights.
|
|
65
|
-
|
|
66
64
|
### Step 0.7: Feature Roadmap Planning (Draft & Correct)
|
|
67
65
|
|
|
68
66
|
**Trigger**: `docs/project-brief.md`에 `## Feature Roadmap` 섹션이 없을 때
|
|
@@ -87,12 +85,9 @@ Apply these insights when creating the implementation plan. If the memory file i
|
|
|
87
85
|
- [ ] F-004: ...
|
|
88
86
|
```
|
|
89
87
|
3. 사용자에게 초안을 제시한다: **"이 Feature Roadmap을 검토하고, 추가/삭제/순서 변경을 알려주세요."**
|
|
90
|
-
> **물어보지 말고, 초안을 만들어서 교정받는다.** 빈 칸을 채우는 것보다 틀린 것을 고치는 것이 쉽다.
|
|
91
88
|
4. 사용자 교정을 반영한 최종 Roadmap을 `docs/project-brief.md`에 `## Feature Roadmap` 섹션으로 기록한다
|
|
92
89
|
5. Feature Roadmap이 확정되면 아래 "For New Feature" 절차로 진행한다
|
|
93
90
|
|
|
94
|
-
> **pivot 이후**: pivot이 `project-brief.md`를 업데이트하면, pm은 변경된 Roadmap을 읽고 Checkpoint에서 반영한다.
|
|
95
|
-
|
|
96
91
|
### For New Feature
|
|
97
92
|
|
|
98
93
|
1. Read `docs/project-brief.md` to understand project vision, goals, **non-goals**, and **Decision Log**
|
|
@@ -133,12 +128,11 @@ Apply these insights when creating the implementation plan. If the memory file i
|
|
|
133
128
|
If no Crew Artifact Index → proceed with normal user-driven planning below.
|
|
134
129
|
<!-- CREW_MODE_END -->
|
|
135
130
|
|
|
136
|
-
3. **Direction Alignment**: Verify
|
|
137
|
-
|
|
138
|
-
- **Goal
|
|
139
|
-
- **
|
|
140
|
-
|
|
141
|
-
If the request represents a clear direction change → **stop and require the `pivot` skill** before proceeding with any planning. Do not proceed even if the user insists — direction changes must be formally tracked.
|
|
131
|
+
3. **Direction Alignment**: Verify against three checkpoints (architect validates STRUCTURE; pm validates FEATURE-level alignment):
|
|
132
|
+
- **Goal Alignment**: Serves a listed Goal? If no clear link → **warn but proceed**. Add `⚠️ Goal Alignment: [feature] does not directly map to listed goals` under `### Direction Alignment` in the plan output.
|
|
133
|
+
- **Non-Goal Violation**: Falls into Non-Goals? → **stop and ask the user**. May need `pivot`.
|
|
134
|
+
- **Decision Consistency**: Contradicts a Decision Log entry? → **stop and warn**. Recommend `pivot`.
|
|
135
|
+
If the request represents a clear direction change → **stop and require `pivot`** before planning. Do not proceed even if the user insists.
|
|
142
136
|
3. Read `docs/features.md` to understand what already exists
|
|
143
137
|
4. Read `docs/dependency-map.md` to understand current architecture
|
|
144
138
|
5. Read `docs/project-state.md` for current Sprint context
|
|
@@ -153,7 +147,7 @@ Apply these insights when creating the implementation plan. If the memory file i
|
|
|
153
147
|
13. **After user approves** → Update `docs/project-state.md` with the new Story
|
|
154
148
|
14. **After user approves** → Update `docs/features.md` with the new feature entry
|
|
155
149
|
|
|
156
|
-
|
|
150
|
+
State file writes (Steps 13-14) execute ONLY after user approval. Rejected plans never touch state.
|
|
157
151
|
|
|
158
152
|
### For Architecture Query
|
|
159
153
|
|
|
@@ -187,8 +181,6 @@ After producing ANY plan (New Feature, Refactor, or Crew-Driven), **do NOT proce
|
|
|
187
181
|
4. **Only after approval** → execute **MANDATORY State File Write** (below), then output 🧭 Next Step pointing to `lead`
|
|
188
182
|
5. If the user requests changes → revise the plan and re-confirm. **No state files are written until approval.**
|
|
189
183
|
|
|
190
|
-
> **Why**: The pm is planning a route, not driving. The user must confirm the route before the engine starts. This prevents irreversible code changes based on a misunderstood plan.
|
|
191
|
-
|
|
192
184
|
### ⚠️ MANDATORY: Post-Approval State File Write
|
|
193
185
|
|
|
194
186
|
**This section executes IMMEDIATELY after user approval. Do NOT skip. Do NOT output the 🧭 Next Step block until ALL writes below are complete.**
|
|
@@ -234,8 +226,6 @@ After the Post-Approval state writes complete, run the `state-check` skill:
|
|
|
234
226
|
3. If state-check returns **WARN** → include the warnings in the plan output, then proceed
|
|
235
227
|
4. If state-check returns **FAIL** → do NOT output STATUS: DONE. Fix the listed drift, then re-run state-check.
|
|
236
228
|
|
|
237
|
-
> Iron Law #10 (Self-Verify) applies to every agent. The pm runs state-check **after** state writes — not before — because the writes are what create the consistency to verify.
|
|
238
|
-
|
|
239
229
|
## Output Format
|
|
240
230
|
|
|
241
231
|
### New Feature Plan
|
|
@@ -291,9 +281,8 @@ Use this format when Crew Artifact Index exists in project-brief.md. If no Artif
|
|
|
291
281
|
|
|
292
282
|
## Sprint Completion Checkpoint
|
|
293
283
|
|
|
294
|
-
**Trigger**: 현재 Sprint의 모든 Story가 ✅ 완료되었을 때 (reviewer pass → pm checkpoint)
|
|
295
|
-
|
|
296
|
-
이 절차는 Sprint 종료 시 자동으로 실행된다. "계속할까요?"가 아니라 **구체적 선택을 강제**한다.
|
|
284
|
+
**Trigger**: 현재 Sprint의 모든 Story가 ✅ 완료되었을 때 (reviewer pass → pm checkpoint).
|
|
285
|
+
Sprint 종료 시 자동 실행 — **구체적 선택을 강제**한다 ("계속할까요?" 가 아님).
|
|
297
286
|
|
|
298
287
|
### 절차
|
|
299
288
|
|
|
@@ -324,7 +313,7 @@ Use this format when Crew Artifact Index exists in project-brief.md. If no Artif
|
|
|
324
313
|
|
|
325
314
|
🏁 마무리: 현재 상태로 프로젝트를 완료하고 wrap-up 진행
|
|
326
315
|
```
|
|
327
|
-
|
|
316
|
+
**"계속"은 선택지에 없다** — 사용자는 구체적 기능 또는 "마무리"를 명시적으로 선택해야 한다.
|
|
328
317
|
|
|
329
318
|
4. **사용자 선택에 따라 분기**:
|
|
330
319
|
- **기능 선택** → 선택된 기능으로 Sprint 계획 (위의 "For New Feature" 절차 진행)
|
|
@@ -342,11 +331,11 @@ Use this format when Crew Artifact Index exists in project-brief.md. If no Artif
|
|
|
342
331
|
- Last changed: [Sprint/Story reference]
|
|
343
332
|
```
|
|
344
333
|
|
|
345
|
-
### 🧭 Navigation — After
|
|
334
|
+
### 🧭 Navigation — After pm
|
|
346
335
|
|
|
347
336
|
After producing a plan, always append a 🧭 block:
|
|
348
337
|
|
|
349
|
-
|
|
|
338
|
+
| pm Result | 🧭 Next Step |
|
|
350
339
|
|---|---|
|
|
351
340
|
| Plan created (solo) | User confirmation — "이 경로(Plan)대로 구현을 시작할까요?" → approved → `lead` |
|
|
352
341
|
<!-- CREW_MODE_START -->
|
|
@@ -217,17 +217,7 @@ STATUS: DONE / DONE_WITH_CONCERNS / BLOCKED
|
|
|
217
217
|
|
|
218
218
|
## Embedded Rules
|
|
219
219
|
|
|
220
|
-
These rules are enforced during every review
|
|
221
|
-
|
|
222
|
-
### Iron Laws
|
|
223
|
-
1. **Mock Sync**: Interface change → mock updated in same commit (FP-001)
|
|
224
|
-
2. **Type Check**: Verify constructor/factory parameters from source, not memory (FP-002)
|
|
225
|
-
3. **Scope Compliance**: Changes must be within current Story scope (docs/project-state.md)
|
|
226
|
-
4. **Security**: No credentials, passwords, or API keys in code or commits
|
|
227
|
-
5. **3-Failure Stop**: Same approach failed 3 times → stop and report
|
|
228
|
-
6. **Dependency Map**: New/modified module → docs/dependency-map.md updated
|
|
229
|
-
7. **Feature Registry**: New feature → docs/features.md updated
|
|
230
|
-
8. **Session Handoff**: Session end → docs/project-state.md Quick Summary updated
|
|
220
|
+
These rules are enforced during every review. The full Iron Laws (10) are defined in `harness/core-rules.md` — reviewer enforces all of them. Below are review-specific rules that supplement the Iron Laws.
|
|
231
221
|
|
|
232
222
|
### Testing Rules
|
|
233
223
|
- New feature = New test. No feature code without tests.
|
package/harness/project-brief.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project Brief
|
|
2
2
|
|
|
3
|
-
> **Fill this out immediately after running `@kodevibe/harness init`.** The
|
|
3
|
+
> **Fill this out immediately after running `@kodevibe/harness init`.** The pm agent uses this file for Direction Guard — without it, scope drift cannot be prevented.
|
|
4
4
|
|
|
5
5
|
## Vision
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
## Non-Goals
|
|
26
26
|
|
|
27
27
|
<!-- What is explicitly OUT OF SCOPE? This is equally important as Goals.
|
|
28
|
-
The
|
|
28
|
+
The pm agent will WARN you when a requested feature falls here.
|
|
29
29
|
Examples:
|
|
30
30
|
- Not a hosting platform — users deploy their own
|
|
31
31
|
- Not supporting legacy REST APIs — MCP only
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
|
|
156
156
|
## Decision Log
|
|
157
157
|
|
|
158
|
-
<!-- Record WHY key decisions were made. The
|
|
158
|
+
<!-- Record WHY key decisions were made. The pm agent uses this to avoid re-debating settled decisions.
|
|
159
159
|
Use the `pivot` skill to add entries here when direction changes.
|
|
160
160
|
Format:
|
|
161
161
|
|
|
@@ -17,7 +17,7 @@ Ensures bottom-up implementation: foundations first, then layers that depend on
|
|
|
17
17
|
- Starting a new feature or Story
|
|
18
18
|
- A feature touches 3+ modules
|
|
19
19
|
- Unsure which module to build first
|
|
20
|
-
- After the
|
|
20
|
+
- After the pm agent creates a high-level plan
|
|
21
21
|
|
|
22
22
|
## Procedure
|
|
23
23
|
|
|
@@ -83,6 +83,25 @@ This step references the indexed company guide; it does not embed the guide cont
|
|
|
83
83
|
2. If yes → verify they include entries for all changes since last release
|
|
84
84
|
3. If no → generate a summary from `git log --oneline <last-tag>..HEAD`
|
|
85
85
|
|
|
86
|
+
### Step 6.5: IDE Adapter 공식 문서 정합성 (IDE-targeting 프로젝트만)
|
|
87
|
+
|
|
88
|
+
If the project ships IDE-specific adapters or generators (e.g., `src/init.js` with multiple `generate<IDE>` functions, OR distributes templates installed under IDE-specific directories like `.cursor/`, `.codex/`, `.windsurf/`, `.agents/`):
|
|
89
|
+
|
|
90
|
+
1. **List all IDEs supported** by the project (read source — do not guess).
|
|
91
|
+
2. For **each IDE**, fetch the **official current documentation** for that IDE's agent/rules/skills layout. Do not rely on training data.
|
|
92
|
+
3. **Diff** the project's generated paths/file formats against the official docs:
|
|
93
|
+
- File extensions (e.g., Codex requires `.toml`, not `.md`)
|
|
94
|
+
- Directory locations (e.g., Antigravity uses `.agents/`, not `.gemini/`)
|
|
95
|
+
- Frontmatter schema (required fields per IDE)
|
|
96
|
+
- Cross-tool standards (e.g., `AGENTS.md`, `.agents/skills/`)
|
|
97
|
+
4. If **any drift** is detected → mark **NOT_READY**. Block the release until adapters match official docs.
|
|
98
|
+
5. Verify regression tests assert the **absence** of stale paths (e.g., `assert(!exists('.gemini/'))` if the IDE moved off Gemini).
|
|
99
|
+
6. Cite the official doc URL inline in the generator code as a comment (source-of-truth pointer).
|
|
100
|
+
|
|
101
|
+
**Rationale**: IDE vendors change their layouts (e.g., Cursor's skills location, Antigravity's `.gemini/` → `.agents/` migration). Without this gate, every IDE update silently breaks `harness init` for that IDE's users.
|
|
102
|
+
|
|
103
|
+
If the project does not ship IDE adapters → skip this step entirely.
|
|
104
|
+
|
|
86
105
|
## Output Format
|
|
87
106
|
|
|
88
107
|
```
|
package/harness/skills/setup.md
CHANGED
|
@@ -278,28 +278,6 @@ For projects with fewer than 3 modules (e.g., single-file scripts, small CLI too
|
|
|
278
278
|
- `breakdown` Waves may collapse into a single Wave — skip Wave-level pacing
|
|
279
279
|
- Consider a simplified workflow: `setup → pm → [code] → reviewer → wrap-up` (skip lead for single-story projects)
|
|
280
280
|
|
|
281
|
-
## Embedded Knowledge
|
|
282
|
-
|
|
283
|
-
### Session Bootstrap Protocol
|
|
284
|
-
When starting a NEW session (not during setup), read these files in order:
|
|
285
|
-
1. `docs/project-state.md` — Quick Summary tells you where we left off
|
|
286
|
-
2. `docs/features.md` — What features exist
|
|
287
|
-
3. `docs/failure-patterns.md` — What mistakes to avoid
|
|
288
|
-
4. `docs/project-brief.md` — Project vision and non-goals
|
|
289
|
-
|
|
290
|
-
### Workflow Pipeline
|
|
291
|
-
- New feature: `pm → [code] → reviewer → lead → wrap-up`
|
|
292
|
-
- Bug fix: `debug → [fix] → sync-tests → reviewer → wrap-up`
|
|
293
|
-
- Session lifecycle: `lead ("where are we?") → [work] → wrap-up`
|
|
294
|
-
|
|
295
|
-
### State File Size Limits
|
|
296
|
-
- docs/project-brief.md: Max 200 lines
|
|
297
|
-
- docs/project-state.md: Max 300 lines
|
|
298
|
-
- docs/failure-patterns.md: Max 50 patterns
|
|
299
|
-
- docs/dependency-map.md: Max 100 modules
|
|
300
|
-
- docs/features.md: Max 50 features
|
|
301
|
-
- docs/agent-memory/*.md: Max 100 lines each
|
|
302
|
-
|
|
303
281
|
## Anti-patterns
|
|
304
282
|
|
|
305
283
|
| Anti-pattern | Correct Approach |
|
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -5,12 +5,24 @@ const path = require('node:path');
|
|
|
5
5
|
const readline = require('node:readline');
|
|
6
6
|
|
|
7
7
|
const HARNESS_DIR = path.join(__dirname, '..', 'harness');
|
|
8
|
+
let currentBackupTimestamp = null;
|
|
8
9
|
|
|
9
10
|
// ─── Template reader ─────────────────────────────────────────
|
|
10
11
|
function readTemplate(name) {
|
|
11
12
|
return fs.readFileSync(path.join(HARNESS_DIR, name), 'utf8');
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
function resetBackupTimestamp() {
|
|
16
|
+
currentBackupTimestamp = null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getBackupTimestamp() {
|
|
20
|
+
if (!currentBackupTimestamp) {
|
|
21
|
+
currentBackupTimestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
22
|
+
}
|
|
23
|
+
return currentBackupTimestamp;
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
// ─── File writer (mkdir -p + conflict check) ─────────────────
|
|
15
27
|
function writeFile(targetDir, relPath, content, overwrite) {
|
|
16
28
|
const fullPath = path.join(targetDir, relPath);
|
|
@@ -19,9 +31,19 @@ function writeFile(targetDir, relPath, content, overwrite) {
|
|
|
19
31
|
console.log(` ⏭ Skipped (exists): ${relPath}`);
|
|
20
32
|
return false;
|
|
21
33
|
}
|
|
34
|
+
let backupRelPath = null;
|
|
35
|
+
if (exists && overwrite) {
|
|
36
|
+
backupRelPath = path.join('.harness', 'init-backups', getBackupTimestamp(), relPath);
|
|
37
|
+
const backupPath = path.join(targetDir, backupRelPath);
|
|
38
|
+
fs.mkdirSync(path.dirname(backupPath), { recursive: true });
|
|
39
|
+
if (!fs.existsSync(backupPath)) {
|
|
40
|
+
fs.copyFileSync(fullPath, backupPath);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
22
43
|
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
23
44
|
fs.writeFileSync(fullPath, content, 'utf8');
|
|
24
|
-
|
|
45
|
+
const backupNote = backupRelPath ? ` (backup: ${backupRelPath})` : '';
|
|
46
|
+
console.log(` ${exists ? '↻' : '✓'} ${relPath}${backupNote}`);
|
|
25
47
|
return true;
|
|
26
48
|
}
|
|
27
49
|
|
|
@@ -78,13 +100,16 @@ function hasFrameworkMarker(content) {
|
|
|
78
100
|
}
|
|
79
101
|
|
|
80
102
|
function hasIdeLayout(targetDir, ide) {
|
|
103
|
+
// IDE-unique layout markers — used to disambiguate when multiple IDEs share
|
|
104
|
+
// common files (e.g., AGENTS.md, .agents/skills/). Each marker MUST be unique
|
|
105
|
+
// to its IDE and aligned with the IDE's official docs.
|
|
81
106
|
const requiredByIde = {
|
|
82
|
-
vscode: '.github/skills/setup/SKILL.md',
|
|
83
|
-
claude: '.claude/skills/setup/SKILL.md',
|
|
84
|
-
cursor: '.cursor/
|
|
85
|
-
codex: '.agents/
|
|
86
|
-
windsurf: '.windsurf/skills/setup/SKILL.md',
|
|
87
|
-
antigravity: '.
|
|
107
|
+
vscode: '.github/skills/setup/SKILL.md', // VS Code: .github/skills/ (official)
|
|
108
|
+
claude: '.claude/skills/setup/SKILL.md', // Claude Code: .claude/skills/ (official)
|
|
109
|
+
cursor: '.cursor/rules/core.mdc', // Cursor: .cursor/rules/*.mdc (official)
|
|
110
|
+
codex: '.codex/agents/reviewer.toml', // Codex CLI: .codex/agents/*.toml (official)
|
|
111
|
+
windsurf: '.windsurf/skills/setup/SKILL.md', // Windsurf: .windsurf/skills/ (official)
|
|
112
|
+
antigravity: '.agents/rules/core.md', // Antigravity: .agents/rules/ (official)
|
|
88
113
|
};
|
|
89
114
|
|
|
90
115
|
const requiredPath = requiredByIde[ide];
|
|
@@ -271,37 +296,55 @@ function generateClaude(targetDir, overwrite, mode = 'solo', crew = false) {
|
|
|
271
296
|
}
|
|
272
297
|
|
|
273
298
|
function generateCursor(targetDir, overwrite, mode = 'solo', crew = false) {
|
|
274
|
-
// .
|
|
299
|
+
// Cursor official docs: https://cursor.com/docs/context/rules
|
|
300
|
+
// Officially supported surfaces ONLY:
|
|
301
|
+
// - .cursor/rules/*.mdc (with frontmatter: alwaysApply, description, globs)
|
|
302
|
+
// - AGENTS.md at project root (and nested directories)
|
|
303
|
+
// Cursor does NOT publicly document custom skills/agents directories, so we
|
|
304
|
+
// emit Skills via the open Agent Skills standard path .agents/skills/
|
|
305
|
+
// (also recognized by VS Code, Codex, Antigravity), and skip a Cursor-specific
|
|
306
|
+
// agents directory entirely.
|
|
275
307
|
const coreRules = resolveContent(readTemplate('core-rules.md'), mode, crew);
|
|
276
308
|
const coreMdc =
|
|
277
309
|
'---\ndescription: kode:harness dispatcher — workflow guidance and state file references\nalwaysApply: true\n---\n\n' +
|
|
278
310
|
coreRules;
|
|
279
311
|
writeFile(targetDir, '.cursor/rules/core.mdc', coreMdc, true);
|
|
280
312
|
|
|
281
|
-
// AGENTS.md — Cursor
|
|
313
|
+
// AGENTS.md — Cursor reads project-root AGENTS.md as agent instructions
|
|
282
314
|
writeFile(targetDir, 'AGENTS.md', coreRules, true);
|
|
283
315
|
|
|
284
|
-
// Skills (.
|
|
285
|
-
writeSkills(targetDir, '.
|
|
316
|
+
// Skills (.agents/skills — open Agent Skills standard, cross-tool)
|
|
317
|
+
writeSkills(targetDir, '.agents/skills', true, mode, crew);
|
|
286
318
|
|
|
287
|
-
// Agents (.cursor/
|
|
288
|
-
|
|
319
|
+
// Agents as additional rules (.cursor/rules/) so they auto-load with Cursor
|
|
320
|
+
// and are user-invocable via @rule-name. We use .md plain (no frontmatter
|
|
321
|
+
// beyond alwaysApply omitted → default "manual" activation).
|
|
322
|
+
for (const agent of AGENTS) {
|
|
323
|
+
const content = resolveContent(readTemplate(agent.file), mode, crew);
|
|
324
|
+
const ruleMd =
|
|
325
|
+
`---\ndescription: ${agent.desc}\nalwaysApply: false\n---\n\n` +
|
|
326
|
+
content;
|
|
327
|
+
writeFile(targetDir, `.cursor/rules/${agent.id}.mdc`, ruleMd, true);
|
|
328
|
+
}
|
|
289
329
|
|
|
290
330
|
// State files (respect user's --overwrite for data files)
|
|
291
331
|
writeStateFiles(targetDir, overwrite, mode, crew);
|
|
292
332
|
}
|
|
293
333
|
|
|
294
334
|
function generateCodex(targetDir, overwrite, mode = 'solo', crew = false) {
|
|
295
|
-
//
|
|
296
|
-
//
|
|
335
|
+
// Codex CLI official docs:
|
|
336
|
+
// - AGENTS.md: https://developers.openai.com/codex/guides/agents-md
|
|
337
|
+
// - Skills: https://developers.openai.com/codex/skills (.agents/skills/SKILL.md)
|
|
338
|
+
// - Subagents: https://developers.openai.com/codex/subagents (.codex/agents/*.toml)
|
|
339
|
+
// AGENTS.md — Codex CLI's canonical project instructions file (auto-loaded).
|
|
297
340
|
writeFile(targetDir, 'AGENTS.md', resolveContent(readTemplate('core-rules.md'), mode, crew), true);
|
|
298
341
|
|
|
299
|
-
// Skills (SKILL.md
|
|
342
|
+
// Skills (.agents/skills/<name>/SKILL.md — official cross-tool standard)
|
|
300
343
|
writeSkills(targetDir, '.agents/skills', true, mode, crew);
|
|
301
344
|
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
|
|
345
|
+
// Subagents (.codex/agents/*.toml — Codex CLI's official format with
|
|
346
|
+
// name, description, developer_instructions fields)
|
|
347
|
+
writeAgentsAsToml(targetDir, '.codex/agents', true, mode, crew);
|
|
305
348
|
|
|
306
349
|
// State files (respect user's --overwrite for data files)
|
|
307
350
|
writeStateFiles(targetDir, overwrite, mode, crew);
|
|
@@ -326,20 +369,31 @@ function generateWindsurf(targetDir, overwrite, mode = 'solo', crew = false) {
|
|
|
326
369
|
}
|
|
327
370
|
|
|
328
371
|
function generateAntigravity(targetDir, overwrite, mode = 'solo', crew = false) {
|
|
372
|
+
// Antigravity official docs:
|
|
373
|
+
// - Skills: https://antigravity.google/docs/skills (.agents/skills/<name>/SKILL.md)
|
|
374
|
+
// - Rules: https://antigravity.google/docs/rules-workflows (.agents/rules/*.md)
|
|
375
|
+
// Note: Antigravity does NOT recognize a project-root GEMINI.md — the global
|
|
376
|
+
// GEMINI.md lives only at ~/.gemini/GEMINI.md. We emit AGENTS.md for cross-tool
|
|
377
|
+
// compat (harmless to Antigravity, useful when Codex/Cursor share the repo).
|
|
329
378
|
const coreRules = resolveContent(readTemplate('core-rules.md'), mode, crew);
|
|
330
379
|
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
// AGENTS.md — Antigravity also follows the AGENTS.md convention shared by
|
|
335
|
-
// Codex / Cursor CLI; emitting it broadens compatibility with no downside
|
|
380
|
+
// AGENTS.md — cross-tool agent instructions (recognized by Codex/Cursor;
|
|
381
|
+
// ignored by Antigravity but provides compatibility for mixed teams)
|
|
336
382
|
writeFile(targetDir, 'AGENTS.md', coreRules, true);
|
|
337
383
|
|
|
338
|
-
//
|
|
339
|
-
|
|
384
|
+
// .agents/rules/core.md — workspace rules (Antigravity's official location)
|
|
385
|
+
writeFile(targetDir, '.agents/rules/core.md', coreRules, true);
|
|
340
386
|
|
|
341
|
-
//
|
|
342
|
-
|
|
387
|
+
// Skills (.agents/skills/<name>/SKILL.md — Antigravity's official location)
|
|
388
|
+
writeSkills(targetDir, '.agents/skills', true, mode, crew);
|
|
389
|
+
|
|
390
|
+
// Agents → Rules (Antigravity has no separate agents directory; agents
|
|
391
|
+
// are persistent rule prompts. We emit one rule file per agent under
|
|
392
|
+
// .agents/rules/, with alwaysApply implied — manual @-mention also works.)
|
|
393
|
+
for (const agent of AGENTS) {
|
|
394
|
+
const content = resolveContent(readTemplate(agent.file), mode, crew);
|
|
395
|
+
writeFile(targetDir, `.agents/rules/${agent.id}.md`, content, true);
|
|
396
|
+
}
|
|
343
397
|
|
|
344
398
|
// State files (respect user's --overwrite for data files)
|
|
345
399
|
writeStateFiles(targetDir, overwrite, mode, crew);
|
|
@@ -430,7 +484,7 @@ function detectExistingInstall(targetDir) {
|
|
|
430
484
|
['.claude/rules/core.md', 'claude'],
|
|
431
485
|
['.cursor/rules/core.mdc', 'cursor'],
|
|
432
486
|
['.windsurf/rules/core.md', 'windsurf'],
|
|
433
|
-
['
|
|
487
|
+
['.agents/rules/core.md', 'antigravity'],
|
|
434
488
|
];
|
|
435
489
|
// Only count as existing if the file contains a framework marker (not from other frameworks)
|
|
436
490
|
const existingIde = ideMarkers.filter(([f, ide]) => {
|
|
@@ -546,7 +600,8 @@ function runDoctor(targetDir) {
|
|
|
546
600
|
['.claude/rules/core.md', 'claude'],
|
|
547
601
|
['.cursor/rules/core.mdc', 'cursor'],
|
|
548
602
|
['.windsurf/rules/core.md', 'windsurf'],
|
|
549
|
-
['
|
|
603
|
+
['.agents/rules/core.md', 'antigravity'],
|
|
604
|
+
['.codex/agents/reviewer.toml', 'codex'],
|
|
550
605
|
['AGENTS.md', 'codex'],
|
|
551
606
|
];
|
|
552
607
|
|
|
@@ -777,6 +832,7 @@ async function run(argv) {
|
|
|
777
832
|
const lang = detectLanguage(args.dir);
|
|
778
833
|
const modeDesc = crew ? `${mode} + crew` : mode;
|
|
779
834
|
console.log(`\n Installing for ${gen.name} (${modeDesc} mode)... (detected language: ${lang})\n`);
|
|
835
|
+
resetBackupTimestamp();
|
|
780
836
|
gen.fn(args.dir, overwrite, mode, crew);
|
|
781
837
|
|
|
782
838
|
// Team mode extras
|