Skip to content

feat: v0.0.5 — asset store identity correction (RAG → assets)#38

Merged
jazz1x merged 1 commit into
mainfrom
fix/rag-pipeline-followup
Apr 28, 2026
Merged

feat: v0.0.5 — asset store identity correction (RAG → assets)#38
jazz1x merged 1 commit into
mainfrom
fix/rag-pipeline-followup

Conversation

@jazz1x
Copy link
Copy Markdown
Owner

@jazz1x jazz1x commented Apr 28, 2026

v0.0.5 — Asset Store identity + production pipeline closure

저장소 이름을 솔직하게 바꾸고, "실패가 가드레일이 된다"는 약속이 처음으로 실제 동작하게 만들었다. 원래 0.0.5(이름)+0.0.6(파이프라인) 두 PRD였지만 서로의 전제라 한 릴리스로 통합.

한눈에

영역
저장소 파일명 harnish-rag.jsonl ("RAG"라 호칭) harnish-assets.jsonl (Asset Store). 자동 이전, 데이터 손실 0
실패 컨텍스트 hook이 /tmp 적재 → Stop그냥 삭제 (CRITICAL) Stop이 dedup → 자산으로 영속화
skillify 산출물 18줄 죽은 스텁, Triggers 없음 자동 Trigger + 타입별 섹션 + references/source-assets.jsonl
inject 출력 type/title/body만 + level / confidence / stability / resolved / context
README "ralph loop" Read→Act→Log→Progress (RALP 약자처럼 보임) 제거. "Ralph Wiggum에서 따온 이름, 약자 아님"

리뷰 포커스

① CRITICAL — 데이터 손실 (failures-become-guardrails 가 깨져있었음)

  • 현상: Stop 이벤트가 /tmp/harnish-pending-*.jsonl을 자산으로 옮기지 않고 그냥 삭제. README 핵심 약속이 첫 hop부터 끊김.
  • 수정: 새 scripts/promote-pending.sh(tool, 첫 의미 라인 50자) 키로 dedup → record-asset.sh 등록. detect-asset.sh Stop 분기에서 자동 호출.
  • 볼 곳: scripts/promote-pending.sh:55-77 · scripts/detect-asset.sh:60-75
  • Q: dedup 키가 충분한가? 같은 에러도 다른 tool이면 별개(의도). promote 실패해도 pending 삭제(무한 누적 방지, retry queue는 별개 PRD).

② skillify production-grade

  • 현상: 생성된 SKILL.md가 description 37자 + Triggers 0회 → Claude 자동 로더가 못 잡음. 사실상 dead skill.
  • 수정: 자산 title 빈도로 Trigger 후보 5개 자동 생성, body는 §1 LLM-finalize + §2 타입별 섹션 + §3 메타, 원본은 references/source-assets.jsonl.
  • 볼 곳: scripts/skillify.sh:60-86 (trigger 추출), :115-140 (섹션 emit)
  • Q: Trigger 품질은 자산 품질에 의존. §1은 여전히 LLM이 마무리(autonomous 아님, 정직 표현 유지).

③ inject 컨텍스트 풍부화

  • 현상: query-assets.sh --format inject가 type/title/body만 — guardrail의 level, decision의 confidence 등 RCA 핵심 필드 누락.
  • 수정: type 헤더에 메타 노출([guardrail/soft], [decision/medium]), 자산별 context: 라인, failure는 resolved: 표시.
  • 볼 곳: scripts/query-assets.sh:113-126
  • Q: 줄당 1줄 → 2줄로 포맷 변경. 현재 소비자는 LLM 컨텍스트 주입뿐이라 영향 없음.

④ 이름 정합성 (BREAKING but auto-migrated)

  • 현상: 스크립트는 "asset" 어휘인데 파일명/스키마 필드는 "RAG". 진짜 RAG는 query-assets.sh --format inject 한 경로뿐.
  • 수정: 파일/필드/변수 일괄 정리. init-assets.sh가 첫 실행 때 idempotent atomic mv. resolve_rag_file()은 deprecated alias로 유지.
  • 볼 곳: scripts/init-assets.sh · scripts/common.sh:48-61 · skills/impl/references/schema.json
  • Q: 외부 호출자 호환을 위해 alias 유지, 다음 메이저에서 제거 예정.

⑤ README "ralph loop" 정직화 — 위 표 마지막 행 참고. 변경 위치: README.md:115,168, README.ko.md:115,168, CHANGELOG.md:108.

테스트 / 변경 규모

41 files changed, 722 insertions(+), 185 deletions(-)
신규: scripts/promote-pending.sh, tests/e2e_pipeline.bats
수정: 14 scripts, 10 SKILL frontmatter, 2 README, CHANGELOG, schema.json, VERSION, plugin.json
  • bats tests/80 / 80 PASS
  • scripts/test-all.sh60 / 60 PASS
  • 신규 회귀: e2e_pipeline.bats 4개 (자산 승격 / dedup / skillify 산출물 / inject 메타) + scripts_advanced.bats 2개 (legacy 자동 이전 + idempotency)
  • 수동 hook 시뮬레이션: 같은 에러 5회 → Stop → 자산 1건 + occurrences: 5

호환성

  • 드롭인 업그레이드. 기존 사용자는 git pull 후 첫 hook 트리거 또는 bash scripts/init-assets.sh로 자동 이전.
  • CLI 인자 변경 없음.
  • CI matrix는 macos-latest 단일로 축소 (ubuntu 제외).

후속 (별개 PR)

  • skillify §1을 LLM 호출로 자동 마무리
  • promote-pending 실패 시 retry queue
  • resolve_rag_file() deprecated alias 제거 → 다음 메이저

Single consolidated release. Originally drafted as 0.0.5 (rename) +
0.0.6 (pipeline closure); both ship together as 0.0.5 because each
is the other's prerequisite.

──────────────────────────────────────────────────────────────────────
Asset Store identity correction
──────────────────────────────────────────────────────────────────────

Audit: 8 scripts, all Korean UI strings, and the schema framing used
"asset/자산", but the file/field names were "RAG". Only
query-assets.sh --format inject is strict RAG; the rest is asset CRUD
+ lifecycle.

Renamed:
- .harnish/harnish-rag.jsonl → .harnish/harnish-assets.jsonl
  (init-assets.sh auto-migrates idempotently — no data loss)
- harnish-rag-archive.jsonl → harnish-assets-archive.jsonl
- schema.json: rag_record → asset_record, rag_file → asset_file
- 14 scripts: RAG_FILE / RAG → ASSET_FILE / ASSETS

Added:
- 2 migration regression tests (legacy file rename + idempotency)
- README "Memory Model" section (two-tier: Asset Store + Skills)
- Honest skillify framing (draft generator, not autonomous)
- common.sh: resolve_asset_file() + resolve_legacy_asset_file();
  resolve_rag_file() kept as deprecated alias

──────────────────────────────────────────────────────────────────────
Production pipeline closure (Trigger → Record → Skillify)
──────────────────────────────────────────────────────────────────────

Three production gaps found via ralphi live audit. All closed end-to-end.

CRITICAL — pending → assets persistence:
- Pre-fix: Stop hook deleted pending file without persisting failures
  ("failures become guardrails" was broken at the first hop).
- Post-fix: scripts/promote-pending.sh dedup's by
  (tool, first_error_line) and auto-records as failure assets with
  tags [auto, tool:<name>, session:<short>] + occurrences metadata.
- detect-asset.sh Stop event now invokes promote-pending automatically.

HIGH — skillify production-grade scaffold:
- description includes Triggers: line auto-extracted from asset
  titles (5 candidates, frequency-ranked).
- Body sectioned by asset type (Failures / Patterns / Guardrails /
  Decisions / Snippets) with metadata
  (level / confidence / stability / resolved).
- references/source-assets.jsonl preserves original assets.

MEDIUM — query --format inject RCA enrichment:
- guardrail/level, decision/confidence, pattern/sN inline header.
- context: line per asset; failure shows resolved: status.

──────────────────────────────────────────────────────────────────────
README cleanup — "ralph loop" honesty
──────────────────────────────────────────────────────────────────────

Quickstart/Usage used to break the loop into [READ]/[ACT]/[LOG]/[PROGRESS],
which read like a "RALP" acronym. It isn't — ralphi and the ralph loop
are both named after Ralph Wiggum (keep trying, don't give up). The
acronym-shape has been removed; explicit Naming-section reference added.

──────────────────────────────────────────────────────────────────────

Tests: 80/80 bats + 60/60 scripts/test-all.sh.
- tests/e2e_pipeline.bats +4 (trigger→record, dedup, skillify quality,
  inject enrichment)
- tests/scripts_advanced.bats +2 (rename migration + idempotency)

CI: matrix reduced to macos-latest only.

Compatibility:
- Drop-in upgrade. Auto-migration runs on first init-assets.sh.
- CLI unchanged. resolve_rag_file() kept as deprecated alias.
@jazz1x jazz1x force-pushed the fix/rag-pipeline-followup branch from b2e68e5 to d048ad2 Compare April 28, 2026 15:23
@jazz1x jazz1x merged commit cf273cd into main Apr 28, 2026
1 check passed
@jazz1x jazz1x deleted the fix/rag-pipeline-followup branch April 28, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant