@ps-neko/nekowork 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/AGENTS.md +112 -0
  2. package/CLAUDE.md +81 -0
  3. package/LICENSE +21 -0
  4. package/README.md +283 -0
  5. package/REVIEW.md +96 -0
  6. package/RULES.md +51 -0
  7. package/SOUL.md +21 -0
  8. package/WORKING-CONTEXT.md +52 -0
  9. package/agent.yaml +219 -0
  10. package/agents/architect.md +57 -0
  11. package/agents/code-reviewer.md +60 -0
  12. package/agents/codex-challenger.md +53 -0
  13. package/agents/codex-reviewer.md +56 -0
  14. package/agents/debugger.md +33 -0
  15. package/agents/doc-writer.md +51 -0
  16. package/agents/executor.md +41 -0
  17. package/agents/planner.md +49 -0
  18. package/agents/research.md +50 -0
  19. package/agents/security-reviewer.md +47 -0
  20. package/agents/test-engineer.md +41 -0
  21. package/bridge/mcp-server.js +301 -0
  22. package/commands/claude-led-codex-review.md +29 -0
  23. package/docs/ADVANCED.md +321 -0
  24. package/docs/AI-DEVELOPMENT-LIFECYCLE.md +105 -0
  25. package/docs/ARCHITECTURE.md +205 -0
  26. package/docs/AUDIT.md +114 -0
  27. package/docs/AUTH-MIGRATION.md +282 -0
  28. package/docs/CHANGELOG.md +97 -0
  29. package/docs/CLI-STAGES.md +89 -0
  30. package/docs/CODEMAPS/README.md +15 -0
  31. package/docs/CODEMAPS/agents.md +22 -0
  32. package/docs/CODEMAPS/bridge.md +18 -0
  33. package/docs/CODEMAPS/hooks.md +28 -0
  34. package/docs/CODEMAPS/manifests.md +14 -0
  35. package/docs/CODEMAPS/rules.md +22 -0
  36. package/docs/CODEMAPS/schemas.md +21 -0
  37. package/docs/CODEMAPS/scripts.md +158 -0
  38. package/docs/CODEMAPS/skills.md +29 -0
  39. package/docs/CODEMAPS/tests.md +98 -0
  40. package/docs/CORE-INVARIANTS.md +38 -0
  41. package/docs/DEMO.md +110 -0
  42. package/docs/EXAMPLE-PROJECT.md +92 -0
  43. package/docs/PORTING.md +154 -0
  44. package/docs/PRODUCT-PRINCIPLES.md +303 -0
  45. package/docs/PUBLISH-ALPHA.md +106 -0
  46. package/docs/QUICKSTART.md +344 -0
  47. package/docs/RELEASE-READINESS.md +140 -0
  48. package/docs/RISK-CLASSIFIER.md +50 -0
  49. package/docs/RUNBOOK.md +146 -0
  50. package/docs/SECURITY.md +79 -0
  51. package/docs/SETUP.md +142 -0
  52. package/docs/WHY-NEKOWORK.md +64 -0
  53. package/docs/case-studies/README.md +16 -0
  54. package/docs/case-studies/SINDRESORHUS-IS-PLAIN-OBJ.md +141 -0
  55. package/docs/dev-log/2026-04-29-p1-recovery.md +142 -0
  56. package/docs/dev-log/2026-04-29-week1-4.md +81 -0
  57. package/docs/examples/GITHUB-ACTIONS-HARDENING.md +86 -0
  58. package/docs/examples/QUALITY-LIFECYCLE-SMOKE.md +32 -0
  59. package/docs/examples/TRADING-DASHBOARD-MOCK.md +65 -0
  60. package/docs/workflows-stash/README.md +32 -0
  61. package/docs/workflows-stash/harness-review.yml +166 -0
  62. package/docs/workflows-stash/harness-validate.yml +48 -0
  63. package/examples/github-actions-hardening/.github/workflows/hardened-validate.yml +38 -0
  64. package/examples/github-actions-hardening/README.md +31 -0
  65. package/examples/github-actions-hardening/case-study/ASK.md +26 -0
  66. package/examples/github-actions-hardening/case-study/GATE_STATUS.md +28 -0
  67. package/examples/github-actions-hardening/case-study/PLAN.md +25 -0
  68. package/examples/github-actions-hardening/case-study/SHIP_READY.md +21 -0
  69. package/examples/github-actions-hardening/case-study/TASK.md +30 -0
  70. package/examples/github-actions-hardening/case-study/TEAM_HANDOFFS.md +37 -0
  71. package/examples/github-actions-hardening/case-study/VERIFY_SUMMARY.md +35 -0
  72. package/examples/github-actions-hardening/case-study/WORK_SUMMARY.md +24 -0
  73. package/examples/github-actions-hardening/package.json +12 -0
  74. package/examples/github-actions-hardening/scripts/check.mjs +43 -0
  75. package/examples/quality-lifecycle-smoke/README.md +30 -0
  76. package/examples/quality-lifecycle-smoke/case-study/ASK.md +24 -0
  77. package/examples/quality-lifecycle-smoke/case-study/GATE_STATUS.md +10 -0
  78. package/examples/quality-lifecycle-smoke/case-study/PLAN.md +19 -0
  79. package/examples/quality-lifecycle-smoke/case-study/SHIP_READY.md +11 -0
  80. package/examples/quality-lifecycle-smoke/case-study/TASK.md +19 -0
  81. package/examples/quality-lifecycle-smoke/case-study/TEAM_HANDOFFS.md +21 -0
  82. package/examples/quality-lifecycle-smoke/case-study/VERIFY_SUMMARY.md +44 -0
  83. package/examples/quality-lifecycle-smoke/case-study/WORK_SUMMARY.md +19 -0
  84. package/examples/quality-lifecycle-smoke/package.json +8 -0
  85. package/examples/quality-lifecycle-smoke/scripts/check.mjs +44 -0
  86. package/examples/trading-dashboard-mock/README.md +33 -0
  87. package/examples/trading-dashboard-mock/case-study/ASK.md +24 -0
  88. package/examples/trading-dashboard-mock/case-study/GATE_STATUS.md +28 -0
  89. package/examples/trading-dashboard-mock/case-study/PLAN.md +23 -0
  90. package/examples/trading-dashboard-mock/case-study/SHIP_READY.md +21 -0
  91. package/examples/trading-dashboard-mock/case-study/TASK.md +29 -0
  92. package/examples/trading-dashboard-mock/case-study/TEAM_HANDOFFS.md +49 -0
  93. package/examples/trading-dashboard-mock/case-study/VERIFY_SUMMARY.md +35 -0
  94. package/examples/trading-dashboard-mock/case-study/WORK_SUMMARY.md +27 -0
  95. package/examples/trading-dashboard-mock/fixtures/market.json +9 -0
  96. package/examples/trading-dashboard-mock/index.html +76 -0
  97. package/examples/trading-dashboard-mock/package.json +9 -0
  98. package/examples/trading-dashboard-mock/scripts/check.mjs +54 -0
  99. package/examples/trading-dashboard-mock/src/app.js +83 -0
  100. package/examples/trading-dashboard-mock/src/styles.css +227 -0
  101. package/hooks/hooks.json +44 -0
  102. package/hooks/scripts/config-protection.js +34 -0
  103. package/hooks/scripts/gateguard-fact-force.js +146 -0
  104. package/hooks/scripts/persistent-mode.mjs +27 -0
  105. package/hooks/scripts/pre-bash-dispatcher.js +63 -0
  106. package/hooks/scripts/quality-gate.js +106 -0
  107. package/manifests/install-components.json +195 -0
  108. package/manifests/install-modules.json +101 -0
  109. package/manifests/install-profiles.json +134 -0
  110. package/package.json +96 -0
  111. package/rules/common/coding-style.md +71 -0
  112. package/rules/common/security.md +69 -0
  113. package/rules/common/testing.md +58 -0
  114. package/rules/python/coding-style.md +80 -0
  115. package/rules/python/testing.md +86 -0
  116. package/rules/typescript/coding-style.md +97 -0
  117. package/rules/typescript/security.md +67 -0
  118. package/rules/typescript/testing.md +78 -0
  119. package/schemas/agent-yaml.schema.json +168 -0
  120. package/schemas/agent.schema.json +32 -0
  121. package/schemas/handoff.schema.json +105 -0
  122. package/schemas/hooks.schema.json +35 -0
  123. package/schemas/install-components.schema.json +46 -0
  124. package/schemas/install-modules.schema.json +39 -0
  125. package/schemas/install-profiles.schema.json +32 -0
  126. package/schemas/install-state.schema.json +42 -0
  127. package/schemas/routing.schema.json +42 -0
  128. package/schemas/skill.schema.json +19 -0
  129. package/scripts/agents/dispatch.js +144 -0
  130. package/scripts/agents/runners/claude.js +214 -0
  131. package/scripts/agents/runners/codex.js +233 -0
  132. package/scripts/agents/runners/gemini.js +92 -0
  133. package/scripts/agents/runners/mock.js +107 -0
  134. package/scripts/auth/github-import-gh.js +52 -0
  135. package/scripts/auth/github-login.js +79 -0
  136. package/scripts/auth/github-logout.js +21 -0
  137. package/scripts/auth/github-status.js +46 -0
  138. package/scripts/build-claude.js +101 -0
  139. package/scripts/build-codemaps.js +286 -0
  140. package/scripts/build-codex.js +93 -0
  141. package/scripts/build-cursor.js +132 -0
  142. package/scripts/build-gemini.js +117 -0
  143. package/scripts/build-opencode.js +117 -0
  144. package/scripts/ci/catalog.js +120 -0
  145. package/scripts/ci/check-markers.js +48 -0
  146. package/scripts/ci/security-hardening.js +270 -0
  147. package/scripts/ci/validate-agents.js +88 -0
  148. package/scripts/ci/validate-hooks.js +99 -0
  149. package/scripts/ci/validate-manifests.js +128 -0
  150. package/scripts/ci/validate-skills.js +93 -0
  151. package/scripts/cli.js +1134 -0
  152. package/scripts/core/auth-guard.js +22 -0
  153. package/scripts/core/build-roots.js +11 -0
  154. package/scripts/core/cli-resolver.js +64 -0
  155. package/scripts/core/execution-workspace.js +84 -0
  156. package/scripts/core/git-mutation-guard.js +79 -0
  157. package/scripts/core/install-state.js +125 -0
  158. package/scripts/core/json-extractor.js +32 -0
  159. package/scripts/core/subprocess.js +74 -0
  160. package/scripts/daemon/wait.js +278 -0
  161. package/scripts/demo-external-project.js +222 -0
  162. package/scripts/demo-quick-run.js +193 -0
  163. package/scripts/demo-review.js +204 -0
  164. package/scripts/doctor.js +296 -0
  165. package/scripts/install-apply.js +185 -0
  166. package/scripts/install-plan.js +411 -0
  167. package/scripts/lib/acceptance-criteria.js +105 -0
  168. package/scripts/lib/costs.js +82 -0
  169. package/scripts/lib/instincts.js +194 -0
  170. package/scripts/lib/keychain.js +85 -0
  171. package/scripts/lib/profile-policy.js +134 -0
  172. package/scripts/lib/profile-safety.js +81 -0
  173. package/scripts/lib/risk-classifier.js +145 -0
  174. package/scripts/lib/router.js +138 -0
  175. package/scripts/lib/severity.js +99 -0
  176. package/scripts/lib/token-vault.js +136 -0
  177. package/scripts/orchestrators/apply.js +225 -0
  178. package/scripts/orchestrators/ask.js +143 -0
  179. package/scripts/orchestrators/gate.js +179 -0
  180. package/scripts/orchestrators/ralph.js +179 -0
  181. package/scripts/orchestrators/review.js +452 -0
  182. package/scripts/orchestrators/run.js +151 -0
  183. package/scripts/orchestrators/ship.js +339 -0
  184. package/scripts/orchestrators/team-lite.js +270 -0
  185. package/scripts/orchestrators/team.js +244 -0
  186. package/scripts/orchestrators/verify.js +306 -0
  187. package/scripts/orchestrators/work.js +207 -0
  188. package/scripts/portability/simulate-port.js +220 -0
  189. package/scripts/repair.js +184 -0
  190. package/scripts/sync-claude-md.js +220 -0
  191. package/scripts/verify/claude-live.js +30 -0
  192. package/scripts/verify/codex-live.js +60 -0
  193. package/scripts/verify/gemini-live.js +48 -0
  194. package/scripts/verify/runtime.js +105 -0
  195. package/skills/claude-led-codex-review/SKILL.md +133 -0
  196. package/skills/plan-eng-review/SKILL.md +51 -0
  197. package/skills/porting/SKILL.md +69 -0
  198. package/skills/ralph/SKILL.md +48 -0
  199. package/skills/release-readiness/SKILL.md +62 -0
  200. package/skills/review/SKILL.md +42 -0
  201. package/skills/security-hardening/SKILL.md +59 -0
  202. package/skills/ship/SKILL.md +44 -0
  203. package/skills/tdd-workflow/SKILL.md +42 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: porting
3
+ description: "Port HARNESS into an external project with preflight conflict detection, selective install, and no-ship review smoke."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: [release-readiness]
7
+ conflicts: []
8
+ auto_inject_keywords: [port, porting, project-root, install-apply, simulate-port]
9
+ tags: [porting, install, project-root]
10
+ ---
11
+
12
+ # porting
13
+
14
+ Use this skill when applying HARNESS to another repository or validating that the tool root and project root stay separated.
15
+
16
+ ## Preferred Shape
17
+
18
+ Use a local repo/submodule style integration for 0.0.2. npm installation is reserved for a future public package release.
19
+
20
+ Recommended layout:
21
+
22
+ ```text
23
+ target-project/
24
+ .harness-tool/ # HARNESS source, often ignored or submodule-managed
25
+ .harness/ # target project state
26
+ .claude/
27
+ .codex/
28
+ ```
29
+
30
+ ## Preflight
31
+
32
+ Run from the HARNESS tool root:
33
+
34
+ ```bash
35
+ node scripts/portability/simulate-port.js <target> --profile developer --verbose
36
+ ```
37
+
38
+ Stop and inspect if the report shows high conflicts such as:
39
+
40
+ - existing `.mcp.json`
41
+ - existing harness output directories
42
+ - self-targeting the HARNESS repository
43
+ - existing `.harness-tool` strategy mismatch
44
+
45
+ ## Apply
46
+
47
+ ```bash
48
+ node scripts/install-apply.js --profile developer --project-root <target>
49
+ ```
50
+
51
+ For a single target surface:
52
+
53
+ ```bash
54
+ node scripts/install-apply.js --profile developer --harness claude --project-root <target>
55
+ ```
56
+
57
+ ## Smoke
58
+
59
+ ```bash
60
+ node scripts/cli.js plan "porting smoke" --project-root <target>
61
+ node scripts/cli.js review "porting smoke" --no-ship --project-root <target>
62
+ ```
63
+
64
+ Verify:
65
+
66
+ - sessions are written under `<target>/.harness/state/sessions`
67
+ - provider CLI cwd is the target project
68
+ - agent catalog and schemas are read from the HARNESS tool root
69
+ - target git changes are not applied unless explicitly requested
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ralph
3
+ description: "PRD AC 가 모두 passes:true 될 때까지 반복 실행. 명시 옵트인만 (사용자 룰: 자동 활성 금지)."
4
+ origin: harness-core
5
+ level: 3
6
+ prerequisites: [tdd-workflow, claude-led-codex-review]
7
+ conflicts: [auto-merge]
8
+ auto_inject_keywords: []
9
+ tags: [persistent, loop]
10
+ ---
11
+
12
+ # ralph
13
+
14
+ PRD 의 acceptance criteria 가 모두 PASS 될 때까지 review 사이클을 자동 반복. 매직 키워드 감지는 **하지 않는다** (사용자 환경의 "자동 활성 금지" 류 룰을 우회하지 않기 위함). 명시 호출만:
15
+
16
+ ```bash
17
+ harness ralph --task "기능 X" [--max-iter 10] [--secure] [--live]
18
+ harness wait --start # 데몬 활성. rate-limit 풀리면 재개
19
+ ```
20
+
21
+ ## 동작
22
+
23
+ 1. PRD 가 없으면 단계 1·2 (ideate, plan) 만 1회 실행 → `prd.json` 생성.
24
+ 2. PRD 의 `acceptance` 중 `passes: false` 항목이 있으면 단계 3~7(no-ship) 1사이클.
25
+ 3. 각 사이클이 끝날 때마다 mock executor 가 1개 AC 를 `passes: true` 로 갱신 (실 LLM 모드면 executor 가 자기 보고).
26
+ 4. 모든 AC 가 PASS → 단계 7 ship (또는 --no-ship 옵션).
27
+ 5. 매 사이클 후 `progress.txt` 에 학습 누적.
28
+
29
+ ## 안전 가드
30
+
31
+ - 매 사이클 후 사용자 룰의 "확인 후 실행" 게이트가 발동하는 작업이 있으면 **데몬 정지** + HUMAN_GATE.
32
+ - `--max-iter` (기본 5) 도달 → 정지.
33
+ - HARNESS_DAILY_COST_CAP_USD 도달 → 정지 (Day 7 의 costs.jsonl 누적 합산).
34
+ - critical 발견 → 즉시 HUMAN_GATE.
35
+
36
+ ## Stop 훅과의 결합
37
+
38
+ `hooks/scripts/persistent-mode.mjs` 가 세션 종료 시 `.harness/state/sessions/<id>/active` 를 본다. ralph 모드일 때만 active 플래그가 박힘 → wakeup.json drop. `harness wait --start` 데몬이 wakeup 을 폴링해서 외부 레이트 리밋 풀린 시점에 다시 시작.
39
+
40
+ ## ScheduleWakeup 결합 (Claude Code 안에서 호출 시)
41
+
42
+ Claude Code 안에서 `/ralph` 호출하면 SkillUse 훅이 자동 ScheduleWakeup 으로 일정 간격 반복을 등록한다. 이 부분은 Day 9~10 의 GitHub Actions 통합과 별개 — 로컬 영속과 GH Actions 영속은 같은 prd.json 위에서 동작.
43
+
44
+ ## 비활성 (안전 디폴트)
45
+
46
+ - 글로벌 매직 키워드 감지 OFF (CLAUDE.md 명시).
47
+ - `harness ralph` 명시 호출 또는 `/ralph` 슬래시만 활성.
48
+ - 어떤 자연어 입력도 자동 활성하지 않는다.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: release-readiness
3
+ description: "Prepare a HARNESS local release candidate by running validation gates, install smoke, builder smoke, and package dry-run checks."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: [security-hardening]
7
+ conflicts: []
8
+ auto_inject_keywords: [release, readiness, smoke, package, publish]
9
+ tags: [release, validation, smoke]
10
+ ---
11
+
12
+ # release-readiness
13
+
14
+ Use this skill before tagging a release, changing package metadata, changing install outputs, or deciding whether a package is publishable.
15
+
16
+ ## Required Gates
17
+
18
+ Run:
19
+
20
+ ```bash
21
+ npm run lint
22
+ npm test
23
+ npm audit --audit-level=moderate
24
+ node scripts/repair.js --check
25
+ node scripts/sync-claude-md.js --check
26
+ node scripts/build-codemaps.js --check
27
+ npm run security:hardening
28
+ npm pack --dry-run --json
29
+ ```
30
+
31
+ ## Install Smoke
32
+
33
+ Use a temporary target project and verify install-plan, portability preflight, install-apply, and a plan-only review path.
34
+
35
+ ```bash
36
+ node scripts/install-plan.js --list --json
37
+ node scripts/install-plan.js --profile developer --json
38
+ node scripts/portability/simulate-port.js <target> --profile developer --json
39
+ node scripts/install-apply.js --profile developer --project-root <target>
40
+ node scripts/cli.js plan "release readiness smoke" --project-root <target>
41
+ ```
42
+
43
+ Expected target outputs:
44
+
45
+ - `.harness/install-state.json`
46
+ - `.harness/state/sessions/`
47
+ - `.claude/`
48
+ - `.codex/config.toml`
49
+ - `.cursor/hooks.json`
50
+ - `.gemini/GEMINI.md`
51
+ - `.opencode/config.json`
52
+
53
+ ## Publish Guard
54
+
55
+ Do not run `npm publish` as part of this skill. Publishing is a separate explicit decision.
56
+
57
+ If preparing for public npm, confirm:
58
+
59
+ - package name uses a controlled scope
60
+ - `private` remains true until the publish task
61
+ - `npm pack --dry-run --json` contains only intended files
62
+ - README and PORTING examples match the chosen package name
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: review
3
+ description: "claude-led-codex-review 단계 4 (self-review) 실행. critical / high 만 잡는다."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: [tdd-workflow]
7
+ conflicts: []
8
+ tags: [review, self]
9
+ ---
10
+
11
+ # review (self)
12
+
13
+ Claude self-review 단계. code-reviewer 에이전트(opus, ro)를 호출해 git diff 를 본다. 출력은 표준 핸드오프 JSON.
14
+
15
+ ## 호출
16
+
17
+ ```bash
18
+ harness self-review # 단독
19
+ # claude-led-codex-review 의 단계 4 로 자동 호출됨
20
+ ```
21
+
22
+ ## 입력
23
+
24
+ - `git diff base...HEAD`
25
+ - `prd-<id>.md`
26
+ - gateguard 가 남긴 사실 노트 (`.harness/state/sessions/<id>/facts/<file>.md`)
27
+
28
+ ## 출력
29
+
30
+ `handoffs/04-self-review.md` (마크다운 5필드 + 부속 JSON) — `schemas/handoff.schema.json` 준수.
31
+
32
+ ## verdict 매핑
33
+
34
+ - 1+ critical → `block`
35
+ - high 만 → `approve_with_fixes`
36
+ - medium 이하만 → `approve`
37
+
38
+ ## 다음 단계 라우팅
39
+
40
+ - `block` → executor 재호출, round++
41
+ - `approve_with_fixes` → 자동 fix → 재리뷰
42
+ - `approve` → 단계 5 codex-review 로 진행
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: security-hardening
3
+ description: "Run and interpret the HARNESS security hardening gate for workflow, MCP, dependency, and delegated-auth policy changes."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: [review]
7
+ conflicts: []
8
+ auto_inject_keywords: [security, hardening, oidc, mcp, dependency, workflow]
9
+ tags: [security, ci, audit]
10
+ ---
11
+
12
+ # security-hardening
13
+
14
+ Use this skill when changing CI workflows, provider auth, MCP servers, package dependencies, release gates, or security-sensitive project policy.
15
+
16
+ ## Workflow
17
+
18
+ 1. Inspect the changed surface.
19
+ - `.github/workflows/*.yml`
20
+ - `agent.yaml#security`
21
+ - `agent.yaml#mcp`
22
+ - `package.json`
23
+ - `package-lock.json`
24
+ - provider runner auth code
25
+
26
+ 2. Run the hardening gate.
27
+
28
+ ```bash
29
+ npm run security:hardening
30
+ ```
31
+
32
+ 3. Pair it with dependency and catalog checks.
33
+
34
+ ```bash
35
+ npm audit --audit-level=moderate
36
+ npm run lint
37
+ ```
38
+
39
+ 4. If workflow files changed, check for these explicit invariants:
40
+ - no `pull_request_target`
41
+ - top-level `permissions`
42
+ - no `write-all`
43
+ - every job has `timeout-minutes`
44
+ - action refs are pinned to a SHA or major version tag
45
+ - static cloud credential secrets require OIDC `id-token: write`
46
+
47
+ 5. If MCP servers changed, verify:
48
+ - stdio servers use exact semver pins
49
+ - HTTP servers use `https://`
50
+ - no `@latest`
51
+
52
+ ## Output
53
+
54
+ Report:
55
+
56
+ - changed security surface
57
+ - commands run
58
+ - pass/fail result
59
+ - any residual risk or required human approval
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: ship
3
+ description: "단계 7. 모든 게이트 PASS 후 PR 생성 + CHANGELOG + 핸드오프 첨부."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: [review]
7
+ conflicts: []
8
+ tags: [release, pr]
9
+ ---
10
+
11
+ # ship
12
+
13
+ claude-led-codex-review 단계 7. 자동 push 는 하지 않는다 (사용자 / CI 환경에서 명시 트리거).
14
+
15
+ ## 사전 조건 (모두 PASS 필요)
16
+
17
+ - [ ] quality-gate 통과 (포맷·린트·타입체크)
18
+ - [ ] 단위 / 통합 / e2e 테스트 통과
19
+ - [ ] 80% 커버리지
20
+ - [ ] self-review verdict = approve
21
+ - [ ] codex-review verdict = approve
22
+ - [ ] (--secure 시) codex-challenge verdict = approve
23
+ - [ ] 모든 핸드오프 파일 존재 (`handoffs/01..07`)
24
+
25
+ 위 중 하나라도 실패 → 차단.
26
+
27
+ ## 동작
28
+
29
+ 1. doc-writer 가 PR 본문 초안 작성 (한국어).
30
+ 2. doc-writer 가 `docs/CHANGELOG.md` 갱신 (`feat / fix / ...` 접두사).
31
+ 3. doc-writer 가 `WORKING-CONTEXT.md` 의 "Latest Execution Notes" 갱신.
32
+ 4. git-master (Day 6 이후) 가 브랜치 생성 + 핸드오프 7개 첨부 + PR 초안 등록.
33
+ 5. **자동 머지 / push 금지** — 사용자 또는 CI 가 명시 트리거.
34
+ 6. `handoffs/07-ship.md` 작성.
35
+
36
+ ## 출력
37
+
38
+ ```
39
+ ✓ harness review --no-ship 모드 종료
40
+ PR 초안: <branch> → main
41
+ 핸드오프: handoffs/01..07 (7개)
42
+ CHANGELOG diff: docs/CHANGELOG.md
43
+ 다음: 사용자 검토 후 'gh pr create' 또는 'git push' 수동 실행
44
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: tdd-workflow
3
+ description: "RED → GREEN → REFACTOR. 한 사이클 = 한 acceptance criteria = 한 작은 커밋."
4
+ origin: harness-core
5
+ level: 2
6
+ prerequisites: []
7
+ conflicts: []
8
+ tags: [implementation, testing]
9
+ ---
10
+
11
+ # TDD Workflow
12
+
13
+ executor 가 따르는 워크플로우. 한 번에 하나의 AC.
14
+
15
+ ## 사이클
16
+
17
+ 1. **RED** — 테스트 작성. 실행. 실패 확인. (`expected: ... received: undefined`)
18
+ 2. **GREEN** — 최소 변경으로 통과. 다른 테스트 깨지면 안 됨.
19
+ 3. **REFACTOR** — 가독성 / 중복 제거. 모든 테스트 다시 통과.
20
+ 4. **COMMIT** — `feat(<area>): <ac-id> <한 줄>`. 커밋 메시지 한국어 OK.
21
+
22
+ ## quality-gate 통과 강제
23
+
24
+ PostToolUse 훅이 매 Edit / Write 후 다음을 실행:
25
+
26
+ - TypeScript: `tsc --noEmit`
27
+ - Python: `ruff check . && mypy`
28
+ - 포맷: prettier / black 자동
29
+ - 테스트: 변경 파일의 unit 테스트만 (`node --test tests/unit/*.test.js` 또는 `pytest --picked`)
30
+
31
+ 실패 시 다음 도구 호출 차단.
32
+
33
+ ## 80% 커버리지 게이트
34
+
35
+ `npm run test:coverage` 가 line / function / branch / statement 4개 모두 80% 미달 시 ship 차단.
36
+
37
+ ## 금지
38
+
39
+ - 한 커밋에 2개 이상 AC.
40
+ - 테스트 없는 변경.
41
+ - 약화된 단언 (`expect(true).toBe(true)`).
42
+ - `--no-verify` 사용.