Install
$ agentstack add skill-conn-castle-agent-layer-implement-plan ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
implement-plan
Implement a plan without freelancing. This skill expects three artifacts:
- a plan file
- a task file
- a context file (orientation for a cold start)
If they are not supplied explicitly, discover the latest matching set under .agent-layer/tmp/.
Use plan-work instead when no plan exists and the artifact set must be written first. Use verify-against-plan instead when the request is to report completeness without making changes.
Defaults
- Do not start coding until you have a plan and task file, or clear user approval to infer a missing artifact.
- Default scope is exactly what the plan and task list describe.
- If the plan is ambiguous in a way that changes code behavior or scope, treat that as a blocker instead of guessing.
- If the context file is missing, proceed with just the plan and task but note its absence in the final handoff.
Artifact discovery
Use the standard artifact naming rule under .agent-layer/tmp/:
..plan.md..task.md..context.md
Discovery rules:
- List
.agent-layer/tmp/*.plan.md,.agent-layer/tmp/*.task.md, and.agent-layer/tmp/*.context.md. - Keep only files matching the standard naming rule with a valid
run-id. - Build candidate sets when both
.plan.mdand.task.mdexist for the exact same `and. A matching.context.md` is expected but not required. - Select the set with the latest
run-idin lexicographic order. - If the user meant an older or different set, require explicit paths instead of guessing.
Fallback:
- If no valid plan/task pair exists, ask the user for explicit paths or regenerate them first.
Required artifact
Write an execution report to:
.agent-layer/tmp/implement-plan..report.md
Use run-id = YYYYMMDD-HHMMSS-. Create the file with touch before writing.
Multi-agent pattern
Recommended roles:
Context scout: maps plan steps to actual files and dependencies.Execution gatekeeper: decides whether the current task batch shouldproceed,revise,escalate, orrewrite-because-out-of-scope.Implementer: owns a focused subset of the changes.Burden-of-proof reviewer: delegated to aprune-new-testssubagent — prunes speculative tests added during implementation.Smell-pattern reviewer: delegated to asimplify-new-codesubagent — undoes agent-side scope creep introduced during implementation.Verifier: runs commands and checks behavior against the plan.
For multi-file work, parallelize read-only exploration first, then implement in reviewable batches.
Continuation rule
Sub-skill returns are intermediate, not terminal. After every delegation, continue to the next numbered phase in the same turn — the sub-skill's closing summary is not implement-plan's closeout. The workflow exits only at the end of Phase 6, a listed human checkpoint, or a sub-skill that halts on its own human checkpoint without applying its changes.
Context Discipline
You are the orchestrator. Do not do the child/subagent work yourself. Your job is to preserve your context to make strategic decisions, ensure each child skill or subagent follows its assigned contract, reconcile their outputs, enforce this workflow's gates, and continue the parent workflow after every child return.
When compaction is needed, retain this section verbatim and also preserve: current phase, active artifact paths, selected scope, pending gate verdict, child skills/subagents already run, their outcomes, unresolved blockers, and the next exact step.
Global constraints
- Treat the plan/task pair as the execution contract and the context file as the orientation guide.
- Do not start coding without a valid plan/task pair or explicit user approval to infer a missing artifact.
- Keep changes tightly scoped to the plan after the gatekeeper returns
proceed. - Tests, docs, and memory updates are part of implementation when the plan requires them.
- If new evidence invalidates part of the plan, jump back to the earliest affected task or planning assumption instead of pushing forward.
- Treat readiness gating as an internal execution decision, not as a reason to ask the user unless a human checkpoint is actually triggered.
Human checkpoints
- Required: ask when the plan/task pair is missing, mismatched, or non-latest and the intended set is unclear.
- Required: ask when implementation would materially deviate from the plan or change behavior the plan did not settle.
- Required: ask before destructive or irreversible actions that are not explicitly covered by the plan.
- Stay autonomous while executing a clear gated plan.
Implementation workflow
Phase 1: Preflight (Context scout)
- Load the context file first (if it exists). Read it fully to orient on:
- the key files and their roles
- the current state of the code before changes
- constraints and dependencies
- the recommended entry point
- Load the plan and task artifacts.
- Confirm all artifacts match:
- same objective
- same scope
- compatible task ordering
- context file key files align with the plan's scope
- Read project standards and verification commands as needed:
README.mdROADMAP.mdandDECISIONS.mdwhen the work is architecturalCOMMANDS.mdbefore choosing validation commands
- Read the entry point file(s) identified in the context file, then any additional code and docs needed to execute the first task batch.
- The execution gatekeeper then chooses exactly one verdict:
proceed: the current batch is ready to implement as writtenrevise: the plan or task list needs updates firstescalate: a human checkpoint is actually requiredrewrite-because-out-of-scope: the current batch should be rewritten to an equivalent in-scope slice before coding
If the verdict is proceed, continue to Phase 2. If the verdict is revise, update or regenerate the plan/task pair and restart Phase 1. If the verdict is escalate, ask the smallest question that unblocks trustworthy execution. If the verdict is rewrite-because-out-of-scope, rewrite the current task batch or task ordering to stay inside the plan's real scope, record the rewrite in the report, and restart Phase 1.
Phase 2: Execute the task list (Implementer)
Execution rules:
- work in task order unless a dependency forces reordering
- keep diffs explainable and localized
- update or add tests as part of the same change
- update docs when behavior or workflow changed
- update project memory files when the change materially affects roadmap, decisions, issues, backlog, or repeatable commands
When a task becomes larger than expected:
- split it
- note the split in the report
- continue only if scope still matches the plan
Phase 3: Track deviations (Implementer)
If you must deviate from the plan:
- document the deviation in the report
- explain why
- note whether the change is:
- equivalent
- narrower
- broader
If the deviation broadens scope materially, hand it back to the execution gatekeeper instead of freelancing.
Phase 4: Prune speculative tests (Burden-of-proof reviewer)
Delegate to a prune-new-tests subagent. Mandatory whenever Phase 2 added or modified test files. Returns master report path plus deleted-count / surviving-gap count.
Record the report path under ## Remaining Follow-up if surviving coverage gaps warrant a separate boost-coverage pass.
Phase 5: Simplify agent-added code (Smell-pattern reviewer)
Delegate to a simplify-new-code subagent. Mandatory whenever Phase 2 produced production-code changes. Returns master report path plus applied-count / reverted-count.
If simplifications change the diff materially, verification commands in Phase 6 must run against the post-simplification working tree.
Phase 6: Verify against the plan (Verifier)
Before wrapping up, confirm:
- every planned end-user-visible or maintainer-visible outcome exists
- every required test/doc/memory update was handled
- verification commands were actually run
- no major task list item was skipped silently
When no broader orchestrator already owns closeout, use the finish-task skill after Phase 6. If it finds stale memory, incomplete plan work, or missing verification, jump back to the earliest affected phase.
Execution report format
Write .agent-layer/tmp/implement-plan..report.md with only these sections:
## Deviations
- Each deviation tagged
equivalent,narrower, orbroader, with a one-line reason. - Include task splits and any
rewrite-because-out-of-scoperewrites here. - Use
Nonewhen no deviations occurred.
## Remaining Follow-up
- Plan items skipped, tests/docs/memory updates deferred, missing context file, and any other open threads, each with a reason.
- Use
Nonewhen nothing is outstanding.
Keep the report short. Do not re-narrate work that is already visible in the diff.
Guardrails
- Do not treat the plan as inspiration. Treat it as the execution contract.
- Do not skip tests because they are inconvenient.
- Do not leave docs or memory stale when the plan called for updates.
- Do not claim verification without observed command output.
- Do not expand into unrelated cleanup just because you noticed it.
Definition of done
- Every planned task-list item is either marked complete (with observable code/test/doc evidence) or recorded as a named deviation in the report.
- Tests, docs, and memory updates promised by the plan were delivered in the same run; any skipped updates are listed in the report's
Remaining Follow-upwith reasons. prune-new-testsran when Phase 2 added or modified test files; any surviving coverage gaps it surfaced are captured under## Remaining Follow-up.simplify-new-coderan when Phase 2 produced production-code changes; verification in Phase 6 ran against the post-simplification working tree.- Verification commands from the plan ran and their observed output is recorded — no "should pass" claims without execution.
Final handoff
After execution:
- Echo the report path.
- Summarize completed work, including plan/task/context paths used.
- Name any deviations, task splits, or missing context file.
- State whether the plan appears complete or whether follow-up remains.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: conn-castle
- Source: conn-castle/agent-layer
- License: MIT
- Homepage: https://agent-layer.dev/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.