Skip to content

add skill: /han-coding:design-an-api - #175

Merged
mxriverlynn merged 3 commits into
mainfrom
design-an-api
Aug 10, 2026
Merged

add skill: /han-coding:design-an-api#175
mxriverlynn merged 3 commits into
mainfrom
design-an-api

Conversation

@mxriverlynn

@mxriverlynn mxriverlynn commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

closes #173

Summary

This PR adds a /design-an-api skill to han-coding that designs an interface contract against one stated goal, so you settle a surface's shape before implementation instead of discovering it while writing the code.

Behavior changes

The skill's load-bearing rule is that every element of the contract has to justify itself. Each parameter, field, type, default, precedence rule, and failure behavior must trace to one of two sources. It either descends from a specific part of the stated goal, or it is necessary for an asked-for behavior. Anything that fits neither source stays out of the design. It lands on a cut list you can see and reinstate, and your direction then becomes its justification. The skill also refuses to run without a goal, because a goal is what stops a contract for one caller from growing into a general-purpose framework. Silence in the goal is not treated as a cut, so error behavior and types survive even when the ticket never mentions them.

A run classifies the interface's size by grepping the code for signals: consumer spread, ordering, persisted or wire data, untrusted input, failure paths, cross-module data, and cross-service seams. It defaults to small and escalates only when one of those signals is clearly present. Four core agents run at every size, and a specialist joins only when its signal is present. From there you hit two gates: first you pick one of two or three real options the architect presents, then you answer any remaining open items one question at a time. An adversarial validation round attacks the amended design before the document is rendered. The run writes three markdown files (context brief, options, final design), date-suffixes rather than overwriting existing ones, and changes no code. That final document is the input to a later /tdd run.

Three existing skills change only their routing text. architectural-analysis, plan-a-feature, and plan-implementation now name design-an-api in their "not for this" lines. A request to design an interface now routes to the new skill, not to a skill that judges existing structure, specifies behavior, or sequences delivery.

Closes #173. Adds /design-an-api, which designs an interface contract for
one stated goal: a discovery wave, an options document from the software
architect, a user option pick, a junior-developer question round, open
items surfaced one at a time, and an adversarial validation round.

Every element of the contract carries a justification naming the goal
language it descends from or the behavior it is a necessity of; anything
that cannot fill that field lands on a cut list the user sees.

Also closes the two-way disambiguation gaps against architectural-analysis,
plan-a-feature, and plan-implementation.
…w fixes

Adds the long-form doc, the plugin README scent line, the skills index
entry, the workflows chain, and the CLAUDE.md map entries.

Review fixes against the plugin-building guidance: a testable git
criterion for the starting-point question, error handling for a failed
discovery agent and a single-option architect round, explicit
continuation after each mid-workflow skill invocation, and a
boundary-data signal replacing the unfamiliar-area signal that had no
consumer now that codebase-explorer runs at every band.
…ure paths

Two defects made the skill's own rules contradict each other. The ordering
signal matched both the Small band (which said it "may be present or absent")
and the Medium band (which counted it among the five escalating signals), and
because the concurrency analyst carries a Medium minimum, the signal could fire
at small with no specialist able to answer it. The roster listed the architect
as running in Steps 5, 7, and 9, omitting the Step 8 relaunch that folds in the
open-item answers.

The starting-point check ran `git diff $(git merge-base HEAD origin/HEAD)...HEAD`.
When origin/HEAD is unset the substitution empties, git reads the rest as
HEAD...HEAD, and the command exits clean with no output, so a branch that did
modify the interface was reported as untouched. It now reads the same
default-branch probe the other Han skills use and treats `unknown` explicitly.

Also: the overwrite guard covered only api-design.md, leaving the context brief
and options document to be silently overwritten; Step 5 retried the architect
for missing justifications but had no disposition when the retry also came back
unjustified; Step 8 had no path for zero open items; and the roster caps were
written as ranges whose floors the rules cannot produce, since a large band
reached by a lone system-seam signal dispatches five agents, not seven.
@mxriverlynn
mxriverlynn marked this pull request as ready for review August 10, 2026 14:04
@mxriverlynn
mxriverlynn merged commit a99786e into main Aug 10, 2026
2 checks passed
@mxriverlynn
mxriverlynn deleted the design-an-api branch August 10, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Han Feedback: software-architect-junior-developer-adversarial-validator (2026-08-06)

1 participant