Ctx implement

From ActiveMemory/ctx · View interactive version

Ctx implement is an AI agent skill from the GitHub repository ActiveMemory/ctx. Execute a plan step-by-step with verification. Use when you have a plan document — canonically specs/plans/<milestone>.md from /ctx-task-out — and need disciplined, checkpointed implementation.

How to use this skill

Skill file

Take a plan — canonically specs/plans/<milestone>.md as written

by /ctx-task-out, though inline text, another file path, or a

plan from the conversation also work — and execute it

step-by-step with build/test verification between steps.

When to Use

specs/plans/<milestone>.md (the canonical input)

"implement this"

execution

at each step

When NOT to Use

suggest /ctx-task-out --spec <path> --milestone <first>

first; decomposing on the fly is what it exists to prevent

first to refine it

Usage Examples

/ctx-implement
/ctx-implement specs/plans/m0a.md
/ctx-implement path/to/plan.md
/ctx-implement (the plan from our discussion above)

Process

1. Load the plan

task breakdown, no acceptance criteria, spans milestones),

redirect: suggest `/ctx-task-out --spec <path> --milestone

<first>` and stop rather than improvising a decomposition

deferrable TBD graduated to blocking mid-milestone. Route its

resolution (a spec edit or DECISIONS.md entry) and a

/ctx-task-out amendment run before executing further tasks

recent plan or approved design

2. Break into steps

Parse the plan into discrete, checkable steps. Each step

should be:

test after implement)

Present the step list to the user for confirmation:

Implementation plan (N steps):

1. [Step description] - verify: [check]

2. [Step description] - verify: [check]

3. ...

Ready to start?

3. Execute step-by-step

For each step:

  1. Announce what you're doing (one line)
  2. Think through the change before writing code: what does

it touch, what could break, what's the simplest correct path?

  1. Implement the change
  2. Verify with the appropriate check:

verbatim (in addition to the map below)

  1. Report step result: pass or fail
  2. If failed: stop, diagnose, fix, re-verify before

moving to the next step

Verify after every individual step before proceeding to the next.

4. Checkpoint progress

After every 3-5 steps (or after a significant milestone):

ledger (see Ledger Duties below)

5. Wrap up

After all steps complete:

CGO_ENABLED=0 go build && go test ./...)

Ledger Duties (plans from /ctx-task-out)

A task-out plan is the execution ledger — the only record of

milestone progress. Executing one carries four bookkeeping duties:

when its acceptance criterion has demonstrably passed — the

command ran, the test is green, the behavior was observed.

Tasks obsoleted by amendment become [o]. st never moves

backwards silently; a regression is a deviation to report.

confirmed by measurement or by the user — never checked because

the tasks that "cover" them are done. The rolling-wave gate

reads DoD only; deriving it from task completion defeats the

gate.

task-id ranges (Plan: specs/plans/<milestone>.md (Txx–Tyy)).

When every task in a range is [x] or [o], mark that epic

[x]. Sync is one-way, plan → TASKS.md; never track task

state in TASKS.md directly.

criterion in place; a criterion change goes back through

/ctx-task-out (amendment mode). When a measurement gate

fires (Risks & measurement gates), stop and route the outcome

through an amendment before executing dependent tasks.

Step Verification Map

| Change type | Verification command |

|--------------------|---------------------------------------------------|

| Go source code | CGO_ENABLED=0 go build -o /dev/null ./cmd/ctx |

| Test files | CGO_ENABLED=0 go test ./... |

| Templates/embeds | CGO_ENABLED=0 go build -o /dev/null ./cmd/ctx |

| Makefile | Run the new/changed target |

| Skill files | Build (to verify embed) + check live copy matches |

| Docs/Markdown only | None required |

| Shell scripts | bash -n script.sh (syntax check) |

Handling Failures

When a step fails verification:

  1. Don't panic: read the error output carefully
  2. Reason through the failure step-by-step before attempting

a fix; understand the cause, not just the symptom

  1. Fix the issue in the current step
  2. Re-verify the fix
  3. Only then move to the next step
  4. If the fix changes the plan, note the deviation

If a step fails repeatedly (3+ attempts), stop and ask the

user for guidance rather than thrashing.

Output Format

Progress updates should be concise:

Step 1/6: Create ctx-next skill directory .......... OK
Step 2/6: Write SKILL.md template .................. OK
Step 3/6: Copy to live skill directory ............. OK
Step 4/6: Build to verify template embeds .......... OK
Step 5/6: Run tests ................................ OK
Step 6/6: Mark task in TASKS.md .................... OK

All 6 steps complete. Build and tests pass.

Examples

Good Implementation

Step 3/8: Add check target to Makefile

Added check: build audit after the audit target.

Verify: make check ... build OK, audit OK.

Result: PASS

Bad Implementation

"I'll implement the whole plan now"

[makes all changes at once without verification]

"Done! Everything should work."

(No step-by-step, no verification, no checkpoints: this

defeats the purpose of the skill.)

Quality Checklist

Before starting, verify:

During execution, verify:

acceptance; epics projected to TASKS.md when their range

completes; DoD boxes left to measurement or the user

After completion, verify:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.