Skip to content

Commit 50b41b4

Browse files
authored
(#94) 하네스 control plane을 구조화된 SDD 런타임으로 고도화
* feat: 하네스 control plane을 구조화된 SDD 런타임으로 고도화 - spec 승인 시 structured intake와 소크라테스 Q/A/Decision 검증 추가 - init, doctor, hook runtime으로 자동 검증 경로와 guard 강제력 보강 - AGENTS, docs, skills, tests를 새 workflow 계약에 맞춰 정리 * fix: pre-push hook 실행 권한을 보정 - .githooks/pre-push를 실행 가능 상태로 수정 - git push 시 local hook이 실제로 동작하도록 정리 * fix: active task 없이도 pre-push hook이 동작하게 수정 - pre-push wrapper에서 pre_command를 항상 먼저 검사 - active task가 없으면 verification guard를 생략하고 종료 * chore: git-ranker 서브모듈 포인터를 최신 develop으로 갱신 - git-ranker 포인터를 fc85948b까지 반영 - backend unit test baseline과 서비스 계층 테스트 도입 커밋을 연결 * fix: 리뷰 지적된 guard 우회와 task 경계 취약점을 수정 - git push -f와 short force flag를 dangerous command guard에서 차단 - task_id 경로 검증을 추가해 task 디렉터리 path traversal을 방지 - 관련 CLI 회귀 테스트를 추가
1 parent d0585eb commit 50b41b4

94 files changed

Lines changed: 3590 additions & 5983 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codex/skills/README.md

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,36 @@
11
# Skills
22

3-
이 디렉터리는 `git-ranker-workflow`에서만 쓰는 project-local skill을 관리한다.
4-
5-
## 목적
6-
7-
- 병렬 에이전트가 같은 품질 기준으로 작업하게 한다.
8-
- 반복 작업을 매번 자연어로 다시 설명하지 않게 한다.
9-
- 문서, spec, evidence 규칙을 실행 절차와 연결한다.
3+
이 디렉터리는 `git-ranker-workflow`에서만 쓰는 최소 workflow skill만 유지한다.
104

115
## Canonical Ownership
126

13-
- 정책, vocabulary, 상태 전이, 종료 조건, evidence minimum은 `docs/operations/`, `docs/architecture/`, `docs/specs/`가 관리한다.
14-
- route 결정은 `docs/operations/request-routing-policy.md`, Socratic 질문 contract와 approval gate는 `docs/operations/sdd-spec-policy.md`, runtime order와 artifact rule은 `docs/operations/workflow-governance.md`가 각각 canonical owner다.
15-
- skill은 그 정책을 대체하지 않고, 한 단계의 반복 실행 절차와 handoff만 다룬다.
16-
- policy와 skill이 충돌하면 skill에 새 규칙을 더하지 말고 canonical policy를 먼저 수정한 뒤 skill을 맞춘다.
17-
18-
## Thin-Layer Rule
19-
20-
- workflow-local skill은 하나의 harness stage, 필요한 handoff, 다음에 읽을 canonical source만 설명한다.
21-
- workflow-local skill은 route 정의, approval gate, state machine, question catalog를 policy 문서처럼 길게 다시 쓰지 않는다.
22-
- workflow-local skill은 backend/frontend file map, repo-local command inventory, bootstrap guide, implementation heuristic의 stable home이 되면 안 된다.
23-
- thin-layer migration은 workflow skill에서 repo-specific detail을 걷어내도 target repo entry doc과 코드/테스트만으로 onboarding이 유지될 때 완료로 본다.
24-
25-
## Registry Status
7+
- 프로젝트 헌법은 `AGENTS.md`가 가진다.
8+
- artifact model, runtime, hook rule, runbook은 `docs/`가 가진다.
9+
- current task state와 evidence는 `workflows/tasks/<task-id>/`가 가진다.
10+
- 전역 guard 정책은 `workflows/system/hooks.json`이 가진다.
11+
- 내부 런타임 구현은 `scripts/workflow_runtime/`이 가진다.
12+
- skill은 위 규칙을 복제하지 않고, 한 단계의 handoff와 CLI 진입점만 안내한다.
2613

27-
- `skill-creator`: 새 skill 생성, 기존 skill 리팩터링
28-
- `request-intake`: 새 요청을 `대화`, `모호한 요청`, `즉시 실행 가능한 작업`으로 분류하고 spec authoring stage로 handoff
29-
- `ambiguity-interview`: `모호한 요청`을 single spec 후보, `Blocked`, `Rejected`로 수렴
30-
- `socratic-spec-authoring`: 소크라테스 질문으로 spec을 세부화하고 질문 루프 종료 뒤 사용자 명시적 승인을 거쳐 승인 상태까지 고정
31-
- `context-pack-selection`: approved spec 뒤에 primary context pack과 required docs를 고정
32-
- `boundary-check`: 구현 전에 read/write/network/escalation 경계를 다시 확인
33-
- `parallel-work-split`: 여러 agent를 투입하기 전에 ownership과 disjoint write set을 고정
34-
- `api-contract-sync`: backend API 계약 변화가 client consumer와 workflow evidence에 미치는 영향을 맞춤
35-
- `verification-contract-runner`: selected verification contract profile을 실행하고 latest verification evidence를 남김
36-
- `repair-loop-triage`: verification 실패나 review 수리 요청 뒤 rerun, `Blocked`, split 중 하나를 정함
37-
- `reviewer-handoff`: review가 실제로 필요할 때 reviewer minimum context를 넘김
38-
- `publish-after-review`: legacy 이름이지만 current policy에서는 latest verification 뒤 open PR을 publish
39-
- `guardrail-ledger-update`: feedback close-out에서 guardrail ledger entry 작성
40-
- `failure-to-policy`: normalized failure를 가장 작은 guardrail asset으로 연결
41-
- `quality-sweep-triage`: quality sweep signal을 cleanup candidate, guardrail follow-up, repair-now, no-action으로 분류
14+
## Active Skill Set
4215

43-
## Recommended Use
16+
- `request-intake`
17+
- `socratic-spec-authoring`
18+
- `phase-planner`
19+
- `boundary-check`
20+
- `phase-executor`
21+
- `verification-runner`
22+
- `review-closeout`
23+
- `repair-reopen`
4424

45-
새 요청을 처음 받을 때의 기본 순서는 아래와 같다.
25+
## Recommended Order
4626

4727
1. `request-intake`
48-
2. `ambiguity-interview` if route is `모호한 요청`
49-
3. `socratic-spec-authoring`
50-
4. `context-pack-selection`
51-
5. `boundary-check`
52-
6. `parallel-work-split` if more than one agent will work on the same spec
53-
54-
`request-intake`는 route와 handoff까지만 담당한다. 현재 spec 초안에 대한 승인 요청과 `Approved` 고정은 `socratic-spec-authoring` 단계에서, 질문 루프가 닫힌 뒤 사용자 명시적 동의를 받아야만 가능하다.
55-
56-
구현 뒤 close-out 순서는 아래 hook을 따른다.
57-
58-
1. `verification-contract-runner`
59-
2. `publish-after-review` once latest verification evidence is `passed`
60-
3. `reviewer-handoff` if independent review is required after publish
61-
4. `repair-loop-triage` if verification failed or review requested changes
62-
5. `guardrail-ledger-update` once feedback close-out is triggered
63-
6. `failure-to-policy` when feedback close-out must choose a guardrail promotion target
64-
7. `quality-sweep-triage` when periodic or targeted quality scan is in scope
65-
66-
`api-contract-sync`의 canonical backend contract는 `git-ranker/docs/openapi/openapi.json`이다. workflow는 canonical spec을 복제해 소유하지 않고, sync 절차와 evidence를 관리한다.
28+
2. `socratic-spec-authoring`
29+
3. `phase-planner`
30+
4. `boundary-check`
31+
5. `phase-executor`
32+
6. `verification-runner`
33+
7. `review-closeout`
34+
8. `repair-reopen`
35+
36+
새 workflow에서는 markdown spec과 JSON state를 분리한다. `spec.md`는 사람용 요구사항 초안이고, `approve`가 이를 `task.json.intake`로 잠근다. `task.json`/`phases.json`/`runs/*.json`은 자동화용 canonical source다.

.codex/skills/ambiguity-interview/SKILL.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

.codex/skills/api-contract-sync/SKILL.md

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
---
22
name: boundary-check
3-
description: context pack selection 뒤에 task type별 read/write/network/escalation 경계와 approved spec의 write scope completeness를 다시 잠가야 할 때 사용한다.
3+
description: active phase의 allowed_write_paths 경계를 먼저 확인하고 범위를 벗어나면 phase를 수정하거나 재계획한다.
44
---
55

66
# Boundary Check
77

8-
이 skill의 목적은 더 넓은 접근을 정당화하는 것이 아니라, 현재 subtask가 이미 허용한 경계 안에서만 움직이도록 다시 확인하는 것이다.
9-
108
## 언제 사용하나
119

12-
- primary context pack이 정해졌고 구현 직전이다.
13-
- approved spec에 write scope와 verification contract profile이 적혀 있다.
10+
- 구현 전에 수정 대상 파일이 현재 phase 경계 안에 들어가는지 확인해야 한다.
1411

1512
## 먼저 확인할 것
1613

17-
- approved spec
18-
- `docs/operations/tool-boundary-matrix.md`
19-
- `docs/operations/workflow-governance.md`
20-
- 필요하면 `docs/operations/verification-contract-registry.md`
14+
- `AGENTS.md`
15+
- `docs/artifact-model.md`
16+
- `docs/hooks.md`
17+
- `workflows/tasks/<task-id>/task.json`
18+
- `workflows/tasks/<task-id>/phases.json`
19+
- `workflows/system/hooks.json`
2120

2221
## 작업 방식
2322

24-
1. primary repo와 active subtask가 여전히 하나인지 확인한다.
25-
2. 현재 읽으려는 문서와 파일이 selected context pack과 spec named input 안에 있는지 점검한다.
26-
3. allowed write paths, control-plane artifacts, explicitly forbidden path가 spec에 모두 적혀 있는지 확인한다.
27-
4. network와 escalation trigger를 최소 범위로 좁힌다.
23+
1. active phase의 `allowed_write_paths`를 읽는다.
24+
2. 수정하려는 파일 목록이 범위 안에 있는지 먼저 대조한다.
25+
3. 범위를 벗어나면 임의로 수정하지 말고 `phases.json`을 다시 계획하거나 승인 범위를 갱신한다.
26+
4. phase를 닫을 때는 `python3 scripts/workflow.py run <task-id> --complete --changed-path ...`로 write scope를 다시 검증한다.
2827

2928
## 결과
3029

31-
- task type
32-
- read boundary
33-
- write boundary
34-
- control-plane artifact
35-
- explicitly forbidden path
36-
- network 필요 여부
37-
- escalation trigger
30+
- 범위 안이면 구현 진행
31+
- 범위 밖이면 phase 재계획 또는 승인 범위 수정

.codex/skills/context-pack-selection/SKILL.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.codex/skills/failure-to-policy/SKILL.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

.codex/skills/guardrail-ledger-update/SKILL.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

.codex/skills/guardrail-ledger-update/references/feedback-closeout-minimum.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.codex/skills/parallel-work-split/SKILL.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)