Workflow Commit

Skill name: workflow-commit

Commit local software changes safely. Use when the user asks to commit, finalize a workflow boundary, prepare a clean git commit, inspect staged/unstaged changes, avoid unrelated user changes, enforce protected branch rules, or generate a commit message from verified work.


Never include unrelated user changes. Verify branch protection rules. For specced work, ensure workflow docs and verification evidence are current before committing.

Embedded Instructions

Software Development Workflow

This is the canonical, tool-agnostic workflow for software development. Agent adapters such as Claude Code slash commands and Codex skills should point here rather than duplicating the policy.

Visual overview: WORKFLOW.mermaid

Version Control

Feature Folder

Every specced feature uses one canonical cumulative feature folder:

docs/issues/{featureId}/

Resolve the feature ID and participating repository from WORKSPACE-CONTEXT.md. In configured workspaces, the stable feature ID is independent of the fresh delivery branch used by each sequential PR. Without .agentic-workflow.json, legacy work continues to use the current branch as featureId.

The folder contains:

FilePurposeMutability
interview.mdGrill Me interview record; captures settled answers, examples, rationale, and open questions before design synthesisLive during design interview
design.mdProblem, intent, and chosen shape; synthesized from the grill interviewFrozen at design gate; amendable with changelog
spec.mdRequirements: acceptance criteria and rubricAmendable with changelog
plan.mdImplementation strategy, steps mapped to rubricEvolves deliberately
issues.mdOperational task breakdown, estimates, statusFluid, appended during work
tracker.mdRubric status and PR logUpdated at PR boundaries
scratchpad.mdRaw decision logAppend-only during sessions
decisions.mdPromoted permanent decisionsGrows at triage boundaries

Each file's H1 includes the stable feature ID.

For multi-repo features, default to one feature-level tracker in the canonical feature folder. It represents the complete feature, not one repository. Create repo-local trackers only when there is a clear process reason; the canonical tracker remains the source of truth.

Design Phase

Every non-trivial feature begins with a design interview, not a spec. The grill-me skill drives a relentless interview about the feature intent, walking each branch of the design tree and resolving dependencies between decisions one by one. When a question has an obvious best answer, the agent proposes it for confirmation; otherwise it asks open and waits.

The interview is not purely ephemeral. Maintain interview.md continuously during Grill Me. It is the primary design-memory artifact for this phase and should capture:

Operational rule: update interview.md after each settled decision or other high-value design clarification. The goal is to cap potential loss from compaction or interruption to at most one recent item.

design.md is synthesized from interview.md after the interview concludes; the interview and the synthesis are separate steps. The design gate (explicit user approval of design.md) must pass before any spec work begins. If the design is rejected outright, delete the branch; nothing downstream was touched.

design.md is frozen at the design gate and thereafter amendable only with a changelog entry, in the same style as spec amendments.

Branch Start

Use scripts/bootstrap_branch_docs.py for the mechanical bootstrap when useful.

Decision Logging

Maintain docs/issues/{featureId}/scratchpad.md throughout the feature. Record a decision when any trigger fires.

Tier 1 triggers, always record:

Tier 2 triggers, record when applicable:

Heuristic: if the code would need an explanatory comment, or a peer would ask "why?" in review, record the decision.

Scratchpad entry format:

## [N] Short descriptive title

[ ] **Promote**

**Confidence:** HIGH | LOW

**Blast Radius:** what could be affected

Full body here.

**Triggered by:** the symptom or question that surfaced this decision

**Alternatives considered:**
- Option A - why rejected
- Option B - why rejected

At each PR boundary, triage all scratchpad entries:

Specification Standards

Spec drafting uses both design-phase artifacts:

If interview.md contains detail that is consistent with the approved design, the spec may include it. If it contradicts design.md, expands scope, or would change the chosen shape, do not silently include it; amend design.md first or ask the user.

Verification has three layers:

Definition of Done
  Acceptance Criteria
    Rubric

The Definition of Done applies to every task. Acceptance criteria and rubric apply when the task has a spec.

Acceptance criteria must describe observable behavior. They must be independently verifiable and unambiguous. If the user gives a vague feature request, draft AC and rubric and get approval before planning.

The rubric is a binary pass/fail evaluation instrument derived from the AC. Every criterion must have explicit pass, fail, and evidence expectations. Prefer outcome-level checks over incidental implementation details.

AC and rubric live in spec.md, not plan.md.

Spec Amendments

When implementation reveals requirements not covered by the original spec:

Planning Standards

Planning begins only after the design gate has passed and the spec has been validated. Plan drafting uses three input layers:

Every implementation step in plan.md should map to at least one rubric criterion, except explicitly labeled coordination or final verification steps. The plan may choose sequencing, code areas, test strategy, and integration touchpoints, but it must not smuggle in new requirements. If design.md or interview.md reveals necessary work that is not represented by spec.md, add a spec amendment before adding that work to the plan.

Task Breakdown

issues.md is the operational counterpart to plan.md. Each issue has a stable ID and references plan steps plus rubric criteria.

## I-{N} - Short descriptive title

- **Status:** open | in-progress | blocked | in-review | closed
- **Estimate:** 0.5d | 1d | 2h | unknown
- **Plan steps:** P{n}
- **Rubric criteria:** R{n}
- **Depends on:** issue IDs or none
- **PR:** PR number/URL or -

Free-form body.

Do not reuse issue IDs. Append newly discovered work as new issues rather than expanding old ones silently.

PR Boundary

When a natural PR boundary is reached:

Feature Completion

Feature Close-out

After final verification passes:

Definition of Done

A task is not complete until all applicable items are true:

If something cannot be tested because of credentials, services, or environment limits, mark the status as implementation complete pending manual verification and provide exact manual steps. Do not mark it fully complete.

Completion Report

For all tasks:

## Completion Report

### Definition of Done
- **Build status:** PASS/FAIL - command ran
- **Lint status:** PASS/FAIL - command ran
- **Tests written:** files and coverage
- **Test suite status:** PASS/FAIL - command ran and summary
- **Integration verified:** Yes/No/N/A - what was checked
- **Application runs:** Yes/No/N/A - what was verified
- **Pending manual verification:** None or exact steps

For specced tasks, add:

### Acceptance Criteria
| # | Criterion | Status | Evidence |
|---|-----------|--------|----------|

### Rubric
| # | Criterion | Result | Scope | Notes |
|---|-----------|--------|-------|-------|

At per-PR boundaries, NOT YET is acceptable for out-of-scope criteria. At feature completion, zero NOT YET criteria may remain.

Gates and Determinism

Every gate is backed, where practical, by a validator script that exits nonzero on failure. The skill or command owning a boundary must run its validator; passage is mechanical, not rhetorical. Validators live in scripts/:

Gate inventory: design gate, spec validation, per-PR DoD, per-PR judge (blocking; explicit user waiver is the only bypass), decision triage, human PR review, final verification.

Context Primitives

Checkpoint and handoff are context-management primitives, not workflow phases. Any phase may invoke them at its boundaries.

Checkpoint

A checkpoint freezes session state for later resumption by the same agent (or a fresh session of it). Invocation modes:

Convention: write CHECKPOINT.md (stable latest pointer) plus a timestamped archive copy under .checkpoints/ in the worktree root, with header metadata: timestamp, repo, branch, originating session. Checkpoints capture state (goal, current position, in-flight work, exact next action, relevant paths and commands). During the design interview phase, interview.md is the authoritative design-memory file and should be kept current continuously; checkpoints remain secondary resume artifacts. During development phases, checkpoints normally reference scratchpad.md/decisions.md for decisions rather than duplicating them. .checkpoints/ stays out of commits via the global gitignore.

Hooks and other automation should treat checkpointing as a resumability mechanism only. They should not be responsible for authoring or maintaining interview.md; that remains an explicit workflow responsibility of the agent during Grill Me.

Handoff

A handoff transfers work to a different agent or persona. It is always interactive: before writing, ask the recipient and their objective, plus anything load-bearing that is not obvious from the work so far (a mini-grill).

Convention: write to .handoffs/ in the worktree root, gitignored globally. Schema: goal/intent, current state, decisions plus rationale, dead ends already tried, open questions, exact next action, relevant paths and commands, the recipient, and the recipient's objective.

Command Adapters

Command-level procedures live in commands/. Codex skills and Claude commands should load the relevant command file on demand.

Supplementary standards (testing protocol, tracker format, spec gates, constraint architecture) live in STANDARDS.md beside this file.

Commit

Use when the user asks to commit or when a workflow boundary requires a commit.

Never use destructive git commands to clean up the worktree unless the user explicitly asks.