RailPose3D 하네스 셋업: CLAUDE.md / PLAN / PROGRESS / agents / skills / hooks #1

Closed
opened 2026-04-28 08:31:39 +09:00 by kimminsung · 0 comments
Owner

배경

이 프로젝트(전철주·레일 등 긴 물체 검출 후 3D 좌표 추출)를 RailPose3D 로 명명하고, 다중 에이전트가 협업할 수 있도록 Anthropic engineering blog "Harness design for long-running app development" 의 원칙(Planner / Generator / Evaluator 분리, file-based handoff, sprint contract, context reset over compaction)을 따르는 하네스를 셋업한다.

핵심 설계 결정 (불변)

  1. 메시 의존 금지 — SfM 카메라 포즈 + ground 분류 dense cloud 만 사용.
  2. 2D 정확 검출 → 3D 삼각측량.
  3. Pose/keypoint 모델 (bbox 아님). 4-keypoint {base, top, L_arm, R_arm} 로 base/완금 구조적 구분.
  4. Segmentation + skeletonize (lane detector 아님). 레일은 view-invariant.
  5. SfM-consistent self-training 으로 30장 라벨 5–20× 증식.

3-모듈 아키텍처

Module 책임 채택
A Pole keypoint 4-keypoint pose RTMPose-m / ViTPose
B Rail seg binary mask → polyline SegFormer-B2 (3-stage transfer)
C 2D→3D 다중뷰 삼각측량 DBSCAN + pycolmap + pyceres / PDAL CSF + Open3D + scipy

셋업 산출물

프로젝트 루트

  • CLAUDE.md — 모든 에이전트 첫 행동 규약(PLAN+PROGRESS 우선 읽기), harness 원칙, 디렉터리 규약
  • PLAN.md — 불변 기준선, 9개 sprint(S0–S8) 분할표, 검증 지표
  • PROGRESS.md — 현재 상태 (S0 todo), Activity Log, Blockers
  • docs/plan.md — 사용자 승인 상세 plan (한국어)
  • docs/research.md — 초기 기술 조사 (이미 존재)

.claude/agents/ (7개)

  • plan-architect (Planner) — sprint contract 작성
  • pole-detector-builder (Generator A)
  • rail-detector-builder (Generator B)
  • triangulation-builder (Generator C)
  • data-pipeline-builder (Generator D — 라벨·aug·self-training)
  • module-evaluator (Evaluator) — PCK / mIoU / reprojection error 정량 판정
  • dataset-explorer (read-only 헬퍼)

.claude/skills/ (6개)

/start, /sprint, /eval, /progress, /handoff, /contract

.claude/hooks/

  • session_briefing.sh — SessionStart 시 PLAN/PROGRESS 요약을 컨텍스트에 주입
  • stop_progress_reminder.sh — Stop 시 PROGRESS.md 1시간 이상 미갱신이면 알림

Sprint 분할 (PLAN.md)

Sprint 모듈 목표
S0 Bootstrap Infra 디렉터리·환경·CI 골격
S1 MVP-Zero A+B Grounding-DINO + SAM2 zero-label baseline
S2 Pole-A1 A RTMPose-m fine-tune
S3 Rail-B1 B SegFormer 3-stage transfer
S4 Triangulate C DBSCAN + pycolmap + pyceres pole pipeline
S5 Rail-3D C Open3D raycasting + B-spline rail pipeline
S6 Self-train A,B SfM-consistent self-training loop
S7 E2E All 100m trial section end-to-end
S8 Korean variants A 단주 vs 문형 가구 분기

현재 상태

🔲 S0 Bootstrap todo. 첫 작업: 디렉터리 골격 + pyproject.toml + ruff/pytest + run_full.py placeholder.

다음 액션

  1. 새 Claude Code 세션에서 /start 호출 → SessionStart hook 으로 자동 브리핑.
  2. /sprint S0 호출 → plan-architect 가 contract 생성.
  3. 사용자가 데이터 가용성(GCP 좌표, Metashape export 위치, RTK 사용 여부) 확인.

위험·열린 질문

  • 실제 드론 영상 + Metashape export 확보 시점 미확정
  • GCP (Ground Control Points) 좌표 데이터 가용성
  • pycolmap/pyceres Windows wheel 호환성 검증 필요 (실패 시 WSL2 fallback)
  • 한국 catenary 마스트 종류 다양성(단주/문형 등) → S8 에서 분기

참조

## 배경 이 프로젝트(전철주·레일 등 긴 물체 검출 후 3D 좌표 추출)를 **RailPose3D** 로 명명하고, 다중 에이전트가 협업할 수 있도록 Anthropic engineering blog "Harness design for long-running app development" 의 원칙(Planner / Generator / Evaluator 분리, file-based handoff, sprint contract, context reset over compaction)을 따르는 하네스를 셋업한다. ## 핵심 설계 결정 (불변) 1. 메시 의존 금지 — SfM 카메라 포즈 + ground 분류 dense cloud 만 사용. 2. 2D 정확 검출 → 3D 삼각측량. 3. Pose/keypoint 모델 (bbox 아님). 4-keypoint `{base, top, L_arm, R_arm}` 로 base/완금 구조적 구분. 4. Segmentation + skeletonize (lane detector 아님). 레일은 view-invariant. 5. SfM-consistent self-training 으로 30장 라벨 5–20× 증식. ## 3-모듈 아키텍처 | Module | 책임 | 채택 | |---|---|---| | **A** Pole keypoint | 4-keypoint pose | RTMPose-m / ViTPose | | **B** Rail seg | binary mask → polyline | SegFormer-B2 (3-stage transfer) | | **C** 2D→3D | 다중뷰 삼각측량 | DBSCAN + pycolmap + pyceres / PDAL CSF + Open3D + scipy | ## 셋업 산출물 ### 프로젝트 루트 - `CLAUDE.md` — 모든 에이전트 첫 행동 규약(PLAN+PROGRESS 우선 읽기), harness 원칙, 디렉터리 규약 - `PLAN.md` — 불변 기준선, 9개 sprint(S0–S8) 분할표, 검증 지표 - `PROGRESS.md` — 현재 상태 (S0 todo), Activity Log, Blockers - `docs/plan.md` — 사용자 승인 상세 plan (한국어) - `docs/research.md` — 초기 기술 조사 (이미 존재) ### `.claude/agents/` (7개) - `plan-architect` (Planner) — sprint contract 작성 - `pole-detector-builder` (Generator A) - `rail-detector-builder` (Generator B) - `triangulation-builder` (Generator C) - `data-pipeline-builder` (Generator D — 라벨·aug·self-training) - `module-evaluator` (Evaluator) — PCK / mIoU / reprojection error 정량 판정 - `dataset-explorer` (read-only 헬퍼) ### `.claude/skills/` (6개) `/start`, `/sprint`, `/eval`, `/progress`, `/handoff`, `/contract` ### `.claude/hooks/` - `session_briefing.sh` — SessionStart 시 PLAN/PROGRESS 요약을 컨텍스트에 주입 - `stop_progress_reminder.sh` — Stop 시 PROGRESS.md 1시간 이상 미갱신이면 알림 ## Sprint 분할 (PLAN.md) | Sprint | 모듈 | 목표 | |---|---|---| | S0 Bootstrap | Infra | 디렉터리·환경·CI 골격 | | S1 MVP-Zero | A+B | Grounding-DINO + SAM2 zero-label baseline | | S2 Pole-A1 | A | RTMPose-m fine-tune | | S3 Rail-B1 | B | SegFormer 3-stage transfer | | S4 Triangulate | C | DBSCAN + pycolmap + pyceres pole pipeline | | S5 Rail-3D | C | Open3D raycasting + B-spline rail pipeline | | S6 Self-train | A,B | SfM-consistent self-training loop | | S7 E2E | All | 100m trial section end-to-end | | S8 Korean variants | A | 단주 vs 문형 가구 분기 | ## 현재 상태 🔲 **S0 Bootstrap** todo. 첫 작업: 디렉터리 골격 + pyproject.toml + ruff/pytest + run_full.py placeholder. ## 다음 액션 1. 새 Claude Code 세션에서 `/start` 호출 → SessionStart hook 으로 자동 브리핑. 2. `/sprint S0` 호출 → `plan-architect` 가 contract 생성. 3. 사용자가 데이터 가용성(GCP 좌표, Metashape export 위치, RTK 사용 여부) 확인. ## 위험·열린 질문 - [ ] 실제 드론 영상 + Metashape export 확보 시점 미확정 - [ ] GCP (Ground Control Points) 좌표 데이터 가용성 - [ ] pycolmap/pyceres Windows wheel 호환성 검증 필요 (실패 시 WSL2 fallback) - [ ] 한국 catenary 마스트 종류 다양성(단주/문형 등) → S8 에서 분기 ## 참조 - Anthropic engineering blog: <https://www.anthropic.com/engineering/harness-design-long-running-apps> - Plan 상세: `docs/plan.md` - 초기 조사: `docs/research.md`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kimminsung/detectelectronpole#1