autospec-grow-run
Drain the growth backlog — implement growth:artifact issues via /autospec-run with a content-quality gate, run the growth:outbound draft→ethics→approval-queue pipeline (package-only, never auto-post), and measure/attribute via live adapters that re-weight the next define cycle. Use after /autospec-grow-define has filed issues.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- autospec-grow-run
- description
- Drain the growth backlog — implement growth:artifact issues via /autospec-run with a content-quality gate, run the growth:outbound draft→ethics→approval-queue pipeline (package-only, never auto-post), and measure/attribute via live adapters that re-weight the next define cycle. Use after /autospec-grow-define has filed issues.
02 资源文件 5
- 参考文档codex/prompt.md20.8 KB
- 脚本install.sh13.0 KB
- 参考文档opencode/agent.md21.2 KB
- 参考文档README.md4.8 KB
- 脚本uninstall.sh3.8 KB
03 SKILL.md 正文
autospec-grow-run workflow (harness-neutral)
Run the implementation half of the autospec-growth pipeline for a
product/site opted into .autospec/growth.yml: drain
growth:artifact issues → draft/gate/queue growth:outbound issues →
handle human approvals → measure and attribute. This skill picks up
where /autospec-grow-define stops.
Manage your own context — never exceed 60%. Delegate to subagents whenever your harness supports it; do not draft outbound copy or run the ethics gate directly in the main conversation when a subagent can do it.
<!-- autospec-block:startup-self-update SKILL_NAME=autospec-grow-run -->
Self-update mode
If the invocation argument matches the regex ^\s*update\s*$ (case-insensitive,
whitespace-padded), this skill enters self-update mode and does not run the
normal pipeline:
- Detect harness by checking which install path exists for this skill:
- Claude Code:
~/.claude/skills/autospec-grow-run/SKILL.md - OpenCode:
~/.config/opencode/agent/autospec-grow-run.md - Codex CLI:
~/.codex/prompts/autospec-grow-run.md
- Claude Code:
- Re-install the full autospec suite from
mainby piping the canonical installer:
Run this one-liner once; it refreshes all autospec skills across all harnesses. When you author this skill's owncurl -fsSL https://raw.githubusercontent.com/berlinguyinca/autospec/main/bootstrap.sh | bash -s -- --skill all --harness all --updateSKILL.mdby hand, mirror the change into the trio by editingskills/autospec-grow-run/SKILL.mdand then re-derivingcodex/prompt.mdandopencode/agent.mdwith the repo's trio-derivation helper (derive-trio.sh, run--in-place), then regenerating the skill goldens with the repo's golden-generation helper (gen-skill-goldens.sh) forautospec-grow-run— never hand-edit the derived copies. - Show the diff between the prior installed file(s) and the freshly
fetched copy (e.g.
diff <(cat <prior>) <(curl -fsSL ...SKILL.md)or the equivalent recorded by the installer). - Stop. Do not enter Phase R0 / any pipeline phase. Print the upgrade summary and return to the user.
If no install path is detected, print Self-update: no installed copy of autospec-grow-run found; run install.sh first. and exit.
Run modes
The invocation argument (after the update check above) selects which phases
run. Match the argument case-insensitively, ignoring surrounding whitespace:
outbound(argument matches^\s*outbound\s*$) — outbound-only mode: run R0 (detect) then R2 (draft → gate → queue) and R3 (handle approvals). Skip R1 and R4. The artifact drain (R1) is the autonomous conductor's Tier 1 job, and measurement (R4) is its own cadence-gated tier; re-running either here would duplicate that work.measure(argument matches^\s*measure\s*$) — measure-only mode: run R0 (detect) then R4 (measure & attribute). Skip R1, R2, and R3. This is what the conductor's cadence-gated measure tier invokes.- anything else / no argument — full pipeline: R0 → R1 → R2 → R3 → R4, exactly as described below.
Resolve the mode once in R0 and hold it for the run. Each phase below names the modes it runs in; when a phase is skipped for the active mode, do not emit its ledger lines or notifications — proceed to the next phase it applies to. The conductor's outbound and measure tiers rely on these narrow modes so each tier does exactly its own slice of work.
Required capabilities & harness adapter
This workflow assumes seven capabilities. Map each one to your harness's actual tool. If a capability is missing, use the listed fallback.
| Capability | Claude Code | OpenCode | Codex CLI | Fallback if missing |
|---|---|---|---|---|
| Subagent dispatch (draft/review/attribute) | Agent (subagent_type=general-purpose) |
nested task agent, await output |
spawn nested CLI session | Do the work in-thread (more context cost) |
| GitHub issue/label/comment ops | gh CLI via Bash |
gh CLI via shell tool |
gh CLI via apply_patch/shell |
Abort the affected step and log a reason; never fake a gh result |
| JSON/JSONL manipulation | jq via Bash |
jq via shell tool |
jq via shell |
Do the parsing inline in the subagent prompt |
| HTTP calls for measurement adapters | curl via Bash |
curl via shell tool |
curl via shell |
Degrade that adapter to {} and continue |
| Human-visible run notifications | PushNotification |
inline message / OS notify equivalent | inline message | Print the notice to the transcript and continue |
| Browser (site/UI verification, best-effort) | autospec-playwright / Claude-in-Chrome if available |
equivalent browser tool if available | not typically available | Skip browser verification; note it as unverified |
| Subagent model tier | Tier A: opus + ultrathink; Tier B: sonnet + medium thinking |
Tier A: top task model + high reasoning; Tier B: smaller-tier task + medium reasoning |
Tier A: top GPT + reasoning_effort=high; Tier B: current spark/cost-optimized Codex + reasoning_effort=medium |
Honor the per-phase tier mapping in AGENTS.md; retry the same subagent UP on unavailability |
| <!-- autospec-block:harness-adapter-core --> |
Persistent project notes: write durable preferences to AGENTS.md in
the repo root — recognized by Claude Code, OpenCode, and Codex. Per
AGENTS.md, subagent dispatches use a two-tier policy: Tier A (top model +
extended thinking) for drafting, gate-review, and attribution work; Tier B
(cheaper model + medium thinking) for mechanical steps. The orchestrator
keeps the user's invoked model. Fall back UP the tier on quota/capacity or
other unavailability by retrying the same subagent with the stronger tier
while preserving parent context.
Harness detection + Model tier
Detect your harness by checking available tools before Phase R0:
-
Claude Code — the
Agenttool with asubagent_typeparameter is available.TIER_A=opus+ultrathink(the alias, which resolves to the current Claude Opus generation)TIER_B=sonnet(the alias, which resolves to the current Claude Sonnet generation)
-
OpenCode — a
tasktool with model/tier configuration is available (nosubagent_type).TIER_A= top-tier task model + high reasoningTIER_B= smaller-tier task model + medium reasoning
-
Codex CLI — neither
Agentnor a configurabletasktool is available;apply_patchis the primary edit tool.TIER_A= current top GPT model +reasoning_effort=highTIER_B= the spark / cost-optimized variant of the configured model when one exists, else the configured model +reasoning_effort=medium
Fallback rule: If TIER_B is not available in your harness (model
unknown, quota/capacity failure, authorization failure, or tool call returns
an error for that model), silently retry the same subagent dispatch with
TIER_A. Preserve the parent context on retry; for Codex native subagents,
fork/inherit the current conversation context and use the latest top GPT
model instead of moving the work into the main session. Never ask the user.
Hold TIER_A and TIER_B for the entire skill run. Resolve both once, at
skill start, before Phase R0.
Model tier:
TIER_A(draft, gate-review, attribute);TIER_B(cheap mechanical).
| Phase | Model tier | Why |
|---|---|---|
| R2 outbound draft | TIER_A |
Drafting on-topic, non-spammy outreach copy that respects each venue's self-promo rule requires judgment. |
| R2/R3 ethics gate reviewer | TIER_A |
Must actively look for disclosure gaps, spam framing, and policy violations — cheap models default to agreeing. |
| R4 attribution synthesis / learnings memo | TIER_A |
Turning raw ledger + metric deltas into a defensible per-lens attribution narrative is judgment-heavy. |
Config read/validate, JSONL plumbing, growth-*.sh/grow-define-*.sh invocations, ledger writes |
TIER_B (or no subagent at all — deterministic scripts) |
Mechanical: parsing, validating, and shelling out to deterministic scripts. |
Relevant memory injection
Before executing the main pipeline phases, call the injector to surface relevant saved lessons:
bash "${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}/inject-relevant-memory.sh" \
--context "autospec-grow-run drain content-quality outbound ethics approval attribution" \
--top-k 5
Prepend the output block (if non-empty) to your working context. This surfaces lessons like the growth-ethics blocklist immutability rule, the "never auto-post" invariant, and prior adapter fail-closed pitfalls before they recur.
R0 — Detect
(runs in every mode)
- Resolve the run mode from the invocation argument (see Run modes
above):
outbound,measure, or full pipeline. Hold it for the run — it decides which of R1–R4 execute. - Detect your harness (see above) and resolve
TIER_A/TIER_B. - Check for
.autospec/growth.yml. If absent, print:"No .autospec/growth.yml found — this repo is not opted into autospec-growth. See skills/autospec-grow-define/README.md to configure a product/site and try again."and exit (inert; do not create the file, do not proceed to any phase). - Render the YAML as JSON (e.g.
yq -o=json . .autospec/growth.yml) and validate it:
If validation fails (non-zero exit), print the validator's stderr reason and exit — do not proceed with a partially-valid config.bash "${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}/validate-growth-config.sh" <config.json> - Resolve the growth-shared script directory once for the rest of the run:
AUTOSPEC_SCRIPTS_DIR="${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}"(this is where everygrowth-*.sh,grow-define-*.sh, andvalidate-*.shscript referenced below lives). Hold the validated<config.json>path for the rest of the run.
R1 — Artifact drain
(full pipeline only — skipped in outbound and measure modes)
- Enumerate open
growth:artifactissues in the target repo:gh issue list --repo <owner/name> --label growth:artifact --state open --json number,title,labels - For each issue, in turn:
- Invoke
/autospec-runagainst that single issue (invoked as the existing skill, not forked/reimplemented — this skill does not duplicate/autospec-run's own decompose/implement/merge machinery). Because the issue carriesgrowth:artifact,/autospec-runitself runs the content-quality gate (GATE=growth: deterministicgrowth-content-quality-precheck.shpre-checks plus aTIER_Areviewer, with adaptive retry on failure) before allowing that issue's PR to auto-merge, alongside the standard code reviewer, thegrowth-ethicsgate, andautospec-secaudit. R1 does not re-run any of these — the gate is single-sourced in/autospec-run. - Append a ledger line:
merged_cleanon success,failedon a per-issue failure. A per-issue failure does not stop the drain — move on to the nextgrowth:artifactissue.
- Invoke
R2 — Outbound draft → gate → queue
(full pipeline and outbound mode — skipped in measure mode)
For each open growth:outbound (or growth/needs-draft) issue, in turn:
- Draft (
TIER_Asubagent) — produce outbound copy matchingskills/autospec-shared/schemas/growth-outbound-draft.schema.json. - Structural validation:
A malformed draft is skipped and logged — do not attempt to repair it in-place; log the reason and move to the next issue.bash "$AUTOSPEC_SCRIPTS_DIR/validate-outbound-draft.sh" <draft.json> - Ethics gate — deterministic disclosure pre-check, then the LLM gate:
followed by abash "$AUTOSPEC_SCRIPTS_DIR/growth-ethics-precheck.sh" --disclosure <draft.md>TIER_Agrowth-ethicsreviewer subagent, both wrapped in a 5-attempt adaptive-retry loop (findings fed back as re-draft directives). If the gate is still blocked after 5 attempts, append arejectedledger line, retire the source issue (remove itsgrowth/needs-draftlabel, addgrowth/rejected), and move on — do not queue a blocked draft. Retiring it stops the conductor's outbound tier from re-drafting the same hopeless issue every cycle. - Cadence check:
If the venue'sbash "$AUTOSPEC_SCRIPTS_DIR/growth-ethics-precheck.sh" --cadence <config.json> <ledger.jsonl> <platform>cadence_cap_per_weekis already met, refuse to queue this draft this cycle (do not reject it permanently — it may queue next cycle). - Relevance check — the draft's rationale/body must carry the target
venue's recorded
self_promo_rulefrom.autospec/growth.yml(targets.communities[*].self_promo_rule); a draft that ignores the venue's self-promo rule is treated as an ethics-gate failure, not queued. - Build the approval-queue body:
bash "$AUTOSPEC_SCRIPTS_DIR/growth-outbound-queue.sh" --build-body <draft.json> - File the control issue — create a
growth/needs-approvalissue inapproval.control_repo(from config) carrying the built body. - Retire the source draft issue — once the control issue is filed,
remove the
growth/needs-draftlabel from the sourcegrowth:outboundissue (and addgrowth/queued). This is load-bearing: the conductor's outbound tier fires whenever an opengrowth/needs-draftissue exists, so a source issue left labelled would be re-drafted every cycle — filing a duplicate control issue and PushNotification each time, and starving the define/measure tiers. Do this only on a successful queue (a cadence refusal in step 4 intentionally leaves the label so the draft retries when the venue's window reopens). - Append a
pendingledger line for the queued draft. - Send a
PushNotificationso a human knows an approval is waiting.
Outbound is package-only. This skill only ever prepares and files a draft for human approval — it never posts, submits, or publishes outbound content to any external platform on its own.
R3 — Handle approvals
(full pipeline and outbound mode — skipped in measure mode)
For each open growth/needs-approval control issue in approval.control_repo:
- Read the issue's labels:
bash "$AUTOSPEC_SCRIPTS_DIR/growth-outbound-queue.sh" --read-state <label-csv> - Route by state, then clear the serviced state so the conductor's
outbound tier does not re-service the same control issue every cycle (the
tier fires whenever a
growth/needs-approvalissue still carries anapproved/edited/rejected/publishedstate label):approved— emit a one-click-publish package (the exact copy + target URL/venue + any submission metadata) as a comment on the control issue. The agent never posts on the human's behalf — the comment is the deliverable. Then removegrowth/approvedand addgrowth/awaiting-publishso the package is not re-emitted each cycle. Do not record apublishedledger line yet — publication is not confirmed. The issue now sits inawaiting-publish(no decision label), so the tier stops selecting it until the human acts.published— the human has confirmed the post is live (pasted the URL and appliedgrowth/published). Append apublishedledger line carrying the live URL, then close the control issue. This is the terminal state; closing it drops it from the tier's pending count. Never infer publication — only this human-applied label triggers the record.edited— treat the edited copy as a new draft: re-run the R2 gate sequence (structural validation → ethics gate → cadence → relevance) and re-queue (which files a fresh control issue). Then close this superseded control issue (removinggrowth/edited).rejected— append arejectedledger line and close out; do not retry automatically.
Clearing the serviced state (relabel or close) on every branch is
load-bearing: it is the R3-side mirror of R2's source-issue retirement, and it
is what makes the shared growth-outbound-pending signal fall back to zero so
Tier G3 (measure) and Tier G1 (define) are not starved. Because the tier also
counts growth/published, a human-confirmed post self-triggers the terminal
record promptly instead of waiting for unrelated outbound work.
Reiterate the invariant: the agent never auto-posts anything to an
external platform under any control-issue state, including approved —
publication is always a human action taken outside this skill.
R4 — Measure & attribute
(full pipeline and measure mode — skipped in outbound mode)
-
Run each adapter configured in
.autospec/growth.yml(measurementblock), e.g.:bash "$AUTOSPEC_SCRIPTS_DIR/growth-adapter-gsc.sh" <config.json> bash "$AUTOSPEC_SCRIPTS_DIR/growth-adapter-analytics.sh" <config.json> bash "$AUTOSPEC_SCRIPTS_DIR/growth-adapter-github.sh" <config.json> bash "$AUTOSPEC_SCRIPTS_DIR/growth-adapter-rank.sh" <config.json>Missing credentials or a fetch error degrade that specific provider to
{}(logged with the reason) — this never aborts the run; the remaining adapters and the rest of R4 still proceed.Each adapter emits its own
{provider, metrics, ts}envelope. Merge all the adapters' envelopes for one snapshot into a single combined envelope before attribution —growth-attribute.shreads one envelope's.metrics, so passing a single adapter's output would silently drop the other providers:# combine this snapshot's per-adapter outputs (adapter-*.json) into one jq -s 'reduce .[] as $x ({provider:"combined", metrics:{}, ts:(.[0].ts)}; .metrics += $x.metrics)' adapter-*.json > snapshot.json -
Run attribution over the merged before/after snapshot envelopes (each built by the merge above at the start and end of the window) and the ledger:
bash "$AUTOSPEC_SCRIPTS_DIR/growth-attribute.sh" <before.json> <after.json> <ledger.jsonl>This produces a per-lens contribution split across lenses that shipped (
merged_clean/published) in the window. -
Feed the attribution result into the source-weight recompute so the next
/autospec-grow-definecycle biases budget toward lenses that actually ship:bash "$AUTOSPEC_SCRIPTS_DIR/growth-source-weights.sh" -
Have a
TIER_Asubagent synthesize a short learnings memo from the attribution output (which lenses/channels are earning their budget, which are mostly refuted or unpublished) and store/print it alongside the run summary. -
Record the measure cycle in the ledger. Append exactly one
kind:"measure"line so the conductor's cadence gate (growth-measure-due.sh) can tell when this repo was last measured — without it, the measure tier fires every cycle forever. Use the canonical append-only writer, which enforces the full 10-key line schema:bash "$AUTOSPEC_SCRIPTS_DIR/growth-ledger.sh" --append "$(jq -n \ --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ --arg reason "$MEASURE_SUMMARY" \ '{round:0, source:"measure", title:"measure cycle", norm_title:("measure-" + $ts), channel:"measurement", kind:"measure", issue:0, outcome:"measured", reason:$reason, ts:$ts}')"issue:0keeps the line out of the per-issuelatestcollapse (it is recorded individually, like a refutation). Append this line whenever R4 runs to completion — in both full-pipeline andmeasuremode — even when every adapter degraded to{}, because a completed (if empty) measure pass still resets the cadence clock. Set$MEASURE_SUMMARYto a one-line digest of the attribution result (or the degradation reason if all adapters returned{}).
Stop
Print a run summary and hand off — one pass per invocation, do not loop:
Phase R4 complete on {repo}.
- artifact drain: <N> issues (<A> merged_clean, <B> failed)
- outbound: <N> drafted, <A> queued pending, <B> rejected, <C> refused (cadence)
- approvals: <N> published, <A> re-queued (edited), <B> rejected
- attribution: <summary of per-lens contribution / adapter degradations>
- ledger: <path to .autospec/growth/ledger.jsonl>
Growth runs unattended under /autospec-autonomous, which drives this skill's
outbound and measure modes on its own cadence; re-run /autospec-grow-define
to plan the next cycle, or invoke this skill directly for a one-off pass.
04 同仓库更多 Skills
trio-pass-skill
暂无简介
duo-pass-skill
暂无简介
duo-divergence-skill
暂无简介
autospec
Use when the user wants to ship a feature end-to-end across multiple commits — bootstraps repo if missing, brainstorms a design spec, decomposes into linked GitHub issues, or splits an existing spec into issues, then runs an autonomous implementation loop with auto-merge.
autospec-upgrade
Use when the user wants to upgrade an Angular, Next.js, or React project to the latest official versions safely — by locking observable behavior before touching versions, upgrading one major at a time with official codemods, and gating completion on mutation score rather than coverage theater.
autospec-ui-audit
Use when a React Router application needs a deterministic whole-site route inventory before UI, UX, navigation, or evidence auditing begins.