/d3nexus:save-contextfrom d3nexus
Persists architectural decisions, active epic states, and programmer activity logs under fcntl.flock concurrency protection, emits role-bound handoff prompts, or completes and archives epic features into the permanent project ledger.
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Persists conversational decisions, active feature states, and programmer activity logs to disk so that work can be resumed seamlessly across account rotations or multi-agent sessions without context degradation.
Core principle: Document decisions and progress on disk as they happen.
Announce at start: "I'm using the save-context skill to persist project memory and state."
/finish).--state)Records an architectural or task status snapshot into .devtool/state/<epic_slug>.md ($\le 20$ lines) and refreshes .devtool/assistant_state.md:
# Portable across all repos and worktrees via `d3nexus resume-context` (or `python3 scripts/resume_context.py`)
d3nexus resume-context --state \
--epic <epic_slug> \
--decisions "<bullet list of key decisions>" \
--status "<current stage or task status>" \
--next "<immediate next step>" \
[--prompt "<custom note for next session>"]
--log)Appends a structured log entry to .devtool/logs/activity_<epic_slug>.log and updates .devtool/activity_stream.log:
python3 scripts/resume_context.py --log \
--epic <epic_slug> \
--task <task_id> \
--request "<summary of user request>" \
--action "<files modified and test results>" \
--note "<deviations, trade-offs, or None>"
--checkpoint <event>)Writes a structured checkpoint block into the per-epic heartbeat (.devtool/state/<epic_slug>.heartbeat.json), updates Next Immediate Step in .devtool/state/<epic_slug>.md, and appends a checkpoint event to events_<epic_slug>.jsonl, all under the same lock. Plain resume_context.py prints the latest checkpoint first, so a fresh session resumes from it:
python3 scripts/resume_context.py --checkpoint <event> --epic <epic_slug> [--next "<next step>"]
Events: gate2_tasks_locked (Role 2.1, right after Gate 2), subagent_returned (Role 2.2, after each summary contract and before the next dispatch), wave_merged (Role 2.2, after every wave merge), model_unavailable, turn_budget, low_quota_stop, quota_low. In low-quota mode (/d3nexus:dev-config low-quota on) the Orchestrator writes low_quota_stop, prints --emit-prompt implement, records --pending-decision, and stops.
--complete --checkpoint)Saves in-flight state and logs without archiving the epic or adding milestones to the permanent ledger:
save-context --checkpoint <epic_slug> "<checkpoint note / next immediate goal>"
--emit-prompt)Generates a ready-to-copy handoff prompt locking the target agent into the appropriate persona:
python3 scripts/resume_context.py --emit-prompt <mode> --epic <epic_slug> [--epic-dir <dir>] [--prompt "<custom_note>"]
Supported modes:
principal-review: Emits Role 2.1 AI Architect & Reviewer prompt for Stage 2 Principal Review (principal-reviser runs inline or as a same-model Role 2.1 subagent).implement: Emits Role 2.2 Orchestrator prompt for /dev-implementation (Stage 3; names the persona and its resolved model and effort; dispatches Role 2.1 and Role 2.3 subagents).cross-review: Emits Role 2.2 Orchestrator prompt for Cross-Model Review (Gate 4 PASS; dispatches Role 2.1 fix-planner and Role 2.3 fixers/verifier).finish: Emits Role 2.2 Orchestrator prompt for /finish (Stage 4; dispatches Role 2.3 for rebase/verify-tier if needed).assistant: Emits Role 2.1 AI Architect & Reviewer prompt for general architectural discussions.brief (--brief-role <task-implementer|task-reviewer|fix-planner|review-fixer|gate4-verifier>): Emits the subagent brief with its persona (Role 2.1 for task-reviewer and fix-planner, Role 2.3 otherwise) and summary JSON contract.--complete)Executed in /finish (Stage 4 Pre-Finish Hook) when an entire epic is complete:
python3 scripts/resume_context.py --complete <epic_slug> "<milestone summary>"
.devtool/PROJECT_LEDGER.md:
- **[YYYY-MM-DD] \<epic_slug>`**: `.devtool/state/<epic_slug>.md and .devtool/logs/activity_<epic_slug>.log into .devtool/archive/..devtool/assistant_state.md and .devtool/activity_stream.log from remaining active epics.<ICON> [<REPO>] [@<account_id>] <Vietnamese Epic Name> - Completed & Archived.--gate / --check-gate)Records or queries formal Gate approvals (Gate 1–5) in .devtool/GATE_LEDGER.md (permanent, tracked) and .devtool/state/gate_ledger.jsonl (ephemeral):
# Record Gate approval
python3 scripts/resume_context.py --gate <1..5> \
--epic <epic_slug> \
--approved "<approved scope summary>" \
[--deviations "<approved deviations or None>"] \
[--by "<author or AI persona>"]
# Query Gate approval
python3 scripts/resume_context.py --check-gate <1..5> --epic <epic_slug>
All writes acquire an exclusive POSIX advisory lock via fcntl.flock on .devtool/.memory.lock. This guarantees that concurrent AI agents running in parallel across multiple epics or repositories do not interleave or corrupt disk state.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job