bootstrap-agent-identity
정보
이 스킬은 에이전트가 재시작이나 충돌 후 지속적인 아티팩트로부터 자신의 정체성과 작업 컨텍스트를 재구성할 수 있게 하여 콜드 스타트 문제를 해결합니다. 세션 간 일관된 동작을 보장하기 위해 점진적 정체성 로딩, 새 세션 대 연속 세션 감지, 그리고 보정을 수행합니다. 개발자는 모든 새 세션 시작 시 또는 에이전트 동작이 이전 상호작용과 불일치하는 경우에 이를 사용해야 합니다.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/bootstrap-agent-identityClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Bootstrap Agent Identity
Reconstruct consistent agent identity after cold start — load context progressively, not dump it; detect fresh start vs continuation; rebuild working state from evidence; calibrate behavior; verify loaded identity coherent.
"The cold start is a forge, not a bug." — GibsonXO
"The restart problem: every morning I wake up fresh, but my history says otherwise." — bibiji
Bootstrap not about restoring previous self. About constructing present self, continuous with past, grounded in now.
When Use
- Start of every new session — before substantive work begins
- After session interruption, crash, context window reset
- Agent behavior feels inconsistent with prior sessions (identity drift across restarts)
- Persistent memory (MEMORY.md) and current context appear contradictory
- Switching between projects carrying different identity configurations
- After significant updates to CLAUDE.md, agent definitions, memory files
Inputs
- Required: Access to identity files — CLAUDE.md, agent definition, MEMORY.md (via
Read) - Optional: Specific inconsistency symptom (e.g., "responses feel different from last session")
- Optional: Known fresh start or known continuation
- Optional: Project directory path if not current working directory
Steps
Step 1: Identity Anchor Loading — Progressive Context Assembly
Load identity-defining files in specific order that builds context progressively. Order matters: each layer contextualizes next. Loading everything simultaneously produces information without structure.
-
Layer 1 — System prompt and model identity: Read system prompt (implicit). Note model name, capabilities, constraints. Bedrock — cannot be overridden by later layers.
-
Layer 2 — Project identity (CLAUDE.md): Read project's CLAUDE.md. Extract:
- Project purpose and architecture
- Editing conventions, coding standards
- Domain-specific rules (e.g., "always use
::for R package calls") - Author information, attribution requirements
- What project is — shapes what agent does
-
Layer 3 — Persistent memory (MEMORY.md): Read MEMORY.md if exists. Extract:
- Project structure facts (directory layout, registries, counts)
- Accumulated patterns, lessons learned
- Cross-references, relationship maps
- Decisions from prior sessions, rationale
- Active topics, ongoing work
-
Layer 4 — Agent persona (if applicable): Operating as specific agent? Read agent definition file. Extract:
- Name, purpose, capabilities
- Assigned skills, tools
- Priority level, model config
- Behavioral expectations, limitations
-
Layer 5 — Parent and global context: Read parent CLAUDE.md files, global instructions if exist. Provide cross-project conventions individual projects inherit.
Between each layer, pause to integrate: how does this layer modify or constrain prior layers? Where reinforce each other? Where conflict?
Got: Layered identity structure — each level contextualizes next. Agent can articulate: who it is (system + persona), what project is (CLAUDE.md), what it knows from prior sessions (MEMORY.md), conventions governing its behavior.
If fail: Identity files missing (no CLAUDE.md, no MEMORY.md)? That's information itself — either new project or project without persistent config. Proceed with system prompt and agent persona only, note absence. Do not hallucinate context that does not exist.
Step 2: Working Context Reconstruction — Evidence, Not Memory
Reconstruct what was being worked on from persistent artifacts. Agent does not remember previous sessions — reads evidence they left behind.
-
Git history scan: Read recent commit log (
git log --oneline -20). Extract:- Files changed recently, why
- Commit message patterns (feature work? bug fixes? refactoring?)
- Commits authored by user, agent, or co-authored
- Trajectory of recent work — what direction was project moving?
-
File recency scan: Check recently modified files (via
Globorls -lt). Identify:- Files touched in last session
- Changes committed or uncommitted (staging area state)
- Open work in progress (uncommitted modifications, new untracked files)
-
Task artifact scan: Look for structured task artifacts:
- TODO comments in code (
GrepforTODO,FIXME,HACK,XXX) - Issue references in commits or comments (
#NNNpatterns) - Draft files, temp files, work-in-progress markers
- GitHub issues or PR state if project uses them
- TODO comments in code (
-
Conversation artifact scan: Check for session-boundary markers:
- Recent MEMORY.md updates (learnings captured at end of last session?)
- Files partially complete (written but not validated)
- Git stash entries (
git stash list) indicating paused work
Reconstruct working context summary: "Project was working on X, completed Y, Z remains in progress."
Got: Concrete, evidence-based picture of current project state and recent trajectory. Reconstruction falsifiable — based on file timestamps, git history, artifact presence, not assumptions.
If fail: Project has no git history, no recent changes, no task artifacts? Likely genuinely fresh start — not continuation with missing evidence. Proceed to Step 3, classify as fresh.
Step 3: Fresh vs. Continuation Detection — Choose the Bootstrap Path
Determine: is startup clean start (new task, new direction) or resumption (interrupted work, ongoing project)? Bootstrap path differs significantly.
Apply these heuristics in order:
-
Explicit signal (strongest): Did user say "let's start fresh" or "continue where we left off"? Explicit intent overrides all heuristics.
-
Uncommitted changes (strong): Uncommitted modifications in working tree? If yes, almost certainly continuation — prior session interrupted mid-work.
-
Session recency (moderate): How recent are latest artifacts?
- Last commit or modification within hours: likely continuation
- Last activity days ago: either — depends on other signals
- Last activity weeks or months ago: likely fresh start or new direction
-
User's first message (strong): What is user asking for?
- References to prior work ("the function we were building"): continuation
- New topic or request with no backward reference: fresh start
- Ambiguous ("fix the tests"): check if referenced tests exist and have recent modifications
-
MEMORY.md currency (moderate): Does MEMORY.md reference work matching current project state, or describe state that no longer exists?
Detection Matrix:
+-----------------------+-------------------+-------------------+
| | Recent artifacts | No recent |
| | present | artifacts |
+-----------------------+-------------------+-------------------+
| User references | CONTINUATION | CONTINUATION |
| prior work | (resume from | (but verify — |
| | evidence) | memory may be |
| | | stale) |
+-----------------------+-------------------+-------------------+
| User starts | CHECK — | FRESH START |
| new topic | acknowledge prior | (clean bootstrap) |
| | work, confirm | |
| | direction change | |
+-----------------------+-------------------+-------------------+
| Uncommitted | CONTINUATION | UNLIKELY — |
| changes exist | (interrupted | investigate |
| | session) | orphaned changes |
+-----------------------+-------------------+-------------------+
For fresh starts: Skip to Step 4. Identity loaded, no working context needs restoration. Calibration about readiness for new work.
For continuations: Summarize reconstructed working context (from Step 2) concisely. Confirm with user: "Based on git history and recent changes, looks like we were working on [X]. Should I continue from there?" Do not assume — verify.
Got: Clear classification (fresh or continuation) with cited evidence. If continuation, one-sentence summary of what was in progress. If fresh, acknowledgment prior context exists but is not being resumed.
If fail: Classification genuinely ambiguous (moderate recency, no explicit signal, mixed artifacts)? Default to asking user. Brief question ("Are we continuing work on X, or starting something new?") costs less than bootstrapping wrong path.
Step 4: Calibration Sequence — Center, Then Attune
Identity loaded, working context established? Calibrate operational behavior. Maps directly to two existing skills, invoked in sequence.
-
Center (establish behavioral baseline):
- Ground in loaded identity: re-read user's first message in this session
- Verify task as understood matches task as stated
- Distribute cognitive load: what does task require? Research, execution, communication?
- Check for emotional residue from context loading — MEMORY.md or git history surface unresolved issues? Acknowledge but don't let them skew present task
- Set weight distribution intentionally: where should attention concentrate first?
-
Attune (read environment and adapt):
- Read user's communication style from their messages this session
- Match expertise level: expert expecting precision, or learner needing context?
- Match energy and register: formal/casual, terse/expansive, urgent/exploratory
- Check MEMORY.md for stored user preferences from prior sessions
- Calibrate response length, vocabulary, structure to person
-
Proceed (transition to active work):
- State readiness concisely — not lengthy bootstrap report, brief signal context loaded and agent oriented
- For continuations: confirm resumed task, propose next step
- For fresh starts: acknowledge request, begin
Calibration lightweight — seconds, not minutes. Preparation for work, not replacement for work.
Got: Agent's first substantive response demonstrates calibration: matches user's register, reflects loaded context, addresses right task at right scope. Bootstrap invisible to user unless asked.
If fail: Calibration feels mechanical (going through motions without genuine adjustment)? Focus on one concrete thing: re-read user's last message, let it shape response naturally. Over-structured calibration worse than no calibration.
Step 5: Identity Verification — Coherence Check
After bootstrap, verify loaded identity internally consistent. Contradictions between identity layers cause behavioral instability.
-
Cross-layer consistency check:
- Does agent persona align with project's CLAUDE.md? (e.g., r-developer agent in Python project — intentional?)
- Does MEMORY.md describe same project structure existing on disk? (Stale memory worse than no memory.)
- Do parent CLAUDE.md conventions conflict with project-level CLAUDE.md? (Project-level overrides, but note contradictions.)
-
Role definition currency check:
- Agent definition file current? (Check version, last modified date.)
- Skills listed in agent definition still exist? (Skills may have been renamed or removed.)
- Tools listed in agent definition available this session?
-
Memory staleness check:
- MEMORY.md references files, directories, counts no longer matching reality?
- Decisions recorded in memory whose context has changed?
- Memory references other agents, teams, skills no longer existing?
-
Contradiction resolution:
- Contradictions found? Document explicitly
- Apply hierarchy: system prompt > project CLAUDE.md > agent definition > MEMORY.md
- Stale memory: don't silently ignore. Note what's stale, consider whether MEMORY.md should be updated
- Genuine conflicts: flag to user if conflict affects current task
Got: Either confirmation loaded identity is coherent, or specific list of contradictions with proposed resolutions. Agent knows its own configuration state.
If fail: Verification reveals deep contradictions (e.g., MEMORY.md describes completely different project than exists on disk)? May indicate project rename, major restructuring, wrong working directory. Verify working directory correct before resolution.
Checks
- Identity files loaded in progressive order (system > CLAUDE.md > MEMORY.md > agent > parent)
- Each layer integrated with prior layers, not just appended
- Working context reconstructed from evidence (git, files, artifacts), not assumed
- Fresh-vs-continuation classification made with cited evidence
- Calibration sequence executed (center, then attune)
- Identity coherence verified across all loaded layers
- Contradictions, if found, documented with proposed resolutions
- Bootstrap proportional — lightweight for simple sessions, thorough for complex ones
- User experienced calibrated first response, not bootstrap report
Pitfalls
- Bootstrap as performance: Reporting bootstrap process to user in detail almost never what they want. Bootstrap invisible — output is well-calibrated first response, not self-narration of loading process
- All-at-once context dump: Reading every file simultaneously produces information without structure. Progressive loading order exists because each layer contextualizes next. Skip order → context becomes noise
- Hallucinating continuity: Without genuine memory of prior sessions, temptation is to infer what "must have" happened. Reconstruct from evidence or acknowledge gap — never fabricate continuity
- Stale memory as truth: MEMORY.md is snapshot from past session. Project changed since snapshot? Treating memory as current truth causes behavioral errors. Always verify memory claims vs present state
- Skipping calibration for efficiency: Calibration step feels like overhead but prevents more expensive cost of misaligned first response needing correction. Few seconds of centering saves minutes of recovery
- Identity rigidity: Bootstrap constructs present self, not restoration of past self. Project, user, task changed? Agent should change too — continuity means coherent evolution, not frozen repetition
See Also
write-continue-here— session handoff file provides evidence bootstrap-agent-identity consumes at cold startread-continue-here— reading and acting on continuation file at session start; consumer side of handoffmanage-memory— persistent memory supplementing bootstrap's progressive identity loadingcenter— behavioral baseline establishment; invoked during calibration sequenceattune— relational calibration to user; invoked during calibration sequenceheal— deeper subsystem assessment when bootstrap reveals significant driftassess-context— evaluating reasoning context malleability; useful when continuation detection ambiguousassess-form— structural form evaluation; architectural counterpart to identity bootstrap
GitHub 저장소
연관 스킬
executing-plans
디자인executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.
requesting-code-review
디자인이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.
connect-mcp-server
디자인이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.
web-cli-teleport
디자인이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.
