agentleFS
park-jongbeompark-jongbeom/patrick-work-harness/skills/gate-e/SKILL.md

gate-e

Skill1 starsChanged 2 months agoMITView on GitHub

WORKLOG recording, session cleanup, and archiving after Gate C or Gate D confirmation. Use on 'Gate E', 'WORKLOG', '세션 정리', 'C~E 일괄', 'D~E 일괄', etc.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If DOC_INDEX.md exists at the target repo root:

    line 33
  2. Very specific:

    If a document was expected to be filled by this session's gates but remains Skeleton → mark Partial with a note (not filled — no applicable …

    line 35
  3. Very specific:

    If all gates for this session have filled their sections → mark Complete

    line 36
  4. Very specific:

    If DOC_INDEX.md does not exist: skip silently.

    line 38
  5. Very specific:

    Judgment: Check the items below in the ${CURRENT_SESSION_FILE} Gate B~D blocks:

    line 42
  6. Very specific:

    If the topic does not fit the existing 5 files, create a new topic file + add 1 row to that repository's error_topics/README.md table.

    line 72
  7. Distinctive:

    If there is no pulled-in item, skip this step.

    line 95
  8. Distinctive:

    After completing the entire Gate E procedure (WORKLOG + archive + plan document(s) update), output the block below at the very end of the …

    line 120
  9. Distinctive:

    If not applicable, omit this block.

    line 186

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gate E Procedure (follow order strictly)


  1. WORKLOG record — add to the top of ${HARNESS_PLANS_DIR}/tasks/worklog/YYYY-Www.md in the format below:

    ## YYYY-MM-DD | Claude | 작업 한줄 요약
    **요청 내용**: ...
    **변경 파일**: - `경로/파일.tsx` — 이유
    **핵심 변경**: 무엇을 왜 어떻게
    **검증 방법**: docker exec ... npm test
    **재사용 후보**: 이번 세션에서 반복된 시행착오·결정 중 다음 세션이 재활용할 만한 것을 1~2줄로 추출. 없으면 "없음".

    The "재사용 후보" block is the ECC pattern-extraction (L1) deliverable. Prefer "없음" over meaningless repetitive entries.

  2. Long-form archive — newly create (copy) the session Gate A~E body to ${HARNESS_PLANS_DIR}/current_work/archive/session_history/ARCHIVE_날짜_세션ID.md.

    Separation of responsibility (SRP):

    • Gate E's responsibility: create the new archive file + update the plan document(s) (tier-aware, see SKILL_DETAIL.md §Plan-Doc Update Pattern) + SESSION_INDEX + CURRENT_SESSION dashboard.
    • Gate E's non-responsibility: do not delete the ${CURRENT_SESSION_FILE} body (completed Gate A~D blocks). When the threshold (100 lines) is exceeded, a separate /doc-cleanup SKILL slims it down.
    • Reason: Right after Gate E, the user must be able to review the Gate A~E flow as-is in ${CURRENT_SESSION_FILE}. If the body disappears, the misunderstanding 「Gate E가 안 됐나?」 arises (reflecting 2026-04-27 user feedback).
    • User guidance: After the Step 5 update, the archive path·WORKLOG path must be noted in this response's final output (securing location traceability).

2-B. Layer 2 document status finalization (if --docs=full was used at /init)

If DOC_INDEX.md exists at the target repo root:

  • Review each Layer 2 row's Status:
    • If a document was expected to be filled by this session's gates but remains Skeleton → mark Partial with a note (not filled — no applicable content this session)
    • If all gates for this session have filled their sections → mark Complete
  • This is the final DOC_INDEX.md touch for this session — subsequent sessions start fresh from the current status.
  • If DOC_INDEX.md does not exist: skip silently.
  1. Error-case storage (conditional) — perform the procedure below directly in this turn. (An inline copy of the same procedure as the /error-log Skill — that skill is not auto-loaded, so perform the below directly in this response. No separate load needed.)

    Judgment: Check the items below in the ${CURRENT_SESSION_FILE} Gate B~D blocks:

    • Gate B build·type·runtime failure / Gate C FIX-B / Gate D re-verification failure / Docker·environment·permission retry
    • There is "value for the next session to reuse" (excluding simple typo·one-off mistakes)

    → If there is no target, output "오류 기록 대상 없음 — 생략" and proceed to Step 4.

    Canonical location (managed independently per repository) — the target repositories are listed in .claude/harness-answers.yml → code_repos (SSOT, shared with error-topics-guard.py). For each entry, the path is {repo}/docs/rules/error_topics/.

    If code_repos is absent or empty → output "code_repos 미설정 — 오류 기록 경로 없음. harness-answers.yml에 설정하세요" and proceed to Step 4. Do not reuse the "오류 기록 대상 없음 — 생략" wording above: that one means this session produced no error worth recording, whereas this one means the recording path itself is unconfigured. Emitting the same line for both makes a configuration gap read as a normal, healthy session — the operator would keep seeing green while nothing is ever recorded.

    • Each folder's README.md is the topic index (canonical). Do not write to the ledger ../error_analysis.md.
    • Docs-only repositories (no application code) are not code_repos entries → record in the error_topics/gate_process.md of the code repository that that session worked on.

    Topic file mapping (common to the three repositories):

    FileTagTarget error
    gate_process.mdPROCGate approval·procedure·「구현」 interpretation·after-the-fact retroactive
    runtime_env.mdENVDocker/container/npm·gradle·pytest/lockfile/permission/path
    git_commit.mdPROCcommit message·git operation
    testing.mdTYPE VERIFY LOGICtype·build·test failure·CI verification
    security_schema.mdSEC APIXSS·token·axios·API contract·DB schema

    If the topic does not fit the existing 5 files, create a new topic file + add 1 row to that repository's error_topics/README.md table.

    Append format (append as a date section at the bottom of the relevant topic file):

    ## [YYYY-MM-DD] 세션ID — 한줄 요약
    - **발생 Gate**: B / C / D
    - **증상**: (로그·메시지 핵심 1~3줄)
    - **근본 원인**: 무엇이 왜 틀렸는가
    - **해결**: 파일·라인 포함 변경점
    - **재발 방지 규칙**: 다음 세션이 지켜야 할 1줄 규칙

    No creating a new document per session — always append to an existing topic file.

  2. FIX-B / DEP handoff — process Gate C's FIX-B·DEP items at the source in the same turn:
    • FIX-B item → register in the plan document (tier-aware, see SKILL_DETAIL.md §Plan-Doc Update Pattern) or as a next-session Gate A candidate
    • Next-session decision → record in the ${SESSION_INDEX_FILE} YAML next_action field
    • ${SESSION_INDEX_FILE} YAML sessions_since_audit += 1
    • ※ The session-status ✅E flip is performed in bulk at Step 5, not this step — preventing Step 4/5 duplication (GATE-E-ENFORCE-1)
    • ⛔ No counter value in prose (AUDIT-COUNTER-STALE-FIX-1): Do not copy the sessions_since_audit number or the =N → /audit 권장 phrase into the next_action·priority_note·${CURRENT_SESSION_FILE} 「다음 행동」 prose. Whether to recommend audit is announced by ② below, which reads the canonical YAML and outputs only in this response (a number baked into prose goes stale immediately after the audit reset → misleads the next session. The same recurring incident is recorded in the SESSION_INDEX YAML comment·HARNESS_EVOLUTION_LOG PLAN-SYNC-21). If a recommendation must be left in prose, only the qualitative expression 「⚡ /audit 권장(정본 YAML 기준)」 without a number is allowed.

4-B. §5 handoff retrieval (conditional) — If there is an item pulled into this session's scope from §5 at Gate A 0-A, confirm the processing trace and delete that line: plan_tier: "2" (or field absent) → <master_plan_file> §5; plan_tier: "1" → <single_plan_file>'s handoff-notes section.

  • If there is no pulled-in item, skip this step.
  • The 「⚠️ 영구 기록」「✅ 결정사항 영구 기록」 subsections are not retrieved at Gate E (absolute preservation).
  • The retrieval is performed together in this response turn.
  1. Plan-doc ✅E status flip (same response turn) — update all applicable plan document(s) below to ✅E (tier-aware, see SKILL_DETAIL.md §Plan-Doc Update Pattern). The status flip is this step's single responsibility (no duplication with Step 4):

    (a) Plan document(s) — plan_tier: "2" (or field absent) → <detail_plan_file> §7, that session's row status → ✅E (날짜, 핵심지표); plan_tier: "1" → <single_plan_file>'s matching ## Phase N session entry → ✅E (날짜, 핵심지표).

    (b) ${SESSION_INDEX_FILE} YAML — that session's gate: → ✅E (...)

    (c) ${CURRENT_SESSION_FILE} — update all of ①②③ below (PROC violation if even one is omitted):

    • ① Header block > **현재 상태**: → ✅E 완료 (날짜)
    • ② Dashboard table | 현재 Gate | → ✅E 완료
    • ③ Dashboard table | Gate 진행 | row → the last E☐/E⏳ to E✅

    Self-verification (mandatory): Right after the update, run grep -c "✅E" ${CURRENT_SESSION_FILE} → confirm result ≥ 2 (header + dashboard). If less, re-check ②③.

    session-dashboard.html update: session-dashboard-sync.py always runs as the first entry of the Stop hook array, reading the ✅E ${CURRENT_SESSION_FILE}·${SESSION_INDEX_FILE} from the previous Step 5 and auto-regenerating the HTML (HARNESS-STALE-GUARD-3). No skill Bash Step needed. Separation of responsibility: the Stop hook gate-e-sync-guard.py is the ✅E consistency guard, session-dashboard-sync.py is the HTML-deliverable sync — separate responsibilities, and dashboard-sync is fail-open so it does not affect the guard behavior.

Enforcement device: Omitting this Step 5(c) is detected by plans/hooks/gate-e-sync-guard.py (Claude Code Stop hook) as a SESSION_INDEX ↔ CURRENT_SESSION ✅E mismatch, blocking response termination (GATE-E-ENFORCE-1). Splitting content output and document update across different turns is a PROC violation.


This Gate response's mandatory final output

After completing the entire Gate E procedure (WORKLOG + archive + plan document(s) update), output the block below at the very end of the response. Omitting it or replacing it with other content is a PROC violation.

Output order: ① Gate E 산출물 위치 → ② 문서 상태 요약 → ③ audit 권장 여부 → ④ 세션 완료 안내

① Gate E deliverable location — After Gate E completion, output the deliverable paths explicitly so the user can trace the result. This is the key output for preventing user misunderstanding, so do not omit it:

── Gate E 산출물 위치 ──────────────────────
  archive (장문 본문) : ${HARNESS_PLANS_DIR}/current_work/archive/session_history/ARCHIVE_YYYY-MM-DD_{세션ID}.md
  WORKLOG            : ${HARNESS_PLANS_DIR}/tasks/worklog/YYYY-Www.md (line N~M)
  문서 갱신 (✅E)     : ${SESSION_INDEX_FILE} · ${CURRENT_SESSION_FILE} 대시보드 · {plan_tier: "2"인 경우 detail_plan_file §7 / plan_tier: "1"인 경우 single_plan_file 해당 Phase}
  ${CURRENT_SESSION_FILE} : 본문(Gate A~D 블록) 보존됨 — 슬림화는 별도 /doc-cleanup 호출 시 수행
────────────────────────────────────────────

Explicitly stating that the ${CURRENT_SESSION_FILE} body is preserved makes the user aware that 「Gate E 결과를 그대로 검토 가능」.

② Document status summary — Right after Gate E completion, measure the applicable plan-doc line counts (row set per harness-answers.yml → plan_tier, see doc-cleanup/SKILL.md §Step 0-B) and apply doc-cleanup Step 0-A 「공유 산정 표」 directly to the current-point metadata to compute the score·grade·recommended model. Output in the format below:

── 문서 상태 ──────────────────────────────
  ${CURRENT_SESSION_FILE}          : N줄  (임계값 100줄) ✅ / ⚠️ 초과
  ${SESSION_INDEX_FILE}            : N줄  (임계값  80줄) ✅ / ⚠️ 초과
  {plan_tier: "2" 행 집합}
  <master_plan_file>          : N줄  (임계값 450줄) ✅ / ⚠️ 초과
  <detail_plan_file>          : N줄  (임계값 700줄) ✅ / ⚠️ 초과
  {또는 plan_tier: "1" 행 집합}
  <single_plan_file>          : N줄  (임계값 <single_plan_threshold>줄) ✅ / ⚠️ 초과
────────────────────────────────────────────
  ⚠️ 초과 항목 있음 → `/doc-cleanup` 실행을 권장합니다.
     권장 모델: {Haiku/Sonnet/Opus} ({등급})
     R/V/D 분해: V-D1 문서초과 +N / V-D2 §5 항목 N건 +N / V-D3 계획문서 임계초과 개수(1→+1/2→+2) +N / D-D 정형 슬림화 +N
  (또는 모두 이하) → 문서 상태 정상
────────────────────────────────────────────

Recommended-model computation (forced procedure) → SKILL_DETAIL.md §Recommended-Model Computation (4 mandatory steps; not auto-loaded — Read it if the obligations are in question). This call site's specifics: target = doc-cleanup/SKILL.md §Step 0-A-a table (including the double-add rule) + §0-A-b grade judgment; measurement = its 4 Bash commands (wc + 3× awk|grep).

③ audit recommendation judgment (SESSION_INDEX YAML single source):

Judge based on the sessions_since_audit field of the ${SESSION_INDEX_FILE} YAML header (the value right after += 1 at Step 4). The judgment·recommendation is performed only in this response output, and the counter number is not recorded in persistent-document prose (same principle as Step 4 「카운터 값 서술 금지」 — the canonical YAML is the sole source).

  • sessions_since_audit ≥ 3 → output recommendation
  • last_audit_date field absent (first time) → output recommendation
  • Chain-transition·priority-change point (e.g. last ✅E of the MEETING-ALIGN chain → entering the next chain, MVP Phase transition, the plan document's priority-table update — <master_plan_file> §2 under plan_tier: "2", or <single_plan_file>'s equivalent priority section under plan_tier: "1") → unconditionally output recommendation

When recommending:

⚡ 직전 /audit 이후 {sessions_since_audit}개 세션 완료 — `/audit` (방향성 점검) 호출을 권장합니다.
   권장 모델: {Haiku/Sonnet/Opus} ({등급})
   R/V/D 분해: §5 즉시 N건 +N / DEP 재검증 N건 +N / 체인 전환 +N / sessions_since_audit N +N
   {현재 모델이 권장보다 낮으면}: ⚠️ 현재 {현재모델} < 권장 {권장모델} — `/model {권장}` 전환 후 `/audit` 호출하세요.
   {현재 모델이 권장 이상이면}: ✅ 현재 {현재모델} ≥ 권장 — 바로 `/audit` 호출 가능

Recommended-model computation (forced procedure) → SKILL_DETAIL.md §Recommended-Model Computation (4 mandatory steps; not auto-loaded — Read it if the obligations are in question). This call site's specifics: target = audit/SKILL.md §Step 0-a table (audit-specific) + §0-b grade judgment; measurement = its 5 commands (grep + 2× awk|grep + operator judgment). 🔴 audit only — current-model detection obligation: from the system context (You are powered by the model named {모델명}), extract the model-family keyword and use it as the current model. Do not infer it from anything else.

If not applicable, omit this block.

④ Session completion guidance:

---
**세션 완료**: 다음 세션은 `${SESSION_INDEX_FILE}`의 `next_action` 항목을 확인하세요. 새 작업 시작 시 `/gate-a` (Gate A 계획)로 시작합니다.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.