mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-14 12:27:18 +01:00
Merge origin/main (v1.91.15.0, #3017) into garrytan/parallel-waves; release metadata v1.91.16.0
Conflicts resolved by hand in templates, tests, CLAUDE.md, TODOS.md, CHANGELOG.md and bin/gstack-config; generated SKILL.md/sections, the agents digest and test/fixtures/context-budget.json regenerated. The eval codemod re-applied to main's new gstack-paths/gstack-slug evals. Coverage-read rule: bare echo separators after unknown output extend the unknown span (main's pathspec CI shape). CLAUDE.md keeps the TREE_MUTATING, catalog-ceiling and detach-timeout facts main's instruction-facts test pins.
This commit is contained in:
commit
6fb8ea3d10
351 files changed
+7477
-8179
No files matched your search
+14
-14
@@ -63,7 +63,7 @@ Host and system plan-mode restrictions and the user's current scope take precede
|
||||
|
||||
If the user invokes a skill in plan mode, run its workflow within the host's plan-mode limits. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; any AskUserQuestion the skill fires is the workflow operating within plan mode, not a violation of it — and a skill whose instructions resolve a question themselves (e.g. a plan-mode auto-select) may legitimately not ask it. AskUserQuestion (any variant — `mcp__*__AskUserQuestion` or native; see "AskUserQuestion Format → Tool resolution") satisfies plan mode's end-of-turn requirement. If AskUserQuestion is unavailable or a call fails, follow the AskUserQuestion Format failure fallback: `headless` → BLOCKED; `interactive` → the prose fallback (also satisfies end-of-turn). At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION — ALWAYS RUN" run only where the host permits them. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.
|
||||
|
||||
If `PROACTIVE` is `"false"`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?"
|
||||
If `PROACTIVE` is `false`, do not auto-invoke or suggest skills, including by asking whether to run one. Only run skills the user explicitly invokes.
|
||||
|
||||
If `SKILL_PREFIX` is `"true"`, suggest/invoke `/gstack-*` names. Disk paths stay `~/.claude/skills/gstack/[skill-name]/SKILL.md`.
|
||||
|
||||
@@ -206,8 +206,9 @@ turns out to be unnecessary, mark it skipped with a one-line reason.
|
||||
non-trivial new features), briefly state your approach before executing. This lets
|
||||
the user course-correct cheaply instead of mid-flight.
|
||||
|
||||
**Dedicated tools over Bash.** Prefer Read, Edit, Write, Glob, Grep over shell
|
||||
equivalents (cat, sed, find, grep). The dedicated tools are cheaper and clearer.
|
||||
**Dedicated tools over Bash.** Prefer the host's dedicated file tools (Read, Edit,
|
||||
Write, and its search tools when it has them) over shell equivalents (cat, sed,
|
||||
find, grep). The dedicated tools are cheaper and clearer.
|
||||
|
||||
## Voice
|
||||
|
||||
@@ -253,7 +254,7 @@ Applies to AskUserQuestion, user replies, and findings. AskUserQuestion Format i
|
||||
- User-turn override wins: if the current message asks for terse / no explanations / just the answer, skip this section.
|
||||
- Terse mode (EXPLAIN_LEVEL: terse): no glosses, no outcome-framing layer, shorter responses.
|
||||
|
||||
Curated jargon list lives at `~/.claude/skills/gstack/scripts/jargon-list.json` (80+ terms). On the first jargon term you encounter this session, Read that file once; treat the `terms` array as the canonical list. The list is repo-owned and may grow between releases.
|
||||
Curated jargon list lives at `~/.claude/skills/gstack/scripts/jargon-list.json`. On the first jargon term you encounter this session, Read that file once; treat the `terms` array as the canonical list. The list is repo-owned and may grow between releases.
|
||||
|
||||
|
||||
## Completeness Principle — Boil the Ocean
|
||||
@@ -272,13 +273,13 @@ A claimed limitation or requirement ("the API can't do this", "X requires a cred
|
||||
|
||||
## Context Health (soft directive)
|
||||
|
||||
During long-running skill sessions, periodically write a brief `[PROGRESS]` summary: done, next, surprises.
|
||||
During long-running skill sessions, when you finish a phase or change direction, tell the user in a sentence or two what is done, what is next, and anything surprising.
|
||||
|
||||
If you are looping on the same diagnostic, same file, or failed fix variants, STOP and reassess. Consider escalation or /context-save. Progress summaries must NEVER mutate git state.
|
||||
|
||||
## Question Tuning (skip entirely if `QUESTION_TUNING: false`)
|
||||
|
||||
Before each decision brief (AskUserQuestion or Conductor/fallback prose), choose `question_id` from `~/.claude/skills/gstack/scripts/question-registry.ts` or `{skill}-{slug}`, then run `printf '%s' "<question summary>" | ~/.claude/skills/gstack/bin/gstack-question-preference --check "<id>" --summary-stdin` (piped summary feeds the one-way keyword net, #2024). `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask.
|
||||
Before each decision brief (AskUserQuestion or Conductor/fallback prose), choose `question_id` from `~/.claude/skills/gstack/scripts/question-registry.ts` or `{skill}-{slug}`, then run `printf '%s' "<question summary>" | ~/.claude/skills/gstack/bin/gstack-question-preference --check "<id>" --summary-stdin` (so the one-way-door keyword check sees the text). `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask.
|
||||
|
||||
**Embed the question_id as a marker in every asked brief**, including ad hoc IDs. Use the same ID for its preference check, question marker, and log. Include `<gstack-qid:{question_id}>` once in the question text itself, not only a command or log. On prose paths, use the explicit reply line. Without the marker, the PreToolUse hook treats AskUserQuestion as observed-only and never auto-decides.
|
||||
|
||||
@@ -312,13 +313,12 @@ Escalate after 3 failed attempts, uncertain security-sensitive changes, or scope
|
||||
|
||||
## Operational Self-Improvement
|
||||
|
||||
Before completing, review the session for durable learnings and log each one —
|
||||
this step ALWAYS runs, it is not conditional on something feeling noteworthy
|
||||
(#2402: 43 of 44 learnings came from explicit /learn because "if you
|
||||
discovered" read as optional). A durable learning is a project quirk, command
|
||||
fix, pitfall, or pattern that would save 5+ minutes in a future session. If
|
||||
the review genuinely surfaces none, state "No durable learnings this session"
|
||||
in your completion summary — an explicit empty result, not a skipped step.
|
||||
Before completing, review the session for durable learnings and log each one.
|
||||
The review runs every time, not only when something felt noteworthy. A durable
|
||||
learning is a project quirk, command fix, pitfall, or pattern that would save
|
||||
5+ minutes in a future session. If the review genuinely surfaces none, state
|
||||
"No durable learnings this session" in your completion summary — an explicit
|
||||
empty result, not a skipped step.
|
||||
|
||||
```bash
|
||||
~/.claude/skills/gstack/bin/gstack-learnings-log '{"skill":"SKILL_NAME","type":"operational","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":N,"source":"observed"}'
|
||||
@@ -334,7 +334,7 @@ preamble's skill-start output echoed. It also drains the artifacts-sync queue
|
||||
(the former skill-end sync step — do not run gstack-brain-sync separately).
|
||||
|
||||
**PLAN MODE EXCEPTION — ALWAYS RUN:** This writes telemetry to
|
||||
`~/.gstack/analytics/`, matching preamble analytics writes.
|
||||
`$GSTACK_STATE_ROOT/analytics/`, matching preamble analytics writes.
|
||||
|
||||
```bash
|
||||
~/.claude/skills/gstack/bin/gstack-skill-end --skill "document-release" --outcome OUTCOME \
|
||||
|
||||
@@ -83,12 +83,9 @@ Apply approved changes immediately after each answer.
|
||||
|
||||
## Step 5: CHANGELOG Voice Polish
|
||||
|
||||
**CRITICAL — NEVER CLOBBER CHANGELOG ENTRIES.**
|
||||
|
||||
This step polishes voice. It does NOT rewrite, replace, or regenerate CHANGELOG content.
|
||||
|
||||
A real incident occurred where an agent replaced existing CHANGELOG entries when it should have
|
||||
preserved them. This skill must NEVER do that.
|
||||
This step polishes voice only. It does not rewrite, replace, or regenerate CHANGELOG
|
||||
content: the entries are the release record, and a replaced entry loses facts nobody
|
||||
notices until after the release.
|
||||
|
||||
**Rules:**
|
||||
1. Read the entire CHANGELOG.md first. Understand what is already there.
|
||||
@@ -103,11 +100,11 @@ preserved them. This skill must NEVER do that.
|
||||
|
||||
**If CHANGELOG was modified in this branch**, review the entry for voice:
|
||||
|
||||
- **Sell test (Diataxis rubric):** Score each CHANGELOG entry 0-3:
|
||||
- **1 point** — answers "What changed?" (reference: names the feature/fix)
|
||||
- **1 point** — answers "Why should I care?" (explanation: user impact, pain removed)
|
||||
- **1 point** — answers "How do I use it?" (how-to: command, flag, or link to docs)
|
||||
- Entries scoring <2 need attention, not replacement. Report missing facts or user impact; polish existing wording only. A score of 3 passes all three checks.
|
||||
- **Sell test (Diataxis):** a good entry answers "What changed?" (names the
|
||||
feature/fix), "Why should I care?" (user impact, pain removed) and "How do I use
|
||||
it?" (command, flag, or link to docs). An entry that answers fewer than two of these needs
|
||||
attention, not replacement: report the missing facts or user impact, and polish
|
||||
existing wording only.
|
||||
- Lead with what the user can now **do** — not implementation details.
|
||||
- "You can now..." not "Refactored the..."
|
||||
- Flag commit-message-style entries and polish wording without removing facts.
|
||||
@@ -159,7 +156,7 @@ If TODOS.md does not exist, skip this step.
|
||||
|
||||
## Step 8: VERSION Bump Question
|
||||
|
||||
**CRITICAL — NEVER BUMP VERSION WITHOUT ASKING.**
|
||||
**Ask before changing VERSION** — the version number is the user's release decision.
|
||||
|
||||
1. **If VERSION does not exist:** Skip silently.
|
||||
|
||||
@@ -277,7 +274,7 @@ fi
|
||||
When the mode is anything except `disabled`, print one line so the off-switch
|
||||
stays discoverable: "Running the Codex doc review automatically (standard step). Disable: `gstack-config set codex_reviews disabled`."
|
||||
|
||||
**Determine the release diff range (D3 — reuse the method, do not invent one).**
|
||||
**Determine the release diff range (reuse the method, do not invent one).**
|
||||
Recompute the SAME range document-release used in its pre-flight / diff analysis, with the
|
||||
documented merge-base method:
|
||||
|
||||
@@ -362,7 +359,7 @@ A native result never supplies outside coverage.
|
||||
Dispatch via the Agent tool with the same prompt, passing `run_in_background: false` (subagents default to background since Claude Code v2.1.198). Bound it at a 5-minute timeout; if it never completes, treat the review as unavailable and continue.
|
||||
Present findings under `DOCUMENTATION REVIEW (Claude subagent):`. If it fails: "Doc review unavailable. Continuing to Step 9." Skip the apply gate, persist `status: unavailable`, `outside_status: unavailable`, and `source: none` below, then continue; unavailable is not a clean review.
|
||||
|
||||
**Apply decision (T3B — informational, never auto-edit, but findings don't evaporate).**
|
||||
**Apply decision (informational, never auto-edit, but findings don't evaporate).**
|
||||
If at least one reviewer completed and there are zero findings, say "Docs match what shipped — no gaps." and state which reviewer supplied that coverage. If neither completed, report "Doc review unavailable", skip the apply question, and persist unavailability below before Step 9. Otherwise
|
||||
present the findings, then use AskUserQuestion ONCE:
|
||||
|
||||
@@ -406,7 +403,7 @@ modified by this run (including approved VERSION/manifest updates), skip commit/
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: update project documentation for vX.Y.Z.W
|
||||
|
||||
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||||
Co-Authored-By: Claude <noreply@anthropic.com>
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
@@ -81,12 +81,9 @@ Apply approved changes immediately after each answer.
|
||||
|
||||
## Step 5: CHANGELOG Voice Polish
|
||||
|
||||
**CRITICAL — NEVER CLOBBER CHANGELOG ENTRIES.**
|
||||
|
||||
This step polishes voice. It does NOT rewrite, replace, or regenerate CHANGELOG content.
|
||||
|
||||
A real incident occurred where an agent replaced existing CHANGELOG entries when it should have
|
||||
preserved them. This skill must NEVER do that.
|
||||
This step polishes voice only. It does not rewrite, replace, or regenerate CHANGELOG
|
||||
content: the entries are the release record, and a replaced entry loses facts nobody
|
||||
notices until after the release.
|
||||
|
||||
**Rules:**
|
||||
1. Read the entire CHANGELOG.md first. Understand what is already there.
|
||||
@@ -101,11 +98,11 @@ preserved them. This skill must NEVER do that.
|
||||
|
||||
**If CHANGELOG was modified in this branch**, review the entry for voice:
|
||||
|
||||
- **Sell test (Diataxis rubric):** Score each CHANGELOG entry 0-3:
|
||||
- **1 point** — answers "What changed?" (reference: names the feature/fix)
|
||||
- **1 point** — answers "Why should I care?" (explanation: user impact, pain removed)
|
||||
- **1 point** — answers "How do I use it?" (how-to: command, flag, or link to docs)
|
||||
- Entries scoring <2 need attention, not replacement. Report missing facts or user impact; polish existing wording only. A score of 3 passes all three checks.
|
||||
- **Sell test (Diataxis):** a good entry answers "What changed?" (names the
|
||||
feature/fix), "Why should I care?" (user impact, pain removed) and "How do I use
|
||||
it?" (command, flag, or link to docs). An entry that answers fewer than two of these needs
|
||||
attention, not replacement: report the missing facts or user impact, and polish
|
||||
existing wording only.
|
||||
- Lead with what the user can now **do** — not implementation details.
|
||||
- "You can now..." not "Refactored the..."
|
||||
- Flag commit-message-style entries and polish wording without removing facts.
|
||||
@@ -157,7 +154,7 @@ If TODOS.md does not exist, skip this step.
|
||||
|
||||
## Step 8: VERSION Bump Question
|
||||
|
||||
**CRITICAL — NEVER BUMP VERSION WITHOUT ASKING.**
|
||||
**Ask before changing VERSION** — the version number is the user's release decision.
|
||||
|
||||
1. **If VERSION does not exist:** Skip silently.
|
||||
|
||||
|
||||
Reference in new issue
Block a user