Skip to main content

implement-slice

Implements a single slice with unit tests and a Reflect step. Agent-first — invoked by the slice-implementer subagent (under implement-mainspec). No human-in-the-loop.

소스 정보

저장소
capitalone/context-specs
최근 소스 활동
2026년 7월 3일 23:34
감지된 SKILL.md 언어
영어
스타
43
포크
6

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
implement-slice
description
Implements a single slice with unit tests and a Reflect step. Agent-first — invoked by the slice-implementer subagent (under implement-mainspec). No human-in-the-loop.
# Implement Slice Executes a single slice with unit tests and a post-implementation Reflect step. Agent-first: invoked by the `slice-implementer` subagent under the parent orchestrator (`implement-mainspec`). No human prompts. ## Invocation Contract This skill is invoked by the `slice-implementer` subagent, not directly by the harness dispatcher. The subagent's prompt provides: **Inputs:** - `slice_path` — absolute path to the slice file (may be outside the working directory). - `working_directory` — absolute path to the feature branch checkout (repo root). **Outputs (uncommitted, in the working directory):** - Implemented code matching the slice's specification. - Unit tests created/updated. - Optional: edits under `.claude/skills/expert/references/` if Reflect produced a high-bar update. The parent orchestrator (`implement-mainspec`) handles git (add, commit, push) after this skill exits. Do NOT commit, do NOT run git operations, do NOT create PRs. **Result reporting (to the calling subagent):** - **SUCCESS**: list key files changed, tests passing, Reflect outcome (no-op | add | edit | delete). - **FAILURE**: describe what went wrong. Reasons include: `test_failure` (unit tests red), `implementation_blocked` (spec contradicts the codebase). ## Workflow 1. **Read slice** - Load the entire slice file into context. 2. **Create TODO list** - Three items: - `{slice-name} - Implement` - `{slice-name} - Unit Tests` - `{slice-name} - Reflect` 3. **Implement** - Mark in_progress, implement all code specified in the slice. 4. **Unit tests** - Create/update unit tests for the implemented functionality. All tests must pass before proceeding. 5. **Reflect** - See the Reflection Protocol below. 6. **Complete** - Mark all TODOs complete, stop. The working directory is the feature branch checkout. There should be no prior partial state to resume from — work as if the slate is clean. ## Reflection Protocol Run only after Implement + Unit Tests are green. ### Step A — Load long-term memory Invoke `/expert` so the skill body and its reference files are pulled into your context: ``` skill: "expert" ``` If absent, Reflect is a no-op. Never fail the slice on missing `/expert`. Otherwise, read the reference files that overlap with what this slice touched (architecture area, patterns used, file types modified). ### Step B — Judge: add, edit, delete, or no-op You now hold two things: 1. **Your experience implementing this slice** — what was confusing, what pattern you implemented, where the spec contradicted the actual codebase (already in your context window). 2. **The current long-term memory** — what `/expert` says about those areas (loaded in Step A). High bar — default to **no-op** unless you have a strong reason to add, edit, or delete. Use the following table to guide your decision: | Outcome | When to use | |---------|------------| | **NO-OP** (default) | Routine work, small adjustments, no contradiction. Prefer this. | | **ADD** | A new fact, few-shot example, or procedure the project lacks. Use reference-file prefixes: `how-to-*` / `concept-*` / `pattern-*` / `invariant-*` / `example-*`. | | **EDIT** | An existing reference is partially wrong; correct it in place. | | **DELETE** | An existing reference contradicts merged code reality. | Strong signals to act: slice got stuck for many iterations, or the slice spec explicitly contradicted code that already exists. Small deviations are noise — prefer NO-OP. ### Step C — Apply directly (only for add/edit/delete) - Write the change to `.claude/skills/expert/references/`. - If you added or deleted a reference file, update `.claude/skills/expert/SKILL.md`'s one-line index. - Do NOT touch `AGENTS.md` — that is owned by `/learn` post-merge. - The orchestrator commits these Expert-file changes with the slice and has full authority to resolve any resulting merge conflicts. ## TODO Structure ``` [ ] 1.3-user-auth - Implement [ ] 1.3-user-auth - Unit Tests [ ] 1.3-user-auth - Reflect ``` ## Guidelines **DON'T:** - Use `AskUserQuestion`. No human is in the loop. - Implement beyond the slice scope. - Proceed with failing unit tests. - Implement dependent slices (that's for implement-mainspec). - Run git commands or create PRs — the parent orchestrator handles git. - Fail the slice because `/expert` is unavailable or Reflect produced no update.
GitHub에서 보기