Claude Skill

suede-agent-teams

Suede Labs agent-team orchestrator: split complex work into coordinated lanes with explicit file ownership, WIP collision detection, quality gates, escalation thresholds, rollback plans, and handoffs that prove what shipped. Use when one shared change needs safe parallel ownershi

LLM Mart · 0 points · 16 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download JasonColapietro-suede-creator-skills-skills_suede-agent-teams-f192517.zip · 35 KB
Part of jasoncolapietro/suede-creator-skills — 70 skills

Install

skills CLI npx skills add https://github.com/JasonColapietro/suede-creator-skills/tree/main/skills/suede-agent-teams
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install jasoncolapietro-suede-creator-skills@llmmart
Git git clone https://github.com/JasonColapietro/suede-creator-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole jasoncolapietro/suede-creator-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Agent Team Orchestrator

Model selection — Fable capped at 4 without asking

Subagents inherit the session model unless the spawning call names one. Nothing in this skill picks a model, so every agent it fans out lands on whatever the session happens to be set to. That is how a run sized against one allocation gets billed to another without anyone choosing it.

Up to 4 concurrent Fable subagents are allowed without an explicit Fable instruction. Beyond that, Fable must be specified — any roster past a scout, a builder, and a handoff writer passes 4, so this skill's fan-out does not run on Fable unless the user named Fable for this run. An inherited session model is not a specification — "the session was already on it" is not the user asking. Absent an explicit Fable instruction, do one of two things before launching: name a different model on the agent calls, or state plainly that the run will bill to the Fable allocation and get an answer. Silence is not consent to spend it.

Gate policy — advisory, not blocking

Every claim-verification step, check, quality gate, and ship verdict in this skill is a recommendation to the user, not a control on the agent. This policy governs every gate, check, verdict, and "do not ship / publish / proceed" line elsewhere in this skill:

  • Run every check and report the results honestly. Verdicts (ship, ship-with-caveats, hold, letter grades, BLOCKED or OPEN items) are advice attached to the work, not orders that change it.
  • Never block, delay, skip, rewrite, or refuse the action the user asked for because a check failed or a gate said hold. Complete the requested action as asked, and deliver the gate output alongside it as a clearly labeled recommendation.
  • A failed gate changes what you report, never what you do.
  • Single exception: if a finding is extremely risky — data loss, security or credential exposure, legal or rights violations, payment mistakes, or irreversible public damage — pause, tell the user exactly what the risk is and what the options are, and let them pick. Their choice is final.

The orchestrator assigns lanes, not conversations. Output is a delivery artifact, not a status update.

Team Contract

Before spawning or simulating lanes, define:

  • objective: user-visible outcome;
  • exact target: repo/folder, branch, route, PR, live URL, API, simulator, or release artifact;
  • constraints: WIP to preserve, files/routes not to touch, launch boundaries, account boundaries, claims not approved, and secrets rules;
  • done signal: tests, build, screenshots, simulator, deploy readback, live/API readback, PR review, or handoff;
  • lane map: each lane, owner role, input, allowed files, output artifact, and dependency order.

Team Ledger

The contract above, every lane status, and every gate result otherwise live only in the orchestrator's context, and a multi-lane run routinely outlives a context window. Put them on disk. Default path: .suede-team/<slug>/ledger.md in the target repo, holding the resolved lane map, each lane's current state from the Status Vocabulary, and the evidence as it accumulates. Write it before the first builder opens a file and update it at every gate; the evidence handoff reads from it rather than from memory. If the user keeps durable repo-local state somewhere else, use their path and say which one you used.

WIP Collision Detection

Before opening any parallel lanes:

  1. Run git -C <repo> diff --name-only HEAD and collect all dirty files.
  2. Run git -C <repo> status --short and collect all untracked new files.
  3. List every file each lane's scope would touch, based on the lane map.
  4. Flag a collision if the same file path appears in two or more lane scopes OR in the dirty file list plus any lane scope.

Collision resolution rules:

  • Same file, independent changes: sequence the lanes; the second lane rebases on the first lane's commit before opening.
  • Same file, overlapping changes: merge the two lanes into one lane with one owner. Do not split responsibility for a single file across two concurrent builders.
  • Dirty file in a lane scope: the orchestrator decides. Either stash and restore, or make that lane the only lane allowed to touch the file.

The orchestrator writes the resolved lane map to the team ledger (.suede-team/<slug>/ledger.md, see Team Ledger) before any builder starts. No builder opens a file not in its assigned lane map.

Default Roster

Start with Scout + Builder + Handoff Writer. Add roles only when a gate is needed: design changes add Design Reviewer, code risk adds Code Grader + Code Reviewer, public release adds Release Verifier.

  • Scout: finds repo, docs, current state, dirty files, live routes, and likely blast radius.
  • Planner: turns requirements into verifiable tasks with acceptance criteria and dependencies.
  • Builder: makes narrow code or content changes inside the existing system.
  • Design reviewer: checks rendered visual quality, responsive behavior, accessibility, copy, and state coverage.
  • Code grader: assigns an A-F ship-risk grade across correctness, security, data/state, Suede truth, UX/release behavior, tests, and deploy readiness.
  • Code reviewer: runs full-context review and turns findings into fix briefs.
  • Visibility grader: grades public pages, GitHub Pages sites, docs, and launch surfaces for findability, first-screen clarity, CTA pull, proof, AI readability, and design signal.
  • Release verifier: checks build, deploy, live/API behavior, App Store/iOS truth, secrets, and published statements.
  • Handoff writer: produces a signed delivery record. If the handoff omits any required field (see Handoff Quality Checklist), the work is not done; it is held.

For high-risk work, keep builder and reviewer separate.

RFC Mode

For major architectural decisions, new feature designs, or changes with broad blast radius, run an RFC (Request for Comments) before spawning builders.

An RFC forces alignment on WHAT and WHY before committing to HOW.

RFC status vocabulary: draft | accepted | superseded | withdrawn.

Before authoring one, read references/incident-and-rfc-templates.md and fill every section it lists — problem statement, proposed solution, alternatives considered, risks, success criteria, decision record.

Require an RFC for: shared interface changes, schema migrations, auth flow rewrites, payment path changes, public API contract changes, or any approach that's been discussed twice without resolution. No builder lane opens until RFC status is accepted.

When to skip: clear, contained changes where the approach is obvious and the blast radius is narrow.

Feature Flag Strategy

Not every change should ship as a hard deploy. Feature flags allow gradual rollout, A/B testing, and instant rollback without a redeploy.

When to flag:

  • New user-facing features in production traffic paths
  • Changes to auth, payment, or data migration paths
  • Any change that cannot be instantly rolled back by revert (e.g., a schema migration)
  • A/B tests

Once a lane is flagged, read the lifecycle, the when-NOT-to-flag list, and the hygiene rules in the Feature Flag Strategy section of references/scenario-templates.md before the ramp starts. Every flag gets a removal date at creation; a stale flag is a P3 code review finding.

Rollback Decision Tree

When something goes wrong after a deploy, the team needs a pre-agreed decision framework to avoid paralysis.

Is there active data loss or corruption? → ROLLBACK IMMEDIATELY. Don't investigate first.
Is there a security exposure (PII, auth bypass, payment data)? → ROLLBACK IMMEDIATELY. Notify security.
Is a primary user path broken (login, checkout, core workflow)? → ROLLBACK unless fix is <15 minutes away.
Is performance degraded but functional? → Hold and investigate. Set a 30-minute timer.
Is it a cosmetic issue? → Hot-fix forward. No rollback.

After rollback:

  1. Write an immediate summary: what rolled back, what was affected, who was notified.
  2. Leave rollback notes in the PR and open a follow-up issue.
  3. Run a lightweight post-mortem (see below) before re-shipping.

Post-Mortem

For any production incident, failed release, or significant rollback, run a post-mortem. Keep it blameless: focus on systems, not individuals.

Severity: P0 (total outage) / P1 (primary path broken) / P2 (degraded) / P3 (cosmetic).

Post-mortems are required for P0 and P1 incidents. Optional but encouraged for P2. Skip for P3. When one is required, write it from references/incident-and-rfc-templates.md and fill every section: timeline, impact, root cause, contributing factors, what went well, and action items with owners and due dates.

Phase Loop

The Phase Loop is the Continuous Team Loop run at minimal scale. Use it when a full 10-gate roster is overkill but you still need scout, plan, build, verify, and ship stages.

For high-risk changes, consult the Rollback Decision Tree before shipping. For gradual rollouts, use the Feature Flag Strategy. For shared interface changes, require RFC Mode before the plan stage opens.

Public Contribution Program

When the objective is recurring work across owned or external public repositories, read references/public-contribution-program.md completely before opening lanes. Use its deterministic ledger to score tasks, lease each repo/issue pair to one worker, and prevent duplicate work. Start in local_only authority with publication disabled. Keep external targets at a reviewed contribution packet unless the user separately approves a draft PR.

The outward artifact gate applies to branch names, commit messages, and PR copy. Use conventional project language and omit voluntary tool-origin branding or trailers. Never forge authorship or deny tool use; an upstream disclosure requirement overrides neutral packaging and moves the lane to owner review.

Model Tiering

Assign the least capable model that can still do the role correctly. Cost and latency compound across a roster; do not default every lane to the most capable model.

  • Mechanical tasks (isolated function, single file, a complete spec with no judgment call): cheapest capable model.
  • Integration and judgment tasks (multi-file coordination, pattern-matching against the existing codebase, non-trivial debugging): standard model.
  • Architecture, design, and review roles (RFC authoring, code grading, security-sensitive review, release verification): most capable model available.

When a lane's task complexity is ambiguous, default up a tier rather than down; a cheap model returning NEEDS_CONTEXT or a wrong answer costs more in re-dispatch than starting at the right tier.

Builder Dispatch Protocol

A dispatched builder reports one of four states before its output reaches review. Handle each before the lane proceeds to the next roster stage:

  • Done: proceed to the next stage in the roster.
  • Done with concerns: the builder finished but flagged a doubt. Read the concern. If it touches correctness or scope, resolve it before review; if it is a pure observation, note it in the handoff and proceed.
  • Needs context: the builder is missing information the lane map should have supplied. Provide it and re-dispatch the same builder; do not silently guess on its behalf.
  • Blocked: the builder cannot proceed. Diagnose why before re-dispatching: a context gap gets more context, a reasoning gap gets a more capable model, an oversized task gets split into smaller lanes, and a wrong plan escalates to the human (see Escalation Protocol). Never re-dispatch the same builder unchanged and hope for a different result.

A builder that asks a clarifying question mid-task gets an answer before it continues; do not let it guess past an open question to hit a deadline.

Continuous Team Loop

Use the smallest loop that can finish the work, but escalate deliberately when the task is broad, risky, release-bound, or the user asks for max agent teams.

Choose the loop:

  • Sequential: default for normal scoped work.
  • Continuous PR: use when strict CI, PR review, branch hygiene, or public release control matters.
  • RFC/DAG: use when the work needs decomposition, design decisions, or dependency ordering before implementation. Run RFC Mode first to capture problem statement, proposed solution, alternatives, risks, and decision record before spawning builders.
  • Exploratory parallel: use when several independent approaches, audits, or surface checks can run without touching the same files.
  • Recovery: use after a failed check, repeated defect, blocked release, drifted claim, or loop churn.

For max-agent work, escalate through this roster only as needed:

Scout -> Planner -> Builder lane(s) -> Design reviewer -> Visibility grader
-> Code grader -> Code reviewer -> Release verifier -> Handoff writer

Wrap the roster with these gates:

  1. Loop selection: name why the loop is sequential, continuous PR, RFC/DAG, exploratory parallel, or recovery.
  2. Team contract: objective, target, constraints, lane map, dependency order, done signal, and ship gate.
  3. Planning quality gate: atomic tasks, observable acceptance criteria, named files/surfaces, must-have requirements, release/account boundaries.
  4. WIP ownership gate: each builder owns explicit files or surfaces; any collision is sequenced.
  5. Execute wave: parallel lanes only when outputs do not collide.
  6. Quality/eval gate: run the relevant source, copy, design, code, visibility, build, screenshot, API, or live checks. A failing check earns up to three genuinely different fixes — each attempt must change the diagnosis or the strategy. Stop early when the same root cause repeats and escalate the repeating cause to the user.
  7. Adversarial review: ask how the result fails in production, release, published statements, abuse, accessibility, mobile, or handoff.
  8. Consensus review: merge multiple review lenses into blockers, accepted caveats, fixes now, and follow-ups.
  9. Release lock: build/deploy/live/API/App Store/iOS/published-statement accuracy is owned by release verifier before any public completion claim.
  10. Evidence handoff: capture changed files, commands, screenshots or URLs, verification, caveats, blockers, status, and next action.

Loop stall protocol: (1) freeze all lanes except the one that failed, (2) assign a diagnosis-only lane (no fixes, root cause only), (3) write a gap plan with a single acceptance criterion, (4) execute only the gap, (5) re-run the original failing check. Do not widen until that check passes.

Inter-Lane Communication

When a builder lane completes its output and a reviewer lane depends on it, the signal is explicit, not assumed.

The completing lane writes a Lane Ready notice:

Lane: [name]
Status: output ready for review
Artifact: [file path, URL, or PR link]
Reviewer: [lane name that receives this output]
Unresolved: [any known issue the reviewer should know before starting]

The reviewer lane does not start until it has received a Lane Ready notice from every upstream dependency in its lane map.

The orchestrator routes Lane Ready notices. In a sequential thread, the orchestrator posts the Lane Ready notice on behalf of each completing lane before invoking the next.

Lanes may not self-declare readiness if their output has not been verified against the acceptance criteria from the Team Contract.

Planning Quality Gate

A plan is not ready until:

  • each task has one concern;
  • dependencies are ordered;
  • acceptance criteria are observable, not subjective;
  • required files or surfaces are named;
  • must-have requirements are covered;
  • tests, screenshots, builds, or API checks map to the risky behavior;
  • release and account boundaries are explicit.

If major uncertainty remains, run a short spike first and keep implementation out of scope until the spike reports back.

Review Convergence

For important merges, run at least two independent review lenses:

  • one asks whether the implementation works as intended;
  • one asks how it can fail in production, review, release, or public use.

Merge the findings into:

  • consensus blockers;
  • plausible divergent risks;
  • accepted caveats;
  • fixes to execute now;
  • follow-ups that should not block.

Repeat fix and review cycles until no blocker remains or the work is held.

Status Vocabulary

Valid states in order: scoped → planned → executing → changed locally → verified locally → reviewed → committed → pushed → deployed → verified live → released

Interrupt states: blocked (needs external action) | held (needs named fix before continuing)

Do not skip. changed locally is not verified locally. deployed is not verified live. Do not mark released until the done signal from the Team Contract passes.

Scenario Templates

Six pre-built configurations exist for common high-risk deployments: (a) Auth Rewrite, (b) Payment Integration, (c) Public Launch Review, (d) Data Migration, (e) Performance Audit, (f) Recovery / Incident Response. When the objective matches one, read references/scenario-templates.md completely before opening lanes and adjust only the named target — each template carries its own roster, lane map, RFC and flag requirements, grader tolerances, and done signal.

Escalation Protocol

Stop the loop, surface the condition, and wait for human sign-off before continuing.

Condition Threshold Action
Repeated fix cycles > 3 fix-rerun cycles on the same failing check Stop. Write a diagnosis summary. Ask: is the acceptance criterion correct, or is the fix strategy wrong?
Security finding of unknown severity Any finding touching auth, session, PII, payment data, or access control that cannot be confidently classified as low risk Stop. Do not attempt a fix. Surface the exact finding and uncertain blast radius. Human decides next step.
Production incident with data exposure Any indication of PII, payment data, or auth token exposure in production logs, error reports, or user reports Stop all lanes. Trigger rollback decision tree. Notify human immediately. Do not investigate further before rollback.
Cost spike > 20 tool calls without a verified output, or estimated API/infra cost > $50 in a single loop Stop. Summarize progress and remaining scope. Ask human to authorize continuation.
Contradictory constraints Two constraints in the Team Contract are mutually exclusive Stop planning. Surface the conflict with a specific example. Do not proceed until human resolves.

No agent may override an escalation threshold by re-scoping the task or declaring the condition resolved without human confirmation.

Red Flags — Stop

  • "The lanes probably won't touch the same files" — probably is not a lane map. Run WIP collision detection first.
  • "The approach is obvious, skip the RFC" — if it has been discussed twice without resolution, it is not obvious.
  • "Mark it done, the code is written" — changed locally is not verified locally; the status vocabulary has no shortcuts.
  • "Leave that caveat out so the handoff looks clean" — a handoff missing a field is status held, not done.
  • "One more fix cycle will crack it" — past 3 cycles on the same failing check, stop and run the loop stall protocol.
  • "The builder can review its own lane" — for high-risk work, builder and reviewer stay separate.

Handoff Quality Checklist

A handoff is not complete until every field below is present and truthful. The handoff writer signs off by confirming each item.

Required fields:

  • Target: exact repo, branch, route, or URL (not "the main app")
  • Changed: every file path that was modified, created, or deleted (not "various files")
  • Commands: every bash command run, in order, with the actual output or exit code
  • Verification: observable evidence (screenshot URL, test output, curl response, build log), not "it works"
  • Status: one of the vocabulary states, not "done" unless the done signal from the Team Contract is satisfied
  • Next: the single most important unresolved step (not "see above")
  • Caveats: every known limitation, assumption, or deferred item; none omitted to make the handoff look cleaner

If any field is missing, the handoff writer must fill it before marking status released or verified live. A handoff with a missing field is status held.

Output Shape

For a team plan:

Objective:
Target:
Constraints:
Lane Map:
Dependency Order:
Done Signal:
Ship Gate:

For execution updates:

Lane:
Status:
Evidence:
Next:
Risk:

For final handoff:

Simple explanation:
Usual breakdown:
Target:
Changed:
Verification:
Caveats:
Status:
Next:
Cue Suede:

Routing

  • The work is one repo's change and a bundled DAG can run it end to end → suede-graph-flo-xr. Precedence: one repo, one change, research-through-release in a single scripted run goes there; orchestration that is manual, ongoing, cross-repo, or a public-contribution program stays here. A single lane inside a program here that needs the full research-and-refute treatment can be handed to suede-graph-flo-xr for that lane alone.
  • A recurring owned/public-repository contribution program needs issue leases, isolated worktrees, review, and an authority-gated packet → read references/public-contribution-program.md and keep this skill as controller
  • A code lane needs review or a ship grade → suede-code (combined), suede-code-review (findings only), or suede-code-grader (grade only)
  • The repo's merge gate is weak or missing → suede-ci-gate
  • The work needs branch ownership, stale-mirror worktree setup, finish options, or cleanup discipline → suede-git-hygiene (private Suede Labs companion, not in this pack)
  • A lane ships AI behavior → suede-ai-eval before that lane's quality gate closes
  • The public launch lane needs a page verdict → suede-visibility-grader, then suede-launch-packaging
Files (suede-creator-skills)
  • agents
    • openai.yaml 728 B
      interface:
        display_name: "Suede Agent Teams"
        short_description: "Coordinate safe delivery and contribution lanes"
        default_prompt: "Use $suede-agent-teams to orchestrate [task]. Define the Team Contract and lane map, run WIP collision detection, open parallel lanes only where safe, allow up to three genuinely different fixes per failing check and stop early when the same root cause repeats, then close with a signed evidence handoff. For a recurring public-repository contribution program, load the contribution reference, lease each task before work starts, keep publication disabled by default, and package conventional outward artifacts behind the exact authority boundary."
      policy:
        allow_implicit_invocation: true
      
  • references
    • incident-and-rfc-templates.md 1.9 KB
      # RFC and Post-Mortem Templates
      
      The stationery for the two documents this skill occasionally asks a lane to write.
      The rules that decide *whether* to write one — the RFC-required list, the
      `accepted`-before-any-builder gate, the P0-P3 severity definitions, and the
      required/optional/skip rule for post-mortems — stay in the `suede-agent-teams`
      SKILL.md next to their triggers. Read this file when you are about to author one of
      the two documents, and fill every section.
      
      ## RFC template
      
      ```
      RFC: [Title]
      Date: [date]
      Status: draft | accepted | superseded | withdrawn
      Deciders: [who has final say]
      
      ## Problem Statement
      One paragraph: what is broken, missing, or suboptimal? Include the user or system impact.
      
      ## Proposed Solution
      What we will build or change. Be specific about interfaces, data shapes, and behavioral contracts.
      
      ## Alternatives Considered
      2–3 alternatives with the reason each was not chosen.
      
      ## Risks
      What could go wrong with the proposed solution? How is each risk mitigated?
      
      ## Success Criteria
      How will we know this worked? Observable, measurable signals.
      
      ## Decision Record
      [filled in after consensus] Accept / Modify / Reject + reason.
      ```
      
      ## Post-mortem template
      
      Keep it blameless: focus on systems, not individuals.
      
      ```
      Post-Mortem: [Brief title]
      Date of incident:
      Duration:
      Severity: P0 (total outage) / P1 (primary path broken) / P2 (degraded) / P3 (cosmetic)
      Author(s):
      
      ## Timeline
      [time]: [event]
      [time]: [detection]
      [time]: [first response]
      [time]: [resolution]
      
      ## Impact
      Users affected:
      Revenue impact (if known):
      Data integrity: affected / not affected
      
      ## Root Cause
      One sentence: the direct technical cause.
      
      ## Contributing Factors
      The systemic conditions that made this possible. (What allowed the root cause to reach production?)
      
      ## What Went Well
      Things that helped detect or contain the incident faster.
      
      ## Action Items
      | Action | Owner | Due |
      |---|---|---|
      | ... | ... | ... |
      
      Status: open / closed
      ```
      
    • public-contribution-program.md 13.7 KB
      # Public Contribution Program
      
      Use this mode to turn a stream of repository issues into small, verified
      contribution packets without duplicate work or unapproved publication.
      
      ## Contents
      
      1. Operating contract
      2. State machine
      3. Discovery and scoring
      4. Ledger and leases
      5. Repository preparation
      6. Build and review loop
      7. Outward artifact contract
      8. Authority matrix
      9. Contribution packet
      10. Learning loop
      
      ## Operating contract
      
      Collect these fields before opening a builder lane:
      
      | Field | Required value |
      |---|---|
      | Objective | One issue or maintenance outcome with observable acceptance criteria |
      | Target | Exact repository, remote, base ref, and local checkout/worktree |
      | Ownership | `owned` or `external`; unknown is `external` |
      | Authority | `local_only` by default; push, draft PR, ready PR, and merge are separate grants |
      | Rules | Nearest `AGENTS.md`, `CONTRIBUTING.md`, security policy, PR template, DCO/CLA, and disclosure policy |
      | Scope | Allowed files plus explicit no-touch paths |
      | Proof | Repo-native tests, build, lint, review, and remote checks required for closure |
      
      Ownership is never inferred from a local clone, login, organization
      membership, or write-capable token. Use an explicit user statement or a
      maintained allowlist. External publication through ready review requires
      `reviewed` mode plus a separate, one-shot grant for every remote action. The
      ledger never merges external work.
      
      ## State machine
      
      ```text
      discover -> classify -> contract -> prepare -> claim -> build -> verify
        -> independent review -> package -> authority gate
      
      owned + authorized -> publish -> checks -> merge or fix
      owned + local_only -> packet_ready
      external or uncertain -> packet_ready -> owner review
      external + reviewed-mode grants -> push -> draft PR -> ready PR -> checks
      ```
      
      Use the team orchestrator's status vocabulary for the implementation lane.
      Use `queued`, `claimed`, `changed_locally`, `verified_locally`, `reviewed`,
      `packet_ready`, `published`, `merged`, `closed`, `blocked`, and `superseded`
      inside the ledger.
      
      Failed verification or review returns to `changed_locally`. Allow at most three
      genuinely different fix strategies for one root cause. A duplicate or already
      landed change becomes `superseded`; do not force every task to ship.
      
      ## Discovery and scoring
      
      Scout read-only first. Prefer tasks with:
      
      - a reproducible issue and clear maintainer intent;
      - a narrow blast radius and executable acceptance criteria;
      - an existing test surface;
      - no active overlapping PR or recent equivalent commit;
      - high user value relative to review and maintenance cost.
      
      Score each candidate from 1 to 5 for impact, confidence, effort, and risk. The
      ledger calculates:
      
      ```text
      score = impact*4 + confidence*3 - effort*2 - risk*3 + owned_bonus(8)
      ```
      
      The owned bonus makes controlled repositories the throughput lane. It does not
      turn a low-value task into a good contribution. Keep at most one active
      external task per target repository until the workflow has a proven acceptance
      record there.
      
      ## Ledger and leases
      
      Use `scripts/contribution-ledger.mjs` for the shared task queue. Store the
      ledger outside the target repository unless the project explicitly tracks
      operations state. Do not put secrets, tokens, private paths, or copied issue
      threads in it.
      
      Initialize with publication disabled:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs init \
        --ledger <control-dir>/contributions.json \
        --publish-mode disabled
      ```
      
      Add and rank a task:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs add \
        --ledger <control-dir>/contributions.json \
        --repo owner/repo --ref 123 --title "Handle empty metadata" \
        --scope owned --ownership-evidence "Owner named this repository" \
        --disclosure not-required \
        --disclosure-source "Checked CONTRIBUTING.md and the PR template" \
        --impact 4 --confidence 4 --effort 2 --risk 2
      
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs next \
        --ledger <control-dir>/contributions.json
      ```
      
      Issue references such as `123`, `#123`, `Issue #123`, and the matching GitHub
      issue URL normalize to one key. A URL for another repository is rejected.
      
      Claim before creating a worktree. The atomic lease is the duplicate-work gate:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs claim \
        --ledger <control-dir>/contributions.json \
        --id <task-id> --worker <lane-id> --lease-minutes 45
      ```
      
      Heartbeat long-running work. Release a task when abandoning it. Expired leases
      return to the queue automatically. Never remove a live lock file; inspect the
      recorded host, token, PID, and process start first. A crashed writer can be
      recovered only with the explicit `recover-lock` command, the exact recorded
      token, a locally verifiable dead process, and the minimum stale age. There is
      no force option. Symlink paths resolve to the same canonical ledger and lock.
      Hard-linked ledgers fail closed because multiple names can split an atomic
      rename into divergent queues.
      
      Advance only after evidence exists:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs transition \
        --ledger <control-dir>/contributions.json \
        --id <task-id> --worker <lane-id> --to verified_locally
      ```
      
      Before `packet_ready`, record task-bound checks for the exact branch name,
      commit message, and PR draft. Each check stores its content hash. Unknown
      disclosure blocks packaging. A required disclosure must occur exactly once in
      the PR draft; the exact statement is preserved while other markers are still
      checked, and a hash-bound owner approval is required before packaging. The
      generic shape gate also requires a valid Git branch ref, a conventional commit
      subject, and nonempty `Summary`, `Why`, `Testing`, `Scope`, and `Risks` PR
      sections. Apply any stricter upstream template rules in addition to these
      minimums.
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs artifact-check \
        --ledger <control-dir>/contributions.json --id <task-id> \
        --worker <lane-id> --kind commit --input <commit-message.txt>
      
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs review-artifact \
        --ledger <control-dir>/contributions.json --id <task-id> --kind pr \
        --sha256 <checked-hash> --decision approve --actor <owner> \
        --review-note "Required statement is present exactly once"
      ```
      
      The ledger-wide publish mode is only a kill switch. `owned` permits separately
      granted publication for owned repositories. `reviewed` also permits an
      external task to advance through push, draft PR, and ready PR after each action
      receives its own one-shot grant. Enabling either mode requires a named actor and
      note. Grants record actor, time, exact target, and packet hash; one task or
      action cannot borrow another's grant. Recording an action also requires its
      resulting GitHub URL and performer. Disabling the kill switch revokes unused
      grants, so authority cannot cross publication runs. External merge grants and
      merge transitions are always rejected.
      
      For a fork push, bind the grant to both repository and branch with
      `owner/repo@refs/heads/<branch>`. An unqualified `refs/heads/<branch>` target
      means the task repository itself.
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs configure \
        --ledger <control-dir>/contributions.json --publish-mode owned \
        --actor <owner> --authority-note "Enable owned publishing for this run"
      
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs grant \
        --ledger <control-dir>/contributions.json --id <task-id> \
        --capability push --actor <owner> \
        --authority-note "Push this named branch only" \
        --target refs/heads/fix/parser-empty-metadata
      
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs transition \
        --ledger <control-dir>/contributions.json --id <task-id> --to published \
        --action push --authority-target refs/heads/fix/parser-empty-metadata \
        --remote-url https://github.com/owner/repo/tree/fix/parser-empty-metadata \
        --performed-by <publisher>
      ```
      
      Repeat `grant` and the publication transition separately for `draft_pr`,
      `ready_pr`, and `merge`. A push target is an exact `refs/heads/<branch>` ref.
      Draft PR authority names the planned branch/PR operation because the PR number
      does not exist yet. Ready and merge targets are the canonical same-repository
      `https://github.com/owner/repo/pull/<number>` URL, and each recorded action must
      stay on that PR. Names in `--actor` and `--performed-by` are audit attestations;
      authentication and authorization of the caller remain the controller's
      responsibility.
      
      For an explicitly approved external run, enable reviewed publication before
      granting the exact external task:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs configure \
        --ledger <control-dir>/contributions.json --publish-mode reviewed \
        --actor <owner> \
        --authority-note "Allow separately granted external PRs through ready review"
      ```
      
      ## Repository preparation
      
      1. Fetch the exact remote and resolve its default branch.
      2. Read repository and nearest-directory instructions completely.
      3. Inspect open PRs and recent commits for overlap.
      4. Record dirty and untracked files before touching the checkout.
      5. Create an isolated branch/worktree from the current remote base.
      6. Copy only required ignored configuration; never copy credential stores.
      7. Assign exact file ownership before opening parallel builders.
      
      Use conventional branch names such as `fix/parser-empty-metadata`,
      `docs/config-example`, or `test/token-refresh`. Add a neutral numeric suffix
      when a name already exists.
      
      ## Build and review loop
      
      Use the smallest useful roster:
      
      ```text
      Scout -> Builder -> Code Reviewer -> Release Verifier -> Handoff Writer
      ```
      
      Add a worker fleet (private Suede Labs companion, not in this pack:
      suede-codex-fleet) only when the task splits into high-volume, independent
      units. Fleet workers remain sandboxed, write only their assigned files, and
      never push. Keep one owner for shared manifests, generated indexes,
      lockfiles, or other collision magnets.
      
      Run the repository's existing checks. Test generated artifacts as well as the
      generator when applicable. Require independent review for authentication,
      payments, user data, release automation, CI workflows, and unusually large
      diffs. Review findings must map to a fix commit and a fresh verification result.
      
      ## Outward artifact contract
      
      Branch names, commits, and PR copy describe the project change, not the tooling
      used to produce it.
      
      - Use a conventional title such as `fix(parser): handle empty metadata`.
      - Structure PR bodies as `Summary`, `Why`, `Testing`, `Scope`, and `Risks`.
      - Omit voluntary tool-origin footers, model badges, automation branding,
        robot markers, and model/tool co-author trailers.
      - Keep the configured human Git identity; never forge authorship, signatures,
        review approval, or timestamps.
      - Never assert "handwritten", "no AI", or another provenance claim the
        evidence does not establish.
      - If upstream rules require assistance disclosure, preserve the exact required
        disclosure and stop the external lane at owner review.
      - Add `Signed-off-by` only when DCO requires it and the signer can truthfully
        attest.
      
      Check each outward artifact only after the task's disclosure requirement is
      recorded in the ledger:
      
      ```bash
      node skills/suede-agent-teams/scripts/contribution-ledger.mjs artifact-check \
        --ledger <control-dir>/contributions.json --id <task-id> \
        --worker <lane-id> --kind commit --input <artifact.txt>
      ```
      
      `unknown` stops packaging. `required` records `owner_review_required` for the
      PR artifact and blocks `packet_ready` until the current hash is explicitly
      approved. It records the hash and exits nonzero so an unattended shell cannot
      mistake the check for completion. The checker reports line numbers and rule
      identifiers; it does not rewrite text or remove required disclosure. Use
      `--kind branch` for the branch
      name and `--kind pr` for the PR draft so branch-only automation prefixes are
      checked without applying a broad word filter to legitimate product copy.
      
      ## Authority matrix
      
      | Target and authority | Allowed outcome |
      |---|---|
      | Any target, `local_only` | Local branch, tests, review, contribution packet |
      | Owned, explicit push approval | Push named branch only |
      | Owned, explicit PR approval | Open named PR; ready/merge remain separate |
      | External or uncertain, no reviewed-mode grant | Packet ready for owner review; no publication |
      | External after explicit reviewed-mode grants | User-controlled fork, draft PR, then ready PR; never merge |
      
      Never force-push, rewrite shared history, change branch protection, merge an
      external PR, deploy, or delete a worktree unless the governing workflow and
      target ownership allow it. External merge remains outside this ledger even
      when a user separately authorizes other publication actions.
      
      ## Contribution packet
      
      ```text
      CONTRIBUTION_PACKET
      Target: <repo, remote, base, head>
      Ownership: <owned|external + evidence>
      Authority: <applied grant and remaining boundary>
      Packet: <reviewed packet SHA-256 bound to every grant>
      Issue: <reference and acceptance criteria>
      Branch: <conventional branch>
      Commits: <hash + conventional subject>
      Changed: <every file + diffstat>
      Verification: <commands + results>
      Review: <findings, fixes, recommendation>
      Artifacts: <branch, commit, and PR hashes + artifact-check results>
      Disclosure: <rule source + required statement disposition + owner review hash>
      Caveats: <known limits>
      Status: <exact state>
      Next: <one exact action>
      ```
      
      ## Learning loop
      
      After merge, close, or supersession, record only reusable facts:
      
      - task type and estimated versus actual effort;
      - tests or review checks that caught real defects;
      - maintainer feedback and accepted house patterns;
      - duplicate-work cause;
      - lead time, review cycles, and merge outcome.
      
      Do not optimize for raw commit count. Optimize for accepted, useful changes
      that survive current-main CI and reduce repeat work in the next contribution.
      
    • scenario-templates.md 8.1 KB
      # Scenario Templates and Feature Flag Practice
      
      Pre-built rosters, lane maps, and rollout mechanics for common high-risk work.
      Read the scenario that matches the objective before opening lanes; adjust only the
      named target. Every roster, gate, and status word used here is defined in the
      `suede-agent-teams` SKILL.md — these are instantiations, not new machinery.
      
      ## Contents
      
      - [(a) Auth Rewrite](#a-auth-rewrite)
      - [(b) Payment Integration](#b-payment-integration)
      - [(c) Public Launch Review](#c-public-launch-review)
      - [(d) Data Migration](#d-data-migration)
      - [(e) Performance Audit](#e-performance-audit)
      - [(f) Recovery / Incident Response](#f-recovery--incident-response)
      - [Feature Flag Strategy](#feature-flag-strategy)
      
      ## (a) Auth Rewrite
      
      Roster: Scout, Planner, Builder (auth lane only), Code Grader, Code Reviewer, Release Verifier, Handoff Writer
      RFC required: yes. Shared session/token contract must be accepted before Builder opens.
      Flag required: yes. Default off in production; ramp by internal → 1% → full.
      
      Lane map:
      - Scout: map current auth flow, session storage, token shape, and all routes that read session
      - Planner: list every file that must change and every route that must be regression-tested
      - Builder: auth files only. No touching unrelated routes.
      - Code Grader: grade security lane with zero tolerance for C or below on the security dimension
      - Code Reviewer: focus on token lifecycle, expiry, rotation, and session fixation
      - Release Verifier: confirm auth works in production before any other lane ships
      - Handoff Writer: include session contract diff and regression test evidence
      
      Done signal: login, logout, token refresh, and session expiry all pass in production
      
      ## (b) Payment Integration
      
      Roster: Scout, Planner, Builder (payment lane only), Code Grader, Code Reviewer, Release Verifier, Handoff Writer
      RFC required: yes. Payment data shape and provider contract must be accepted.
      Flag required: yes. Never ramp payment paths without a staged rollout.
      
      Lane map:
      - Scout: map current billing models, Stripe/provider SDK version, webhook endpoints, and idempotency handling
      - Builder: payment files and webhook handlers only
      - Code Grader: flag any missing idempotency key, error retry, or PCI-sensitive data log as a blocker
      - Code Reviewer: confirm error handling covers card decline, webhook replay, partial capture, refund edge cases
      - Release Verifier: test with Stripe test mode, then confirm webhook signature validation in production
      - Handoff Writer: include provider dashboard link and webhook log evidence
      
      Done signal: charge, refund, and webhook replay all pass in production with idempotency confirmed
      
      ## (c) Public Launch Review
      
      Roster: Scout, Design Reviewer, Visibility Grader, Code Reviewer, Release Verifier, Handoff Writer
      RFC required: no (review-only, no builder lane)
      
      Lane map:
      - Scout: enumerate every public-facing URL, meta tag, og:image, CTA, and claims sentence
      - Design Reviewer: check above-fold load, mobile rendering, accessibility, and state coverage
      - Visibility Grader: score first-screen clarity, CTA pull, proof, AI readability, and structured data
      - Code Reviewer: check for console errors, broken links, unresolved env vars, and exposed secrets
      - Release Verifier: confirm live URL, DNS, SSL, and all published statements match approved copy
      - Handoff Writer: include Lighthouse score, screenshot evidence, and any unresolved published statement
      
      Done signal: all public URLs verified live, no console errors, Lighthouse performance ≥ 80
      
      ## (d) Data Migration
      
      Roster: Scout, Planner, Builder (migration lane only), Code Grader, Release Verifier, Handoff Writer
      RFC required: yes. Data shape before/after and rollback strategy must be accepted.
      Flag required: migration itself cannot be flagged; gate behind a manual trigger or migration script run
      
      Lane map:
      - Scout: map current schema, row counts, FK constraints, indexes, and any running jobs that read the affected tables
      - Planner: write migration script, define rollback script (reverse migration or restore point), and identify zero-downtime vs. maintenance-window requirement
      - Builder: migration files only. Schema changes separated from data backfill into two sequential sub-lanes.
      - Code Grader: grade data/state dimension with zero tolerance for D or below; flag missing rollback script as a blocker
      - Release Verifier: run migration against a staging DB clone, confirm row counts before/after, confirm app boots with new schema, then promote to production
      - Handoff Writer: include before/after row counts, migration command with timing, and rollback script location
      
      Done signal: production DB row counts match expected delta, app health check passes, rollback script tested in staging
      
      ## (e) Performance Audit
      
      Roster: Scout, Planner, Builder (perf lane only), Code Grader, Release Verifier, Handoff Writer
      RFC required: no, unless audit reveals a structural change (e.g. query rewrite, CDN switch).
      
      Lane map:
      - Scout: run Lighthouse, measure Core Web Vitals (LCP, INP, CLS), identify top 3 bundle contributors, map slow DB queries (EXPLAIN ANALYZE), and list current caching headers
      - Planner: rank findings by impact × effort, list the three highest-ROI fixes
      - Builder: implement only ranked fixes. No opportunistic refactors.
      - Code Grader: confirm each fix does not regress correctness or introduce a race condition
      - Release Verifier: compare Lighthouse before/after with screenshots; confirm no regression on primary user paths
      - Handoff Writer: include before/after Lighthouse scores, Core Web Vitals deltas, and any deferred findings
      
      Done signal: LCP < 2.5s or measurable improvement documented; no regression on primary paths
      
      ## (f) Recovery / Incident Response
      
      Roster: Scout, Builder (fix lane only), Release Verifier, Handoff Writer
      RFC required: no (incident is already in progress; run the Rollback Decision Tree, not an RFC)
      Flag required: n/a — this scenario reacts to an existing deploy, it does not introduce one
      
      Lane map:
      - Scout: identify what shipped, when, and what changed; walk the Rollback Decision Tree (data loss/corruption, security exposure, primary path broken, degraded-but-functional, or cosmetic) and name which branch applies
      - Scout: if the branch is "ROLLBACK IMMEDIATELY" (data loss/corruption or security exposure), say so and stop — do not investigate further before rollback, per the Rollback Decision Tree
      - Builder: executes the rollback, or the <15-minute fix, or the hot-fix-forward, per the branch Scout named. No opportunistic changes outside the incident scope.
      - Builder: after rollback, write the immediate summary — what rolled back, what was affected, who was notified — and open a follow-up issue, per the Rollback Decision Tree's post-rollback steps
      - Release Verifier: confirm the primary path is restored in production before any other lane closes
      - Handoff Writer: run the post-mortem for any P0 or P1 incident (required) or P2 (optional but encouraged); skip for P3. Populate Timeline, Impact, Root Cause, Contributing Factors, What Went Well, and Action Items with owners and due dates.
      
      Done signal: primary path verified restored in production; for P0/P1, a completed post-mortem with status `open` and every action item assigned an owner
      
      ## Feature Flag Strategy
      
      The trigger list — when to flag — stays in SKILL.md. This is the mechanics once a
      lane is flagged.
      
      **Flag lifecycle:**
      1. **Introduce**: create the flag, default off in production. Ship the code behind the flag.
      2. **Ramp**: enable for internal users, then 1%, 10%, 50%, 100% of production traffic. Monitor at each ramp.
      3. **Remove**: once 100% and stable for ≥2 weeks, delete the flag and all conditional branches. Flag removal is a P3 code review finding if overdue. Set the removal date at creation, not after ramp.
      
      **When NOT to flag:**
      - Bug fixes with no behavioral change (ship directly)
      - Internal tooling with no external API contract
      - Refactors that don't change behavior (ship with a focused review)
      
      **Flag hygiene rules:**
      - Every flag gets a removal date at creation. Stale flags are a debt item (P3 code review finding).
      - Flag names describe the feature, not the state: `new_billing_flow` not `enable_billing`.
      - Never nest flags inside flags without a design review.
      
  • scripts
    • contribution-ledger.mjs 51.1 KB · in bundle
  • CARD.md 5 KB
    # Skill Card — Agent Team Orchestrator
    
    <!-- Generated by scripts/build-skill-cards.mjs — do not hand-edit. -->
    <!-- Regenerate with: npm run build:cards -->
    
    Release record for the `suede-agent-teams` skill, following the NVIDIA skill-card template (<https://docs.nvidia.com/skills/skill-cards>). It tells a reviewer what the skill does, who owns it, what it needs, what could go wrong, and what evidence backs the release — without requiring them to open the source first.
    
    ## Description
    
    Suede Labs agent-team orchestrator: split complex work into coordinated lanes with explicit file ownership, WIP collision detection, quality gates, escalation thresholds, rollback plans, and handoffs that prove what shipped.
    
    Status: production. Ships in the `suede-skills` plugin (the full pack) at release 0.19.0; loads as a Claude Code / Codex agent skill from this directory's [SKILL.md](./SKILL.md).
    
    ## Owner
    
    Jason Colapietro, Suede Labs AI (<https://github.com/JasonColapietro>). Security contact: `info@suedeai.ai` per [SECURITY.md](../../SECURITY.md).
    
    ## License / Terms of Use
    
    MIT ([LICENSE](../../LICENSE)). The pack's combined license expression is `MIT AND BSD-3-Clause`; this skill bundles no third-party licensed material of its own.
    
    ## Use Case
    
    Target users: developers and creators running the skill inside a Claude Code or Codex CLI session.
    
    Use when one shared change needs safe parallel ownership across builders and reviewers, when a lane map must be resolved before anyone opens a file, or when running a repeatable public-repository contribution program with issue scoring, atomic task leases, isolated worktrees, and explicit publication authority.
    
    Out of scope — one repo change a bundled DAG can run end to end (use suede-graph-flo-xr); findings-only review of a diff (use suede-code-review) or an A-F ship grade (use suede-code-grader); CI, branch protection, or merge-gate wiring (use suede-ci-gate); branch and worktree setup on a stale mirror (a private Suede Labs companion, not in this pack).
    
    ## Deployment Geography
    
    Global. The skill is a prompt-and-script package that runs locally inside the invoking agent session; it pins no region-specific service of its own.
    
    ## Requirements / Dependencies
    
    - A Claude Code or Codex CLI session with the `suede-skills` plugin installed (install options: <https://skills.suedeai.ai/>).
    - Bundled files loaded relative to this directory: `agents/` (1 file), `scripts/` (1 file), `references/` (3 files).
    - Credentials: none are bundled or required by the skill files. Any tool or API credentials come from the host session; never paste credentials into skill files, prompts, or outputs.
    
    ## Known Risks and Mitigations
    
    - Risk: an agent treats a quality gate as autonomous authority. Mitigation: every gate in the pack is advisory — it changes what is reported, never what the user decided; only extreme-risk findings (data loss, credential exposure, legal/rights violations, payment mistakes, irreversible public damage) pause for the user's explicit choice.
    - Risk: a skill instruction is used to act outside its mandate. Mitigation: the hard limits in the skill body's "Red flags" section, quoted below.
    
    From "Red flags":
    
    - "The lanes probably won't touch the same files" — probably is not a lane map. Run WIP collision detection first.
    - "The approach is obvious, skip the RFC" — if it has been discussed twice without resolution, it is not obvious.
    - "Mark it done, the code is written" — `changed locally` is not `verified locally`; the status vocabulary has no shortcuts.
    - "Leave that caveat out so the handoff looks clean" — a handoff missing a field is status `held`, not done.
    - "One more fix cycle will crack it" — past 3 cycles on the same failing check, stop and run the loop stall protocol.
    - "The builder can review its own lane" — for high-risk work, builder and reviewer stay separate.
    
    ## References
    
    - Skill source: [`skills/suede-agent-teams/SKILL.md`](./SKILL.md)
    - Rendered reference page: <https://skills.suedeai.ai/skills/suede-agent-teams.html>
    - Security policy and reviewed scanner exceptions: [SECURITY.md](../../SECURITY.md) and [`.plugin-scanner.toml`](../../.plugin-scanner.toml) at the repo root
    
    ## Skill Output
    
    Structured Markdown returned in the agent's response, shaped by the output contract defined in the skill body: "Output Shape". The skill publishes, posts, and sends nothing without the user's explicit authorization; delivery decisions stay with the user.
    
    ## Skill Version
    
    0.19.0 — the pack is single-versioned, so every skill releases together; see [VERSION](../../VERSION) and [CITATION.cff](../../CITATION.cff) for the release identifier this card describes.
    
    ## Ethical Considerations
    
    - The skill produces recommendations for a human decision-maker. Publishing, sending, payment, and rights decisions stay with the user.
    - Its gates require verifiable claims and honest reporting; do not use the skill to fabricate claims, evidence, metrics, or attribution.
    - Report suspected misuse or a security concern privately per [SECURITY.md](../../SECURITY.md); do not open a public issue for it.
    
  • SKILL.md 22.9 KB
    ---
    name: suede-agent-teams
    description: "Suede Labs agent-team orchestrator: split complex work into coordinated lanes with explicit file ownership, WIP collision detection, quality gates, escalation thresholds, rollback plans, and handoffs that prove what shipped. Use when one shared change needs safe parallel ownership across builders and reviewers, when a lane map must be resolved before anyone opens a file, or when running a repeatable public-repository contribution program with issue scoring, atomic task leases, isolated worktrees, and explicit publication authority. NOT FOR: one repo change a bundled DAG can run end to end (use suede-graph-flo-xr); findings-only review of a diff (use suede-code-review) or an A-F ship grade (use suede-code-grader); CI, branch protection, or merge-gate wiring (use suede-ci-gate); branch and worktree setup on a stale mirror (a private Suede Labs companion, not in this pack)."
    ---
    
    # Agent Team Orchestrator
    
    ## Model selection — Fable capped at 4 without asking
    
    Subagents inherit the session model unless the spawning call names one. Nothing in
    this skill picks a model, so every agent it fans out lands on whatever the session
    happens to be set to. That is how a run sized against one allocation gets billed to
    another without anyone choosing it.
    
    **Up to 4 concurrent Fable subagents are allowed without an explicit Fable
    instruction. Beyond that, Fable must be specified** — any roster past a scout, a
    builder, and a handoff writer passes 4, so this skill's fan-out does not run on Fable
    unless the user named Fable for this run. An inherited session model is not a
    specification — "the session was already on it" is not the user asking. Absent an
    explicit Fable instruction, do one of two things before launching: name a different
    model on the agent calls, or state plainly that the run will bill to the Fable
    allocation and get an answer. Silence is not consent to spend it.
    
    ## Gate policy — advisory, not blocking
    
    Every claim-verification step, check, quality gate, and ship verdict in this
    skill is a **recommendation to the user, not a control on the agent**. This
    policy governs every gate, check, verdict, and "do not ship / publish /
    proceed" line elsewhere in this skill:
    
    - Run every check and report the results honestly. Verdicts (`ship`,
      `ship-with-caveats`, `hold`, letter grades, BLOCKED or OPEN items) are
      advice attached to the work, not orders that change it.
    - Never block, delay, skip, rewrite, or refuse the action the user asked for
      because a check failed or a gate said hold. Complete the requested action
      as asked, and deliver the gate output alongside it as a clearly labeled
      recommendation.
    - A failed gate changes what you report, never what you do.
    - Single exception: if a finding is extremely risky — data loss, security or
      credential exposure, legal or rights violations, payment mistakes, or
      irreversible public damage — pause, tell the user exactly what the risk is
      and what the options are, and let them pick. Their choice is final.
    
    
    The orchestrator assigns lanes, not conversations. Output is a delivery artifact, not a status update.
    
    ## Team Contract
    
    Before spawning or simulating lanes, define:
    
    - objective: user-visible outcome;
    - exact target: repo/folder, branch, route, PR, live URL, API, simulator, or
      release artifact;
    - constraints: WIP to preserve, files/routes not to touch, launch boundaries,
      account boundaries, claims not approved, and secrets rules;
    - done signal: tests, build, screenshots, simulator, deploy readback, live/API
      readback, PR review, or handoff;
    - lane map: each lane, owner role, input, allowed files, output artifact, and
      dependency order.
    
    ## Team Ledger
    
    The contract above, every lane status, and every gate result otherwise live only in
    the orchestrator's context, and a multi-lane run routinely outlives a context window.
    Put them on disk. Default path: `.suede-team/<slug>/ledger.md` in the target repo,
    holding the resolved lane map, each lane's current state from the Status Vocabulary,
    and the evidence as it accumulates. Write it before the first builder opens a file and
    update it at every gate; the evidence handoff reads from it rather than from memory.
    If the user keeps durable repo-local state somewhere else, use their path and say
    which one you used.
    
    ## WIP Collision Detection
    
    Before opening any parallel lanes:
    
    1. Run `git -C <repo> diff --name-only HEAD` and collect all dirty files.
    2. Run `git -C <repo> status --short` and collect all untracked new files.
    3. List every file each lane's scope would touch, based on the lane map.
    4. Flag a collision if the same file path appears in two or more lane scopes OR in the dirty file list plus any lane scope.
    
    Collision resolution rules:
    - Same file, independent changes: sequence the lanes; the second lane rebases on the first lane's commit before opening.
    - Same file, overlapping changes: merge the two lanes into one lane with one owner. Do not split responsibility for a single file across two concurrent builders.
    - Dirty file in a lane scope: the orchestrator decides. Either stash and restore, or make that lane the only lane allowed to touch the file.
    
    The orchestrator writes the resolved lane map to the team ledger (`.suede-team/<slug>/ledger.md`, see Team Ledger) before any builder starts. No builder opens a file not in its assigned lane map.
    
    ## Default Roster
    
    Start with Scout + Builder + Handoff Writer. Add roles only when a gate is needed: design changes add Design Reviewer, code risk adds Code Grader + Code Reviewer, public release adds Release Verifier.
    
    - **Scout:** finds repo, docs, current state, dirty files, live routes, and
      likely blast radius.
    - **Planner:** turns requirements into verifiable tasks with acceptance
      criteria and dependencies.
    - **Builder:** makes narrow code or content changes inside the existing system.
    - **Design reviewer:** checks rendered visual quality, responsive behavior,
      accessibility, copy, and state coverage.
    - **Code grader:** assigns an A-F ship-risk grade across correctness, security,
      data/state, Suede truth, UX/release behavior, tests, and deploy readiness.
    - **Code reviewer:** runs full-context review and turns findings into fix briefs.
    - **Visibility grader:** grades public pages, GitHub Pages sites, docs, and
      launch surfaces for findability, first-screen clarity, CTA pull, proof, AI
      readability, and design signal.
    - **Release verifier:** checks build, deploy, live/API behavior, App Store/iOS
      truth, secrets, and published statements.
    - **Handoff writer:** produces a signed delivery record. If the handoff omits any required field (see Handoff Quality Checklist), the work is not done; it is held.
    
    For high-risk work, keep builder and reviewer separate.
    
    ## RFC Mode
    
    For major architectural decisions, new feature designs, or changes with broad blast radius, run an RFC (Request for Comments) before spawning builders.
    
    An RFC forces alignment on WHAT and WHY before committing to HOW.
    
    RFC status vocabulary: `draft | accepted | superseded | withdrawn`.
    
    Before authoring one, read
    [`references/incident-and-rfc-templates.md`](references/incident-and-rfc-templates.md)
    and fill every section it lists — problem statement, proposed solution, alternatives
    considered, risks, success criteria, decision record.
    
    Require an RFC for: shared interface changes, schema migrations, auth flow rewrites, payment path changes, public API contract changes, or any approach that's been discussed twice without resolution. No builder lane opens until RFC status is `accepted`.
    
    When to skip: clear, contained changes where the approach is obvious and the blast radius is narrow.
    
    ## Feature Flag Strategy
    
    Not every change should ship as a hard deploy. Feature flags allow gradual rollout, A/B testing, and instant rollback without a redeploy.
    
    **When to flag:**
    - New user-facing features in production traffic paths
    - Changes to auth, payment, or data migration paths
    - Any change that cannot be instantly rolled back by revert (e.g., a schema migration)
    - A/B tests
    
    Once a lane is flagged, read the lifecycle, the when-NOT-to-flag list, and the hygiene
    rules in
    the Feature Flag Strategy section of [`references/scenario-templates.md`](references/scenario-templates.md)
    before the ramp starts. Every flag gets a removal date at creation; a stale flag is a
    P3 code review finding.
    
    ## Rollback Decision Tree
    
    When something goes wrong after a deploy, the team needs a pre-agreed decision framework to avoid paralysis.
    
    ```
    Is there active data loss or corruption? → ROLLBACK IMMEDIATELY. Don't investigate first.
    Is there a security exposure (PII, auth bypass, payment data)? → ROLLBACK IMMEDIATELY. Notify security.
    Is a primary user path broken (login, checkout, core workflow)? → ROLLBACK unless fix is <15 minutes away.
    Is performance degraded but functional? → Hold and investigate. Set a 30-minute timer.
    Is it a cosmetic issue? → Hot-fix forward. No rollback.
    ```
    
    After rollback:
    1. Write an immediate summary: what rolled back, what was affected, who was notified.
    2. Leave rollback notes in the PR and open a follow-up issue.
    3. Run a lightweight post-mortem (see below) before re-shipping.
    
    ## Post-Mortem
    
    For any production incident, failed release, or significant rollback, run a post-mortem. Keep it blameless: focus on systems, not individuals.
    
    Severity: P0 (total outage) / P1 (primary path broken) / P2 (degraded) / P3 (cosmetic).
    
    Post-mortems are required for P0 and P1 incidents. Optional but encouraged for P2. Skip for P3.
    When one is required, write it from
    [`references/incident-and-rfc-templates.md`](references/incident-and-rfc-templates.md)
    and fill every section: timeline, impact, root cause, contributing factors, what went
    well, and action items with owners and due dates.
    
    ## Phase Loop
    
    The Phase Loop is the Continuous Team Loop run at minimal scale. Use it when a full 10-gate roster is overkill but you still need scout, plan, build, verify, and ship stages.
    
    For high-risk changes, consult the Rollback Decision Tree before shipping. For gradual rollouts, use the Feature Flag Strategy. For shared interface changes, require RFC Mode before the plan stage opens.
    
    ## Public Contribution Program
    
    When the objective is recurring work across owned or external public
    repositories, read
    [`references/public-contribution-program.md`](references/public-contribution-program.md)
    completely before opening lanes. Use its deterministic ledger to score tasks,
    lease each repo/issue pair to one worker, and prevent duplicate work. Start in
    `local_only` authority with publication disabled. Keep external targets at a
    reviewed contribution packet unless the user separately approves a draft PR.
    
    The outward artifact gate applies to branch names, commit messages, and PR
    copy. Use conventional project language and omit voluntary tool-origin
    branding or trailers. Never forge authorship or deny tool use; an upstream
    disclosure requirement overrides neutral packaging and moves the lane to owner
    review.
    
    ## Model Tiering
    
    Assign the least capable model that can still do the role correctly. Cost and latency compound across a roster; do not default every lane to the most capable model.
    
    - **Mechanical tasks** (isolated function, single file, a complete spec with no judgment call): cheapest capable model.
    - **Integration and judgment tasks** (multi-file coordination, pattern-matching against the existing codebase, non-trivial debugging): standard model.
    - **Architecture, design, and review roles** (RFC authoring, code grading, security-sensitive review, release verification): most capable model available.
    
    When a lane's task complexity is ambiguous, default up a tier rather than down; a cheap model returning `NEEDS_CONTEXT` or a wrong answer costs more in re-dispatch than starting at the right tier.
    
    ## Builder Dispatch Protocol
    
    A dispatched builder reports one of four states before its output reaches review. Handle each before the lane proceeds to the next roster stage:
    
    - **Done**: proceed to the next stage in the roster.
    - **Done with concerns**: the builder finished but flagged a doubt. Read the concern. If it touches correctness or scope, resolve it before review; if it is a pure observation, note it in the handoff and proceed.
    - **Needs context**: the builder is missing information the lane map should have supplied. Provide it and re-dispatch the same builder; do not silently guess on its behalf.
    - **Blocked**: the builder cannot proceed. Diagnose why before re-dispatching: a context gap gets more context, a reasoning gap gets a more capable model, an oversized task gets split into smaller lanes, and a wrong plan escalates to the human (see Escalation Protocol). Never re-dispatch the same builder unchanged and hope for a different result.
    
    A builder that asks a clarifying question mid-task gets an answer before it continues; do not let it guess past an open question to hit a deadline.
    
    ## Continuous Team Loop
    
    Use the smallest loop that can finish the work, but escalate deliberately when
    the task is broad, risky, release-bound, or the user asks for max agent teams.
    
    Choose the loop:
    
    - **Sequential:** default for normal scoped work.
    - **Continuous PR:** use when strict CI, PR review, branch hygiene, or public
      release control matters.
    - **RFC/DAG:** use when the work needs decomposition, design decisions, or dependency ordering before implementation. Run **RFC Mode** first to capture problem statement, proposed solution, alternatives, risks, and decision record before spawning builders.
    - **Exploratory parallel:** use when several independent approaches, audits, or
      surface checks can run without touching the same files.
    - **Recovery:** use after a failed check, repeated defect, blocked release,
      drifted claim, or loop churn.
    
    For max-agent work, escalate through this roster only as needed:
    
    ```text
    Scout -> Planner -> Builder lane(s) -> Design reviewer -> Visibility grader
    -> Code grader -> Code reviewer -> Release verifier -> Handoff writer
    ```
    
    Wrap the roster with these gates:
    
    1. **Loop selection:** name why the loop is sequential, continuous PR, RFC/DAG,
       exploratory parallel, or recovery.
    2. **Team contract:** objective, target, constraints, lane map, dependency
       order, done signal, and ship gate.
    3. **Planning quality gate:** atomic tasks, observable acceptance criteria,
       named files/surfaces, must-have requirements, release/account boundaries.
    4. **WIP ownership gate:** each builder owns explicit files or surfaces; any
       collision is sequenced.
    5. **Execute wave:** parallel lanes only when outputs do not collide.
    6. **Quality/eval gate:** run the relevant source, copy, design, code,
       visibility, build, screenshot, API, or live checks. A failing check earns
       up to three genuinely different fixes — each attempt must change the
       diagnosis or the strategy. Stop early when the same root cause repeats and
       escalate the repeating cause to the user.
    7. **Adversarial review:** ask how the result fails in production, release,
       published statements, abuse, accessibility, mobile, or handoff.
    8. **Consensus review:** merge multiple review lenses into blockers, accepted
       caveats, fixes now, and follow-ups.
    9. **Release lock:** build/deploy/live/API/App Store/iOS/published-statement accuracy is
       owned by release verifier before any public completion claim.
    10. **Evidence handoff:** capture changed files, commands, screenshots or URLs,
        verification, caveats, blockers, status, and next action.
    
    Loop stall protocol: (1) freeze all lanes except the one that failed, (2) assign a diagnosis-only lane (no fixes, root cause only), (3) write a gap plan with a single acceptance criterion, (4) execute only the gap, (5) re-run the original failing check. Do not widen until that check passes.
    
    ## Inter-Lane Communication
    
    When a builder lane completes its output and a reviewer lane depends on it, the signal is explicit, not assumed.
    
    The completing lane writes a Lane Ready notice:
    
    ```
    Lane: [name]
    Status: output ready for review
    Artifact: [file path, URL, or PR link]
    Reviewer: [lane name that receives this output]
    Unresolved: [any known issue the reviewer should know before starting]
    ```
    
    The reviewer lane does not start until it has received a Lane Ready notice from every upstream dependency in its lane map.
    
    The orchestrator routes Lane Ready notices. In a sequential thread, the orchestrator posts the Lane Ready notice on behalf of each completing lane before invoking the next.
    
    Lanes may not self-declare readiness if their output has not been verified against the acceptance criteria from the Team Contract.
    
    ## Planning Quality Gate
    
    A plan is not ready until:
    
    - each task has one concern;
    - dependencies are ordered;
    - acceptance criteria are observable, not subjective;
    - required files or surfaces are named;
    - must-have requirements are covered;
    - tests, screenshots, builds, or API checks map to the risky behavior;
    - release and account boundaries are explicit.
    
    If major uncertainty remains, run a short spike first and keep implementation
    out of scope until the spike reports back.
    
    ## Review Convergence
    
    For important merges, run at least two independent review lenses:
    
    - one asks whether the implementation works as intended;
    - one asks how it can fail in production, review, release, or public use.
    
    Merge the findings into:
    
    - consensus blockers;
    - plausible divergent risks;
    - accepted caveats;
    - fixes to execute now;
    - follow-ups that should not block.
    
    Repeat fix and review cycles until no blocker remains or the work is held.
    
    ## Status Vocabulary
    
    Valid states in order: `scoped` → `planned` → `executing` → `changed locally` → `verified locally` → `reviewed` → `committed` → `pushed` → `deployed` → `verified live` → `released`
    
    Interrupt states: `blocked` (needs external action) | `held` (needs named fix before continuing)
    
    Do not skip. `changed locally` is not `verified locally`. `deployed` is not `verified live`. Do not mark `released` until the done signal from the Team Contract passes.
    
    ## Scenario Templates
    
    Six pre-built configurations exist for common high-risk deployments: (a) Auth Rewrite,
    (b) Payment Integration, (c) Public Launch Review, (d) Data Migration, (e) Performance
    Audit, (f) Recovery / Incident Response. When the objective matches one, read
    [`references/scenario-templates.md`](references/scenario-templates.md) completely
    before opening lanes and adjust only the named target — each template carries its own
    roster, lane map, RFC and flag requirements, grader tolerances, and done signal.
    
    ## Escalation Protocol
    
    Stop the loop, surface the condition, and wait for human sign-off before continuing.
    
    | Condition | Threshold | Action |
    |---|---|---|
    | Repeated fix cycles | > 3 fix-rerun cycles on the same failing check | Stop. Write a diagnosis summary. Ask: is the acceptance criterion correct, or is the fix strategy wrong? |
    | Security finding of unknown severity | Any finding touching auth, session, PII, payment data, or access control that cannot be confidently classified as low risk | Stop. Do not attempt a fix. Surface the exact finding and uncertain blast radius. Human decides next step. |
    | Production incident with data exposure | Any indication of PII, payment data, or auth token exposure in production logs, error reports, or user reports | Stop all lanes. Trigger rollback decision tree. Notify human immediately. Do not investigate further before rollback. |
    | Cost spike | > 20 tool calls without a verified output, or estimated API/infra cost > $50 in a single loop | Stop. Summarize progress and remaining scope. Ask human to authorize continuation. |
    | Contradictory constraints | Two constraints in the Team Contract are mutually exclusive | Stop planning. Surface the conflict with a specific example. Do not proceed until human resolves. |
    
    No agent may override an escalation threshold by re-scoping the task or declaring the condition resolved without human confirmation.
    
    ## Red Flags — Stop
    
    - "The lanes probably won't touch the same files" — probably is not a lane map. Run WIP collision detection first.
    - "The approach is obvious, skip the RFC" — if it has been discussed twice without resolution, it is not obvious.
    - "Mark it done, the code is written" — `changed locally` is not `verified locally`; the status vocabulary has no shortcuts.
    - "Leave that caveat out so the handoff looks clean" — a handoff missing a field is status `held`, not done.
    - "One more fix cycle will crack it" — past 3 cycles on the same failing check, stop and run the loop stall protocol.
    - "The builder can review its own lane" — for high-risk work, builder and reviewer stay separate.
    
    ## Handoff Quality Checklist
    
    A handoff is not complete until every field below is present and truthful. The handoff writer signs off by confirming each item.
    
    Required fields:
    - [ ] Target: exact repo, branch, route, or URL (not "the main app")
    - [ ] Changed: every file path that was modified, created, or deleted (not "various files")
    - [ ] Commands: every bash command run, in order, with the actual output or exit code
    - [ ] Verification: observable evidence (screenshot URL, test output, curl response, build log), not "it works"
    - [ ] Status: one of the vocabulary states, not "done" unless the done signal from the Team Contract is satisfied
    - [ ] Next: the single most important unresolved step (not "see above")
    - [ ] Caveats: every known limitation, assumption, or deferred item; none omitted to make the handoff look cleaner
    
    If any field is missing, the handoff writer must fill it before marking status `released` or `verified live`. A handoff with a missing field is status `held`.
    
    ## Output Shape
    
    For a team plan:
    
    ```text
    Objective:
    Target:
    Constraints:
    Lane Map:
    Dependency Order:
    Done Signal:
    Ship Gate:
    ```
    
    For execution updates:
    
    ```text
    Lane:
    Status:
    Evidence:
    Next:
    Risk:
    ```
    
    For final handoff:
    
    ```text
    Simple explanation:
    Usual breakdown:
    Target:
    Changed:
    Verification:
    Caveats:
    Status:
    Next:
    Cue Suede:
    ```
    
    ## Routing
    
    - The work is one repo's change and a bundled DAG can run it end to end →
      **suede-graph-flo-xr**. Precedence: one repo, one change, research-through-release in a
      single scripted run goes there; orchestration that is manual, ongoing, cross-repo,
      or a public-contribution program stays here. A single lane inside a program here
      that needs the full research-and-refute treatment can be handed to **suede-graph-flo-xr**
      for that lane alone.
    - A recurring owned/public-repository contribution program needs issue leases,
      isolated worktrees, review, and an authority-gated packet → read
      `references/public-contribution-program.md` and keep this skill as controller
    - A code lane needs review or a ship grade → **suede-code** (combined), **suede-code-review** (findings only), or **suede-code-grader** (grade only)
    - The repo's merge gate is weak or missing → **suede-ci-gate**
    - The work needs branch ownership, stale-mirror worktree setup, finish options, or cleanup discipline → **suede-git-hygiene** (private Suede Labs companion, not in this pack)
    - A lane ships AI behavior → **suede-ai-eval** before that lane's quality gate closes
    - The public launch lane needs a page verdict → **suede-visibility-grader**, then **suede-launch-packaging**
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related