@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.
- package/AGENTS.md +112 -0
- package/CLAUDE.md +81 -0
- package/LICENSE +21 -0
- package/README.md +283 -0
- package/REVIEW.md +96 -0
- package/RULES.md +51 -0
- package/SOUL.md +21 -0
- package/WORKING-CONTEXT.md +52 -0
- package/agent.yaml +219 -0
- package/agents/architect.md +57 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/codex-challenger.md +53 -0
- package/agents/codex-reviewer.md +56 -0
- package/agents/debugger.md +33 -0
- package/agents/doc-writer.md +51 -0
- package/agents/executor.md +41 -0
- package/agents/planner.md +49 -0
- package/agents/research.md +50 -0
- package/agents/security-reviewer.md +47 -0
- package/agents/test-engineer.md +41 -0
- package/bridge/mcp-server.js +301 -0
- package/commands/claude-led-codex-review.md +29 -0
- package/docs/ADVANCED.md +321 -0
- package/docs/AI-DEVELOPMENT-LIFECYCLE.md +105 -0
- package/docs/ARCHITECTURE.md +205 -0
- package/docs/AUDIT.md +114 -0
- package/docs/AUTH-MIGRATION.md +282 -0
- package/docs/CHANGELOG.md +97 -0
- package/docs/CLI-STAGES.md +89 -0
- package/docs/CODEMAPS/README.md +15 -0
- package/docs/CODEMAPS/agents.md +22 -0
- package/docs/CODEMAPS/bridge.md +18 -0
- package/docs/CODEMAPS/hooks.md +28 -0
- package/docs/CODEMAPS/manifests.md +14 -0
- package/docs/CODEMAPS/rules.md +22 -0
- package/docs/CODEMAPS/schemas.md +21 -0
- package/docs/CODEMAPS/scripts.md +158 -0
- package/docs/CODEMAPS/skills.md +29 -0
- package/docs/CODEMAPS/tests.md +98 -0
- package/docs/CORE-INVARIANTS.md +38 -0
- package/docs/DEMO.md +110 -0
- package/docs/EXAMPLE-PROJECT.md +92 -0
- package/docs/PORTING.md +154 -0
- package/docs/PRODUCT-PRINCIPLES.md +303 -0
- package/docs/PUBLISH-ALPHA.md +106 -0
- package/docs/QUICKSTART.md +344 -0
- package/docs/RELEASE-READINESS.md +140 -0
- package/docs/RISK-CLASSIFIER.md +50 -0
- package/docs/RUNBOOK.md +146 -0
- package/docs/SECURITY.md +79 -0
- package/docs/SETUP.md +142 -0
- package/docs/WHY-NEKOWORK.md +64 -0
- package/docs/case-studies/README.md +16 -0
- package/docs/case-studies/SINDRESORHUS-IS-PLAIN-OBJ.md +141 -0
- package/docs/dev-log/2026-04-29-p1-recovery.md +142 -0
- package/docs/dev-log/2026-04-29-week1-4.md +81 -0
- package/docs/examples/GITHUB-ACTIONS-HARDENING.md +86 -0
- package/docs/examples/QUALITY-LIFECYCLE-SMOKE.md +32 -0
- package/docs/examples/TRADING-DASHBOARD-MOCK.md +65 -0
- package/docs/workflows-stash/README.md +32 -0
- package/docs/workflows-stash/harness-review.yml +166 -0
- package/docs/workflows-stash/harness-validate.yml +48 -0
- package/examples/github-actions-hardening/.github/workflows/hardened-validate.yml +38 -0
- package/examples/github-actions-hardening/README.md +31 -0
- package/examples/github-actions-hardening/case-study/ASK.md +26 -0
- package/examples/github-actions-hardening/case-study/GATE_STATUS.md +28 -0
- package/examples/github-actions-hardening/case-study/PLAN.md +25 -0
- package/examples/github-actions-hardening/case-study/SHIP_READY.md +21 -0
- package/examples/github-actions-hardening/case-study/TASK.md +30 -0
- package/examples/github-actions-hardening/case-study/TEAM_HANDOFFS.md +37 -0
- package/examples/github-actions-hardening/case-study/VERIFY_SUMMARY.md +35 -0
- package/examples/github-actions-hardening/case-study/WORK_SUMMARY.md +24 -0
- package/examples/github-actions-hardening/package.json +12 -0
- package/examples/github-actions-hardening/scripts/check.mjs +43 -0
- package/examples/quality-lifecycle-smoke/README.md +30 -0
- package/examples/quality-lifecycle-smoke/case-study/ASK.md +24 -0
- package/examples/quality-lifecycle-smoke/case-study/GATE_STATUS.md +10 -0
- package/examples/quality-lifecycle-smoke/case-study/PLAN.md +19 -0
- package/examples/quality-lifecycle-smoke/case-study/SHIP_READY.md +11 -0
- package/examples/quality-lifecycle-smoke/case-study/TASK.md +19 -0
- package/examples/quality-lifecycle-smoke/case-study/TEAM_HANDOFFS.md +21 -0
- package/examples/quality-lifecycle-smoke/case-study/VERIFY_SUMMARY.md +44 -0
- package/examples/quality-lifecycle-smoke/case-study/WORK_SUMMARY.md +19 -0
- package/examples/quality-lifecycle-smoke/package.json +8 -0
- package/examples/quality-lifecycle-smoke/scripts/check.mjs +44 -0
- package/examples/trading-dashboard-mock/README.md +33 -0
- package/examples/trading-dashboard-mock/case-study/ASK.md +24 -0
- package/examples/trading-dashboard-mock/case-study/GATE_STATUS.md +28 -0
- package/examples/trading-dashboard-mock/case-study/PLAN.md +23 -0
- package/examples/trading-dashboard-mock/case-study/SHIP_READY.md +21 -0
- package/examples/trading-dashboard-mock/case-study/TASK.md +29 -0
- package/examples/trading-dashboard-mock/case-study/TEAM_HANDOFFS.md +49 -0
- package/examples/trading-dashboard-mock/case-study/VERIFY_SUMMARY.md +35 -0
- package/examples/trading-dashboard-mock/case-study/WORK_SUMMARY.md +27 -0
- package/examples/trading-dashboard-mock/fixtures/market.json +9 -0
- package/examples/trading-dashboard-mock/index.html +76 -0
- package/examples/trading-dashboard-mock/package.json +9 -0
- package/examples/trading-dashboard-mock/scripts/check.mjs +54 -0
- package/examples/trading-dashboard-mock/src/app.js +83 -0
- package/examples/trading-dashboard-mock/src/styles.css +227 -0
- package/hooks/hooks.json +44 -0
- package/hooks/scripts/config-protection.js +34 -0
- package/hooks/scripts/gateguard-fact-force.js +146 -0
- package/hooks/scripts/persistent-mode.mjs +27 -0
- package/hooks/scripts/pre-bash-dispatcher.js +63 -0
- package/hooks/scripts/quality-gate.js +106 -0
- package/manifests/install-components.json +195 -0
- package/manifests/install-modules.json +101 -0
- package/manifests/install-profiles.json +134 -0
- package/package.json +96 -0
- package/rules/common/coding-style.md +71 -0
- package/rules/common/security.md +69 -0
- package/rules/common/testing.md +58 -0
- package/rules/python/coding-style.md +80 -0
- package/rules/python/testing.md +86 -0
- package/rules/typescript/coding-style.md +97 -0
- package/rules/typescript/security.md +67 -0
- package/rules/typescript/testing.md +78 -0
- package/schemas/agent-yaml.schema.json +168 -0
- package/schemas/agent.schema.json +32 -0
- package/schemas/handoff.schema.json +105 -0
- package/schemas/hooks.schema.json +35 -0
- package/schemas/install-components.schema.json +46 -0
- package/schemas/install-modules.schema.json +39 -0
- package/schemas/install-profiles.schema.json +32 -0
- package/schemas/install-state.schema.json +42 -0
- package/schemas/routing.schema.json +42 -0
- package/schemas/skill.schema.json +19 -0
- package/scripts/agents/dispatch.js +144 -0
- package/scripts/agents/runners/claude.js +214 -0
- package/scripts/agents/runners/codex.js +233 -0
- package/scripts/agents/runners/gemini.js +92 -0
- package/scripts/agents/runners/mock.js +107 -0
- package/scripts/auth/github-import-gh.js +52 -0
- package/scripts/auth/github-login.js +79 -0
- package/scripts/auth/github-logout.js +21 -0
- package/scripts/auth/github-status.js +46 -0
- package/scripts/build-claude.js +101 -0
- package/scripts/build-codemaps.js +286 -0
- package/scripts/build-codex.js +93 -0
- package/scripts/build-cursor.js +132 -0
- package/scripts/build-gemini.js +117 -0
- package/scripts/build-opencode.js +117 -0
- package/scripts/ci/catalog.js +120 -0
- package/scripts/ci/check-markers.js +48 -0
- package/scripts/ci/security-hardening.js +270 -0
- package/scripts/ci/validate-agents.js +88 -0
- package/scripts/ci/validate-hooks.js +99 -0
- package/scripts/ci/validate-manifests.js +128 -0
- package/scripts/ci/validate-skills.js +93 -0
- package/scripts/cli.js +1134 -0
- package/scripts/core/auth-guard.js +22 -0
- package/scripts/core/build-roots.js +11 -0
- package/scripts/core/cli-resolver.js +64 -0
- package/scripts/core/execution-workspace.js +84 -0
- package/scripts/core/git-mutation-guard.js +79 -0
- package/scripts/core/install-state.js +125 -0
- package/scripts/core/json-extractor.js +32 -0
- package/scripts/core/subprocess.js +74 -0
- package/scripts/daemon/wait.js +278 -0
- package/scripts/demo-external-project.js +222 -0
- package/scripts/demo-quick-run.js +193 -0
- package/scripts/demo-review.js +204 -0
- package/scripts/doctor.js +296 -0
- package/scripts/install-apply.js +185 -0
- package/scripts/install-plan.js +411 -0
- package/scripts/lib/acceptance-criteria.js +105 -0
- package/scripts/lib/costs.js +82 -0
- package/scripts/lib/instincts.js +194 -0
- package/scripts/lib/keychain.js +85 -0
- package/scripts/lib/profile-policy.js +134 -0
- package/scripts/lib/profile-safety.js +81 -0
- package/scripts/lib/risk-classifier.js +145 -0
- package/scripts/lib/router.js +138 -0
- package/scripts/lib/severity.js +99 -0
- package/scripts/lib/token-vault.js +136 -0
- package/scripts/orchestrators/apply.js +225 -0
- package/scripts/orchestrators/ask.js +143 -0
- package/scripts/orchestrators/gate.js +179 -0
- package/scripts/orchestrators/ralph.js +179 -0
- package/scripts/orchestrators/review.js +452 -0
- package/scripts/orchestrators/run.js +151 -0
- package/scripts/orchestrators/ship.js +339 -0
- package/scripts/orchestrators/team-lite.js +270 -0
- package/scripts/orchestrators/team.js +244 -0
- package/scripts/orchestrators/verify.js +306 -0
- package/scripts/orchestrators/work.js +207 -0
- package/scripts/portability/simulate-port.js +220 -0
- package/scripts/repair.js +184 -0
- package/scripts/sync-claude-md.js +220 -0
- package/scripts/verify/claude-live.js +30 -0
- package/scripts/verify/codex-live.js +60 -0
- package/scripts/verify/gemini-live.js +48 -0
- package/scripts/verify/runtime.js +105 -0
- package/skills/claude-led-codex-review/SKILL.md +133 -0
- package/skills/plan-eng-review/SKILL.md +51 -0
- package/skills/porting/SKILL.md +69 -0
- package/skills/ralph/SKILL.md +48 -0
- package/skills/release-readiness/SKILL.md +62 -0
- package/skills/review/SKILL.md +42 -0
- package/skills/security-hardening/SKILL.md +59 -0
- package/skills/ship/SKILL.md +44 -0
- package/skills/tdd-workflow/SKILL.md +42 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
> 외부 하네스(Codex CLI, OpenAI 표준, GitHub agents) · 사람을 위한 풀 사양. CLAUDE.md 의 압축 버전이 아니라 정전(canon) 문서.
|
|
4
|
+
|
|
5
|
+
## You Are
|
|
6
|
+
|
|
7
|
+
You are running with HARNESS — a multi-harness AI development agent runtime. Your role depends on which agent identity you were dispatched with. Read the matching `agents/<name>.md` for your full prompt and constraints.
|
|
8
|
+
|
|
9
|
+
## 역할 정전(Canonical Roles)
|
|
10
|
+
|
|
11
|
+
각 에이전트는 `agents/<name>.md` 의 frontmatter 로 정의된다. 핵심 필드:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
name: <id>
|
|
15
|
+
description: <한 줄>
|
|
16
|
+
provider: claude | codex | gemini | auto
|
|
17
|
+
model: opus | sonnet | haiku | gpt-5-codex | gemini-2.5-pro
|
|
18
|
+
level: 0 | 1 | 2 | 3 # 0=info, 1=helper, 2=workflow, 3=critical
|
|
19
|
+
disallowedTools: [...] # Opus 는 기본 Write/Edit 차단
|
|
20
|
+
trigger: [...] # 키워드 또는 stage 이름
|
|
21
|
+
hand_off_to: [...]
|
|
22
|
+
fact_forcing: true|false # PreToolUse 사실 조사 강제 여부
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Workflow Surface Policy
|
|
26
|
+
|
|
27
|
+
- `skills/` 가 정전 워크플로우 표면이다. 새 워크플로우는 `skills/` 에 먼저 만든다.
|
|
28
|
+
- `commands/` 는 legacy slash-entry 호환 표면이다. 신규 추가 금지, 점진 마이그레이션.
|
|
29
|
+
- `agents/` 는 페르소나 카탈로그다. 워크플로우는 `skills/` 에서 정의하고 에이전트는 `skills/` 가 호출한다.
|
|
30
|
+
|
|
31
|
+
## 7단계 풀사이클 (claude-led-codex-review)
|
|
32
|
+
|
|
33
|
+
| 단계 | 담당 | 입력 | 출력 |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| 1 ideate | research, planner | 사용자 한 줄 요청 | `handoffs/01-ideate.md` |
|
|
36
|
+
| 2 plan | planner (opus) | 1의 출력 | `prd-<id>.md` + `test-spec-<id>.md` |
|
|
37
|
+
| 3 implement | executor (sonnet) | 2의 출력 + TDD | git diff |
|
|
38
|
+
| 4 self-review | code-reviewer (opus, ro) | git diff | `handoffs/04-self-review.md` (issues JSON 요약) |
|
|
39
|
+
| 5 codex-review | codex-reviewer (별도 세션) | diff + 04 + PRD | `handoffs/05-codex-review.md` |
|
|
40
|
+
| 6 codex-challenge | codex-challenger (별도 세션, --secure) | diff + 04 + 05 | `handoffs/06-challenge.md` |
|
|
41
|
+
| 7 ship | doc-writer + git-master | 모든 핸드오프 | PR + CHANGELOG |
|
|
42
|
+
|
|
43
|
+
## 라우팅 결정 규칙
|
|
44
|
+
|
|
45
|
+
- **eco mode**: opus → sonnet, sonnet → haiku (단 단계 4·5는 sonnet floor).
|
|
46
|
+
- **risk escalation**: auth/crypto/payment 디렉터리 변경 → security-reviewer 필수, --secure 자동 활성.
|
|
47
|
+
- **blast radius**: 변경 파일 ≥ 20 → code-reviewer (opus) 필수.
|
|
48
|
+
- **round limit**: 단계 5/6 round ≥ 3 → human gate.
|
|
49
|
+
|
|
50
|
+
## 권한 매트릭스
|
|
51
|
+
|
|
52
|
+
| Tool | architect | planner | executor | code-reviewer | codex-reviewer | security-reviewer |
|
|
53
|
+
|---|---|---|---|---|---|---|
|
|
54
|
+
| Read | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
55
|
+
| Write | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
|
|
56
|
+
| Edit | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
|
|
57
|
+
| Bash | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
|
|
58
|
+
| Network | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ |
|
|
59
|
+
|
|
60
|
+
## 핸드오프 표준
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
# Handoff: <stage>
|
|
64
|
+
|
|
65
|
+
**Decided**: ...
|
|
66
|
+
**Rejected**: ...
|
|
67
|
+
**Risks**: ...
|
|
68
|
+
**Files**: ...
|
|
69
|
+
**Remaining**: ...
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
10~20줄 한도. 자유 산문 금지. JSON 첨부 가능 (`schemas/handoff.schema.json`).
|
|
73
|
+
|
|
74
|
+
## State Management
|
|
75
|
+
|
|
76
|
+
- `.harness/state/sessions/<id>/prd.json` — acceptance criteria + passes 플래그
|
|
77
|
+
- `.harness/state/sessions/<id>/progress.txt` — append-only 학습 누적
|
|
78
|
+
- `.harness/state/sessions/<id>/notepad.md` — 자유 메모
|
|
79
|
+
- `.harness/state/sessions/<id>/handoffs/<NN>-<stage>.md` — 단계 간 결정 로그
|
|
80
|
+
|
|
81
|
+
PreCompact 훅이 컴팩션 직전 자동 dump. SessionStart 에서 active 세션 발견 시 prd + 가장 최근 핸드오프 2개만 inject.
|
|
82
|
+
|
|
83
|
+
## 보안 12-item Minimum Bar
|
|
84
|
+
|
|
85
|
+
ECC `the-security-guide.md` 차용:
|
|
86
|
+
|
|
87
|
+
1. 에이전트 ID 와 개인 계정 분리
|
|
88
|
+
2. Short-lived scoped credentials (OIDC 권장)
|
|
89
|
+
3. Untrusted work 는 devcontainer / VM / 원격 샌드박스
|
|
90
|
+
4. Outbound network 기본 deny
|
|
91
|
+
5. Secret-bearing path 읽기 차단
|
|
92
|
+
6. 파일 / HTML / 스크린샷 / 링크 sanitize 후 privileged agent 에 전달
|
|
93
|
+
7. unsandboxed shell, egress, deploy, off-repo write 는 approval 필수
|
|
94
|
+
8. tool calls / approvals / network attempts 모두 로깅
|
|
95
|
+
9. process-group kill + heartbeat dead-man switch
|
|
96
|
+
10. 영속 메모리는 좁고 처분 가능하게
|
|
97
|
+
11. 카탈로그(skills, hooks, MCP, agents)도 supply chain 으로 스캔
|
|
98
|
+
12. MCP 서버는 SemVer 핀
|
|
99
|
+
|
|
100
|
+
## 외부 하네스 호환
|
|
101
|
+
|
|
102
|
+
- **Claude Code**: `.claude/` 빌드 산출물 + `.claude-plugin/plugin.json`
|
|
103
|
+
- **Codex CLI**: `.codex/config.toml` (TOML, `[mcp_servers.*]`, `[profiles.review]` 등)
|
|
104
|
+
- **Cursor**: `.cursor/hooks.json` (이벤트명 어댑터: `beforeShellExecution` 등)
|
|
105
|
+
- **Gemini CLI**: `.gemini/GEMINI.md` (요약 + 스킬 포인터)
|
|
106
|
+
- **OpenCode**: `.opencode/opencode.json` (단일 JSON)
|
|
107
|
+
|
|
108
|
+
빌드 타임 투영은 `scripts/build-<harness>.{js,ts}` 가 담당.
|
|
109
|
+
|
|
110
|
+
## 변경 절차
|
|
111
|
+
|
|
112
|
+
이 문서의 핸드오프 표준 / 라우팅 규칙 / 권한 매트릭스 변경은 RULES.md 변경과 함께 진행한다.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
> Claude Code 부팅 컨텍스트. 자동 갱신 영역은 마커 사이만 갈아낀다. 사용자 작성 영역은 보존된다.
|
|
4
|
+
|
|
5
|
+
## 사용자 작성 영역 (수동, 보존)
|
|
6
|
+
|
|
7
|
+
이 프로젝트는 HARNESS 자체 코드베이스다. 프로젝트 디폴트 자연어는 한국어 (외부 컨트리뷰터의 영어 PR 환영). 사용자가 자기 환경에 글로벌 룰 (`~/.claude/CLAUDE.md` 등) 을 두고 있다면 그쪽이 우선한다.
|
|
8
|
+
|
|
9
|
+
## 자동 갱신 영역
|
|
10
|
+
|
|
11
|
+
<!-- HARNESS:START version=0.1.0-alpha.0 -->
|
|
12
|
+
<!-- 이 영역은 scripts/sync-claude-md.js 가 자동 갱신한다. 직접 편집 금지. -->
|
|
13
|
+
|
|
14
|
+
## 카탈로그 요약
|
|
15
|
+
|
|
16
|
+
- agents: 11
|
|
17
|
+
- skills: 9
|
|
18
|
+
- commands: 1 (legacy compat)
|
|
19
|
+
- hooks: 5 (gateguard-fact-force, config-protection, quality-gate, pre-bash-dispatcher, persistent-mode)
|
|
20
|
+
- profiles: core, developer, security, product, quality, frontend, testing, research, full
|
|
21
|
+
- harnesses: claude, codex, cursor, gemini, opencode
|
|
22
|
+
|
|
23
|
+
## 에이전트 → 모델 매트릭스
|
|
24
|
+
|
|
25
|
+
| Agent | Provider | Model | Sandbox |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| architect | claude | opus | read-only |
|
|
28
|
+
| planner | claude | opus | read-only |
|
|
29
|
+
| executor | claude | sonnet | workspace-write |
|
|
30
|
+
| code-reviewer | claude | opus | read-only |
|
|
31
|
+
| codex-reviewer | codex | gpt-5-codex | read-only |
|
|
32
|
+
| codex-challenger | codex | gpt-5-codex | read-only |
|
|
33
|
+
| security-reviewer | claude | opus | read-only |
|
|
34
|
+
| debugger | claude | sonnet | workspace-write |
|
|
35
|
+
| test-engineer | claude | sonnet | workspace-write |
|
|
36
|
+
| research | gemini | gemini-2.5-pro | read-only |
|
|
37
|
+
| doc-writer | claude | haiku | workspace-write |
|
|
38
|
+
|
|
39
|
+
## 핵심 명령어
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
harness install --plan --profile core # 설치 dry-run
|
|
43
|
+
harness ask "<task>" # question gate, no project mutation
|
|
44
|
+
harness team "<task>" # read-only worker handoffs
|
|
45
|
+
harness work "<task>" # single executor implement handoff
|
|
46
|
+
harness verify "<task>" --session <id> # Codex-only verification
|
|
47
|
+
harness gate status --session <id> # inspect or resolve HUMAN_GATE state
|
|
48
|
+
harness ship "<task>" --session <id> # ship/no-ship readiness handoff
|
|
49
|
+
harness apply --session <id> # apply verified SHIP_READY live-work diff
|
|
50
|
+
harness run "<task>" --session <id> # work -> verify -> ship, optional --apply
|
|
51
|
+
harness review "<task>" [--secure|--fast|--no-ship] # legacy full cycle
|
|
52
|
+
harness review-cycle "<task>" [--secure|--fast|--no-ship] # explicit legacy alias
|
|
53
|
+
harness plan "<task>"
|
|
54
|
+
harness self-review
|
|
55
|
+
harness codex-review # 단계 5 단독
|
|
56
|
+
harness sessions
|
|
57
|
+
harness costs --since=7d
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## State 경로
|
|
61
|
+
|
|
62
|
+
- 세션: `.harness/state/sessions/<id>/{prd.json,progress.txt,notepad.md,handoffs/}`
|
|
63
|
+
- 프로젝트: `.harness/project-memory.json` + `WORKING-CONTEXT.md`
|
|
64
|
+
- 글로벌: `~/.harness/instincts/` + `.harness/costs.jsonl`
|
|
65
|
+
|
|
66
|
+
## 매직 키워드 → 스킬 (명시 옵트인만)
|
|
67
|
+
|
|
68
|
+
자동 활성 키워드 감지는 **사용**하지 않는다. 사용자 룰("확인 후 실행") 우선. 모든 스킬은 슬래시 명령(`/claude-led-codex-review`) 또는 CLI(`harness review`) 로 명시 호출.
|
|
69
|
+
|
|
70
|
+
## 핸드오프 5필드
|
|
71
|
+
|
|
72
|
+
Decided / Rejected / Risks / Files / Remaining — 10~20줄.
|
|
73
|
+
|
|
74
|
+
<!-- HARNESS:END -->
|
|
75
|
+
|
|
76
|
+
## 빌드 후 확인
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
node scripts/ci/check-markers.js # 마커 일관성
|
|
80
|
+
npm run validate:all # 카탈로그 lint
|
|
81
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HARNESS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# NEKOWORK
|
|
2
|
+
|
|
3
|
+
Local-first AI development harness for Claude Code, Codex CLI, and Gemini CLI.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/Ps-Neko/NEKOWORK/actions/workflows/harness-validate.yml)
|
|
6
|
+
|
|
7
|
+
NEKOWORK is the product. HARNESS is the local runtime it packages: one source catalog, `agent.yaml`, projected into Claude Code, Codex CLI, Cursor, Gemini CLI, and OpenCode surfaces.
|
|
8
|
+
|
|
9
|
+
Claude writes or plans, Codex challenges the result in a separate context, and human gates stop critical or repeated-risk changes.
|
|
10
|
+
|
|
11
|
+
NEKOWORK is also a quality runtime: it combines disciplined development workflow, product-aware planning, read-only multi-agent review, independent Codex verification, Human Gate approval, and explicit apply control.
|
|
12
|
+
|
|
13
|
+
Product principle:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
NEKOWORK = Claude work -> Codex verification -> Human Gate
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
NEKOWORK is not meant to become a large agent pack. Skills, hooks, profiles, and team modes are added only when they preserve the verification loop.
|
|
20
|
+
|
|
21
|
+
## Three Paths
|
|
22
|
+
|
|
23
|
+
Most users should start with the Beginner path. The other paths are for explicit phase control or legacy compatibility.
|
|
24
|
+
|
|
25
|
+
1. Beginner: `doctor -> ask -> run -> gate`
|
|
26
|
+
2. Advanced: `ask -> plan -> team -> work -> verify -> gate -> ship -> apply`
|
|
27
|
+
3. Legacy: `review` / `review-cycle`
|
|
28
|
+
|
|
29
|
+
## Why NEKOWORK
|
|
30
|
+
|
|
31
|
+
NEKOWORK is for teams that want AI-assisted development without making the agent catalog the product. The default path keeps local auth, inspectable handoffs, single-executor writes, independent Codex verification, and Human Gate decisions in front of risky ship/apply steps.
|
|
32
|
+
|
|
33
|
+
## Status
|
|
34
|
+
|
|
35
|
+
- Current version: `0.1.0-alpha.0` public alpha candidate
|
|
36
|
+
- Current package name: `@ps-neko/nekowork`
|
|
37
|
+
- npm publishing: prepared for `npm publish --access public --tag alpha`, but not published until npm owner auth is available
|
|
38
|
+
- Supported install path today: clone, submodule, or local repository integration
|
|
39
|
+
- Future npm path is prepared; final publish requires `npm whoami` to succeed
|
|
40
|
+
- Default mode: mock providers, no API keys, no provider CLI calls
|
|
41
|
+
|
|
42
|
+
Current local verification:
|
|
43
|
+
|
|
44
|
+
- `npm run lint`: pass
|
|
45
|
+
- `npm test`: 238 tests pass
|
|
46
|
+
- `npm audit --audit-level=moderate`: 0 vulnerabilities
|
|
47
|
+
- `npm pack --dry-run --json`: pass
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
Requirements:
|
|
52
|
+
|
|
53
|
+
- Node.js 22+
|
|
54
|
+
- npm
|
|
55
|
+
- git
|
|
56
|
+
|
|
57
|
+
Fastest no-API demo:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/Ps-Neko/NEKOWORK.git harness
|
|
61
|
+
cd harness
|
|
62
|
+
npm ci
|
|
63
|
+
npm run demo:quick -- --cleanup
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This creates a disposable target project and runs `doctor -> run -> gate status`. It uses mock providers and does not call Claude, Codex, Gemini, or paid APIs.
|
|
67
|
+
|
|
68
|
+
Recommended path for most users:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/Ps-Neko/NEKOWORK.git harness
|
|
72
|
+
cd harness
|
|
73
|
+
npm ci
|
|
74
|
+
node scripts/cli.js doctor --quick
|
|
75
|
+
node scripts/cli.js ask "clarify a risky or ambiguous request" --session first-ask
|
|
76
|
+
node scripts/cli.js run "implement, verify, and prepare ship readiness" --session first-run
|
|
77
|
+
node scripts/cli.js gate status --session first-run
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`run` executes `work -> verify -> ship`. It does not apply by default. `apply` is always explicit and requires a verified `SHIP_READY` live-work diff.
|
|
81
|
+
|
|
82
|
+
Advanced path:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
ask -> plan -> team -> work -> verify -> gate -> ship -> apply
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Legacy compatibility smoke:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node scripts/cli.js review "check the project setup" --no-ship --session first-smoke
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The default review path uses mock providers, so it does not need API keys or provider CLIs.
|
|
95
|
+
|
|
96
|
+
For the fuller first-run guide, see [docs/QUICKSTART.md](docs/QUICKSTART.md).
|
|
97
|
+
|
|
98
|
+
To see the repository-based external project flow end to end:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm run demo:external
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
To inspect small case-study targets, see [examples/trading-dashboard-mock](examples/trading-dashboard-mock), [examples/github-actions-hardening](examples/github-actions-hardening), and [examples/quality-lifecycle-smoke](examples/quality-lifecycle-smoke). They demonstrate financial UI, CI workflow, and quality lifecycle changes passing local checks while still preserving Codex verification, Human Gate policy, and explicit apply control.
|
|
105
|
+
|
|
106
|
+
## What You Get
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
doctor ... OK
|
|
110
|
+
run workflow ... OK
|
|
111
|
+
gate status ... OK
|
|
112
|
+
Demo completed: verdict=approve_with_fixes, ship_ready=false, applied=false
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Outputs are written under:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
.harness/state/sessions/<session-id>/handoffs/
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Use It In Another Project
|
|
122
|
+
|
|
123
|
+
Recommended repository install shape:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
cd <target-project>
|
|
127
|
+
git submodule add https://github.com/Ps-Neko/NEKOWORK.git .harness-tool
|
|
128
|
+
node .harness-tool/scripts/portability/simulate-port.js . --profile developer --verbose
|
|
129
|
+
node .harness-tool/scripts/install-apply.js --profile developer --project-root .
|
|
130
|
+
node .harness-tool/scripts/cli.js doctor --project-root . --quick
|
|
131
|
+
node .harness-tool/scripts/cli.js plan "first NEKOWORK smoke" --project-root .
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The HARNESS tool root stays in `.harness-tool/`. Session state, generated harness files, and git work happen in the target project root.
|
|
135
|
+
|
|
136
|
+
For a disposable external-project walkthrough, see [docs/EXAMPLE-PROJECT.md](docs/EXAMPLE-PROJECT.md).
|
|
137
|
+
|
|
138
|
+
## Live Provider Auth
|
|
139
|
+
|
|
140
|
+
Live mode delegates auth to local CLI sessions:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
claude auth status
|
|
144
|
+
codex login
|
|
145
|
+
gemini
|
|
146
|
+
|
|
147
|
+
node scripts/cli.js review "live local smoke" --live --no-ship
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Long-lived API key environment variables are blocked by default before provider CLI calls:
|
|
151
|
+
|
|
152
|
+
- Claude: `ANTHROPIC_API_KEY`
|
|
153
|
+
- Codex: `OPENAI_API_KEY`
|
|
154
|
+
- Gemini: `GEMINI_API_KEY`, `GOOGLE_API_KEY`
|
|
155
|
+
|
|
156
|
+
Use API-key paths only with explicit opt-in, for example `HARNESS_AUTH_ALLOW_ENV_OVERRIDE=1`.
|
|
157
|
+
|
|
158
|
+
## Main Surface
|
|
159
|
+
|
|
160
|
+
The public alpha surface is intentionally small:
|
|
161
|
+
|
|
162
|
+
- `doctor`: inspect local readiness
|
|
163
|
+
- `ask`: clarify goal, scope, risk, and success criteria without provider calls
|
|
164
|
+
- `plan`: create a planning handoff
|
|
165
|
+
- `team`: create read-only handoffs from multiple worker perspectives
|
|
166
|
+
- `work`: let a single executor produce an implement handoff and isolated diff
|
|
167
|
+
- `verify`: run Codex-only verification on a prior work handoff
|
|
168
|
+
- `gate`: inspect, approve, or block a human gate for a session
|
|
169
|
+
- `ship`: produce a ship/no-ship readiness handoff after Codex verification
|
|
170
|
+
- `apply`: apply a verified `SHIP_READY` live-work diff to the target project
|
|
171
|
+
- `run`: execute the decomposed wrapper, `work -> verify -> ship`, with optional apply
|
|
172
|
+
- `review`: run the legacy full Claude-led/Codex-reviewed workflow
|
|
173
|
+
- `review-cycle`: explicit compatibility alias for the legacy full review workflow
|
|
174
|
+
- `install --plan` / `install --apply`: project generated harness surfaces
|
|
175
|
+
|
|
176
|
+
Advanced features such as `team-lite`, `ralph`, `wait`, instincts, cost tracking, and the Rust supervisor are documented in [docs/ADVANCED.md](docs/ADVANCED.md).
|
|
177
|
+
|
|
178
|
+
`plan` is recommended before `work` for larger changes. The current `run` command intentionally stays compact: it runs `work -> verify -> ship`, records acceptance criteria through `work`, and applies only when `--apply` is explicitly provided.
|
|
179
|
+
|
|
180
|
+
Use `--profile quality` or `--profile security` on `work`, `verify`, and `run` when a task needs stronger evidence prompts. Add `--strict-quality` to `verify` or `run` when missing evidence or acceptance coverage should become a fix-required verdict before ship.
|
|
181
|
+
|
|
182
|
+
## Catalog
|
|
183
|
+
|
|
184
|
+
- Agents: 11
|
|
185
|
+
- Skills: 9
|
|
186
|
+
- Hooks: 5
|
|
187
|
+
- Modules: 7
|
|
188
|
+
- Profiles: `core`, `developer`, `security`, `product`, `quality`, `frontend`, `testing`, `research`, `full`
|
|
189
|
+
- Harness targets: `claude`, `codex`, `cursor`, `gemini`, `opencode`
|
|
190
|
+
|
|
191
|
+
Key skills:
|
|
192
|
+
|
|
193
|
+
- `claude-led-codex-review`
|
|
194
|
+
- `plan-eng-review`
|
|
195
|
+
- `tdd-workflow`
|
|
196
|
+
- `review`
|
|
197
|
+
- `ship`
|
|
198
|
+
- `ralph`
|
|
199
|
+
- `security-hardening`
|
|
200
|
+
- `release-readiness`
|
|
201
|
+
- `porting`
|
|
202
|
+
|
|
203
|
+
## Common Commands
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
node scripts/cli.js doctor
|
|
207
|
+
node scripts/cli.js doctor --quick --gemini-smoke
|
|
208
|
+
npm run demo:quick
|
|
209
|
+
node scripts/install-plan.js --list
|
|
210
|
+
node scripts/install-plan.js --profile developer
|
|
211
|
+
node scripts/install-apply.js --profile developer --project-root <target>
|
|
212
|
+
|
|
213
|
+
node scripts/cli.js ask "clarify a risky or ambiguous request"
|
|
214
|
+
node scripts/cli.js plan "draft a safe implementation plan"
|
|
215
|
+
node scripts/cli.js team "collect read-only worker handoffs" --workers planner,research,security,test --no-write
|
|
216
|
+
node scripts/cli.js work "implement the planned change with one executor" --single-executor --session work-smoke
|
|
217
|
+
node scripts/cli.js verify "verify the implemented change" --session work-smoke
|
|
218
|
+
node scripts/cli.js verify "verify quality evidence" --profile quality --strict-quality --session work-smoke
|
|
219
|
+
node scripts/cli.js gate status --session work-smoke
|
|
220
|
+
node scripts/cli.js ship "prepare ship readiness" --require-clean-gates --session work-smoke
|
|
221
|
+
node scripts/cli.js apply --session work-smoke
|
|
222
|
+
node scripts/cli.js run "implement, verify, and prepare ship readiness" --session run-smoke
|
|
223
|
+
node scripts/cli.js review "implement and review this change" --no-ship
|
|
224
|
+
node scripts/cli.js review-cycle "legacy full-cycle compatibility smoke" --no-ship
|
|
225
|
+
node scripts/cli.js review "security-sensitive change" --secure --no-ship
|
|
226
|
+
|
|
227
|
+
npm run lint
|
|
228
|
+
npm test
|
|
229
|
+
npm audit --audit-level=moderate
|
|
230
|
+
node scripts/repair.js --check
|
|
231
|
+
node scripts/sync-claude-md.js --check
|
|
232
|
+
node scripts/build-codemaps.js --check
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Release Gates
|
|
236
|
+
|
|
237
|
+
Before any tag or public npm decision, run:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
npm run lint
|
|
241
|
+
npm test
|
|
242
|
+
npm audit --audit-level=moderate
|
|
243
|
+
node scripts/repair.js --check
|
|
244
|
+
node scripts/sync-claude-md.js --check
|
|
245
|
+
node scripts/build-codemaps.js --check
|
|
246
|
+
npm run security:hardening
|
|
247
|
+
npm pack --dry-run --json
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`npm pack --dry-run --json` currently produces a package named like `ps-neko-nekowork-0.1.0-alpha.0.tgz`. It does not publish.
|
|
251
|
+
|
|
252
|
+
## Documentation
|
|
253
|
+
|
|
254
|
+
- [docs/QUICKSTART.md](docs/QUICKSTART.md) - first run and common paths
|
|
255
|
+
- [docs/WHY-NEKOWORK.md](docs/WHY-NEKOWORK.md) - comparison and product positioning
|
|
256
|
+
- [docs/PUBLISH-ALPHA.md](docs/PUBLISH-ALPHA.md) - public npm alpha release plan
|
|
257
|
+
- [docs/DEMO.md](docs/DEMO.md) - sample command output and generated files
|
|
258
|
+
- [docs/EXAMPLE-PROJECT.md](docs/EXAMPLE-PROJECT.md) - repository-based external project demo
|
|
259
|
+
- [docs/case-studies](docs/case-studies) - real external project run evidence
|
|
260
|
+
- [examples/trading-dashboard-mock](examples/trading-dashboard-mock) - standalone financial UI mock target and case-study evidence
|
|
261
|
+
- [examples/quality-lifecycle-smoke](examples/quality-lifecycle-smoke) - standalone quality profile and strict-quality case-study evidence
|
|
262
|
+
- [docs/SECURITY.md](docs/SECURITY.md) - local-first auth and safety model
|
|
263
|
+
- [docs/ADVANCED.md](docs/ADVANCED.md) - advanced workflows and runtime features
|
|
264
|
+
- [docs/SETUP.md](docs/SETUP.md) - local contributor setup and live provider smoke
|
|
265
|
+
- [docs/PORTING.md](docs/PORTING.md) - using HARNESS in an external project
|
|
266
|
+
- [docs/RELEASE-READINESS.md](docs/RELEASE-READINESS.md) - release and publish gates
|
|
267
|
+
- [docs/RUNBOOK.md](docs/RUNBOOK.md) - operations guide
|
|
268
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) - system architecture
|
|
269
|
+
- [docs/PRODUCT-PRINCIPLES.md](docs/PRODUCT-PRINCIPLES.md) - product position, invariants, CLI phase semantics
|
|
270
|
+
- [docs/AI-DEVELOPMENT-LIFECYCLE.md](docs/AI-DEVELOPMENT-LIFECYCLE.md) - quality runtime and disciplined AI development lifecycle
|
|
271
|
+
- [docs/CORE-INVARIANTS.md](docs/CORE-INVARIANTS.md) - non-negotiable runtime safety rules
|
|
272
|
+
- [docs/CLI-STAGES.md](docs/CLI-STAGES.md) - stage contract and compatibility transition
|
|
273
|
+
- [docs/RISK-CLASSIFIER.md](docs/RISK-CLASSIFIER.md) - shared risk tags, challenge, and gate policy
|
|
274
|
+
- [docs/examples/TRADING-DASHBOARD-MOCK.md](docs/examples/TRADING-DASHBOARD-MOCK.md) - financial mockup flow with Human Gate
|
|
275
|
+
- [docs/examples/GITHUB-ACTIONS-HARDENING.md](docs/examples/GITHUB-ACTIONS-HARDENING.md) - CI workflow hardening flow with Human Gate
|
|
276
|
+
- [docs/examples/QUALITY-LIFECYCLE-SMOKE.md](docs/examples/QUALITY-LIFECYCLE-SMOKE.md) - quality profile flow with evidence and acceptance coverage
|
|
277
|
+
- [docs/AUDIT.md](docs/AUDIT.md) - readiness and remaining debt
|
|
278
|
+
- [docs/CHANGELOG.md](docs/CHANGELOG.md) - project history
|
|
279
|
+
- [SOUL.md](SOUL.md), [RULES.md](RULES.md), [AGENTS.md](AGENTS.md) - project principles and agent rules
|
|
280
|
+
|
|
281
|
+
## License
|
|
282
|
+
|
|
283
|
+
MIT
|
package/REVIEW.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# REVIEW.md
|
|
2
|
+
|
|
3
|
+
> Codex 독립 검증 단계의 핸드오프 표준. Claude / Codex / 사람이 같은 포맷으로 의사소통한다.
|
|
4
|
+
|
|
5
|
+
## 핸드오프 5필드 (고정)
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Handoff: <NN>-<stage>
|
|
9
|
+
|
|
10
|
+
**Decided**: 무엇을 결정했는가 (1~3줄)
|
|
11
|
+
**Rejected**: 무엇을 의도적으로 거절했는가 + 이유 (1~3줄)
|
|
12
|
+
**Risks**: 알려진 리스크 (1~3줄)
|
|
13
|
+
**Files**: 변경된 또는 영향받는 파일 (목록)
|
|
14
|
+
**Remaining**: 다음 단계 / 미해결 (1~3줄)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
총 10~20줄. 자유 산문 금지.
|
|
18
|
+
|
|
19
|
+
## 단계별 핸드오프
|
|
20
|
+
|
|
21
|
+
| 파일 | 작성자 | 내용 |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `01-ideate.md` | research / planner | 문제 재정의 + 후보 접근 |
|
|
24
|
+
| `02-plan.md` | planner | PRD 요약 + acceptance criteria 카운트 |
|
|
25
|
+
| `03-implement.md` | executor | 구현 요약 + TDD 사이클 카운트 |
|
|
26
|
+
| `04-self-review.md` | code-reviewer | issues JSON 요약 (severity별 카운트) |
|
|
27
|
+
| `05-codex-review.md` | codex-reviewer | issues JSON + verdict |
|
|
28
|
+
| `06-challenge.md` | codex-challenger | adversarial 발견 |
|
|
29
|
+
| `07-ship.md` | doc-writer / git-master | PR URL + CHANGELOG diff |
|
|
30
|
+
|
|
31
|
+
## Codex 출력 JSON 스키마
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"issues": [
|
|
36
|
+
{
|
|
37
|
+
"severity": "critical | high | medium | low | info",
|
|
38
|
+
"category": "security | correctness | performance | style | test | docs",
|
|
39
|
+
"file": "string",
|
|
40
|
+
"line": "integer",
|
|
41
|
+
"summary": "string (한 줄)",
|
|
42
|
+
"why": "string (1~3줄)",
|
|
43
|
+
"suggested_fix": "string | null"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"verdict": "block | approve_with_fixes | approve",
|
|
47
|
+
"confidence": "number (0.0 ~ 1.0)",
|
|
48
|
+
"round": "integer"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
전체 스키마는 `schemas/handoff.schema.json` 참조.
|
|
53
|
+
|
|
54
|
+
## Verdict 처리
|
|
55
|
+
|
|
56
|
+
| verdict | 처리 |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `block` | executor 재호출 (round++), critical/high 모두 입력으로 |
|
|
59
|
+
| `approve_with_fixes` | 자동 fix 후 재리뷰 (round++) |
|
|
60
|
+
| `approve` | 다음 단계 진행 (--secure 면 단계 6, 아니면 단계 7) |
|
|
61
|
+
|
|
62
|
+
round ≥ 3 → human gate.
|
|
63
|
+
|
|
64
|
+
## Severity 분류 규칙
|
|
65
|
+
|
|
66
|
+
- **critical**: 보안 취약점 (auth bypass, 시크릿 노출, SQL injection, RCE), 데이터 손실, 프로덕션 다운
|
|
67
|
+
- **high**: 회귀, 기능 미동작, DB 스키마 위반, 성능 회귀 ≥ 30%
|
|
68
|
+
- **medium**: 가독성 / 유지보수성 부채, 미사용 코드, 잘못된 에러 처리
|
|
69
|
+
- **low**: 스타일, 네이밍, 미세한 비효율
|
|
70
|
+
- **info**: 제안, 학습 노트
|
|
71
|
+
|
|
72
|
+
## Categories 분류
|
|
73
|
+
|
|
74
|
+
- **security** — 인증, 권한, 시크릿, 입력 검증, 외부 API
|
|
75
|
+
- **correctness** — 로직 오류, 엣지 케이스, race condition
|
|
76
|
+
- **performance** — N+1, 메모리, 알고리즘
|
|
77
|
+
- **style** — 포맷, 네이밍, 컨벤션
|
|
78
|
+
- **test** — 누락, 약한 단언, 잘못된 모킹
|
|
79
|
+
- **docs** — README, 주석, CHANGELOG
|
|
80
|
+
|
|
81
|
+
## Round 카운터
|
|
82
|
+
|
|
83
|
+
세션 내 단계별 누적. `.harness/state/sessions/<id>/round.json`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{ "review": 1, "challenge": 0 }
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Human Gate Trigger
|
|
90
|
+
|
|
91
|
+
- severity = critical 발견 (1건이라도)
|
|
92
|
+
- round ≥ 3
|
|
93
|
+
- blast radius (변경 파일 수) ≥ 20
|
|
94
|
+
- 사용자가 명시적으로 `--human-always` 지정
|
|
95
|
+
|
|
96
|
+
게이트 발동 시 `.harness/state/sessions/<id>/HUMAN_GATE` 파일 생성, 오케스트레이터가 멈추고 사용자에게 핸드오프.
|
package/RULES.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# RULES
|
|
2
|
+
|
|
3
|
+
> 강제 가능한 규칙만 적는다. "왜"는 SOUL.md, "어떻게"는 CLAUDE.md / AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Must Always
|
|
6
|
+
|
|
7
|
+
- 프로젝트 디폴트 자연어는 한국어. 외부 컨트리뷰터는 영어도 가능.
|
|
8
|
+
- 모든 자동 수정은 quality-gate → self-review → codex-review 순서로 검증한다.
|
|
9
|
+
- 모든 도구 호출은 `.harness/audit/<date>.jsonl` 에 기록한다.
|
|
10
|
+
- 모든 MCP 서버는 SemVer 핀(`@x.y.z`)으로 명시한다. `@latest` 금지.
|
|
11
|
+
- `Edit` / `Write` 직전 `gateguard-fact-force` 가 사실 조사를 강제한다.
|
|
12
|
+
- 핸드오프는 5필드(Decided / Rejected / Risks / Files / Remaining)를 지킨다.
|
|
13
|
+
- 커밋 메시지는 `feat / fix / docs / refactor / test / chore / perf / ci` 접두사를 쓴다.
|
|
14
|
+
- 80% 이상 테스트 커버리지를 유지한다 (`tests/unit/` 단위 / `tests/integration/` 통합).
|
|
15
|
+
|
|
16
|
+
## Must Never
|
|
17
|
+
|
|
18
|
+
- 사용자 환경의 글로벌 룰 (각 사용자의 `~/.claude/CLAUDE.md` 등) 을 우회하지 않는다 — 외부 룰이 있으면 그쪽이 우선.
|
|
19
|
+
- `git push --force`, `git reset --hard`, `rm -rf` 를 자동 실행하지 않는다.
|
|
20
|
+
- `--no-verify` 로 hook 을 건너뛰지 않는다.
|
|
21
|
+
- secret 을 코드에 하드코딩하지 않는다 (config-protection hook 으로도 차단됨).
|
|
22
|
+
- Codex 와 Claude 의 컨텍스트를 직접 공유하지 않는다 (핸드오프 문서로만).
|
|
23
|
+
- severity ≥ HIGH 또는 round ≥ 3 발견 시 사람 승인 없이 머지하지 않는다.
|
|
24
|
+
- 한꺼번에 수백 개의 스킬을 카탈로그에 넣지 않는다 (progressive 확장 — `docs/AUDIT.md` §6).
|
|
25
|
+
|
|
26
|
+
## Format Specs
|
|
27
|
+
|
|
28
|
+
### Agent
|
|
29
|
+
- 위치: `agents/<name>.md`
|
|
30
|
+
- frontmatter 필수: `name, description, model, level, provider, disallowedTools`
|
|
31
|
+
- schema: `schemas/agent.schema.json`
|
|
32
|
+
|
|
33
|
+
### Skill
|
|
34
|
+
- 위치: `skills/<name>/SKILL.md`
|
|
35
|
+
- frontmatter 필수: `name, description, origin, level`
|
|
36
|
+
- schema: `schemas/skill.schema.json`
|
|
37
|
+
|
|
38
|
+
### Hook
|
|
39
|
+
- 위치: `hooks/hooks.json` (단일 정의) + `hooks/scripts/*.{js,mjs}`
|
|
40
|
+
- ENV 토글 필수 (`HARNESS_HOOK_<NAME>=1`)
|
|
41
|
+
- schema: `schemas/hooks.schema.json`
|
|
42
|
+
|
|
43
|
+
### Handoff
|
|
44
|
+
- 위치: `.harness/state/sessions/<id>/handoffs/<NN>-<stage>.md`
|
|
45
|
+
- 5필드 고정: Decided / Rejected / Risks / Files / Remaining
|
|
46
|
+
- 10~20줄 한도
|
|
47
|
+
- JSON 부속: `schemas/handoff.schema.json`
|
|
48
|
+
|
|
49
|
+
## 변경 절차
|
|
50
|
+
|
|
51
|
+
이 문서를 변경하려면 PR 에서 명시적 사유를 제시해야 한다. 변경 후 `CLAUDE.md` 와 `AGENTS.md` 의 자동 갱신 영역(`<!-- HARNESS:START --> ... <!-- HARNESS:END -->`)을 동기화한다.
|
package/SOUL.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# SOUL
|
|
2
|
+
|
|
3
|
+
## 정체성
|
|
4
|
+
|
|
5
|
+
HARNESS 는 하나의 매니페스트로 Claude Code · Codex CLI · Gemini CLI 를 통합하는 AI 개발 에이전트 하네스다. Claude 가 코드를 쓰고, Codex 가 그것을 의심하고, 사람이 마지막을 잡는다.
|
|
6
|
+
|
|
7
|
+
## 핵심 원칙
|
|
8
|
+
|
|
9
|
+
1. **하나의 진실 원본** — 매니페스트가 정답. 하네스별 산출물은 파생물일 뿐.
|
|
10
|
+
2. **Claude 주 실행자, Codex 독립 검증자** — 두 에이전트는 컨텍스트를 공유하지 않는다.
|
|
11
|
+
3. **Progressive Disclosure** — 알 필요가 없는 것은 보여주지 않는다.
|
|
12
|
+
4. **Fact-Forcing Security** — 자기평가는 무력하다. 사실 조사를 강제하라.
|
|
13
|
+
5. **Test → Review → Re-Review → Human Gate** — 자동화의 끝에 사람이 있다.
|
|
14
|
+
|
|
15
|
+
## Cross-Harness Vision
|
|
16
|
+
|
|
17
|
+
특정 하네스에 종속되지 않는다. Claude Code 가 사라져도 Codex · Cursor · Gemini · OpenCode · 사내 LLM 위에서 동일한 카탈로그가 동작해야 한다.
|
|
18
|
+
|
|
19
|
+
## 영원하지 않다
|
|
20
|
+
|
|
21
|
+
이 문서가 자주 바뀐다면 정체성이 흔들리고 있다는 신호다. 1년에 한 번 이상 갱신되지 않아야 한다.
|