Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

code-production-process

FreeNo executable scriptsNot checked

Six-stage quality-gate pipeline for any code implementation task

bobmatnycby bobmatnyc★ 79 GitHub stars

About this skill

Code Production Process

Overview

This skill implements a six-stage quality-gate pipeline that every non-trivial code implementation task must pass through before being declared complete. The pipeline exists because the repository owner cannot visually assess code quality — all quality assurance must therefore be enforced by automated gates inside the agent pipeline itself, not by human review after the fact. Each stage produces a concrete artifact and must clear a defined gate before the next stage may begin. No stage may be skipped on the standard path. The critic agent operates with full context isolation to prevent anchoring bias from the implementer's own framing. A deliberately adversarial review catches issues that a cooperative pass-through would miss.

Trigger Conditions

This skill loads when any of the following conditions are true:

Explicit triggers (pre-dispatch):

  • PM is about to dispatch an engineer agent for a task that will produce >50 lines of source code
  • PM is about to dispatch an engineer agent for a task that will touch >1 source file
  • Task description contains implementation verbs: "implement", "write", "build", "create", "refactor", "add feature", "fix bug in [module]"

Post-dispatch detection:

  • Engineer agent returns and git diff --stat shows source file changes (.py, .ts, .js, .go, .rs, .java, .rb, .sh with logic) regardless of stated task scope
  • Engineer agent produces new files under src/, lib/, app/, services/, api/ directories

Explicit exclusions — do NOT trigger this pipeline for:

  • Documentation edits (.md, .rst, .txt, .html content-only)
  • Commit messages, PR descriptions, changelogs
  • Config-only changes (*.yaml, *.toml, *.json, *.env with no code logic)
  • Single-line fixes with scope verified to be <5 lines
  • Dependency version bumps with no code changes

When in doubt: err toward triggering the pipeline. A false positive costs one critic dispatch. A false negative ships broken or insecure code.

The 6-Stage Pipeline

Each stage has a defined agent, required output artifact, and a gate condition. The gate condition must be satisfied before proceeding. Failing a gate returns to the current stage, not to stage 1, unless the failure indicates a fundamental misunderstanding of requirements.

Stage 1: Research

Agent: research

Tools: mcp__vector-indexer-mcp__search_hybrid, mcp__knowledge__kb_search, mcp__knowledge__search_local

What the agent does:

  • Searches the existing codebase for similar implementations that can be reused or extended
  • Identifies existing abstractions, patterns, and conventions the implementation must follow
  • Locates relevant KB entries covering architecture decisions, data models, API contracts
  • Enumerates external dependencies and their established usage patterns in the codebase

Required output artifact: A written spec document (markdown) covering:

  • What exists already (cite file paths and function names)
  • What must be built new
  • Which existing patterns the implementation must follow
  • Input/output contracts the new code must satisfy
  • Known edge cases from existing usage

Gate: Spec document exists and names at least one existing codebase reference. Research agent MUST NOT produce implementation code. If no relevant existing code exists, the output explicitly states "no prior implementation found" — this is a valid research finding, not a failure.

See: references/stage-research.md for prompt templates and search strategy.


Stage 2: Architect

Agent: python-engineer (in design mode — no implementation code produced)

Skills loaded: software-patterns

What the agent does:

  • Reads the Stage 1 spec document
  • Designs the public interface: class signatures, function signatures, data models, type annotations
  • Specifies abstract base classes (ABCs) or Protocol classes where polymorphism is needed
  • Documents invariants and preconditions for each public method
  • Notes which external dependencies will be used and how

Required output artifact: An interface specification document containing:

  • All public class/function signatures with full type annotations
  • ABC or Protocol definitions (no method bodies — only ... or pass)
  • Data model schemas (Pydantic models, dataclasses, TypedDicts — no logic)
  • Error types that will be raised and their hierarchy
  • A one-paragraph statement of what the implementation will NOT do

Gate: Interface document exists. Zero implementation code (no function bodies with logic, no algorithm steps, no I/O calls). The architect produces the contract; the engineer fills it.

Important: The code-critic agent may optionally be dispatched here to review the interface design for API coherence before implementation begins. This is the Phase 2 design critic pass. If dispatched, critic input is the interface document only — no code exists yet.

See: `references/stage-archi

Full SKILL.md on GitHub

Install code-production-process in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

metadata.jsonreferences/critic-isolation.mdreferences/skip-rules.mdreferences/stage-architect.mdreferences/stage-critic.mdreferences/stage-implement.mdreferences/stage-research.mdreferences/stage-security.mdreferences/stage-tests.md

FAQ

What does the code-production-process skill do?

Six-stage quality-gate pipeline for any code implementation task

How do I install the code-production-process skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the code-production-process skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare code-production-process with