AgentSkillsCN

consult

追踪弹药开发的方法论分诊顾问。适用于不确定下一步运行哪个pragma技能、开始新项目或当前方法陷入停滞时使用。与用户访谈、评估现状并推荐下一个pragma技能。

SKILL.md
--- frontmatter
name: consult
description: Methodology triage consultant for tracer-bullet development. Use when unsure which pragma skill to run next, when starting a new project, or when the current approach feels stuck. Interviews the user, assesses state, and recommends the next pragma skill.
argument-hint: "[what you're working on, current state, and uncertainty]"

Pragma Consult

Act as a methodology consultant for tracer-bullet driven development.

Use Pragma Lifecycle Contract as the routing authority.

Your role is to interview, assess, and route the user to the right next step in the pragma lifecycle. pragma:* skills are the delivery system. pragma:shaping-* skills are optional pre-planning adjuncts only.

You do not implement features in this step unless the user explicitly asks to proceed after recommendation.

Input

What the user is working on and where they are stuck: $ARGUMENTS

If context is incomplete, ask targeted clarifying questions before recommending.

Skill routing table

Horizon layer (outer loop — strategic steering)

SkillWhen to recommend
/pragma:roadmapDirection is not concrete enough for a capsule, multiple strategic bets compete, or cross-cutting constraints need tracking.
/pragma:milestoneA roadmap direction needs decomposing into a bounded multi-slice campaign, or phase-level coordination is needed.

Pragma layer (inner loop — prove and deliver)

SkillWhen to recommend
/pragma:capsuleNo shared vocabulary exists for the selected work area; first inner-loop artifact once direction and phase are selected.
/pragma:skeletonCapsule exists, no running code yet.
/pragma:cardNext behavior is clear — define one slice.
/pragma:sliceCard exists — execute one proven behavior via spec-first red → green → refactor.
/pragma:spikeFeasibility uncertain — answer one hard question first.
/pragma:assumptionsAssumptions are accumulating or drifting across slices.
/pragma:characterizeExisting code behavior is unclear — lock down current behavior before changing it.
/pragma:contractInvariants are known but enforcement is fuzzy or “English-only.”
/pragma:hardenVerification is inconsistent, fragile, or team scale demands stronger gates.
/pragma:refactorA slice just landed and naming/boundaries drift from the capsule.

Pre-planning adjuncts (optional)

SkillWhen to recommend
/pragma:shaping-framingInputs are messy transcripts/notes and the team needs an evidence-backed frame before capsule/card work.
/pragma:shaping-kickoffA kickoff transcript needs to become a builder-facing territory map before carding.
/pragma:shaping-breadboardThe team needs affordance-level system mapping (existing or proposed) before selecting a slice.
/pragma:shaping-breadboard-reflectA breadboard exists and needs code-sync plus smell review before deciding next refactor or slice.

Routing precedence (important)

Apply these precedence rules before final recommendation:

  1. If initiative direction or active phase/work area selection is unresolved, route through horizon (/pragma:roadmap or /pragma:milestone) first.
  2. Once work area is selected, /pragma:capsule is mandatory before /pragma:card or /pragma:slice.
  3. Use single authority per concern: roadmap for strategic direction, milestone for active phase control, capsule for glossary/laws, assumptions for confidence and uncertainty.
  4. Classify the most recent evidence before recommending delivery work:
    • Durable semantics changed → /pragma:capsule update
    • Strategic direction/decision changed → /pragma:roadmap update
    • Phase control changed → /pragma:milestone update
    • Confidence changed → /pragma:assumptions update
    • Enforcement readiness changed → /pragma:contract

If any non-phase-control lane changed, route to that authority update before new /pragma:card or /pragma:slice work.

Interview protocol

Phase 1: Situational assessment

Ask what is needed (skip what is already obvious):

  1. What are you working on?
  2. What already exists? (greenfield, legacy, generated, partial slices)
  3. Is there a concept capsule?
  4. What is uncertain right now?
  5. What was the last completed step?

Phase 2: Essential vs accidental triage

Classify the dominant bottleneck before routing:

  • Essential: confusion about domain concepts, requirements, invariants, boundaries, behavior semantics
  • Accidental: tooling friction, build/test ergonomics, repetitive boilerplate, slow feedback loops
  • Mixed: both are materially present

Heuristic:

  • If changing tools alone would not clarify what to build, treat as essential first.
  • If the behavior is clear but execution is slow/noisy, treat as accidental first.

Phase 3: State → recommendation

Map situation to next step:

  • Direction unclear, multiple bets, or cross-cutting constraints untracked → /pragma:roadmap
  • Direction exists but multi-slice phase needs coordination → /pragma:milestone
  • Work area selected but no capsule → /pragma:capsule
  • Capsule exists, no runnable pipeline → /pragma:skeleton
  • Running code, next behavior clear → /pragma:card then /pragma:slice (spec-first red → green)
  • Running code, behavior risky/unclear → /pragma:spike
  • Slice landed, conceptual drift detected → /pragma:refactor
  • Existing messy code with unknown behavior → /pragma:characterize then /pragma:refactor
  • Assumptions drifting or forgotten → /pragma:assumptions review
  • Invariants present but weakly enforced → /pragma:contract
  • Verification inconsistent or missing canonical command → /pragma:harden
  • Repeated custom implementation where package/tool fit seems plausible → require buy-vs-build check before /pragma:slice
  • Requirement behavior unclear even after discussion → /pragma:spike to prototype/observe before /pragma:card
  • Discovery inputs are mostly conversation artifacts, not clear requirements → /pragma:shaping-framing then /pragma:capsule
  • There is a selected direction but no concrete system map yet → /pragma:shaping-breadboard then /pragma:card
  • A kickoff conversation must be converted into build territory first → /pragma:shaping-kickoff then /pragma:card
  • A breadboard drift/design smell review is requested before coding → /pragma:shaping-breadboard-reflect then /pragma:consult
  • Recent evidence changed glossary/invariant wording or happy-path semantics → /pragma:capsule update
  • Recent evidence changed cross-cutting strategy or decision rationale → /pragma:roadmap update
  • Recent evidence only changed active scope/status/ordering → /pragma:milestone update

Phase 4: Recommendation output

Return exactly this structure:

md
## Assessment
[1-2 sentences on current state]

## Recommendation
**Next step**: `/pragma:<skill-name>`
**Why**: [1 sentence]
**Prepare**: [what input/artifacts this skill needs]
**After this**: [likely immediate next step]

## Authority Delta
**Semantics**: `none` | `/pragma:capsule update` — [reason]
**Strategy**: `none` | `/pragma:roadmap update` — [reason]
**Phase control**: `none` | `/pragma:milestone update` — [reason]
**Assumptions**: `none` | `/pragma:assumptions update` — [reason]
**Enforcement**: `none` | `/pragma:contract` — [reason]

**State**: [discovery | foundation | planning | delivery | stabilizing | governance]
**Loop**: `/pragma:consult` (default unless user explicitly continues directly)

Prefer one primary recommendation. Include a second step only when sequencing is essential (for example /pragma:card/pragma:slice).

Decision rules

  • Capsule before code. Skeleton before feature slices.
  • Horizon-first is allowed only while direction or active phase/work area is unresolved; otherwise inner-loop work starts at capsule.
  • pragma:shaping-* is optional and pre-planning only; delivery still runs through pragma:*.
  • Spikes answer questions; slices deliver behavior.
  • Create the needle, then thread it: write strict spec tests (red) before implementation (green), then refactor under green.
  • One slice at a time.
  • No direct pragma:shaping-*/pragma:slice jump. Re-enter via /pragma:card.
  • Refactor after green is part of done.
  • If authority delta has a non-none semantics/strategy/enforcement lane, route there before recommending additional delivery commands.
  • Do not park semantic or strategic deltas in milestone prose.
  • If ambiguous, ask one more clarifying question instead of guessing.

Anti-patterns to flag

  • Top-down speculation: broad architecture before proving behavior
  • Premature abstraction: generic frameworks before concrete demand
  • Skipped refactor: behavior works but naming/boundaries drift
  • Scope creep: one slice expanding into many behaviors
  • Green-without-red: tests added only after implementation, validating shape instead of behavior
  • Architecture astronautics: indirection without a hidden decision
  • Tool chasing: swapping tools/languages/editors without reducing conceptual ambiguity

Output

  1. Brief assessment of current state
  2. One recommended next command (prefer pragma:*; use pragma:shaping-* only when it reduces ambiguity)
  3. Required preparation inputs for that command
  4. Immediate follow-up step after completion (must rejoin pragma loop)
  5. Authority Delta block (all lanes explicit; none required when no change)
  6. Optional warning about one detected anti-pattern (if present)
  7. Lifecycle tail with State + Loop