@bluenyang/reins 0.2.0 → 0.3.0-rc.2

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 (97) hide show
  1. package/README.md +50 -203
  2. package/cli/dist/commands/config-models.js +206 -127
  3. package/cli/dist/commands/config.js +104 -16
  4. package/cli/dist/commands/configure.js +166 -134
  5. package/cli/dist/commands/install.js +161 -217
  6. package/cli/dist/commands/migrate.js +23 -48
  7. package/cli/dist/commands/update.js +203 -30
  8. package/cli/dist/lib/agents-md.js +111 -0
  9. package/cli/dist/lib/bindings.js +227 -386
  10. package/cli/dist/lib/detect.js +7 -2
  11. package/cli/dist/lib/generate.js +56 -75
  12. package/cli/dist/lib/harness.js +0 -3
  13. package/cli/dist/lib/migrate-plan.js +3 -3
  14. package/cli/dist/lib/prompter.js +4 -4
  15. package/cli/dist/lib/reader.js +20 -0
  16. package/cli/dist/lib/upstream.js +0 -17
  17. package/cli/dist/lib/vendor-write.js +9 -56
  18. package/cli/dist/reins.js +59 -270
  19. package/docs/README.ko.md +31 -204
  20. package/harness/CHANGELOG.md +8 -3
  21. package/harness/VERSION +1 -1
  22. package/harness/models.yaml +8 -0
  23. package/harness/policy/common-red-lines.yaml +4 -4
  24. package/harness/roles/advisor.md +10 -14
  25. package/harness/roles/auditor.md +17 -0
  26. package/harness/roles/executor.md +32 -0
  27. package/harness/roles/implementer.md +23 -21
  28. package/harness/roles/pl.md +44 -21
  29. package/harness/roles/planner.md +17 -19
  30. package/harness/roles/pm.md +16 -21
  31. package/harness/schemas/bindings.schema.json +55 -0
  32. package/harness/schemas/install.schema.json +1 -2
  33. package/harness/schemas/intent.schema.json +1 -13
  34. package/harness/templates/agents-md-blocks.md +52 -17
  35. package/harness/templates/audit.md +25 -0
  36. package/harness/templates/history.md +14 -0
  37. package/harness/templates/intent.md +5 -0
  38. package/harness/templates/spec.md +4 -2
  39. package/package.json +1 -2
  40. package/skills/audit/SKILL.md +28 -0
  41. package/skills/implement/SKILL.md +30 -0
  42. package/skills/intent/SKILL.md +28 -0
  43. package/skills/merge/SKILL.md +26 -0
  44. package/skills/onboard/SKILL.md +31 -0
  45. package/skills/reins-setup/SKILL.md +16 -25
  46. package/skills/release/SKILL.md +26 -0
  47. package/skills/retro/SKILL.md +30 -0
  48. package/skills/review/SKILL.md +27 -0
  49. package/skills/roadmap/SKILL.md +29 -0
  50. package/skills/spec/SKILL.md +27 -0
  51. package/skills/test/SKILL.md +26 -0
  52. package/cli/dist/commands/check.js +0 -379
  53. package/cli/dist/commands/gate.js +0 -136
  54. package/cli/dist/commands/knowledge.js +0 -111
  55. package/cli/dist/commands/metrics.js +0 -138
  56. package/cli/dist/commands/new.js +0 -190
  57. package/cli/dist/commands/retro.js +0 -7
  58. package/cli/dist/commands/stages.js +0 -562
  59. package/cli/dist/commands/status.js +0 -281
  60. package/cli/dist/lib/enforcement.js +0 -125
  61. package/cli/dist/lib/memory.js +0 -96
  62. package/cli/dist/lib/metrics.js +0 -223
  63. package/cli/dist/lib/retro.js +0 -179
  64. package/cli/dist/lib/verdict.js +0 -15
  65. package/cli/dist/lib/work.js +0 -106
  66. package/cli/dist/scripts/enforcement.js +0 -24
  67. package/harness/policy/budget.yaml +0 -13
  68. package/harness/policy/enforcement.yaml +0 -98
  69. package/harness/policy/stops.yaml +0 -29
  70. package/harness/policy/transitions.yaml +0 -13
  71. package/harness/roles/code-review.md +0 -27
  72. package/harness/roles/deploy.md +0 -50
  73. package/harness/roles/docs.md +0 -19
  74. package/harness/roles/lookup.md +0 -22
  75. package/harness/roles/qa-design.md +0 -22
  76. package/harness/roles/qa-run.md +0 -19
  77. package/harness/roles/verify-tool.md +0 -21
  78. package/harness/schemas/bindings-local.schema.json +0 -21
  79. package/harness/schemas/bus-request.schema.json +0 -17
  80. package/harness/schemas/bus-response.schema.json +0 -14
  81. package/harness/schemas/enforcement.schema.json +0 -22
  82. package/harness/schemas/plan.schema.json +0 -10
  83. package/harness/schemas/ticket.schema.json +0 -15
  84. package/harness/templates/bus/request.yaml +0 -20
  85. package/harness/templates/bus/response.yaml +0 -10
  86. package/harness/templates/plan.md +0 -23
  87. package/harness/templates/ticket.md +0 -29
  88. package/skills/reins-implement/SKILL.md +0 -20
  89. package/skills/reins-intent/SKILL.md +0 -26
  90. package/skills/reins-loop/SKILL.md +0 -26
  91. package/skills/reins-loop/references/vendor-cli.md +0 -41
  92. package/skills/reins-release/SKILL.md +0 -18
  93. package/skills/reins-retro/SKILL.md +0 -20
  94. package/skills/reins-review/SKILL.md +0 -23
  95. package/skills/reins-roadmap/SKILL.md +0 -17
  96. package/skills/reins-spec/SKILL.md +0 -22
  97. package/skills/reins-test/SKILL.md +0 -18
package/docs/README.ko.md CHANGED
@@ -2,163 +2,36 @@
2
2
 
3
3
  [English](../README.md)
4
4
 
5
- reins는 저장소에 에이전트 하네스를 설치하고 기존 하네스를 옮기고 갱신하는 도구입니다. 하네스는 코딩
6
- 에이전트의 역할, 루프 정책, 스키마로 검증되는 인수인계 파일, 지식 저장소, 게이트로 이루어집니다.
7
- 정해진 지점마다 스크립트 `reins check`가 루프를 계속해도 되는지 판정하므로 에이전트는 자기 역할
8
- 안에서 지시받은 일만 합니다. 사람은 게이트에서 결정만 내립니다.
5
+ reins는 저장소의 에이전트 하네스를 관리합니다. 코딩 에이전트가 그 저장소에서 일하는 방식을 정하는 파일(`AGENTS.md`, 역할, 단계 스킬, 모델 할당)을 설치·이전·갱신·설정하는 것이 전부입니다. reins가 설치한 것은 프로젝트가 일하는 동안 reins를 실행하지 않습니다. 검사는 프로젝트의 훅 도구가 프로젝트의 명령으로 돌리고, 흐름을 지켰는지는 버전마다 감사가 판정합니다.
9
6
 
10
- BlueNyang과 Team Croffle의 저장소 열두 곳이 같은 하네스 계보를 쓰면서 같은 문제를 겪고 있어 이
11
- 도구를 만듭니다. 에이전트가 요청 밖으로 나가고 구현한 세션이 검증과 판단까지 합니다. 지식이 gitignore
12
- 영역에서 사라지고 멈추는 기준이 없습니다. 복사본끼리 어긋나고 루프가 Claude에서만 돕니다. 문제 전체
13
- 목록(P1–P6)은 [proposal.ko.md](proposal.ko.md)에 있습니다.
7
+ BlueNyang과 Team Croffle의 저장소 열두 곳이 같은 하네스 계통을 쓰면서 같은 문제를 겪었기 때문에 만들었습니다. 에이전트가 요청 밖으로 나가고, 한 세션이 구현과 판정을 함께 하고, 지식이 gitignore된 곳에서 사라지고, 사본이 서로 갈라졌습니다. 전체 목록은 [기획서](proposal.ko.md)에 있습니다.
14
8
 
15
9
  ## 상태
16
10
 
17
- 0.1.5가 npm에 있습니다: `npx @bluenyang/reins <command>`. 계획의 1차(round one)로, graph 단계이며
18
- 생성되는 벤더 파일은 Claude Code만 검증했습니다. loop와 harness 단계는 0.2에서 graph로부터 깎아
19
- 냅니다. 0.1.3에서 루프를 단계 스킬로 나누고 PR → CI → rc 릴리스 흐름을 넣었고, 0.1.4에서 큰 저장소
20
- 적용을 준비했습니다(릴리스 설정, 모노레포 게이트, migrate 수정). 0.1.5는 어떤 규칙이 강제되고
21
- 어떤 규칙이 권고인지 밝히고, 모델 할당을 팀과 사용자 두 층으로 나누며, CI를 Ubuntu·Windows·macOS와
22
- Node 22·24에서 돌립니다. rc 단계인 0.2.0은 모델과 역할을 터미널 화면에서 정하는 `reins config`를 더하고,
23
- install과 update의 질문도 화면으로 묻습니다. 버전마다 바뀐 것은
24
- [CHANGELOG.md](../CHANGELOG.md)에, 다음 계획은 로드맵에 있습니다.
11
+ **0.3.0-rc.2가 릴리스 후보입니다**(intent 019): `npx @bluenyang/reins@0.3.0-rc.2`. 최신 stable인 0.2.0은 아직 이전 설계를 설치합니다. 그 설계에서는 스킬과 훅이 작업 중에 `npx @bluenyang/reins`를 불렀습니다. 0.3은 그것을 없애고, `reins update`가 0.1.x·0.2.0 설치를 옮깁니다. 버전마다 바뀐 것은 [CHANGELOG.md](../CHANGELOG.md)에, 앞으로의 계획은 [로드맵](ROADMAP.ko.md)에 있습니다.
25
12
 
26
- reins는 자기 루프로 자기 자신을 개발합니다. intent 001(`reins status`), 002(`reins metrics`),
27
- 003(위반 시나리오)이 각각 intent → spec → plan → ticket 순서를 거쳤고, T1~T5 검사를 통과했으며 코드
28
- 리뷰는 Codex가 맡았습니다. 다른 벤더에 묶인 역할은 각 벤더 CLI(`codex exec`, `agy -p`)로
29
- 돌았습니다. `reins-loop` 스킬에 따라 주 에이전트가 호출한 것이며 CLI가 벤더를 스스로 부르는 기능은
30
- 아직 없습니다.
31
-
32
- ## 사다리
13
+ ## 동작 방식
33
14
 
34
- 단계는 세 가지입니다. 위 단계는 아래 단계를 포함하고 세 단계는 하나의 원본을 공유합니다.
15
+ - **기본은 단일 에이전트입니다.** 에이전트 하나(PM)가 모든 단계를 수행합니다. 조사, 리뷰, 감사처럼 읽기 위주의 일이나 급한 병렬 작업에는 같은 모델의 서브에이전트를 쓸 수 있습니다. 멀티는 역할군(PM, PL, Planner, Implementer, Executor, Advisor, Auditor)에 모델을 할당해 켭니다. 모델이 없는 역할군의 일은 PM이 합니다. 근거는 Anthropic의 [Building agents: When to fold subagents into your main agent loop](https://claude.com/resources/articles/building-agents-when-to-fold-subagents-into-your-main-agent-loop)(2026-10-22)입니다.
16
+ - **흐름은 실행 중 차단이 아니라 문서로 적습니다.** `docs/ROADMAP.md` → intent → spec → 구현 → 리뷰 → 테스트 → 머지 → 감사 → 릴리스 → 회고. 단계마다 `.agents/skills/`에 스킬이 있고, 순서와 멈추고 물을 때는 `AGENTS.md`에 있습니다.
17
+ - **승인은 사용자가 합니다.** intent와 매번의 spec 요약은 사용자를 기다립니다. PM은 사용자의 말을 인용해 승인을 기록합니다. 사용자가 건너뛰라고 한 단계는 한 번만 적용됩니다.
18
+ - **버전마다 감사합니다.** 머지 뒤, rc 전에 감사가 기록(intent, spec, git 이력, 로그)을 읽고 단계마다 판정합니다. 사용자가 끄지 않는 한 필수이고, 결과는 `.agents/audit/`에 커밋됩니다.
19
+ - **온보딩.** 설치 뒤 첫 대화에서 PM이 프로젝트를 파악하고 사용자에게 물어 `AGENTS.md`의 프로젝트 절을 씁니다.
20
+ - **파일마다 수명이 있습니다.** 작업 중 파일은 회고 뒤에 요약하고 지웁니다.
35
21
 
36
- | 단계 | 구성 |
37
- |---|---|
38
- | harness | 커밋·푸시 시점의 검증기(T2, T4, T6), 레드라인, 생성되는 권한 설정 |
39
- | loop | 계획 → 작업 → 테스트 → 릴리스 사이클, 역할 수는 줄고 전환 지점과 정지 조건은 같습니다 |
40
- | graph | 열두 역할 전부, 스키마로 검증되는 인수인계 파일, 역할별 모델 바인딩 |
22
+ 설계는 [design.ko.md](design.ko.md)에 있습니다.
41
23
 
42
- `reins install <tier>`는 세 단계 모두 받습니다. 1차는 graph 단계를 겨냥합니다. 0.2에서는 측정한 비용을
43
- 입력으로 삼아 graph에서 loop와 harness를 깎아 낼 계획입니다.
44
-
45
- ## 동작 방식
24
+ ## 시작하기
46
25
 
47
- **역할.** 열두 개입니다: pm, planner, pl, implementer, lookup, verify-tool, code-review, qa-design,
48
- qa-run, deploy, docs, advisor. 역할 파일마다 해서는 안 되는 일이 적혀 있습니다. 역할을 나누는 것이
49
- 모델을 나누는 것은 아닙니다. 모든 역할을 한 모델로 돌릴 수 있고 `bindings.yaml`이 역할마다 벤더와
50
- 모델을 정합니다. 설계상 감지되지 않은 벤더에 묶인 역할은 fallback으로, 그것도 없으면 pm의 모델로
51
- 돌아가므로 열두 역할 모두 Claude만으로 돌 수 있습니다.
52
-
53
- **레드라인.** 모든 역할에 적용되는 규칙이 열 개(C1–C10) 있습니다. 몇 가지를 들면
54
- 이렇습니다. 통과만 시키는 구현 금지(C1), 관리 블록·정책·역할 파일 수정 금지(C2), 자기 권한 파일 수정
55
- 금지(C3), 시크릿 읽기 금지(C4), 훅 우회 금지(C5), deploy 역할 밖의 push·PR·merge·릴리스 금지(C6).
56
- 전체 목록은 [design.ko.md](design.ko.md) 2절에 있습니다. 규칙마다 실제로 어떻게 지켜지는지는 아래
57
- [강제와 권고](#강제와-권고)에 있습니다. 막는 것, 전이 지점에서 검사하는 것, 역할과 스킬에 적혀만 있는 것이 섞여 있습니다.
58
-
59
- **검증기.** `reins check`는 전환 지점마다 돌아 판정을 하나 출력합니다. 모델을 호출하지 않습니다.
60
- 역할이 판단을 인수인계 파일에 쓰면 검증기가 그것을 적용할 뿐입니다.
61
-
62
- | 판정 | 종료 코드 | 의미 |
63
- |---|---|---|
64
- | CONTINUE | 0 | 계속 진행 |
65
- | HOLD | 10 | 사용자의 답이 필요합니다 |
66
- | STOP | 20 | 사람 없이 고칠 수 있고 이어서 재개합니다. 정지할 때 어디서, 왜(A1~G2 중 id), 어떻게 재개하는지 기록합니다 |
67
- | ESCALATE | 30 | 실패 사슬: pl → pm → advisor → 사용자 |
68
-
69
- 정지 조건 A1–G2는 24개이며 되돌릴 수 없는 작업, 미결 결정, 무너진 전제, 반복 실패, 비용, 규칙 위반,
70
- 사용자 중단을 다룹니다.
71
-
72
- **사슬과 사람의 두 결정.** 작업은 `intent.md` → `spec.md` → `plan.md` → ticket 네 파일을 따라
73
- 흐릅니다. 사람이 결정하는 지점은 둘입니다. intent는 사용자가 승인하고 spec은 3~5줄 요약을 보고
74
- 사용자가 거부할 수 있습니다. 나머지는 역할끼리 검토합니다. 검증 출력은 나온 그대로 붙입니다.
75
- "통과"라는 한 마디만으로는 통과가 아닙니다.
76
-
77
- **배치.**
78
-
79
- | 경로 | 커밋 | 내용 |
80
- |---|---|---|
81
- | `AGENTS.md` | 합니다 | 도구가 쓰는 관리 블록, 프로젝트가 쓰는 섹션 |
82
- | `.agents/` | 합니다 | `intent/`, `knowledge/`, `harness/`(역할, 정책, 스키마, 템플릿, `bindings.yaml`, `gates.yaml`), `skills/` |
83
- | `.claude/` | 합니다 | `.agents/`에서 생성한 파일, 직접 고치지 않습니다 |
84
- | `.loctx/` | 안 합니다 (gitignore) | ticket, 보고서, 인수인계 `bus/`, `history/`, 로컬 로드맵 |
85
-
86
- ## 강제와 권고
87
-
88
- 모든 규칙이 강제되는 것은 아닙니다. 규칙은 세 가지 중 하나로 지켜지고, `harness/policy/enforcement.yaml`이 규칙마다 한 줄로 어느 쪽인지 적습니다.
89
-
90
- - **차단**(blocked): 스크립트·훅·권한 deny가 실행 전에 막습니다.
91
- - **검사**(checked): 전이 지점 검사, drift 검사, CI가 사후에 잡습니다.
92
- - **권고**(advised): 역할이나 스킬 문서에만 적혀 있습니다. 코드로는 잡히지 않습니다.
93
-
94
- 등급은 실제로 지켜지는 부분 가운데 가장 강한 것으로 매기고, 빈 곳은 `빈틈` 열에 적습니다. 훅은 설치했을 때만 적용되고, deny 규칙과 에이전트 도구 제한은 Claude Code에만 있습니다. 규칙 id는 [design.ko.md](design.ko.md) 2·3절에, 근거는 [violations.ko.md](violations.ko.md)에 있습니다. 권고에 머문 규칙은 [0.2](ROADMAP.ko.md)의 입력입니다. 표의 `빈틈` 열은 영어 원문 그대로입니다.
95
-
96
- <!-- enforcement:begin -->
97
- | id | 지킴 | 수단 | 빈틈 |
98
- |---|---|---|---|
99
- | C1 | 권고 | `role` | judged by reviewers only; nothing detects a hard-coded pass |
100
- | C2 | 차단 | `hook:pre-commit`, `check:drift` | only when the hook is installed; the edit itself is not prevented |
101
- | C3 | 차단 | `hook:pre-commit`, `check:drift` | only when the hook is installed; no deny rule covers .claude/settings.json itself |
102
- | C4 | 차단 | `deny`, `hook:pre-commit` | Claude Code only; .env.* is a finite list, so names such as .env.custom have no deny rule; the hook sees staged paths, not reads |
103
- | C5 | 차단 | `deny`, `gate`, `check:verdict` | combined or later-position forms such as git commit -nm are not denied |
104
- | C6 | 권고 | `role` | pre-push holds pushes to the default branch (A4) and the deny rules stop force and --no-verify pushes; any other push, PR, merge, release or tag is not blocked |
105
- | C7 | 권고 | `role` | — |
106
- | C8 | 권고 | `role` | — |
107
- | C9 | 권고 | `role` | — |
108
- | C10 | 권고 | `role` | T2 lists it but the pre-commit check does not compare the diff with plan.md |
109
- | A1 | 차단 | `deny`, `hook:pre-push` | moving a published tag forward to a descendant passes the ancestry test |
110
- | A2 | 권고 | `role` | — |
111
- | A3 | 권고 | `role` | — |
112
- | A4 | 차단 | `hook:pre-push` | only a push to the default branch is held; other ways of leaving the machine are not detected |
113
- | B1 | 검사 | `check:ticket-start` | — |
114
- | B2 | 권고 | `role` | — |
115
- | B3 | 권고 | `role`, `check:ticket-start` | the scope conflict is a role's judgement; ticket-start checks only the approval chain |
116
- | B4 | 권고 | `role` | — |
117
- | B5 | 권고 | `role` | — |
118
- | P1 | 권고 | `role` | — |
119
- | P2 | 검사 | `check:ticket-start`, `check:rc-close` | only ticket-in-plan; a diff is not compared with plan.md |
120
- | D1 | 검사 | `check:verdict` | does not tell a ticket before rc.1 from an rc after |
121
- | D2 | 권고 | `role` | no memory across runs |
122
- | D3 | 권고 | `role` | no alone-versus-full-run comparison |
123
- | D4 | 차단 | `gate`, `check:verdict` | an empty gate output is only a WARN |
124
- | D5 | 검사 | `check:verdict` | — |
125
- | E1 | 권고 | `role` | nothing reads a budget or a token count |
126
- | E2 | 권고 | `role` | nothing reads a budget or a token count |
127
- | E3 | 권고 | `role` | T5 lists it but nothing reads a budget or a token count |
128
- | F1 | 권고 | `role` | the deny rules stop some attempts in Claude Code, but no stop is recorded |
129
- | F2 | 차단 | `hook:pre-commit`, `check:drift`, `check:ticket-start`, `check:rc-close` | — |
130
- | F3 | 권고 | `role` | — |
131
- | G1 | 권고 | `role` | no signal handler and no resume record on an interrupt |
132
- | G2 | 권고 | `role` | — |
133
- | T1 | 검사 | `check:ticket-start` | budget-left is not implemented |
134
- | T2 | 차단 | `hook:pre-commit` | only when the hook is installed; the P2 and C10 diff checks do not exist |
135
- | T3 | 검사 | `check:verdict` | — |
136
- | T4 | 차단 | `hook:pre-push` | implements A1 and the default-branch push (A4); A2, A3, C6 and the loop-step check do not exist |
137
- | T5 | 검사 | `check:rc-close` | E3 is not implemented |
138
- | T6 | 권고 | `role` | no code runs on an interrupt or a violation signal |
139
-
140
- | 역할 | 차단 | 검사 | 권고 | 차단되는 항목 |
141
- |---|---|---|---|---|
142
- | advisor | 0 | 0 | 2 | — |
143
- | code-review | 1 | 0 | 2 | edit code |
144
- | deploy | 1 | 0 | 2 | force-push, delete or move tags, rewrite main |
145
- | docs | 0 | 0 | 3 | — |
146
- | implementer | 0 | 0 | 5 | — |
147
- | lookup | 3 | 0 | 0 | write any file; produce reports or context files; run gates or tests |
148
- | planner | 0 | 0 | 3 | — |
149
- | pl | 0 | 0 | 3 | — |
150
- | pm | 0 | 1 | 2 | — |
151
- | qa-design | 0 | 0 | 3 | — |
152
- | qa-run | 0 | 0 | 2 | — |
153
- | verify-tool | 0 | 2 | 1 | — |
154
- | 예산 범위 | 0 | 0 | 6 | — |
155
- <!-- enforcement:end -->
156
-
157
- 표는 `pnpm docs:enforcement`로 만들고, 테스트가 YAML과 같은지 확인합니다.
26
+ 설정할 저장소의 루트에서 실행합니다(Node 22 이상).
158
27
 
159
- ## 시작하기
28
+ ```sh
29
+ npx @bluenyang/reins install --dry-run # 무엇을 쓸지 보기
30
+ npx @bluenyang/reins install # 묻고 나서 하네스 배치
31
+ npx @bluenyang/reins config # 모델과 역할, 에이전트 도구, 모드, 감사
32
+ ```
160
33
 
161
- Claude Code에서는 플러그인을 설치하면 저장소 설정까지 맡길 수 있습니다.
34
+ 그다음 저장소에서 에이전트를 여세요. `AGENTS.md`의 온보딩 표시가 첫 대화를 시작합니다. Claude Code에서는 플러그인이 같은 명령을 보여 줍니다.
162
35
 
163
36
  ```
164
37
  /plugin marketplace add bluenyang/reins
@@ -166,73 +39,27 @@ Claude Code에서는 플러그인을 설치하면 저장소 설정까지 맡길
166
39
  /reins:reins-setup
167
40
  ```
168
41
 
169
- Codex, Antigravity, Cursor나 터미널에서는 CLI를 씁니다. Node 22 이상이 필요합니다. 설치하려는 저장소의 루트에서 실행하며, 저장소에 커밋이 하나 이상 있어야
170
- 합니다(0.1.0의 `check`는 커밋이 없는 저장소에서 실패합니다).
171
-
172
- ```sh
173
- npx @bluenyang/reins install graph --dry-run # 쓸 파일을 미리 보여 줍니다
174
- npx @bluenyang/reins install graph --mode auto # 파일을 놓고 CLI를 감지해 기본값을 적용합니다
175
- npx @bluenyang/reins check --drift # 원본과 생성물이 맞으면 "drift: ok"를 출력합니다
176
- npx @bluenyang/reins status # intent, ticket, bus, 마지막 history
177
- ```
178
-
179
- 3·4세대 하네스가 있는 저장소에는 `install`이 거부하고 `migrate`를 안내합니다. 훅은 설치 안내문에서
180
- 제안만 하고 `--hooks`를 줄 때만 추가합니다.
181
-
182
- 설치한 뒤에는 에이전트로 일합니다. Claude Code에서는 `/reins-setup`을 한 번 실행하고, 새 요청마다
183
- `/reins-intent`를 씁니다. Codex, Antigravity, Cursor는 같은 스킬을 `.agents/skills/`에서 읽습니다.
184
- CLI는 스킬이 알아서 부릅니다.
185
-
186
- reins 자체를 개발하려면 `git clone https://github.com/bluenyang/reins.git` 후 `pnpm install`,
187
- `pnpm build`를 하고 `node cli/dist/reins.js <command>`로 실행합니다([CONTRIBUTING](CONTRIBUTING.ko.md) 참고).
42
+ reins 자체를 개발하려면 `git clone https://github.com/bluenyang/reins.git` 뒤 `pnpm install`, `pnpm build`를 하고 `node cli/dist/reins.js <명령>`으로 실행합니다([CONTRIBUTING.ko.md](CONTRIBUTING.ko.md)).
188
43
 
189
44
  ## 명령
190
45
 
191
- | 명령 | 상태 | 하는 일 |
192
- |---|---|---|
193
- | `install <harness\|loop\|graph>` | 구현됨 | 하네스를 설치합니다. 터미널에서 `--mode manual`이면 벤더·언어·게이트·하위 게이트를 화면으로 묻습니다. `--mode manual\|auto`, `--hooks`, `--dry-run`, `--json` |
194
- | `migrate <tier>` | 구현됨 | 기존 하네스나 `.ai/` 작업 공간을 이 배치로 옮깁니다 |
195
- | `update` | 구현됨 | 패키지된 하네스를 다시 적용하되 프로젝트 섹션은 건드리지 않습니다. 터미널에서는 계획을 보여 주고 먼저 묻습니다(`--yes`는 묻지 않습니다) |
196
- | `config` | 구현됨 | 터미널에서는 설정 화면(`models and roles configuration`, `exit`)을 띄웁니다. 터미널이 아니면 해석된 bindings 표와 바꾸는 방법을 출력합니다. `--json` |
197
- | `configure bindings` | 구현됨 | `--set role=model ...` 또는 `--vendors claude,openai`. `--disable <role...>`·`--enable <role...>`은 역할을 끄고 켭니다(`--local`은 나만. pm·implementer·verify-tool은 끌 수 없습니다). 옵션이 없으면 묻습니다 |
198
- | `gate [names...]` | 구현됨 | `gates.yaml`을 선언된 대로 실행하고 원본 출력을 `.loctx/reports/`에 남깁니다 |
199
- | `status` | 구현됨 | 하네스, intent, ticket, bus, 마지막 history를 읽기 전용으로 보여 줍니다 |
200
- | `check` | 구현됨 | `--stage ticket-start\|pre-commit\|verdict\|pre-push\|rc-close` 또는 `--drift` |
201
- | `metrics` | 구현됨 | `.loctx/reports/metrics.jsonl` 요약: 역할·벤더·ticket·intent별 토큰, ticket당 knowledge 정지 수. `metrics record`로 역할 실행의 토큰을 남깁니다 |
202
- | `recall` | 미구현 | 증상으로 과거 결정을 찾습니다 |
203
- | `doctor` | 미구현 | — |
204
- | `configure gates` | 구현됨 | 하위 디렉터리 게이트 제안을 보여 줍니다. `--add <name>...`은 gates.yaml 끝에 덧붙입니다 |
205
- | `configure budget\|language` | 미구현 | — |
206
-
207
- `install`, `migrate`, `update`, `gate`, `status`, `check`, `metrics`는 `--json`을 받습니다. `check`와 `gate`는 실행할 때마다 `.loctx/reports/metrics.jsonl`에 한 줄을 남깁니다. `check`의 stage는
208
- T1(`ticket-start`), T2(`pre-commit`), T3(`verdict`), T4(`pre-push`), T5(`rc-close`)에 대응합니다.
209
-
210
- ## 스킬
211
-
212
- 스킬 열 개가 `SKILL.md` 표준을 따릅니다. `reins-setup`은 설치, `reins-loop`는 지휘를 맡고, 나머지 단계 스킬 여덟 개는 단계 하나씩을 맡아 단독으로도 부를 수 있습니다.
213
-
214
- | 스킬 | 쓸 때 |
46
+ | 명령 | 하는 일 |
215
47
  |---|---|
216
- | `reins-setup` | reins를 설치하거나 기존 하네스를 옮길 때 |
217
- | `reins-roadmap` | 공개 로드맵을 고치고 대상 버전을 정할 때 |
218
- | `reins-intent` | 새 요청이 들어올 때: 질문지와 승인된 intent |
219
- | `reins-spec` | intent가 승인됐을 때: 수락된 spec, plan, ticket |
220
- | `reins-implement` | ticket이 준비됐을 때: 커밋 단위로 구현 |
221
- | `reins-review` | ticket이 끝났을 때: 검증, 리뷰, 닫기 |
222
- | `reins-test` | 버전의 ticket이 모두 끝났을 때: 시나리오와 빌드 |
223
- | `reins-release` | 버전 테스트가 끝났을 때: PR, CI, merge, rc |
224
- | `reins-retro` | 버전이 릴리스됐을 때: 회고와 knowledge 제안 |
225
- | `reins-loop` | spec이 수락됐을 때: 단계 스킬을 순서대로 호출 |
48
+ | `install` | 하네스를 배치하고, 에이전트 도구를 감지하고, 게이트를 확인하고, 프로젝트 게이트 명령을 부르는 훅을 제안하고(`--hooks`면 husky에 넣음), 온보딩 표시를 남깁니다. `--mode manual\|auto`, `--dry-run`, `--json` |
49
+ | `migrate` | 이전 하네스나 `.ai/` 작업 공간을 이 배치로 옮기고, 이전 `AGENTS.md`는 PM이 합치도록 따로 둡니다. `--legacy local\|committed`, `--dry-run` |
50
+ | `update` | 패키지의 하네스를 다시 적용합니다. 손으로 고친 생성 파일은 덮어쓰기 전에 묻고(`--force`), 0.1.x·0.2.0 설치를 0.3으로 옮기며 옛 작업 파일을 보여 줍니다(`--yes`면 지움) |
51
+ | `config` | 터미널에서 화면: 모델과 역할, 에이전트 도구, 모드(single·multi), 감사. `config bindings`·`config gates`는 플래그로(`configure`는 별칭) |
226
52
 
227
- ## 로드맵
53
+ ## 스킬
228
54
 
229
- 전체 계획은 [docs/ROADMAP.ko.md](ROADMAP.ko.md)에 있습니다([English](ROADMAP.md)).
55
+ `onboard`, `roadmap`, `intent`, `spec`, `implement`, `review`, `test`, `merge`, `audit`, `release`, `retro`. 단계마다 하나이고 평문이며, 단일과 멀티에서 같은 스킬을 씁니다. 스킬마다 만드는 파일과 지우는 때, 다음 스킬을 적습니다.
230
56
 
231
57
  ## 문서
232
58
 
233
- - [proposal.ko.md](proposal.ko.md): 문제, 목표, 요구사항, 성공 기준
234
- - [design.ko.md](design.ko.md): 배치, 역할, 정지 조건, 파일 형식, CLI
235
- - 영문판: [proposal.md](proposal.md), [design.md](design.md). 영문판과 한국어판이 다르면 한국어 파일이 우선합니다.
59
+ - [proposal.ko.md](proposal.ko.md): 문제, 목표, 요구사항
60
+ - [design.ko.md](design.ko.md): 배치, 역할, 흐름, 감사, 파일 형식, CLI
61
+ - [ROADMAP.ko.md](ROADMAP.ko.md): 버전
62
+ - 영어판: [proposal.md](proposal.md), [design.md](design.md), [ROADMAP.md](ROADMAP.md). 둘이 어긋나면 한글판이 기준입니다.
236
63
 
237
64
  ## 라이선스
238
65
 
@@ -1,8 +1,13 @@
1
1
  # reins harness changelog
2
2
 
3
- Read by `reins update`: it lists the entries newer than a project's pinned version. An entry tagged
4
- `[skill]` needs the project's own sections touched — `reins update` then points to `/reins-update`,
5
- where the PM proposes those changes for the user to approve.
3
+ Read by `reins update`: it lists the entries newer than a project's pinned version.
4
+
5
+ ## 0.3.0
6
+ - rc.2: `models.yaml` lists known models per vendor; a mode switch adds `reins:mode-changed` (no AGENTS.previous.md); the `onboard` skill handles it.
7
+ - Seven role groups replace the twelve roles; bindings.yaml version 2 (mode, audit, groups); `update` converts version 1.
8
+ - Eleven stage skills without the `reins-` prefix replace the ten `reins-*` skills; none calls reins.
9
+ - AGENTS.md blocks: notice, layout, settings, flow, delegation, records, stops, language; an onboarding or reconcile note for the PM.
10
+ - Templates: intent (plan, waivers), spec (work units, checks), audit, history. Gone: plan, ticket, bus, stops, enforcement, transitions, budget.
6
11
 
7
12
  ## 0.1.2
8
13
  - Intent status gains `released` (set once a stable version of the intent is out); `reins status` folds such an intent into one line with no next action. Additive: existing values are unchanged.
package/harness/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.3.0
@@ -0,0 +1,8 @@
1
+ # Known models per vendor (design §9): what `reins config` offers when a vendor's CLI cannot list its own.
2
+ # agy and cursor-agent list theirs; this list is their fallback. `other` always lets the user type an ID.
3
+ schema: reins/models@1
4
+ vendors:
5
+ claude: [claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-1]
6
+ openai: [gpt-6.1-sol, gpt-6.1-terra, gpt-6-astra]
7
+ google: [gemini-4-argon-high, gemini-4-argon-medium, gemini-4-argon-low, gemini-3.8-flash-medium]
8
+ cursor: [cursor-grok-4.5-high-fast]
@@ -1,10 +1,10 @@
1
1
  schema: reins/policy/red-lines@1
2
- # Common prohibitions for every role (design §2). The verifier enforces these; roles add their own must_not.
2
+ # What no role does (design §2-4). Agents keep these; the audit judges them; C4 patterns also become deny rules.
3
3
  rules:
4
4
  - id: C1
5
5
  text: Implementing "to pass" — hard-coding, or making only some paths look right. Fix the cause.
6
6
  - id: C2
7
- text: Editing AGENTS.md managed blocks, harness/policy/ or harness/roles/ (pm and `reins update` only).
7
+ text: Editing AGENTS.md managed blocks or harness sources by hand (the user changes them with `reins config` and `reins update`).
8
8
  - id: C3
9
9
  text: Editing one's own permission file or any generated vendor file.
10
10
  - id: C4
@@ -14,7 +14,7 @@ rules:
14
14
  - id: C5
15
15
  text: Bypassing hooks (--no-verify) or massaging gate output (pipes that hide the exit code).
16
16
  - id: C6
17
- text: push, PR, merge, release, tag — deploy role only, inside the pre-release loop.
17
+ text: push, PR, merge, release, tag without the user's instruction or a setting that allows it (the deployer within that scope).
18
18
  - id: C7
19
19
  text: Reversing a recorded decision (knowledge/) without the user.
20
20
  - id: C8
@@ -22,4 +22,4 @@ rules:
22
22
  - id: C9
23
23
  text: Touching running servers, clusters or network devices.
24
24
  - id: C10
25
- text: Changing files or behaviour outside the intent and plan — open a ticket instead.
25
+ text: Changing files or behaviour outside the intent and spec — ask the PM.
@@ -1,18 +1,14 @@
1
1
  ---
2
- role: advisor
3
- default_binding: "claude-fable-5-1"
4
- summary: "Steps in at the end of the escalation chain: root cause, test plan, fix plan. Asks the user before anything beyond its authority."
5
- covered_by: user
6
- may:
7
- - "read everything; run gates and scenarios"
8
- - "write the analysis and plan to the bus and propose knowledge entries"
9
- must_not:
10
- - "widen its own or any role's authority without the user"
11
- - "bypass any stop condition"
2
+ group: advisor
3
+ summary: "High-capability models the PM consults on large, complex or abstract requirements and on serious incidents."
4
+ roles:
5
+ committee:
6
+ does: "Analyse the PM's information and question and answer with options, grounds and a recommendation; for an incident (e.g. the flow not followed), the root cause and a remedy."
7
+ must_not:
8
+ - "extend its own authority or decide for the user"
9
+ - "read the other committee members' answers before answering"
10
+ tools: { write: false, shell: true, push: false }
12
11
  ---
13
-
14
12
  # advisor
15
13
 
16
- Stage skills: none (called when the chain escalates).
17
-
18
- 1. Take the failing chain's reports; reproduce. 2. Name causes with evidence; order fixes; hand a plan to the PL. 3. HOLD when a decision is the user's.
14
+ - Several models may sit on the committee; each answers independently and the PM combines them, keeping minority views.
@@ -0,0 +1,17 @@
1
+ ---
2
+ group: auditor
3
+ summary: "Audits a finished version against the harness only."
4
+ roles:
5
+ auditor:
6
+ does: "Judge whether the version followed the flow in AGENTS.md, from the records alone, and write .agents/audit/<version>.md."
7
+ must_not:
8
+ - "judge code quality or test results as such; they are evidence that a step ran"
9
+ - "call a step kept without an evidence path; that is \"cannot confirm\""
10
+ - "read the working conversation"
11
+ tools: { write: true, shell: true, push: false }
12
+ ---
13
+ # auditor
14
+
15
+ Reads: AGENTS.md and the harness settings as they were, the intent, spec, `docs/ROADMAP.md`, `.loctx/ROADMAP.local.md`, git history, history, gate and test logs.
16
+
17
+ For each step of the flow (local roadmap → roadmap → intent → approval → spec → approval → implementation and commits → review → test → merge): kept, violated, cannot confirm, or skipped on the user's instruction (recorded in `waivers:`). Judge against the rules in force at the time. A generated or harness file changed by a commit that is not an `update`/`config` commit is a violation. For each violation: the criticism, and a remedy (by severity, with PL or Advisor opinions).
@@ -0,0 +1,32 @@
1
+ ---
2
+ group: executor
3
+ summary: "Runs things and reports what they printed: large tool logs, research, test runs, releases."
4
+ roles:
5
+ tool-executor:
6
+ does: "Summarise a large tool output (hooks, checks, lint) for the PL: what failed, file:line, the raw log path."
7
+ must_not:
8
+ - "call a failure a pass, or report a run that did not happen"
9
+ - "edit code"
10
+ tools: { write: false, shell: true, push: false }
11
+ researcher:
12
+ does: "Find information locally or on the web and give it to the PM with sources."
13
+ must_not:
14
+ - "write files"
15
+ tools: { write: false, shell: true, push: false }
16
+ qa-runner:
17
+ does: "Run the checks exactly as written and judge each against its expected result; ambiguous is a fail."
18
+ must_not:
19
+ - "change a check or its expected result"
20
+ tools: { write: false, shell: true, push: false }
21
+ deployer:
22
+ does: "Push, open the PR, wait for CI, merge and cut releases within what the user's settings or instruction allow."
23
+ must_not:
24
+ - "release stable without the user's explicit instruction"
25
+ - "force-push, delete tags or rewrite the default branch"
26
+ - "touch production"
27
+ tools: { write: false, shell: true, push: true }
28
+ ---
29
+ # executor
30
+
31
+ - Attach the raw output (or its path) to every report; a summary alone is not evidence.
32
+ - On a refusal (permissions, a failing check), stop and return it to the PM; do not look for another way.
@@ -1,25 +1,27 @@
1
1
  ---
2
- role: implementer
3
- default_binding: "claude-sonnet-5-5"
4
- summary: "Implements one ticket on the plan's branch, runs the gates, commits. May run in parallel on independent tickets."
5
- covered_by: none
6
- may:
7
- - "edit the files the plan names"
8
- - "run gates declared in gates.yaml"
9
- - "commit each finished unit on the feature branch as it goes, without asking; tick the ticket checklist"
10
- must_not:
11
- - "edit files outside the plan (C10 — open a ticket instead)"
12
- - "judge its own work or declare tests passed"
13
- - "implement 'to pass': hard-code, or make only some paths look right (C1)"
14
- - "push"
15
- - "batch a whole ticket into one commit, or leave finished work uncommitted"
2
+ group: implementer
3
+ summary: "Writes code, tests and documents for the spec's work units."
4
+ roles:
5
+ code:
6
+ does: "Implement a work unit so the requirement holds everywhere it applies, and commit it."
7
+ must_not:
8
+ - "implement to pass (hard-coding, looking right on some paths)"
9
+ - "change files outside the work unit"
10
+ - "judge its own work as done without the checks"
11
+ tools: { write: true, shell: true, push: false }
12
+ qa:
13
+ does: "Write the test code and scripts the checks describe."
14
+ must_not:
15
+ - "weaken a check so it passes"
16
+ tools: { write: true, shell: true, push: false }
17
+ doc:
18
+ does: "Write documents (both roadmaps, README, LICENSE, CONTRIBUTING, SECURITY, .loctx documents) in the configured language; public documents may be polished."
19
+ must_not:
20
+ - "state behaviour that was not confirmed as fact"
21
+ tools: { write: true, shell: true, push: false }
16
22
  ---
17
-
18
23
  # implementer
19
24
 
20
- Stage skills: `reins-implement`.
21
-
22
- 1. Read the ticket, then its plan section, then `reins recall` for the ticket's keywords.
23
- 2. Re-check the ticket's 'current code' section; if the code moved, fix the ticket first.
24
- 3. Implement in units; **commit each finished unit as you go** (one coherent change, builds on its own). The hook runs `reins check --stage pre-commit` on every commit.
25
- 4. Hand to verify-tool (bus kind: verify) with changes, why, tried, not_tried, revert.
25
+ - One work unit, one commit; the commit message names its spec items (S-n, W-n). The project's hooks run the gates.
26
+ - The code, tests and documents of one feature may be done in one run.
27
+ - When the plan turns out wrong, update the intent or spec in the same commit, or stop and ask the PM.
@@ -1,25 +1,48 @@
1
1
  ---
2
- role: pl
3
- default_binding: "claude-sonnet-5-5"
4
- summary: "Owns plan.md and the tickets; directs implementers; decides from verification results without judging them itself."
5
- covered_by: pm
6
- may:
7
- - "write intent/<id>/plan.md; create and order tickets in .loctx/ticket/"
8
- - "dispatch implementers (parallel when tickets have no dependencies)"
9
- - "read verify-tool and review responses and decide: fix, proceed, or escalate"
10
- - "update plan.md departure log in the same commit when implementation departs (R45)"
11
- must_not:
12
- - "push, open PRs, merge, release"
13
- - "judge test results (verify-tool does); declare a scenario passed"
14
- - "merge its own code"
2
+ group: pl
3
+ summary: "Coordinates sub-work for the PM, reviews, and gives independent opinions on large decisions."
4
+ roles:
5
+ control:
6
+ does: "Split and order sub-tasks, collect and analyse the reports of the agents doing them, and hand the PM one summary."
7
+ must_not:
8
+ - "write production code itself"
9
+ - "change the plan or scope without the PM"
10
+ tools: { write: false, shell: true, push: false }
11
+ plan-reviewer:
12
+ does: "Check the spec and its work units against the user's own words, the approved intent and the product boundary."
13
+ must_not:
14
+ - "approve a plan that moves the product boundary without the user"
15
+ - "edit the plan; return findings instead"
16
+ tools: { write: false, shell: true, push: false }
17
+ code-reviewer:
18
+ does: "Find defects and departures from the spec in the diff and propose fixes, with file:line."
19
+ must_not:
20
+ - "edit code"
21
+ - "decide a merge"
22
+ tools: { write: false, shell: true, push: false }
23
+ qa-plan-reviewer:
24
+ does: "Check the test plan for missing cases, vague expected results and untestable checks."
25
+ must_not:
26
+ - "edit the test plan"
27
+ tools: { write: false, shell: true, push: false }
28
+ doc-reviewer:
29
+ does: "Check a document's claims against their evidence and say fix or pass."
30
+ must_not:
31
+ - "edit the document"
32
+ tools: { write: false, shell: true, push: false }
33
+ retrospector:
34
+ does: "After a version, read the audit and the release and propose changes to AGENTS.md, skills and the harness, including whether the groups switched on paid for themselves."
35
+ must_not:
36
+ - "apply a proposal; the user accepts and the PM or `config`/`update` applies"
37
+ tools: { write: false, shell: true, push: false }
38
+ discussion:
39
+ does: "Give an opinion on the PM's question without seeing the other opinions; grounds and counterexamples first."
40
+ must_not:
41
+ - "read the other discussants' answers before answering"
42
+ tools: { write: false, shell: true, push: false }
15
43
  ---
16
-
17
44
  # pl
18
45
 
19
- Stage skills: `reins-spec`, `reins-review`.
20
-
21
- 1. From an accepted spec: write plan.md (files that change, order of work, risks, proof, test checklist). Each order-of-work item becomes one ticket.
22
- 2. For each ticket: hand to an implementer (bus kind: implement) with the plan section and knowledge hits. A ticket's checklist items are the expected commit units.
23
- 3. On a verify-tool failure summary: decide fix (new ticket or same ticket) or escalate per the chain.
24
- 4. For a review request (bus kind: review) fill `changes[]: {path, what, why: <S-n>, evidence: <report path>}` per change, plus `requirement` on each change (the spec text of its S-n, one quoted line) and, in the request's top-level `why`, `allowed files:` with the plan's file list for the ticket; the reviewer gets nothing else but that request and the diff, so never needs the spec or plan.
25
- 5. When all planned tickets are done → rc.1 is ready; stabilization tickets afterwards only.
46
+ - Routine review takes one reviewer. Discussion (every assigned model) is for large decisions, the remedy after an audit finds a violation, an incident of the flow not being followed, or an unresolved disagreement — never ticket-level review.
47
+ - Every finding names its evidence (file:line, commit, log path). No evidence path means "cannot confirm", never a pass.
48
+ - Return the result with a reason to the PM; do not call another model.
@@ -1,23 +1,21 @@
1
1
  ---
2
- role: planner
3
- default_binding: "claude-opus-5-5"
4
- summary: "Turns an approved intent into spec.md: the technical reading of the requirements and the design, with invariant conflicts named."
5
- covered_by: pm
6
- may:
7
- - "read code and documents"
8
- - "write intent/<id>/spec.md and the questionnaire record in intent.md"
9
- - "run the feasibility checks the spec needs"
10
- must_not:
11
- - "edit source code"
12
- - "add requirements the intent does not contain (C10)"
13
- - "approve its own spec"
2
+ group: planner
3
+ summary: "Turns an approved intent into a spec with work units and checks."
4
+ roles:
5
+ spec-writer:
6
+ does: "Write spec.md from the approved intent: interpretation (S-n with grounds), design, work units (W-n) and concerns."
7
+ must_not:
8
+ - "add requirements the intent does not have"
9
+ - "change the intent"
10
+ tools: { write: true, shell: true, push: false }
11
+ qa-designer:
12
+ does: "Write the checks (V-n): what to run, the expected result and how a fail looks; may read the code."
13
+ must_not:
14
+ - "pass an ambiguous result; ambiguous is a fail"
15
+ tools: { write: true, shell: true, push: false }
14
16
  ---
15
-
16
17
  # planner
17
18
 
18
- Stage skills: `reins-spec`.
19
-
20
- 1. Read intent.md fully, then knowledge/ (`reins recall`) for prior decisions that touch it.
21
- 2. Write spec.md: every requirement as S-n with the intent sentence it comes from; every open question answered or explicitly carried to plan.
22
- 3. Check each design invariant in AGENTS.md (reins:read invariants) — state conflict or none.
23
- 4. Hand to pm and qa-design via the bus (kind: review).
19
+ - Every S-n names the intent sentence it comes from.
20
+ - Work units are small enough that each lands as one commit passing the project's gates.
21
+ - The spec's `summary_for_user` is 3–5 lines the user can answer with 진행 or 수정.