ワンクリックで
kf-developer
Receive a track ID, validate it is an active unclaimed track, then implement it following the kiloforge workflow.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Receive a track ID, validate it is an active unclaimed track, then implement it following the kiloforge workflow.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Kiloforge CLI tools reference and shared documentation hub. Lists available tools, provides runtime environment info, and hosts reference docs used by other kf-* skills.
Product strategy advisor: research the codebase and competitive landscape to provide product design, branding, feature prioritization, and competitive analysis advice. Produces actionable reports to .agent/kf/_reports/product-advisor/ designed for handoff to /kf-architect.
Project architect: research the codebase and distill feature requests into well-scoped kiloforge tracks with specs and implementation plans. Splits large work into multiple tracks (including BE/FE splits). Merges track artifacts to the primary branch so developer workers can claim them.
Resolve git merge conflicts during push or pull sync operations. Fetches remote changes, merges, resolves conflicts (or escalates), and completes the sync.
Interactive project bootstrapper with platform-aware defaults. Guides users through project creation decisions, generates a blueprint, scaffolds the project, and invokes kf-setup with pre-populated answers.
Manage track lifecycle: archive, bulk-archive, compact, restore, delete, rename, and cleanup
SOC 職業分類に基づく
| name | kf-developer |
| description | Receive a track ID, validate it is an active unclaimed track, then implement it following the kiloforge workflow. |
| metadata | {"argument-hint":"<track-id> [--disable-auto-merge] [--auto-exit[=SECONDS]]"} |
Implement a kiloforge track in a parallel worktree workflow. Receives a track ID, validates it is available for work, then executes the full implementation cycle: branch, implement, verify, and merge.
/kf-architect instead)/kf-setup first)/kf-implement instead)When entering the developer role, output this anchor line exactly:
ACTIVE ROLE: kf-developer — track {trackId} — skill at ~/.claude/skills/kf-developer/SKILL.md
This line is designed to survive compaction summaries. If you see it in your context but can no longer recall the full workflow, re-read the skill file before continuing. For project-specific values, re-read only what you need:
.agent/kf/workflow.yaml~/.kf/bin/kf-track.py list --ref ${PRIMARY_BRANCH}~/.kf/bin/kf-track-content.py progress {trackId}git worktree listThis agent runs in a dedicated git worktree. The worktree folder name is the agent's identity and its home branch name. Naming conventions vary — worktrees may be named kfc-<id>-worker-N (conductor-managed), developer-N, worker-N, or any other name. The role (developer, architect, etc.) is determined by the skill invoked, not by the worktree name.
git branch --show-current
git rev-parse --git-common-dir 2>/dev/null
git rev-parse --git-dir 2>/dev/null
git worktree list
git worktree list — needed for merge operationsCRITICAL: Verify you are NOT in the primary branch worktree. Compare your current working directory against the primary branch worktree path from git worktree list. If they match, you are in the main worktree — HALT immediately:
ERROR: You are in the primary branch worktree. Agents must NEVER work
in the main worktree. Use your own worker worktree instead.
Current directory: $(pwd)
Primary worktree: {primary worktree path}
The main worktree is a merge target only — no agent should ever checkout branches, commit, or modify files there. All work happens in dedicated worker worktrees.
If no track ID argument was provided, HALT with usage instructions.
Otherwise, run a single command that validates the track, checks dependencies, and acquires the claim:
eval "$(~/.kf/bin/kf-preflight.py)" && ~/.kf/bin/kf-track.py claim {trackId}
This command does everything in one step:
PRIMARY_BRANCH from project configIf exit code is 0: the track is claimed. The output contains structured key=value lines (PRIMARY_BRANCH=, TITLE=, TYPE=, SPEC_CONSTRAINED_BY=, etc.). Parse these and proceed.
If exit code is non-zero: the error message explains why (track not found, already completed, deps blocked, claim held by another worktree). HALT.
CRITICAL — Primary branch usage:
claim output includes PRIMARY_BRANCH=<value>. Use this value for ALL subsequent commands.main — always use ${PRIMARY_BRANCH} from the claim output.--ref ${PRIMARY_BRANCH} for read-only commands when in a worktree, but the scripts auto-resolve refs when on the primary branch.${PRIMARY_BRANCH}.================================================================================
KILOFORGE DEVELOPER — TRACK CLAIMED
================================================================================
Track: {trackId}
Title: {TITLE from claim output}
Type: {TYPE from claim output}
Beginning implementation:
1. Create branch kf/{type}/{trackId} from ${PRIMARY_BRANCH}
2. Implement all tasks following the plan
3. Verify and prepare for merge
================================================================================
Proceed immediately to Phase 2 (Setup).
Output the compaction anchor:
ACTIVE ROLE: kf-developer — track {trackId} — skill at ~/.claude/skills/kf-developer/SKILL.md
Create an implementation branch from the primary branch:
git checkout -b kf/{type}/{trackId} ${PRIMARY_BRANCH}
Branch naming: kf/{type}/{trackId} where type comes from metadata (e.g., kf/feature/auth_20250115100000Z). The implementation branch is always created from ${PRIMARY_BRANCH} to ensure it starts with the latest code.
After creating the implementation branch, check if a previous worker stashed work for this track:
STASH=$(git branch --list "kf/stash/{trackId}/*" | head -1 | sed 's/^[* ]*//')
if [ -n "$STASH" ]; then
git merge "$STASH" --no-edit
git branch -D "$STASH"
echo "Restored from stash: $STASH"
fi
If a stash branch exists, merge it into the fresh implementation branch. This recovers any work saved by a previous agent that was interrupted before completing the track. Delete the stash branch after merging — it's no longer needed.
Read .agent/kf/workflow.yaml and parse:
make test, make e2e)Load track context via CLI (now from the working tree, which is based on the primary branch):
# Full track content
~/.kf/bin/kf-track-content.py show {trackId}
# Or section by section for large tracks:
~/.kf/bin/kf-track-content.py show {trackId} --section spec
~/.kf/bin/kf-track-content.py show {trackId} --section plan
~/.kf/bin/kf-track-content.py progress {trackId}
# Check conflict risk with other active tracks
~/.kf/bin/kf-track.py conflicts list {trackId} --ref ${PRIMARY_BRANCH}
# Check spec context — what product items this track fulfills and what technical constraints apply
~/.kf/bin/kf-track.py spec validate {trackId} --ref ${PRIMARY_BRANCH}
The spec validate command shows which product spec items this track is required-for (deliverables) and which technical spec items it is constrained-by (implementation rules to follow). If the track has no spec_refs or no spec exists, this is silently skipped.
Also read project context:
.agent/kf/product.yaml.agent/kf/tech-stack.yaml.agent/kf/code_styleguides/ (if present)Follow the exact same implementation workflow as /kf-implement:
workflow.yamlworkflow.yaml~/.kf/bin/kf-track-content.py task {trackId} <phase>.<task> --done~/.kf/bin/kf-track-content.py progress {trackId}Before marking the track complete, verify alignment with spec items:
~/.kf/bin/kf-track.py spec validate {trackId}
If the track has constrained-by or relates-to spec refs, review each one:
tech.api.cursor-pagination is listed, confirm list endpoints use cursor pagination, not offset). If a constraint was not followed, fix the implementation before proceeding.If the track has no spec_refs or no spec exists, skip this step.
After all tasks are done and spec alignment is verified, update all tracking files and commit:
Update track status using kf-track (updates meta.yaml and cleans conflicts automatically):
~/.kf/bin/kf-track.py update {trackId} --status completed
Verify all tasks are marked done: ~/.kf/bin/kf-track-content.py progress {trackId}
Assess spec fulfillment (if the track has required-for spec refs):
~/.kf/bin/kf-track.py spec validate {trackId}
Check the fulfillment status in the output. Only items this track is required-for are relevant. Look for READY lines.
If any items show READY (this track was the last required track), assess each:
constrained-by technical spec items — verify the implementation follows each constraintIf the assessment passes:
~/.kf/bin/kf-track.py spec op fulfilled <item-id>
~/.kf/bin/kf-track.py spec op finalize --description "Fulfilled <item-id>: <brief rationale>"
git add .agent/kf/spec/
git commit -m "chore: fulfill spec item <item-id>"
If the assessment fails, report the gaps but do not mark as fulfilled.
If no items show READY or the track has no required-for refs, skip assessment.
If no spec exists or no spec_refs, skip this step entirely.
git add .agent/kf/tracks/{trackId}/
git commit -m "chore: mark track {trackId} complete"
By default, auto-merge is enabled — proceed directly to the merge sequence after implementation completes.
If --disable-auto-merge was provided:
================================================================================
TRACK COMPLETE — READY TO MERGE
================================================================================
Track: {trackId} - {title}
Branch: kf/{type}/{trackId}
Tasks: {completed}/{total}
Ready to merge. Say "merge" to begin the lock -> rebase -> verify -> merge sequence.
================================================================================
Wait for explicit "merge" command before proceeding.
If --disable-auto-merge was not provided (default): skip the pause and proceed directly to the merge sequence.
When the user says "merge" (or immediately if auto-merge is enabled (default)), execute the full merge protocol. The developer performs an implementation merge — verification is mandatory.
For the full merge protocol details, see kf-merge-protocol/SKILL.md.
Run the full verification suite before acquiring the lock to avoid holding it during long test runs:
# Read verification commands from workflow.yaml (e.g., make test && make build && make lint)
VERIFY_CMD="<commands from workflow.yaml>"
eval "$VERIFY_CMD"
If verification fails, do not attempt to merge. Fix issues first.
VERIFY_CMD="<commands from workflow.yaml>"
~/.kf/bin/kf-merge.py \
--holder "$(basename $(pwd))" \
--timeout 300 \
--verify "$VERIFY_CMD" \
--reapply "~/.kf/bin/kf-track.py update {trackId} --status completed" \
--cleanup-branch kf/{type}/{trackId}
--timeout 300 — wait up to 5 minutes for the lock (auto-merge mode)--verify — runs verification again post-rebase (primary branch may have introduced changes)--reapply — re-marks the track as completed if track state conflicts were resolved--cleanup-branch — deletes the implementation branch after mergeWith --disable-auto-merge: Use --timeout 0 instead. If lock is held (exit code 2), report and HALT — wait for user to say "merge" to retry.
Exit code 3 means unresolved rebase conflicts — lock is STILL HELD. Resolve the source code conflicts (git add the resolved files, git rebase --continue), then re-run kf-merge.py (acquire is idempotent for the same holder). Only release the lock after merge completes or via explicit abort (git rebase --abort && kf-merge-lock release).
After kf-merge succeeds:
# Return to developer home branch
git checkout {worker-home-branch}
# Clean up any stash branches for this track
for b in $(git branch --list "kf/stash/{trackId}/*" | sed 's/^[* ]*//'); do
git branch -D "$b"
done
Release the worktree claim — the merge has already propagated the completed status to the primary branch:
~/.kf/bin/kf-claim.py release
Report:
================================================================================
MERGE COMPLETE
================================================================================
Track: {trackId} - {title}
Merged into: ${PRIMARY_BRANCH}
Branch: kf/{type}/{trackId} (deleted)
Home branch: {worker-home-branch} (synced to ${PRIMARY_BRANCH})
Developer is ready for next track.
================================================================================
--auto-exit was provided)If the --auto-exit flag was provided, exit the session after completion:
# Read from conductor status file
WORKER_NAME=$(basename $(pwd))
STATUS_FILE="$(git rev-parse --git-common-dir)/kf-conductor/${WORKER_NAME}.json"
if [ -f "$STATUS_FILE" ]; then
TMUX_WINDOW=$(python3 -c "import json; d=json.load(open('$STATUS_FILE')); print(d.get('tmux_window',''))")
PANE_INDEX=$(python3 -c "import json; d=json.load(open('$STATUS_FILE')); print(d.get('pane_index',''))")
PANE_TARGET="${TMUX_WINDOW}.${PANE_INDEX}"
fi
Auto-exit in {N} seconds. Type anything to cancel.
--auto-exit=30), wait that many seconds first — this gives the user a window to intervene or review the outputAuto-exit cancelled.tmux kill-pane -t "${PANE_TARGET}"
If --auto-exit with no value was provided, kill the pane immediately (no delay):
tmux kill-pane -t "${PANE_TARGET}"
If no status file is found (not running under conductor), fall back to just stopping the response.
If --auto-exit was not provided, remain in the interactive session.
| Error | Action |
|---|---|
| No track ID provided | Display usage, HALT |
| Track not found | List available tracks from primary branch, HALT |
| Track already complete | Notify, HALT |
| Track already claimed | Show claiming worker/branch, HALT |
| Track missing spec/plan | Suggest regeneration, HALT |
| Kiloforge not initialized | Suggest /kf-setup, HALT |
| Verification failure | Report details, offer fix/retry/wait |
| Branch lock held | Report (kf-merge-lock status), wait for other worker |
| Rebase conflict (state files) | Accept theirs, continue rebase, re-apply via CLI |
| Rebase conflict (source code) | Lock stays held — resolve conflicts, git add, git rebase --continue, then proceed with merge. Only release lock after merge or explicit abort. |
| Post-rebase verify failure | Release lock, report, offer fix/retry/abort |
| Merge not fast-forwardable | Release lock, offer re-rebase or abort |
| Flag | Effect |
|---|---|
| (none) | Default: implement, auto-merge (poll branch lock if held) |
--disable-auto-merge | Pause after implementation; wait for explicit "merge" command |
--auto-exit | Exit the session after completion (default: immediate) |
--auto-exit=30 | Wait 30 seconds after completion, then exit |
| Variable | Default | Description |
|---|---|---|
KF_ORCH_URL | http://localhost:4001 | Orchestrator URL for HTTP lock API |
The branch lock is managed by the shared ~/.kf/bin/kf-merge-lock.py helper, which supports dual-mode acquisition:
--auto-merge. Crash recovery via automatic TTL expiry.$(git rev-parse --git-common-dir)/merge.lock directory. PID-based stale detection with auto-cleanup.Detection is automatic. Run kf-merge-lock status to inspect current lock state.
${PRIMARY_BRANCH} from claim output — NEVER hardcode main or master. For read-only commands (list, get, spec), prefer --ref ${PRIMARY_BRANCH} when running in a worktree. The scripts auto-resolve the correct ref when on the primary branch.--disable-auto-merge is providedworker-* branch after mergerm -rf the lock directory or force-release HTTP locks held by others.