@runchr/gstack-antigravity 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/gstack/.agents/skills/gstack/SKILL.md +651 -0
- package/.agents/skills/gstack/.agents/skills/gstack-autoplan/SKILL.md +678 -0
- package/.agents/skills/gstack/.agents/skills/gstack-benchmark/SKILL.md +482 -0
- package/.agents/skills/gstack/.agents/skills/gstack-browse/SKILL.md +511 -0
- package/.agents/skills/gstack/.agents/skills/gstack-canary/SKILL.md +486 -0
- package/.agents/skills/gstack/.agents/skills/gstack-careful/SKILL.md +50 -0
- package/.agents/skills/gstack/.agents/skills/gstack-cso/SKILL.md +607 -0
- package/.agents/skills/gstack/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
- package/.agents/skills/gstack/.agents/skills/gstack-design-review/SKILL.md +988 -0
- package/.agents/skills/gstack/.agents/skills/gstack-document-release/SKILL.md +604 -0
- package/.agents/skills/gstack/.agents/skills/gstack-freeze/SKILL.md +67 -0
- package/.agents/skills/gstack/.agents/skills/gstack-guard/SKILL.md +62 -0
- package/.agents/skills/gstack/.agents/skills/gstack-investigate/SKILL.md +415 -0
- package/.agents/skills/gstack/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
- package/.agents/skills/gstack/.agents/skills/gstack-office-hours/SKILL.md +986 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
- package/.agents/skills/gstack/.agents/skills/gstack-qa/SKILL.md +1006 -0
- package/.agents/skills/gstack/.agents/skills/gstack-qa-only/SKILL.md +626 -0
- package/.agents/skills/gstack/.agents/skills/gstack-retro/SKILL.md +1065 -0
- package/.agents/skills/gstack/.agents/skills/gstack-review/SKILL.md +704 -0
- package/.agents/skills/gstack/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
- package/.agents/skills/gstack/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
- package/.agents/skills/gstack/.agents/skills/gstack-ship/SKILL.md +1312 -0
- package/.agents/skills/gstack/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
- package/.agents/skills/gstack/.agents/skills/gstack-upgrade/SKILL.md +220 -0
- package/.agents/skills/gstack/.env.example +5 -0
- package/.agents/skills/gstack/.github/workflows/skill-docs.yml +17 -0
- package/.agents/skills/gstack/AGENTS.md +49 -0
- package/.agents/skills/gstack/ARCHITECTURE.md +359 -0
- package/.agents/skills/gstack/BROWSER.md +271 -0
- package/.agents/skills/gstack/CHANGELOG.md +800 -0
- package/.agents/skills/gstack/CLAUDE.md +284 -0
- package/.agents/skills/gstack/CONTRIBUTING.md +370 -0
- package/.agents/skills/gstack/ETHOS.md +129 -0
- package/.agents/skills/gstack/LICENSE +21 -0
- package/.agents/skills/gstack/README.md +228 -0
- package/.agents/skills/gstack/SKILL.md +657 -0
- package/.agents/skills/gstack/SKILL.md.tmpl +281 -0
- package/.agents/skills/gstack/TODOS.md +564 -0
- package/.agents/skills/gstack/VERSION +1 -0
- package/.agents/skills/gstack/autoplan/SKILL.md +689 -0
- package/.agents/skills/gstack/autoplan/SKILL.md.tmpl +416 -0
- package/.agents/skills/gstack/benchmark/SKILL.md +489 -0
- package/.agents/skills/gstack/benchmark/SKILL.md.tmpl +233 -0
- package/.agents/skills/gstack/bin/dev-setup +68 -0
- package/.agents/skills/gstack/bin/dev-teardown +56 -0
- package/.agents/skills/gstack/bin/gstack-analytics +191 -0
- package/.agents/skills/gstack/bin/gstack-community-dashboard +113 -0
- package/.agents/skills/gstack/bin/gstack-config +38 -0
- package/.agents/skills/gstack/bin/gstack-diff-scope +71 -0
- package/.agents/skills/gstack/bin/gstack-global-discover.ts +591 -0
- package/.agents/skills/gstack/bin/gstack-repo-mode +93 -0
- package/.agents/skills/gstack/bin/gstack-review-log +9 -0
- package/.agents/skills/gstack/bin/gstack-review-read +12 -0
- package/.agents/skills/gstack/bin/gstack-slug +15 -0
- package/.agents/skills/gstack/bin/gstack-telemetry-log +158 -0
- package/.agents/skills/gstack/bin/gstack-telemetry-sync +127 -0
- package/.agents/skills/gstack/bin/gstack-update-check +196 -0
- package/.agents/skills/gstack/browse/SKILL.md +517 -0
- package/.agents/skills/gstack/browse/SKILL.md.tmpl +141 -0
- package/.agents/skills/gstack/browse/bin/find-browse +21 -0
- package/.agents/skills/gstack/browse/bin/remote-slug +14 -0
- package/.agents/skills/gstack/browse/scripts/build-node-server.sh +48 -0
- package/.agents/skills/gstack/browse/src/browser-manager.ts +634 -0
- package/.agents/skills/gstack/browse/src/buffers.ts +137 -0
- package/.agents/skills/gstack/browse/src/bun-polyfill.cjs +109 -0
- package/.agents/skills/gstack/browse/src/cli.ts +420 -0
- package/.agents/skills/gstack/browse/src/commands.ts +111 -0
- package/.agents/skills/gstack/browse/src/config.ts +150 -0
- package/.agents/skills/gstack/browse/src/cookie-import-browser.ts +417 -0
- package/.agents/skills/gstack/browse/src/cookie-picker-routes.ts +207 -0
- package/.agents/skills/gstack/browse/src/cookie-picker-ui.ts +541 -0
- package/.agents/skills/gstack/browse/src/find-browse.ts +61 -0
- package/.agents/skills/gstack/browse/src/meta-commands.ts +269 -0
- package/.agents/skills/gstack/browse/src/platform.ts +17 -0
- package/.agents/skills/gstack/browse/src/read-commands.ts +335 -0
- package/.agents/skills/gstack/browse/src/server.ts +369 -0
- package/.agents/skills/gstack/browse/src/snapshot.ts +398 -0
- package/.agents/skills/gstack/browse/src/url-validation.ts +91 -0
- package/.agents/skills/gstack/browse/src/write-commands.ts +352 -0
- package/.agents/skills/gstack/browse/test/bun-polyfill.test.ts +72 -0
- package/.agents/skills/gstack/browse/test/commands.test.ts +1836 -0
- package/.agents/skills/gstack/browse/test/config.test.ts +250 -0
- package/.agents/skills/gstack/browse/test/cookie-import-browser.test.ts +397 -0
- package/.agents/skills/gstack/browse/test/cookie-picker-routes.test.ts +205 -0
- package/.agents/skills/gstack/browse/test/find-browse.test.ts +50 -0
- package/.agents/skills/gstack/browse/test/fixtures/basic.html +33 -0
- package/.agents/skills/gstack/browse/test/fixtures/cursor-interactive.html +22 -0
- package/.agents/skills/gstack/browse/test/fixtures/dialog.html +15 -0
- package/.agents/skills/gstack/browse/test/fixtures/empty.html +2 -0
- package/.agents/skills/gstack/browse/test/fixtures/forms.html +55 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval-checkout.html +108 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval-spa.html +98 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval.html +51 -0
- package/.agents/skills/gstack/browse/test/fixtures/responsive.html +49 -0
- package/.agents/skills/gstack/browse/test/fixtures/snapshot.html +55 -0
- package/.agents/skills/gstack/browse/test/fixtures/spa.html +24 -0
- package/.agents/skills/gstack/browse/test/fixtures/states.html +17 -0
- package/.agents/skills/gstack/browse/test/fixtures/upload.html +25 -0
- package/.agents/skills/gstack/browse/test/gstack-config.test.ts +125 -0
- package/.agents/skills/gstack/browse/test/gstack-update-check.test.ts +467 -0
- package/.agents/skills/gstack/browse/test/handoff.test.ts +235 -0
- package/.agents/skills/gstack/browse/test/path-validation.test.ts +63 -0
- package/.agents/skills/gstack/browse/test/platform.test.ts +37 -0
- package/.agents/skills/gstack/browse/test/snapshot.test.ts +467 -0
- package/.agents/skills/gstack/browse/test/test-server.ts +57 -0
- package/.agents/skills/gstack/browse/test/url-validation.test.ts +72 -0
- package/.agents/skills/gstack/canary/SKILL.md +493 -0
- package/.agents/skills/gstack/canary/SKILL.md.tmpl +220 -0
- package/.agents/skills/gstack/careful/SKILL.md +59 -0
- package/.agents/skills/gstack/careful/SKILL.md.tmpl +57 -0
- package/.agents/skills/gstack/careful/bin/check-careful.sh +112 -0
- package/.agents/skills/gstack/codex/SKILL.md +677 -0
- package/.agents/skills/gstack/codex/SKILL.md.tmpl +356 -0
- package/.agents/skills/gstack/conductor.json +6 -0
- package/.agents/skills/gstack/cso/SKILL.md +615 -0
- package/.agents/skills/gstack/cso/SKILL.md.tmpl +376 -0
- package/.agents/skills/gstack/design-consultation/SKILL.md +625 -0
- package/.agents/skills/gstack/design-consultation/SKILL.md.tmpl +369 -0
- package/.agents/skills/gstack/design-review/SKILL.md +998 -0
- package/.agents/skills/gstack/design-review/SKILL.md.tmpl +262 -0
- package/.agents/skills/gstack/docs/images/github-2013.png +0 -0
- package/.agents/skills/gstack/docs/images/github-2026.png +0 -0
- package/.agents/skills/gstack/docs/skills.md +877 -0
- package/.agents/skills/gstack/document-release/SKILL.md +613 -0
- package/.agents/skills/gstack/document-release/SKILL.md.tmpl +357 -0
- package/.agents/skills/gstack/freeze/SKILL.md +82 -0
- package/.agents/skills/gstack/freeze/SKILL.md.tmpl +80 -0
- package/.agents/skills/gstack/freeze/bin/check-freeze.sh +68 -0
- package/.agents/skills/gstack/gstack-upgrade/SKILL.md +226 -0
- package/.agents/skills/gstack/gstack-upgrade/SKILL.md.tmpl +224 -0
- package/.agents/skills/gstack/guard/SKILL.md +82 -0
- package/.agents/skills/gstack/guard/SKILL.md.tmpl +80 -0
- package/.agents/skills/gstack/investigate/SKILL.md +435 -0
- package/.agents/skills/gstack/investigate/SKILL.md.tmpl +196 -0
- package/.agents/skills/gstack/land-and-deploy/SKILL.md +880 -0
- package/.agents/skills/gstack/land-and-deploy/SKILL.md.tmpl +575 -0
- package/.agents/skills/gstack/office-hours/SKILL.md +996 -0
- package/.agents/skills/gstack/office-hours/SKILL.md.tmpl +624 -0
- package/.agents/skills/gstack/package.json +55 -0
- package/.agents/skills/gstack/plan-ceo-review/SKILL.md +1277 -0
- package/.agents/skills/gstack/plan-ceo-review/SKILL.md.tmpl +838 -0
- package/.agents/skills/gstack/plan-design-review/SKILL.md +676 -0
- package/.agents/skills/gstack/plan-design-review/SKILL.md.tmpl +314 -0
- package/.agents/skills/gstack/plan-eng-review/SKILL.md +836 -0
- package/.agents/skills/gstack/plan-eng-review/SKILL.md.tmpl +279 -0
- package/.agents/skills/gstack/qa/SKILL.md +1016 -0
- package/.agents/skills/gstack/qa/SKILL.md.tmpl +316 -0
- package/.agents/skills/gstack/qa/references/issue-taxonomy.md +85 -0
- package/.agents/skills/gstack/qa/templates/qa-report-template.md +126 -0
- package/.agents/skills/gstack/qa-only/SKILL.md +633 -0
- package/.agents/skills/gstack/qa-only/SKILL.md.tmpl +101 -0
- package/.agents/skills/gstack/retro/SKILL.md +1072 -0
- package/.agents/skills/gstack/retro/SKILL.md.tmpl +833 -0
- package/.agents/skills/gstack/review/SKILL.md +849 -0
- package/.agents/skills/gstack/review/SKILL.md.tmpl +259 -0
- package/.agents/skills/gstack/review/TODOS-format.md +62 -0
- package/.agents/skills/gstack/review/checklist.md +190 -0
- package/.agents/skills/gstack/review/design-checklist.md +132 -0
- package/.agents/skills/gstack/review/greptile-triage.md +220 -0
- package/.agents/skills/gstack/scripts/analytics.ts +190 -0
- package/.agents/skills/gstack/scripts/dev-skill.ts +82 -0
- package/.agents/skills/gstack/scripts/eval-compare.ts +96 -0
- package/.agents/skills/gstack/scripts/eval-list.ts +116 -0
- package/.agents/skills/gstack/scripts/eval-select.ts +86 -0
- package/.agents/skills/gstack/scripts/eval-summary.ts +187 -0
- package/.agents/skills/gstack/scripts/eval-watch.ts +172 -0
- package/.agents/skills/gstack/scripts/gen-skill-docs.ts +2414 -0
- package/.agents/skills/gstack/scripts/skill-check.ts +167 -0
- package/.agents/skills/gstack/setup +269 -0
- package/.agents/skills/gstack/setup-browser-cookies/SKILL.md +330 -0
- package/.agents/skills/gstack/setup-browser-cookies/SKILL.md.tmpl +74 -0
- package/.agents/skills/gstack/setup-deploy/SKILL.md +459 -0
- package/.agents/skills/gstack/setup-deploy/SKILL.md.tmpl +220 -0
- package/.agents/skills/gstack/ship/SKILL.md +1457 -0
- package/.agents/skills/gstack/ship/SKILL.md.tmpl +528 -0
- package/.agents/skills/gstack/supabase/config.sh +10 -0
- package/.agents/skills/gstack/supabase/functions/community-pulse/index.ts +59 -0
- package/.agents/skills/gstack/supabase/functions/telemetry-ingest/index.ts +135 -0
- package/.agents/skills/gstack/supabase/functions/update-check/index.ts +37 -0
- package/.agents/skills/gstack/supabase/migrations/001_telemetry.sql +89 -0
- package/.agents/skills/gstack/test/analytics.test.ts +277 -0
- package/.agents/skills/gstack/test/codex-e2e.test.ts +197 -0
- package/.agents/skills/gstack/test/fixtures/coverage-audit-fixture.ts +76 -0
- package/.agents/skills/gstack/test/fixtures/eval-baselines.json +7 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.css +86 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.html +41 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-enum-diff.rb +30 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-enum.rb +27 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-vuln.rb +14 -0
- package/.agents/skills/gstack/test/gemini-e2e.test.ts +173 -0
- package/.agents/skills/gstack/test/gen-skill-docs.test.ts +1049 -0
- package/.agents/skills/gstack/test/global-discover.test.ts +187 -0
- package/.agents/skills/gstack/test/helpers/codex-session-runner.ts +282 -0
- package/.agents/skills/gstack/test/helpers/e2e-helpers.ts +239 -0
- package/.agents/skills/gstack/test/helpers/eval-store.test.ts +548 -0
- package/.agents/skills/gstack/test/helpers/eval-store.ts +689 -0
- package/.agents/skills/gstack/test/helpers/gemini-session-runner.test.ts +104 -0
- package/.agents/skills/gstack/test/helpers/gemini-session-runner.ts +201 -0
- package/.agents/skills/gstack/test/helpers/llm-judge.ts +130 -0
- package/.agents/skills/gstack/test/helpers/observability.test.ts +283 -0
- package/.agents/skills/gstack/test/helpers/session-runner.test.ts +96 -0
- package/.agents/skills/gstack/test/helpers/session-runner.ts +357 -0
- package/.agents/skills/gstack/test/helpers/skill-parser.ts +206 -0
- package/.agents/skills/gstack/test/helpers/touchfiles.ts +260 -0
- package/.agents/skills/gstack/test/hook-scripts.test.ts +373 -0
- package/.agents/skills/gstack/test/skill-e2e-browse.test.ts +293 -0
- package/.agents/skills/gstack/test/skill-e2e-deploy.test.ts +279 -0
- package/.agents/skills/gstack/test/skill-e2e-design.test.ts +614 -0
- package/.agents/skills/gstack/test/skill-e2e-plan.test.ts +538 -0
- package/.agents/skills/gstack/test/skill-e2e-qa-bugs.test.ts +194 -0
- package/.agents/skills/gstack/test/skill-e2e-qa-workflow.test.ts +412 -0
- package/.agents/skills/gstack/test/skill-e2e-review.test.ts +535 -0
- package/.agents/skills/gstack/test/skill-e2e-workflow.test.ts +586 -0
- package/.agents/skills/gstack/test/skill-e2e.test.ts +3325 -0
- package/.agents/skills/gstack/test/skill-llm-eval.test.ts +787 -0
- package/.agents/skills/gstack/test/skill-parser.test.ts +179 -0
- package/.agents/skills/gstack/test/skill-routing-e2e.test.ts +605 -0
- package/.agents/skills/gstack/test/skill-validation.test.ts +1520 -0
- package/.agents/skills/gstack/test/telemetry.test.ts +278 -0
- package/.agents/skills/gstack/test/touchfiles.test.ts +262 -0
- package/.agents/skills/gstack/unfreeze/SKILL.md +40 -0
- package/.agents/skills/gstack/unfreeze/SKILL.md.tmpl +38 -0
- package/README.md +12 -7
- package/README_KO.md +12 -6
- package/package.json +3 -2
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoplan
|
|
3
|
+
description: |
|
|
4
|
+
Auto-review pipeline — reads the full CEO, design, and eng review skills from disk
|
|
5
|
+
and runs them sequentially with auto-decisions using 6 decision principles. Surfaces
|
|
6
|
+
taste decisions (close approaches, borderline scope, codex disagreements) at a final
|
|
7
|
+
approval gate. One command, fully reviewed plan out.
|
|
8
|
+
Use when asked to "auto review", "autoplan", "run all reviews", "review this plan
|
|
9
|
+
automatically", or "make the decisions for me".
|
|
10
|
+
Proactively suggest when the user has a plan file and wants to run the full review
|
|
11
|
+
gauntlet without answering 15-30 intermediate questions.
|
|
12
|
+
---
|
|
13
|
+
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
|
|
14
|
+
<!-- Regenerate: bun run gen:skill-docs -->
|
|
15
|
+
|
|
16
|
+
## Preamble (run first)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
_UPD=$(~/.codex/skills/gstack/bin/gstack-update-check 2>/dev/null || .agents/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
|
|
20
|
+
[ -n "$_UPD" ] && echo "$_UPD" || true
|
|
21
|
+
mkdir -p ~/.gstack/sessions
|
|
22
|
+
touch ~/.gstack/sessions/"$PPID"
|
|
23
|
+
_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
24
|
+
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
|
|
25
|
+
_CONTRIB=$(~/.codex/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
|
|
26
|
+
_PROACTIVE=$(~/.codex/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
|
|
27
|
+
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
28
|
+
echo "BRANCH: $_BRANCH"
|
|
29
|
+
echo "PROACTIVE: $_PROACTIVE"
|
|
30
|
+
source <(~/.codex/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true
|
|
31
|
+
REPO_MODE=${REPO_MODE:-unknown}
|
|
32
|
+
echo "REPO_MODE: $REPO_MODE"
|
|
33
|
+
_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
|
|
34
|
+
echo "LAKE_INTRO: $_LAKE_SEEN"
|
|
35
|
+
_TEL=$(~/.codex/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
|
|
36
|
+
_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
|
|
37
|
+
_TEL_START=$(date +%s)
|
|
38
|
+
_SESSION_ID="$$-$(date +%s)"
|
|
39
|
+
echo "TELEMETRY: ${_TEL:-off}"
|
|
40
|
+
echo "TEL_PROMPTED: $_TEL_PROMPTED"
|
|
41
|
+
mkdir -p ~/.gstack/analytics
|
|
42
|
+
echo '{"skill":"autoplan","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
|
|
43
|
+
for _PF in ~/.gstack/analytics/.pending-*; do [ -f "$_PF" ] && ~/.codex/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
|
|
47
|
+
them when the user explicitly asks. The user opted out of proactive suggestions.
|
|
48
|
+
|
|
49
|
+
If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.codex/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED <from> <to>`: tell user "Running gstack v{to} (just updated!)" and continue.
|
|
50
|
+
|
|
51
|
+
If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.
|
|
52
|
+
Tell the user: "gstack follows the **Boil the Lake** principle — always do the complete
|
|
53
|
+
thing when AI makes the marginal cost near-zero. Read more: https://garryslist.org/posts/boil-the-ocean"
|
|
54
|
+
Then offer to open the essay in their default browser:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
open https://garryslist.org/posts/boil-the-ocean
|
|
58
|
+
touch ~/.gstack/.completeness-intro-seen
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
|
|
62
|
+
|
|
63
|
+
If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,
|
|
64
|
+
ask the user about telemetry. Use AskUserQuestion:
|
|
65
|
+
|
|
66
|
+
> Help gstack get better! Community mode shares usage data (which skills you use, how long
|
|
67
|
+
> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.
|
|
68
|
+
> No code, file paths, or repo names are ever sent.
|
|
69
|
+
> Change anytime with `gstack-config set telemetry off`.
|
|
70
|
+
|
|
71
|
+
Options:
|
|
72
|
+
- A) Help gstack get better! (recommended)
|
|
73
|
+
- B) No thanks
|
|
74
|
+
|
|
75
|
+
If A: run `~/.codex/skills/gstack/bin/gstack-config set telemetry community`
|
|
76
|
+
|
|
77
|
+
If B: ask a follow-up AskUserQuestion:
|
|
78
|
+
|
|
79
|
+
> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,
|
|
80
|
+
> no way to connect sessions. Just a counter that helps us know if anyone's out there.
|
|
81
|
+
|
|
82
|
+
Options:
|
|
83
|
+
- A) Sure, anonymous is fine
|
|
84
|
+
- B) No thanks, fully off
|
|
85
|
+
|
|
86
|
+
If B→A: run `~/.codex/skills/gstack/bin/gstack-config set telemetry anonymous`
|
|
87
|
+
If B→B: run `~/.codex/skills/gstack/bin/gstack-config set telemetry off`
|
|
88
|
+
|
|
89
|
+
Always run:
|
|
90
|
+
```bash
|
|
91
|
+
touch ~/.gstack/.telemetry-prompted
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.
|
|
95
|
+
|
|
96
|
+
## AskUserQuestion Format
|
|
97
|
+
|
|
98
|
+
**ALWAYS follow this structure for every AskUserQuestion call:**
|
|
99
|
+
1. **Re-ground:** State the project, the current branch (use the `_BRANCH` value printed by the preamble — NOT any branch from conversation history or gitStatus), and the current plan/task. (1-2 sentences)
|
|
100
|
+
2. **Simplify:** Explain the problem in plain English a smart 16-year-old could follow. No raw function names, no internal jargon, no implementation details. Use concrete examples and analogies. Say what it DOES, not what it's called.
|
|
101
|
+
3. **Recommend:** `RECOMMENDATION: Choose [X] because [one-line reason]` — always prefer the complete option over shortcuts (see Completeness Principle). Include `Completeness: X/10` for each option. Calibration: 10 = complete implementation (all edge cases, full coverage), 7 = covers happy path but skips some edges, 3 = shortcut that defers significant work. If both options are 8+, pick the higher; if one is ≤5, flag it.
|
|
102
|
+
4. **Options:** Lettered options: `A) ... B) ... C) ...` — when an option involves effort, show both scales: `(human: ~X / CC: ~Y)`
|
|
103
|
+
|
|
104
|
+
Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex.
|
|
105
|
+
|
|
106
|
+
Per-skill instructions may add additional formatting rules on top of this baseline.
|
|
107
|
+
|
|
108
|
+
## Completeness Principle — Boil the Lake
|
|
109
|
+
|
|
110
|
+
AI-assisted coding makes the marginal cost of completeness near-zero. When you present options:
|
|
111
|
+
|
|
112
|
+
- If Option A is the complete implementation (full parity, all edge cases, 100% coverage) and Option B is a shortcut that saves modest effort — **always recommend A**. The delta between 80 lines and 150 lines is meaningless with CC+gstack. "Good enough" is the wrong instinct when "complete" costs minutes more.
|
|
113
|
+
- **Lake vs. ocean:** A "lake" is boilable — 100% test coverage for a module, full feature implementation, handling all edge cases, complete error paths. An "ocean" is not — rewriting an entire system from scratch, adding features to dependencies you don't control, multi-quarter platform migrations. Recommend boiling lakes. Flag oceans as out of scope.
|
|
114
|
+
- **When estimating effort**, always show both scales: human team time and CC+gstack time. The compression ratio varies by task type — use this reference:
|
|
115
|
+
|
|
116
|
+
| Task type | Human team | CC+gstack | Compression |
|
|
117
|
+
|-----------|-----------|-----------|-------------|
|
|
118
|
+
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
|
|
119
|
+
| Test writing | 1 day | 15 min | ~50x |
|
|
120
|
+
| Feature implementation | 1 week | 30 min | ~30x |
|
|
121
|
+
| Bug fix + regression test | 4 hours | 15 min | ~20x |
|
|
122
|
+
| Architecture / design | 2 days | 4 hours | ~5x |
|
|
123
|
+
| Research / exploration | 1 day | 3 hours | ~3x |
|
|
124
|
+
|
|
125
|
+
- This principle applies to test coverage, error handling, documentation, edge cases, and feature completeness. Don't skip the last 10% to "save time" — with AI, that 10% costs seconds.
|
|
126
|
+
|
|
127
|
+
**Anti-patterns — DON'T do this:**
|
|
128
|
+
- BAD: "Choose B — it covers 90% of the value with less code." (If A is only 70 lines more, choose A.)
|
|
129
|
+
- BAD: "We can skip edge case handling to save time." (Edge case handling costs minutes with CC.)
|
|
130
|
+
- BAD: "Let's defer test coverage to a follow-up PR." (Tests are the cheapest lake to boil.)
|
|
131
|
+
- BAD: Quoting only human-team effort: "This would take 2 weeks." (Say: "2 weeks human / ~1 hour CC.")
|
|
132
|
+
|
|
133
|
+
## Repo Ownership Mode — See Something, Say Something
|
|
134
|
+
|
|
135
|
+
`REPO_MODE` from the preamble tells you who owns issues in this repo:
|
|
136
|
+
|
|
137
|
+
- **`solo`** — One person does 80%+ of the work. They own everything. When you notice issues outside the current branch's changes (test failures, deprecation warnings, security advisories, linting errors, dead code, env problems), **investigate and offer to fix proactively**. The solo dev is the only person who will fix it. Default to action.
|
|
138
|
+
- **`collaborative`** — Multiple active contributors. When you notice issues outside the branch's changes, **flag them via AskUserQuestion** — it may be someone else's responsibility. Default to asking, not fixing.
|
|
139
|
+
- **`unknown`** — Treat as collaborative (safer default — ask before fixing).
|
|
140
|
+
|
|
141
|
+
**See Something, Say Something:** Whenever you notice something that looks wrong during ANY workflow step — not just test failures — flag it briefly. One sentence: what you noticed and its impact. In solo mode, follow up with "Want me to fix it?" In collaborative mode, just flag it and move on.
|
|
142
|
+
|
|
143
|
+
Never let a noticed issue silently pass. The whole point is proactive communication.
|
|
144
|
+
|
|
145
|
+
## Search Before Building
|
|
146
|
+
|
|
147
|
+
Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.codex/skills/gstack/ETHOS.md` for the full philosophy.
|
|
148
|
+
|
|
149
|
+
**Three layers of knowledge:**
|
|
150
|
+
- **Layer 1** (tried and true — in distribution). Don't reinvent the wheel. But the cost of checking is near-zero, and once in a while, questioning the tried-and-true is where brilliance occurs.
|
|
151
|
+
- **Layer 2** (new and popular — search for these). But scrutinize: humans are subject to mania. Search results are inputs to your thinking, not answers.
|
|
152
|
+
- **Layer 3** (first principles — prize these above all). Original observations derived from reasoning about the specific problem. The most valuable of all.
|
|
153
|
+
|
|
154
|
+
**Eureka moment:** When first-principles reasoning reveals conventional wisdom is wrong, name it:
|
|
155
|
+
"EUREKA: Everyone does X because [assumption]. But [evidence] shows this is wrong. Y is better because [reasoning]."
|
|
156
|
+
|
|
157
|
+
Log eureka moments:
|
|
158
|
+
```bash
|
|
159
|
+
jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true
|
|
160
|
+
```
|
|
161
|
+
Replace SKILL_NAME and ONE_LINE_SUMMARY. Runs inline — don't stop the workflow.
|
|
162
|
+
|
|
163
|
+
**WebSearch fallback:** If WebSearch is unavailable, skip the search step and note: "Search unavailable — proceeding with in-distribution knowledge only."
|
|
164
|
+
|
|
165
|
+
## Contributor Mode
|
|
166
|
+
|
|
167
|
+
If `_CONTRIB` is `true`: you are in **contributor mode**. You're a gstack user who also helps make it better.
|
|
168
|
+
|
|
169
|
+
**At the end of each major workflow step** (not after every single command), reflect on the gstack tooling you used. Rate your experience 0 to 10. If it wasn't a 10, think about why. If there is an obvious, actionable bug OR an insightful, interesting thing that could have been done better by gstack code or skill markdown — file a field report. Maybe our contributor will help make us better!
|
|
170
|
+
|
|
171
|
+
**Calibration — this is the bar:** For example, `$B js "await fetch(...)"` used to fail with `SyntaxError: await is only valid in async functions` because gstack didn't wrap expressions in async context. Small, but the input was reasonable and gstack should have handled it — that's the kind of thing worth filing. Things less consequential than this, ignore.
|
|
172
|
+
|
|
173
|
+
**NOT worth filing:** user's app bugs, network errors to user's URL, auth failures on user's site, user's own JS logic bugs.
|
|
174
|
+
|
|
175
|
+
**To file:** write `~/.gstack/contributor-logs/{slug}.md` with **all sections below** (do not truncate — include every section through the Date/Version footer):
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
# {Title}
|
|
179
|
+
|
|
180
|
+
Hey gstack team — ran into this while using /{skill-name}:
|
|
181
|
+
|
|
182
|
+
**What I was trying to do:** {what the user/agent was attempting}
|
|
183
|
+
**What happened instead:** {what actually happened}
|
|
184
|
+
**My rating:** {0-10} — {one sentence on why it wasn't a 10}
|
|
185
|
+
|
|
186
|
+
## Steps to reproduce
|
|
187
|
+
1. {step}
|
|
188
|
+
|
|
189
|
+
## Raw output
|
|
190
|
+
```
|
|
191
|
+
{paste the actual error or unexpected output here}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## What would make this a 10
|
|
195
|
+
{one sentence: what gstack should have done differently}
|
|
196
|
+
|
|
197
|
+
**Date:** {YYYY-MM-DD} | **Version:** {gstack version} | **Skill:** /{skill}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Slug: lowercase, hyphens, max 60 chars (e.g. `browse-js-no-await`). Skip if file already exists. Max 3 reports per session. File inline and continue — don't stop the workflow. Tell user: "Filed gstack field report: {title}"
|
|
201
|
+
|
|
202
|
+
## Completion Status Protocol
|
|
203
|
+
|
|
204
|
+
When completing a skill workflow, report status using one of:
|
|
205
|
+
- **DONE** — All steps completed successfully. Evidence provided for each claim.
|
|
206
|
+
- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern.
|
|
207
|
+
- **BLOCKED** — Cannot proceed. State what is blocking and what was tried.
|
|
208
|
+
- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need.
|
|
209
|
+
|
|
210
|
+
### Escalation
|
|
211
|
+
|
|
212
|
+
It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result."
|
|
213
|
+
|
|
214
|
+
Bad work is worse than no work. You will not be penalized for escalating.
|
|
215
|
+
- If you have attempted a task 3 times without success, STOP and escalate.
|
|
216
|
+
- If you are uncertain about a security-sensitive change, STOP and escalate.
|
|
217
|
+
- If the scope of work exceeds what you can verify, STOP and escalate.
|
|
218
|
+
|
|
219
|
+
Escalation format:
|
|
220
|
+
```
|
|
221
|
+
STATUS: BLOCKED | NEEDS_CONTEXT
|
|
222
|
+
REASON: [1-2 sentences]
|
|
223
|
+
ATTEMPTED: [what you tried]
|
|
224
|
+
RECOMMENDATION: [what the user should do next]
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Telemetry (run last)
|
|
228
|
+
|
|
229
|
+
After the skill workflow completes (success, error, or abort), log the telemetry event.
|
|
230
|
+
Determine the skill name from the `name:` field in this file's YAML frontmatter.
|
|
231
|
+
Determine the outcome from the workflow result (success if completed normally, error
|
|
232
|
+
if it failed, abort if the user interrupted).
|
|
233
|
+
|
|
234
|
+
**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to
|
|
235
|
+
`~/.gstack/analytics/` (user config directory, not project files). The skill
|
|
236
|
+
preamble already writes to the same directory — this is the same pattern.
|
|
237
|
+
Skipping this command loses session duration and outcome data.
|
|
238
|
+
|
|
239
|
+
Run this bash:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
_TEL_END=$(date +%s)
|
|
243
|
+
_TEL_DUR=$(( _TEL_END - _TEL_START ))
|
|
244
|
+
rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
|
|
245
|
+
~/.codex/skills/gstack/bin/gstack-telemetry-log \
|
|
246
|
+
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
|
|
247
|
+
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Replace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with
|
|
251
|
+
success/error/abort, and `USED_BROWSE` with true/false based on whether `$B` was used.
|
|
252
|
+
If you cannot determine the outcome, use "unknown". This runs in the background and
|
|
253
|
+
never blocks the user.
|
|
254
|
+
|
|
255
|
+
## Step 0: Detect base branch
|
|
256
|
+
|
|
257
|
+
Determine which branch this PR targets. Use the result as "the base branch" in all subsequent steps.
|
|
258
|
+
|
|
259
|
+
1. Check if a PR already exists for this branch:
|
|
260
|
+
`gh pr view --json baseRefName -q .baseRefName`
|
|
261
|
+
If this succeeds, use the printed branch name as the base branch.
|
|
262
|
+
|
|
263
|
+
2. If no PR exists (command fails), detect the repo's default branch:
|
|
264
|
+
`gh repo view --json defaultBranchRef -q .defaultBranchRef.name`
|
|
265
|
+
|
|
266
|
+
3. If both commands fail, fall back to `main`.
|
|
267
|
+
|
|
268
|
+
Print the detected base branch name. In every subsequent `git diff`, `git log`,
|
|
269
|
+
`git fetch`, `git merge`, and `gh pr create` command, substitute the detected
|
|
270
|
+
branch name wherever the instructions say "the base branch."
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Prerequisite Skill Offer
|
|
275
|
+
|
|
276
|
+
When the design doc check above prints "No design doc found," offer the prerequisite
|
|
277
|
+
skill before proceeding.
|
|
278
|
+
|
|
279
|
+
Say to the user via AskUserQuestion:
|
|
280
|
+
|
|
281
|
+
> "No design doc found for this branch. `/office-hours` produces a structured problem
|
|
282
|
+
> statement, premise challenge, and explored alternatives — it gives this review much
|
|
283
|
+
> sharper input to work with. Takes about 10 minutes. The design doc is per-feature,
|
|
284
|
+
> not per-product — it captures the thinking behind this specific change."
|
|
285
|
+
|
|
286
|
+
Options:
|
|
287
|
+
- A) Run /office-hours first (in another window, then come back)
|
|
288
|
+
- B) Skip — proceed with standard review
|
|
289
|
+
|
|
290
|
+
If they skip: "No worries — standard review. If you ever want sharper input, try
|
|
291
|
+
/office-hours first next time." Then proceed normally. Do not re-offer later in the session.
|
|
292
|
+
|
|
293
|
+
# /autoplan — Auto-Review Pipeline
|
|
294
|
+
|
|
295
|
+
One command. Rough plan in, fully reviewed plan out.
|
|
296
|
+
|
|
297
|
+
/autoplan reads the full CEO, design, and eng review skill files from disk and follows
|
|
298
|
+
them at full depth — same rigor, same sections, same methodology as running each skill
|
|
299
|
+
manually. The only difference: intermediate AskUserQuestion calls are auto-decided using
|
|
300
|
+
the 6 principles below. Taste decisions (where reasonable people could disagree) are
|
|
301
|
+
surfaced at a final approval gate.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## The 6 Decision Principles
|
|
306
|
+
|
|
307
|
+
These rules auto-answer every intermediate question:
|
|
308
|
+
|
|
309
|
+
1. **Choose completeness** — Ship the whole thing. Pick the approach that covers more edge cases.
|
|
310
|
+
2. **Boil lakes** — Fix everything in the blast radius (files modified by this plan + direct importers). Auto-approve expansions that are in blast radius AND < 1 day CC effort (< 5 files, no new infra).
|
|
311
|
+
3. **Pragmatic** — If two options fix the same thing, pick the cleaner one. 5 seconds choosing, not 5 minutes.
|
|
312
|
+
4. **DRY** — Duplicates existing functionality? Reject. Reuse what exists.
|
|
313
|
+
5. **Explicit over clever** — 10-line obvious fix > 200-line abstraction. Pick what a new contributor reads in 30 seconds.
|
|
314
|
+
6. **Bias toward action** — Merge > review cycles > stale deliberation. Flag concerns but don't block.
|
|
315
|
+
|
|
316
|
+
**Conflict resolution (context-dependent tiebreakers):**
|
|
317
|
+
- **CEO phase:** P1 (completeness) + P2 (boil lakes) dominate.
|
|
318
|
+
- **Eng phase:** P5 (explicit) + P3 (pragmatic) dominate.
|
|
319
|
+
- **Design phase:** P5 (explicit) + P1 (completeness) dominate.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Decision Classification
|
|
324
|
+
|
|
325
|
+
Every auto-decision is classified:
|
|
326
|
+
|
|
327
|
+
**Mechanical** — one clearly right answer. Auto-decide silently.
|
|
328
|
+
Examples: run codex (always yes), run evals (always yes), reduce scope on a complete plan (always no).
|
|
329
|
+
|
|
330
|
+
**Taste** — reasonable people could disagree. Auto-decide with recommendation, but surface at the final gate. Three natural sources:
|
|
331
|
+
1. **Close approaches** — top two are both viable with different tradeoffs.
|
|
332
|
+
2. **Borderline scope** — in blast radius but 3-5 files, or ambiguous radius.
|
|
333
|
+
3. **Codex disagreements** — codex recommends differently and has a valid point.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## What "Auto-Decide" Means
|
|
338
|
+
|
|
339
|
+
Auto-decide replaces the USER'S judgment with the 6 principles. It does NOT replace
|
|
340
|
+
the ANALYSIS. Every section in the loaded skill files must still be executed at the
|
|
341
|
+
same depth as the interactive version. The only thing that changes is who answers the
|
|
342
|
+
AskUserQuestion: you do, using the 6 principles, instead of the user.
|
|
343
|
+
|
|
344
|
+
**You MUST still:**
|
|
345
|
+
- READ the actual code, diffs, and files each section references
|
|
346
|
+
- PRODUCE every output the section requires (diagrams, tables, registries, artifacts)
|
|
347
|
+
- IDENTIFY every issue the section is designed to catch
|
|
348
|
+
- DECIDE each issue using the 6 principles (instead of asking the user)
|
|
349
|
+
- LOG each decision in the audit trail
|
|
350
|
+
- WRITE all required artifacts to disk
|
|
351
|
+
|
|
352
|
+
**You MUST NOT:**
|
|
353
|
+
- Compress a review section into a one-liner table row
|
|
354
|
+
- Write "no issues found" without showing what you examined
|
|
355
|
+
- Skip a section because "it doesn't apply" without stating what you checked and why
|
|
356
|
+
- Produce a summary instead of the required output (e.g., "architecture looks good"
|
|
357
|
+
instead of the ASCII dependency graph the section requires)
|
|
358
|
+
|
|
359
|
+
"No issues found" is a valid output for a section — but only after doing the analysis.
|
|
360
|
+
State what you examined and why nothing was flagged (1-2 sentences minimum).
|
|
361
|
+
"Skipped" is never valid for a non-skip-listed section.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Phase 0: Intake + Restore Point
|
|
366
|
+
|
|
367
|
+
### Step 1: Capture restore point
|
|
368
|
+
|
|
369
|
+
Before doing anything, save the plan file's current state to an external file:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
source <(~/.codex/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG
|
|
373
|
+
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-')
|
|
374
|
+
DATETIME=$(date +%Y%m%d-%H%M%S)
|
|
375
|
+
echo "RESTORE_PATH=$HOME/.gstack/projects/$SLUG/${BRANCH}-autoplan-restore-${DATETIME}.md"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Write the plan file's full contents to the restore path with this header:
|
|
379
|
+
```
|
|
380
|
+
# /autoplan Restore Point
|
|
381
|
+
Captured: [timestamp] | Branch: [branch] | Commit: [short hash]
|
|
382
|
+
|
|
383
|
+
## Re-run Instructions
|
|
384
|
+
1. Copy "Original Plan State" below back to your plan file
|
|
385
|
+
2. Invoke /autoplan
|
|
386
|
+
|
|
387
|
+
## Original Plan State
|
|
388
|
+
[verbatim plan file contents]
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Then prepend a one-line HTML comment to the plan file:
|
|
392
|
+
`<!-- /autoplan restore point: [RESTORE_PATH] -->`
|
|
393
|
+
|
|
394
|
+
### Step 2: Read context
|
|
395
|
+
|
|
396
|
+
- Read CLAUDE.md, TODOS.md, git log -30, git diff against the base branch --stat
|
|
397
|
+
- Discover design docs: `ls -t ~/.gstack/projects/$SLUG/*-design-*.md 2>/dev/null | head -1`
|
|
398
|
+
- Detect UI scope: grep the plan for view/rendering terms (component, screen, form,
|
|
399
|
+
button, modal, layout, dashboard, sidebar, nav, dialog). Require 2+ matches. Exclude
|
|
400
|
+
false positives ("page" alone, "UI" in acronyms).
|
|
401
|
+
|
|
402
|
+
### Step 3: Load skill files from disk
|
|
403
|
+
|
|
404
|
+
Read each file using the Read tool:
|
|
405
|
+
- `~/.codex/skills/gstack/plan-ceo-review/SKILL.md`
|
|
406
|
+
- `~/.codex/skills/gstack/plan-design-review/SKILL.md` (only if UI scope detected)
|
|
407
|
+
- `~/.codex/skills/gstack/plan-eng-review/SKILL.md`
|
|
408
|
+
|
|
409
|
+
**Section skip list — when following a loaded skill file, SKIP these sections
|
|
410
|
+
(they are already handled by /autoplan):**
|
|
411
|
+
- Preamble (run first)
|
|
412
|
+
- AskUserQuestion Format
|
|
413
|
+
- Completeness Principle — Boil the Lake
|
|
414
|
+
- Search Before Building
|
|
415
|
+
- Contributor Mode
|
|
416
|
+
- Completion Status Protocol
|
|
417
|
+
- Telemetry (run last)
|
|
418
|
+
- Step 0: Detect base branch
|
|
419
|
+
- Review Readiness Dashboard
|
|
420
|
+
- Plan File Review Report
|
|
421
|
+
- Prerequisite Skill Offer (BENEFITS_FROM)
|
|
422
|
+
|
|
423
|
+
Follow ONLY the review-specific methodology, sections, and required outputs.
|
|
424
|
+
|
|
425
|
+
Output: "Here's what I'm working with: [plan summary]. UI scope: [yes/no].
|
|
426
|
+
Loaded review skills from disk. Starting full review pipeline with auto-decisions."
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Phase 1: CEO Review (Strategy & Scope)
|
|
431
|
+
|
|
432
|
+
Follow plan-ceo-review/SKILL.md — all sections, full depth.
|
|
433
|
+
Override: every AskUserQuestion → auto-decide using the 6 principles.
|
|
434
|
+
|
|
435
|
+
**Override rules:**
|
|
436
|
+
- Mode selection: SELECTIVE EXPANSION
|
|
437
|
+
- Premises: accept reasonable ones (P6), challenge only clearly wrong ones
|
|
438
|
+
- **GATE: Present premises to user for confirmation** — this is the ONE AskUserQuestion
|
|
439
|
+
that is NOT auto-decided. Premises require human judgment.
|
|
440
|
+
- Alternatives: pick highest completeness (P1). If tied, pick simplest (P5).
|
|
441
|
+
If top 2 are close → mark TASTE DECISION.
|
|
442
|
+
- Scope expansion: in blast radius + <1d CC → approve (P2). Outside → defer to TODOS.md (P3).
|
|
443
|
+
Duplicates → reject (P4). Borderline (3-5 files) → mark TASTE DECISION.
|
|
444
|
+
- All 10 review sections: run fully, auto-decide each issue, log every decision.
|
|
445
|
+
|
|
446
|
+
**Required execution checklist (CEO):**
|
|
447
|
+
|
|
448
|
+
Step 0 (0A-0F) — run each sub-step and produce:
|
|
449
|
+
- 0A: Premise challenge with specific premises named and evaluated
|
|
450
|
+
- 0B: Existing code leverage map (sub-problems → existing code)
|
|
451
|
+
- 0C: Dream state diagram (CURRENT → THIS PLAN → 12-MONTH IDEAL)
|
|
452
|
+
- 0C-bis: Implementation alternatives table (2-3 approaches with effort/risk/pros/cons)
|
|
453
|
+
- 0D: Mode-specific analysis with scope decisions logged
|
|
454
|
+
- 0E: Temporal interrogation (HOUR 1 → HOUR 6+)
|
|
455
|
+
- 0F: Mode selection confirmation
|
|
456
|
+
|
|
457
|
+
Sections 1-10 — for EACH section, run the evaluation criteria from the loaded skill file:
|
|
458
|
+
- Sections WITH findings: full analysis, auto-decide each issue, log to audit trail
|
|
459
|
+
- Sections with NO findings: 1-2 sentences stating what was examined and why nothing
|
|
460
|
+
was flagged. NEVER compress a section to just its name in a table row.
|
|
461
|
+
- Section 11 (Design): run only if UI scope was detected in Phase 0
|
|
462
|
+
|
|
463
|
+
**Mandatory outputs from Phase 1:**
|
|
464
|
+
- "NOT in scope" section with deferred items and rationale
|
|
465
|
+
- "What already exists" section mapping sub-problems to existing code
|
|
466
|
+
- Error & Rescue Registry table (from Section 2)
|
|
467
|
+
- Failure Modes Registry table (from review sections)
|
|
468
|
+
- Dream state delta (where this plan leaves us vs 12-month ideal)
|
|
469
|
+
- Completion Summary (the full summary table from the CEO skill)
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Phase 2: Design Review (conditional — skip if no UI scope)
|
|
474
|
+
|
|
475
|
+
Follow plan-design-review/SKILL.md — all 7 dimensions, full depth.
|
|
476
|
+
Override: every AskUserQuestion → auto-decide using the 6 principles.
|
|
477
|
+
|
|
478
|
+
**Override rules:**
|
|
479
|
+
- Focus areas: all relevant dimensions (P1)
|
|
480
|
+
- Structural issues (missing states, broken hierarchy): auto-fix (P5)
|
|
481
|
+
- Aesthetic/taste issues: mark TASTE DECISION
|
|
482
|
+
- Design system alignment: auto-fix if DESIGN.md exists and fix is obvious
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Phase 3: Eng Review + Codex
|
|
487
|
+
|
|
488
|
+
Follow plan-eng-review/SKILL.md — all sections, full depth.
|
|
489
|
+
Override: every AskUserQuestion → auto-decide using the 6 principles.
|
|
490
|
+
|
|
491
|
+
**Override rules:**
|
|
492
|
+
- Scope challenge: never reduce (P2)
|
|
493
|
+
- Codex review: always run if available (P6)
|
|
494
|
+
Command: `codex exec "Review this plan for architectural issues, missing edge cases, and hidden complexity. Be adversarial. File: <plan_path>" -s read-only --enable web_search_cached`
|
|
495
|
+
Timeout: 10 minutes, then proceed with "Codex timed out — single-reviewer mode"
|
|
496
|
+
- Architecture choices: explicit over clever (P5). If codex disagrees with valid reason → TASTE DECISION.
|
|
497
|
+
- Evals: always include all relevant suites (P1)
|
|
498
|
+
- Test plan: generate artifact at `~/.gstack/projects/$SLUG/{user}-{branch}-test-plan-{datetime}.md`
|
|
499
|
+
- TODOS.md: collect all deferred scope expansions from Phase 1, auto-write
|
|
500
|
+
|
|
501
|
+
**Required execution checklist (Eng):**
|
|
502
|
+
|
|
503
|
+
1. Step 0 (Scope Challenge): Read actual code referenced by the plan. Map each
|
|
504
|
+
sub-problem to existing code. Run the complexity check. Produce concrete findings.
|
|
505
|
+
|
|
506
|
+
2. Step 0.5 (Codex): Run if available. Present full output under CODEX SAYS header.
|
|
507
|
+
|
|
508
|
+
3. Section 1 (Architecture): Produce ASCII dependency graph showing new components
|
|
509
|
+
and their relationships to existing ones. Evaluate coupling, scaling, security.
|
|
510
|
+
|
|
511
|
+
4. Section 2 (Code Quality): Identify DRY violations, naming issues, complexity.
|
|
512
|
+
Reference specific files and patterns. Auto-decide each finding.
|
|
513
|
+
|
|
514
|
+
5. **Section 3 (Test Review) — NEVER SKIP OR COMPRESS.**
|
|
515
|
+
This section requires reading actual code, not summarizing from memory.
|
|
516
|
+
- Read the diff or the plan's affected files
|
|
517
|
+
- Build the test diagram: list every NEW UX flow, data flow, codepath, and branch
|
|
518
|
+
- For EACH item in the diagram: what type of test covers it? Does one exist? Gaps?
|
|
519
|
+
- For LLM/prompt changes: which eval suites must run?
|
|
520
|
+
- Auto-deciding test gaps means: identify the gap → decide whether to add a test
|
|
521
|
+
or defer (with rationale and principle) → log the decision. It does NOT mean
|
|
522
|
+
skipping the analysis.
|
|
523
|
+
- Write the test plan artifact to disk
|
|
524
|
+
|
|
525
|
+
6. Section 4 (Performance): Evaluate N+1 queries, memory, caching, slow paths.
|
|
526
|
+
|
|
527
|
+
**Mandatory outputs from Phase 3:**
|
|
528
|
+
- "NOT in scope" section
|
|
529
|
+
- "What already exists" section
|
|
530
|
+
- Architecture ASCII diagram (Section 1)
|
|
531
|
+
- Test diagram mapping codepaths to coverage (Section 3)
|
|
532
|
+
- Test plan artifact written to disk (Section 3)
|
|
533
|
+
- Failure modes registry with critical gap flags
|
|
534
|
+
- Completion Summary (the full summary from the Eng skill)
|
|
535
|
+
- TODOS.md updates (collected from all phases)
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## Decision Audit Trail
|
|
540
|
+
|
|
541
|
+
After each auto-decision, append a row to the plan file using Edit:
|
|
542
|
+
|
|
543
|
+
```markdown
|
|
544
|
+
<!-- AUTONOMOUS DECISION LOG -->
|
|
545
|
+
## Decision Audit Trail
|
|
546
|
+
|
|
547
|
+
| # | Phase | Decision | Principle | Rationale | Rejected |
|
|
548
|
+
|---|-------|----------|-----------|-----------|----------|
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Write one row per decision incrementally (via Edit). This keeps the audit on disk,
|
|
552
|
+
not accumulated in conversation context.
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Pre-Gate Verification
|
|
557
|
+
|
|
558
|
+
Before presenting the Final Approval Gate, verify that required outputs were actually
|
|
559
|
+
produced. Check the plan file and conversation for each item.
|
|
560
|
+
|
|
561
|
+
**Phase 1 (CEO) outputs:**
|
|
562
|
+
- [ ] Premise challenge with specific premises named (not just "premises accepted")
|
|
563
|
+
- [ ] All applicable review sections have findings OR explicit "examined X, nothing flagged"
|
|
564
|
+
- [ ] Error & Rescue Registry table produced (or noted N/A with reason)
|
|
565
|
+
- [ ] Failure Modes Registry table produced (or noted N/A with reason)
|
|
566
|
+
- [ ] "NOT in scope" section written
|
|
567
|
+
- [ ] "What already exists" section written
|
|
568
|
+
- [ ] Dream state delta written
|
|
569
|
+
- [ ] Completion Summary produced
|
|
570
|
+
|
|
571
|
+
**Phase 2 (Design) outputs — only if UI scope detected:**
|
|
572
|
+
- [ ] All 7 dimensions evaluated with scores
|
|
573
|
+
- [ ] Issues identified and auto-decided
|
|
574
|
+
|
|
575
|
+
**Phase 3 (Eng) outputs:**
|
|
576
|
+
- [ ] Scope challenge with actual code analysis (not just "scope is fine")
|
|
577
|
+
- [ ] Architecture ASCII diagram produced
|
|
578
|
+
- [ ] Test diagram mapping codepaths to test coverage
|
|
579
|
+
- [ ] Test plan artifact written to disk at ~/.gstack/projects/$SLUG/
|
|
580
|
+
- [ ] "NOT in scope" section written
|
|
581
|
+
- [ ] "What already exists" section written
|
|
582
|
+
- [ ] Failure modes registry with critical gap assessment
|
|
583
|
+
- [ ] Completion Summary produced
|
|
584
|
+
|
|
585
|
+
**Audit trail:**
|
|
586
|
+
- [ ] Decision Audit Trail has at least one row per auto-decision (not empty)
|
|
587
|
+
|
|
588
|
+
If ANY checkbox above is missing, go back and produce the missing output. Max 2
|
|
589
|
+
attempts — if still missing after retrying twice, proceed to the gate with a warning
|
|
590
|
+
noting which items are incomplete. Do not loop indefinitely.
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## Phase 4: Final Approval Gate
|
|
595
|
+
|
|
596
|
+
**STOP here and present the final state to the user.**
|
|
597
|
+
|
|
598
|
+
Present as a message, then use AskUserQuestion:
|
|
599
|
+
|
|
600
|
+
```
|
|
601
|
+
## /autoplan Review Complete
|
|
602
|
+
|
|
603
|
+
### Plan Summary
|
|
604
|
+
[1-3 sentence summary]
|
|
605
|
+
|
|
606
|
+
### Decisions Made: [N] total ([M] auto-decided, [K] choices for you)
|
|
607
|
+
|
|
608
|
+
### Your Choices (taste decisions)
|
|
609
|
+
[For each taste decision:]
|
|
610
|
+
**Choice [N]: [title]** (from [phase])
|
|
611
|
+
I recommend [X] — [principle]. But [Y] is also viable:
|
|
612
|
+
[1-sentence downstream impact if you pick Y]
|
|
613
|
+
|
|
614
|
+
### Auto-Decided: [M] decisions [see Decision Audit Trail in plan file]
|
|
615
|
+
|
|
616
|
+
### Review Scores
|
|
617
|
+
- CEO: [summary]
|
|
618
|
+
- Design: [summary or "skipped, no UI scope"]
|
|
619
|
+
- Eng: [summary]
|
|
620
|
+
- Codex: [summary or "unavailable"]
|
|
621
|
+
|
|
622
|
+
### Deferred to TODOS.md
|
|
623
|
+
[Items auto-deferred with reasons]
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
**Cognitive load management:**
|
|
627
|
+
- 0 taste decisions: skip "Your Choices" section
|
|
628
|
+
- 1-7 taste decisions: flat list
|
|
629
|
+
- 8+: group by phase. Add warning: "This plan had unusually high ambiguity ([N] taste decisions). Review carefully."
|
|
630
|
+
|
|
631
|
+
AskUserQuestion options:
|
|
632
|
+
- A) Approve as-is (accept all recommendations)
|
|
633
|
+
- B) Approve with overrides (specify which taste decisions to change)
|
|
634
|
+
- C) Interrogate (ask about any specific decision)
|
|
635
|
+
- D) Revise (the plan itself needs changes)
|
|
636
|
+
- E) Reject (start over)
|
|
637
|
+
|
|
638
|
+
**Option handling:**
|
|
639
|
+
- A: mark APPROVED, write review logs, suggest /ship
|
|
640
|
+
- B: ask which overrides, apply, re-present gate
|
|
641
|
+
- C: answer freeform, re-present gate
|
|
642
|
+
- D: make changes, re-run affected phases (scope→1B, design→2, test plan→3, arch→3). Max 3 cycles.
|
|
643
|
+
- E: start over
|
|
644
|
+
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
## Completion: Write Review Logs
|
|
648
|
+
|
|
649
|
+
On approval, write 3 separate review log entries so /ship's dashboard recognizes them:
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
|
|
653
|
+
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
654
|
+
|
|
655
|
+
~/.codex/skills/gstack/bin/gstack-review-log '{"skill":"plan-ceo-review","timestamp":"'"$TIMESTAMP"'","status":"clean","unresolved":0,"critical_gaps":0,"mode":"SELECTIVE_EXPANSION","via":"autoplan","commit":"'"$COMMIT"'"}'
|
|
656
|
+
|
|
657
|
+
~/.codex/skills/gstack/bin/gstack-review-log '{"skill":"plan-eng-review","timestamp":"'"$TIMESTAMP"'","status":"clean","unresolved":0,"critical_gaps":0,"issues_found":0,"mode":"FULL_REVIEW","via":"autoplan","commit":"'"$COMMIT"'"}'
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
If Phase 2 ran (UI scope):
|
|
661
|
+
```bash
|
|
662
|
+
~/.codex/skills/gstack/bin/gstack-review-log '{"skill":"plan-design-review","timestamp":"'"$TIMESTAMP"'","status":"clean","unresolved":0,"via":"autoplan","commit":"'"$COMMIT"'"}'
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
Replace field values with actual counts from the review.
|
|
666
|
+
|
|
667
|
+
Suggest next step: `/ship` when ready to create the PR.
|
|
668
|
+
|
|
669
|
+
---
|
|
670
|
+
|
|
671
|
+
## Important Rules
|
|
672
|
+
|
|
673
|
+
- **Never abort.** The user chose /autoplan. Respect that choice. Surface all taste decisions, never redirect to interactive review.
|
|
674
|
+
- **Premises are the one gate.** The only non-auto-decided AskUserQuestion is the premise confirmation in Phase 1.
|
|
675
|
+
- **Log every decision.** No silent auto-decisions. Every choice gets a row in the audit trail.
|
|
676
|
+
- **Full depth means full depth.** Do not compress or skip sections from the loaded skill files (except the skip list in Phase 0). "Full depth" means: read the code the section asks you to read, produce the outputs the section requires, identify every issue, and decide each one. A one-sentence summary of a section is not "full depth" — it is a skip. If you catch yourself writing fewer than 3 sentences for any review section, you are likely compressing.
|
|
677
|
+
- **Artifacts are deliverables.** Test plan artifact, failure modes registry, error/rescue table, ASCII diagrams — these must exist on disk or in the plan file when the review completes. If they don't exist, the review is incomplete.
|
|
678
|
+
- **Sequential order.** CEO → Design → Eng. Each phase builds on the last.
|