KAGEMUX — AI CODING WORKFLOW PROMPT PACK Published November 11, 2026 Guide: https://kagemux.com/guides/ai-coding-workflow Use these templates to plan and review a focused change. Replace every bracketed field. Run tests in your own development environment and record actual results. This pack does not execute code, validate a patch or establish release readiness. 1. CONTEXT PACKET Project / purpose: Current revision or saved baseline: Language and actual runtime version: Module format / framework / relevant dependency versions: Existing test command and working directory: Current behavior: Desired behavior: Smallest reproducing input: Relevant helper, callers and existing tests: Constraints / behavior to preserve: Work outside scope: Open decisions: Before sharing, remove keys, tokens, passwords, private customer data and unrelated configuration. Review logs and screenshots too. Use labeled placeholders while preserving the code structure necessary to explain the problem. 2. PROMPT — ACCEPTANCE CRITERIA Read the request and supplied code. Restate the intended behavior as acceptance criteria, with inputs and expected outputs. Separate confirmed requirements, open decisions and work outside scope. Identify callers that could be affected. Do not implement yet or invent missing project details. REQUEST: [paste] RELEVANT CODE AND CALLERS: [paste] CONSTRAINTS: [paste] 3. PROMPT — FOCUSED CHANGE Propose the smallest patch that meets these approved acceptance criteria. First list the files and behavior you would change. Preserve existing project conventions and unrelated behavior. Explain the order of operations and error handling. Use existing dependencies. If essential context is missing, identify it before proposing code. CRITERIA: [paste] CONTEXT PACKET: [paste] 4. PROMPT — REVIEW Review this proposed diff against the approved contract and existing callers. For each issue, name the affected requirement, give a concrete failing input and explain the smallest correction. Separate confirmed defects from questions. Do not claim tests ran. Do not rewrite unrelated code. CONTRACT: [paste] DIFF AND CALLERS: [paste] 5. PROMPT — DIAGNOSE AN OBSERVED FAILURE Diagnose this observed failure using only the supplied contract, diff and test output. Distinguish an implementation defect from a test or environment issue. State your evidence and any uncertainty. Propose one focused correction and the check that would confirm it. Do not mark it fixed before a new result is provided. CONTRACT AND DIFF: [paste] COMMAND, ENVIRONMENT AND OUTPUT: [paste] 6. ACCEPTANCE CHECKLIST [ ] Each required behavior has an input/action and an expected result. [ ] Invalid inputs, boundaries and side effects have explicit decisions. [ ] Existing callers and exports remain compatible or have a reviewed change. [ ] The diff matches the scope; unrelated changes are removed or separately agreed. [ ] New dependencies and suggested commands have been reviewed. [ ] The baseline is recoverable. [ ] Secrets and private records are absent from shared context and test fixtures. [ ] Tests challenge the contract rather than copying the proposed implementation. [ ] Actual execution results are distinguished from predictions. [ ] Remaining gaps and release decisions are recorded. 7. TEST PLAN AND RESULTS RECORD Case ID: Requirement: Input or action: Expected result (write before evaluating the candidate): Actual command / working directory: Environment and revision: Observed output: Status: PASS / FAIL / NOT RUN / BLOCKED Reason if not run or blocked: Next action: Repeat for ordinary inputs, boundaries, invalid inputs, preserved caller data and relevant integration behavior. Keep a regression case for a confirmed defect. A generated test file is not a passing run. Missing execution evidence is NOT RUN or BLOCKED, never PASS. 8. FICTIONAL EXAMPLE — TAG NORMALIZATION This example is an instructional contract, not a claim about KageMux's code. normalizeTags accepts an array of strings; trims surrounding whitespace; lowercases text; discards blank results; removes duplicates after normalization; preserves first occurrence order; returns a new array without changing the original; and throws TypeError for a non-array or any non-string element. One invalid element rejects the entire call. Sorting and database changes are outside scope. Illustrative cases (expected outcomes, not execution receipts): [" Design ", "design", "CODE"] -> ["design", "code"] ["beta", "ALPHA", " Beta "] -> ["beta", "alpha"] ["", " ", "code"] -> ["code"] [] -> a new empty array "design", null, or ["design", 7] -> TypeError Original input values and order -> unchanged after the call Review questions: - Does duplicate detection use the normalized value? - Would String(value) silently admit an invalid element? - Are blanks removed without discarding legitimate nonempty labels? - Is the output order still the encounter order? - Does the caller handle the agreed error behavior? 9. CHANGE NOTE Problem: Behavior after the change: Files and exact revision / patch: Checks actually run, with results: Checks not run and why: Remaining limitations: Reviewer / release decision: Recovery reference: Keep this note with the project. Follow its normal review and release process.