defprod-change-code

Implements change-scoped code following linked user story acceptance criteria and repo conventions.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/defprod1/defprod-skills --skill defprod-change-code-defprod1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defprod-change-code
Source: https://github.com/defprod1/defprod-skills/tree/main/skills/defprod-change-code
Command: npx skills add https://github.com/defprod1/defprod-skills --skill defprod-change-code-defprod1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Implementing a product change without a clear contract leads to scope creep, missed acceptance criteria, and story statuses that drift out of sync with actual work. This Skill grounds the coding stage in the change's linked user stories or traced bug root cause, keeping implementation aligned with the definition. ## Core Features & Use Cases - Change context resolution: Detects the active change from .defprod/change, branch names, or commit trailers, validates it is live, and stamps stage start/finish via the DefProd MCP server. - Story status management: Advances linked user stories from backlog/ready to inProgress using RFC 6902 patches, never regressing stories already further along. - Autonomous and interactive modes: Runs end-to-end with documented defaults in autonomous mode, or pauses for human approval at decision points in interactive mode. - Use Case: A developer on branch chg/checkout/CHG-12-add-discount-codes invokes the skill; it loads the linked stories' acceptance criteria, marks them in progress, implements the discount logic following repo conventions, and verifies the project compiles before finishing the stage. ## Quick Start Ask your AI agent to run the defprod-change-code skill to implement the current change within the scope of its linked user stories.

Frequently Asked Questions about defprod-change-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a DefProd change with an AI coding agent?

Invoke the defprod-change-code skill in a repo connected to the DefProd MCP server. It loads the change's linked user stories and acceptance criteria, marks them in progress, implements the code following repo conventions, and runs the compile check before finishing the stage.

How does the skill know which change I am working on?

It resolves context in precedence order: the .defprod/change JSON file in the worktree root, a branch named chg/<slug>/CHG-NN-*, or a Change trailer on the HEAD commit. It validates the change is still active and ignores stale carriers from shipped or cancelled changes.

Does defprod-change-code work without the defprod-change orchestrator?

Yes, it works standalone. Without an orchestrator-provided mode it defaults to interactive mode, asking questions at decision points and presenting results for approval before calling finishChangeStage. With no change context it proceeds silently without stamping.

What happens to user story statuses during the code stage?

Stories in backlog or ready status are advanced to inProgress via patchUserStory with an RFC 6902 patch array. Stories already in review, testing, or completed are left untouched, since the stage only owns the forward transition into inProgress.

Why did my story status update fail during the code stage?

The patchUserStory call requires an RFC 6902 patch array, not a plain field object like { status }. A failed write does not fail the stage; the skill reports the failure and continues with implementation.