@runchr/gstack-antigravity 0.1.0
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.
Potentially problematic release.
This version of @runchr/gstack-antigravity might be problematic. Click here for more details.
- package/.agents/rules/ETHOS.md +129 -0
- package/.agents/rules/global-gstack.md +117 -0
- package/.agents/rules/persona-gstack-autoplan.md +14 -0
- package/.agents/rules/persona-gstack-benchmark.md +14 -0
- package/.agents/rules/persona-gstack-browse.md +14 -0
- package/.agents/rules/persona-gstack-canary.md +14 -0
- package/.agents/rules/persona-gstack-careful.md +14 -0
- package/.agents/rules/persona-gstack-codex.md +14 -0
- package/.agents/rules/persona-gstack-cso.md +14 -0
- package/.agents/rules/persona-gstack-design-consultation.md +14 -0
- package/.agents/rules/persona-gstack-design-review.md +14 -0
- package/.agents/rules/persona-gstack-document-release.md +14 -0
- package/.agents/rules/persona-gstack-freeze.md +14 -0
- package/.agents/rules/persona-gstack-gstack-upgrade.md +14 -0
- package/.agents/rules/persona-gstack-guard.md +14 -0
- package/.agents/rules/persona-gstack-investigate.md +14 -0
- package/.agents/rules/persona-gstack-land-and-deploy.md +14 -0
- package/.agents/rules/persona-gstack-office-hours.md +14 -0
- package/.agents/rules/persona-gstack-plan-ceo-review.md +14 -0
- package/.agents/rules/persona-gstack-plan-design-review.md +14 -0
- package/.agents/rules/persona-gstack-plan-eng-review.md +14 -0
- package/.agents/rules/persona-gstack-qa-only.md +14 -0
- package/.agents/rules/persona-gstack-qa.md +14 -0
- package/.agents/rules/persona-gstack-retro.md +14 -0
- package/.agents/rules/persona-gstack-review.md +14 -0
- package/.agents/rules/persona-gstack-setup-browser-cookies.md +14 -0
- package/.agents/rules/persona-gstack-setup-deploy.md +14 -0
- package/.agents/rules/persona-gstack-ship.md +14 -0
- package/.agents/rules/persona-gstack-unfreeze.md +14 -0
- package/.agents/rules/persona-gstack.md +40 -0
- package/.agents/rules/recursive-identities.md +22 -0
- package/.agents/workflows/autoplan.md +30 -0
- package/.agents/workflows/benchmark.md +31 -0
- package/.agents/workflows/browse.md +26 -0
- package/.agents/workflows/canary.md +33 -0
- package/.agents/workflows/careful.md +22 -0
- package/.agents/workflows/codex.md +36 -0
- package/.agents/workflows/cso.md +29 -0
- package/.agents/workflows/design-consultation.md +28 -0
- package/.agents/workflows/design-review.md +28 -0
- package/.agents/workflows/document-release.md +32 -0
- package/.agents/workflows/freeze.md +17 -0
- package/.agents/workflows/gstack-upgrade.md +54 -0
- package/.agents/workflows/gstack.md +56 -0
- package/.agents/workflows/guard.md +18 -0
- package/.agents/workflows/investigate.md +37 -0
- package/.agents/workflows/land-and-deploy.md +35 -0
- package/.agents/workflows/office-hours.md +27 -0
- package/.agents/workflows/plan-ceo-review.md +34 -0
- package/.agents/workflows/plan-design-review.md +31 -0
- package/.agents/workflows/plan-eng-review.md +28 -0
- package/.agents/workflows/qa-only.md +28 -0
- package/.agents/workflows/qa.md +73 -0
- package/.agents/workflows/retro.md +34 -0
- package/.agents/workflows/review.md +30 -0
- package/.agents/workflows/setup-browser-cookies.md +15 -0
- package/.agents/workflows/setup-cookies.md +8 -0
- package/.agents/workflows/setup-deploy.md +21 -0
- package/.agents/workflows/ship.md +93 -0
- package/.agents/workflows/unfreeze.md +12 -0
- package/LICENSE +22 -0
- package/README.md +189 -0
- package/README_KO.md +191 -0
- package/bin/install.js +105 -0
- package/gstack-origin/.agents/skills/gstack/SKILL.md +651 -0
- package/gstack-origin/.agents/skills/gstack-autoplan/SKILL.md +678 -0
- package/gstack-origin/.agents/skills/gstack-benchmark/SKILL.md +482 -0
- package/gstack-origin/.agents/skills/gstack-browse/SKILL.md +511 -0
- package/gstack-origin/.agents/skills/gstack-canary/SKILL.md +486 -0
- package/gstack-origin/.agents/skills/gstack-careful/SKILL.md +50 -0
- package/gstack-origin/.agents/skills/gstack-cso/SKILL.md +607 -0
- package/gstack-origin/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
- package/gstack-origin/.agents/skills/gstack-design-review/SKILL.md +988 -0
- package/gstack-origin/.agents/skills/gstack-document-release/SKILL.md +604 -0
- package/gstack-origin/.agents/skills/gstack-freeze/SKILL.md +67 -0
- package/gstack-origin/.agents/skills/gstack-guard/SKILL.md +62 -0
- package/gstack-origin/.agents/skills/gstack-investigate/SKILL.md +415 -0
- package/gstack-origin/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
- package/gstack-origin/.agents/skills/gstack-office-hours/SKILL.md +986 -0
- package/gstack-origin/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
- package/gstack-origin/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
- package/gstack-origin/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
- package/gstack-origin/.agents/skills/gstack-qa/SKILL.md +1006 -0
- package/gstack-origin/.agents/skills/gstack-qa-only/SKILL.md +626 -0
- package/gstack-origin/.agents/skills/gstack-retro/SKILL.md +1065 -0
- package/gstack-origin/.agents/skills/gstack-review/SKILL.md +704 -0
- package/gstack-origin/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
- package/gstack-origin/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
- package/gstack-origin/.agents/skills/gstack-ship/SKILL.md +1312 -0
- package/gstack-origin/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
- package/gstack-origin/.agents/skills/gstack-upgrade/SKILL.md +220 -0
- package/gstack-origin/.env.example +5 -0
- package/gstack-origin/.github/workflows/skill-docs.yml +17 -0
- package/gstack-origin/AGENTS.md +49 -0
- package/gstack-origin/ARCHITECTURE.md +359 -0
- package/gstack-origin/BROWSER.md +271 -0
- package/gstack-origin/CHANGELOG.md +800 -0
- package/gstack-origin/CLAUDE.md +284 -0
- package/gstack-origin/CONTRIBUTING.md +370 -0
- package/gstack-origin/ETHOS.md +129 -0
- package/gstack-origin/LICENSE +21 -0
- package/gstack-origin/README.md +228 -0
- package/gstack-origin/SKILL.md +657 -0
- package/gstack-origin/SKILL.md.tmpl +281 -0
- package/gstack-origin/TODOS.md +564 -0
- package/gstack-origin/VERSION +1 -0
- package/gstack-origin/autoplan/SKILL.md +689 -0
- package/gstack-origin/autoplan/SKILL.md.tmpl +416 -0
- package/gstack-origin/benchmark/SKILL.md +489 -0
- package/gstack-origin/benchmark/SKILL.md.tmpl +233 -0
- package/gstack-origin/bin/dev-setup +68 -0
- package/gstack-origin/bin/dev-teardown +56 -0
- package/gstack-origin/bin/gstack-analytics +191 -0
- package/gstack-origin/bin/gstack-community-dashboard +113 -0
- package/gstack-origin/bin/gstack-config +38 -0
- package/gstack-origin/bin/gstack-diff-scope +71 -0
- package/gstack-origin/bin/gstack-global-discover.ts +591 -0
- package/gstack-origin/bin/gstack-repo-mode +93 -0
- package/gstack-origin/bin/gstack-review-log +9 -0
- package/gstack-origin/bin/gstack-review-read +12 -0
- package/gstack-origin/bin/gstack-slug +15 -0
- package/gstack-origin/bin/gstack-telemetry-log +158 -0
- package/gstack-origin/bin/gstack-telemetry-sync +127 -0
- package/gstack-origin/bin/gstack-update-check +196 -0
- package/gstack-origin/browse/SKILL.md +517 -0
- package/gstack-origin/browse/SKILL.md.tmpl +141 -0
- package/gstack-origin/browse/bin/find-browse +21 -0
- package/gstack-origin/browse/bin/remote-slug +14 -0
- package/gstack-origin/browse/scripts/build-node-server.sh +48 -0
- package/gstack-origin/browse/src/browser-manager.ts +634 -0
- package/gstack-origin/browse/src/buffers.ts +137 -0
- package/gstack-origin/browse/src/bun-polyfill.cjs +109 -0
- package/gstack-origin/browse/src/cli.ts +420 -0
- package/gstack-origin/browse/src/commands.ts +111 -0
- package/gstack-origin/browse/src/config.ts +150 -0
- package/gstack-origin/browse/src/cookie-import-browser.ts +417 -0
- package/gstack-origin/browse/src/cookie-picker-routes.ts +207 -0
- package/gstack-origin/browse/src/cookie-picker-ui.ts +541 -0
- package/gstack-origin/browse/src/find-browse.ts +61 -0
- package/gstack-origin/browse/src/meta-commands.ts +269 -0
- package/gstack-origin/browse/src/platform.ts +17 -0
- package/gstack-origin/browse/src/read-commands.ts +335 -0
- package/gstack-origin/browse/src/server.ts +369 -0
- package/gstack-origin/browse/src/snapshot.ts +398 -0
- package/gstack-origin/browse/src/url-validation.ts +91 -0
- package/gstack-origin/browse/src/write-commands.ts +352 -0
- package/gstack-origin/browse/test/bun-polyfill.test.ts +72 -0
- package/gstack-origin/browse/test/commands.test.ts +1836 -0
- package/gstack-origin/browse/test/config.test.ts +250 -0
- package/gstack-origin/browse/test/cookie-import-browser.test.ts +397 -0
- package/gstack-origin/browse/test/cookie-picker-routes.test.ts +205 -0
- package/gstack-origin/browse/test/find-browse.test.ts +50 -0
- package/gstack-origin/browse/test/fixtures/basic.html +33 -0
- package/gstack-origin/browse/test/fixtures/cursor-interactive.html +22 -0
- package/gstack-origin/browse/test/fixtures/dialog.html +15 -0
- package/gstack-origin/browse/test/fixtures/empty.html +2 -0
- package/gstack-origin/browse/test/fixtures/forms.html +55 -0
- package/gstack-origin/browse/test/fixtures/qa-eval-checkout.html +108 -0
- package/gstack-origin/browse/test/fixtures/qa-eval-spa.html +98 -0
- package/gstack-origin/browse/test/fixtures/qa-eval.html +51 -0
- package/gstack-origin/browse/test/fixtures/responsive.html +49 -0
- package/gstack-origin/browse/test/fixtures/snapshot.html +55 -0
- package/gstack-origin/browse/test/fixtures/spa.html +24 -0
- package/gstack-origin/browse/test/fixtures/states.html +17 -0
- package/gstack-origin/browse/test/fixtures/upload.html +25 -0
- package/gstack-origin/browse/test/gstack-config.test.ts +125 -0
- package/gstack-origin/browse/test/gstack-update-check.test.ts +467 -0
- package/gstack-origin/browse/test/handoff.test.ts +235 -0
- package/gstack-origin/browse/test/path-validation.test.ts +63 -0
- package/gstack-origin/browse/test/platform.test.ts +37 -0
- package/gstack-origin/browse/test/snapshot.test.ts +467 -0
- package/gstack-origin/browse/test/test-server.ts +57 -0
- package/gstack-origin/browse/test/url-validation.test.ts +72 -0
- package/gstack-origin/canary/SKILL.md +493 -0
- package/gstack-origin/canary/SKILL.md.tmpl +220 -0
- package/gstack-origin/careful/SKILL.md +59 -0
- package/gstack-origin/careful/SKILL.md.tmpl +57 -0
- package/gstack-origin/careful/bin/check-careful.sh +112 -0
- package/gstack-origin/codex/SKILL.md +677 -0
- package/gstack-origin/codex/SKILL.md.tmpl +356 -0
- package/gstack-origin/conductor.json +6 -0
- package/gstack-origin/cso/SKILL.md +615 -0
- package/gstack-origin/cso/SKILL.md.tmpl +376 -0
- package/gstack-origin/design-consultation/SKILL.md +625 -0
- package/gstack-origin/design-consultation/SKILL.md.tmpl +369 -0
- package/gstack-origin/design-review/SKILL.md +998 -0
- package/gstack-origin/design-review/SKILL.md.tmpl +262 -0
- package/gstack-origin/docs/images/github-2013.png +0 -0
- package/gstack-origin/docs/images/github-2026.png +0 -0
- package/gstack-origin/docs/skills.md +877 -0
- package/gstack-origin/document-release/SKILL.md +613 -0
- package/gstack-origin/document-release/SKILL.md.tmpl +357 -0
- package/gstack-origin/freeze/SKILL.md +82 -0
- package/gstack-origin/freeze/SKILL.md.tmpl +80 -0
- package/gstack-origin/freeze/bin/check-freeze.sh +68 -0
- package/gstack-origin/gstack-upgrade/SKILL.md +226 -0
- package/gstack-origin/gstack-upgrade/SKILL.md.tmpl +224 -0
- package/gstack-origin/guard/SKILL.md +82 -0
- package/gstack-origin/guard/SKILL.md.tmpl +80 -0
- package/gstack-origin/investigate/SKILL.md +435 -0
- package/gstack-origin/investigate/SKILL.md.tmpl +196 -0
- package/gstack-origin/land-and-deploy/SKILL.md +880 -0
- package/gstack-origin/land-and-deploy/SKILL.md.tmpl +575 -0
- package/gstack-origin/office-hours/SKILL.md +996 -0
- package/gstack-origin/office-hours/SKILL.md.tmpl +624 -0
- package/gstack-origin/package.json +55 -0
- package/gstack-origin/plan-ceo-review/SKILL.md +1277 -0
- package/gstack-origin/plan-ceo-review/SKILL.md.tmpl +838 -0
- package/gstack-origin/plan-design-review/SKILL.md +676 -0
- package/gstack-origin/plan-design-review/SKILL.md.tmpl +314 -0
- package/gstack-origin/plan-eng-review/SKILL.md +836 -0
- package/gstack-origin/plan-eng-review/SKILL.md.tmpl +279 -0
- package/gstack-origin/qa/SKILL.md +1016 -0
- package/gstack-origin/qa/SKILL.md.tmpl +316 -0
- package/gstack-origin/qa/references/issue-taxonomy.md +85 -0
- package/gstack-origin/qa/templates/qa-report-template.md +126 -0
- package/gstack-origin/qa-only/SKILL.md +633 -0
- package/gstack-origin/qa-only/SKILL.md.tmpl +101 -0
- package/gstack-origin/retro/SKILL.md +1072 -0
- package/gstack-origin/retro/SKILL.md.tmpl +833 -0
- package/gstack-origin/review/SKILL.md +849 -0
- package/gstack-origin/review/SKILL.md.tmpl +259 -0
- package/gstack-origin/review/TODOS-format.md +62 -0
- package/gstack-origin/review/checklist.md +190 -0
- package/gstack-origin/review/design-checklist.md +132 -0
- package/gstack-origin/review/greptile-triage.md +220 -0
- package/gstack-origin/scripts/analytics.ts +190 -0
- package/gstack-origin/scripts/dev-skill.ts +82 -0
- package/gstack-origin/scripts/eval-compare.ts +96 -0
- package/gstack-origin/scripts/eval-list.ts +116 -0
- package/gstack-origin/scripts/eval-select.ts +86 -0
- package/gstack-origin/scripts/eval-summary.ts +187 -0
- package/gstack-origin/scripts/eval-watch.ts +172 -0
- package/gstack-origin/scripts/gen-skill-docs.ts +2414 -0
- package/gstack-origin/scripts/skill-check.ts +167 -0
- package/gstack-origin/setup +269 -0
- package/gstack-origin/setup-browser-cookies/SKILL.md +330 -0
- package/gstack-origin/setup-browser-cookies/SKILL.md.tmpl +74 -0
- package/gstack-origin/setup-deploy/SKILL.md +459 -0
- package/gstack-origin/setup-deploy/SKILL.md.tmpl +220 -0
- package/gstack-origin/ship/SKILL.md +1457 -0
- package/gstack-origin/ship/SKILL.md.tmpl +528 -0
- package/gstack-origin/supabase/config.sh +10 -0
- package/gstack-origin/supabase/functions/community-pulse/index.ts +59 -0
- package/gstack-origin/supabase/functions/telemetry-ingest/index.ts +135 -0
- package/gstack-origin/supabase/functions/update-check/index.ts +37 -0
- package/gstack-origin/supabase/migrations/001_telemetry.sql +89 -0
- package/gstack-origin/test/analytics.test.ts +277 -0
- package/gstack-origin/test/codex-e2e.test.ts +197 -0
- package/gstack-origin/test/fixtures/coverage-audit-fixture.ts +76 -0
- package/gstack-origin/test/fixtures/eval-baselines.json +7 -0
- package/gstack-origin/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/qa-eval-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/review-eval-design-slop.css +86 -0
- package/gstack-origin/test/fixtures/review-eval-design-slop.html +41 -0
- package/gstack-origin/test/fixtures/review-eval-enum-diff.rb +30 -0
- package/gstack-origin/test/fixtures/review-eval-enum.rb +27 -0
- package/gstack-origin/test/fixtures/review-eval-vuln.rb +14 -0
- package/gstack-origin/test/gemini-e2e.test.ts +173 -0
- package/gstack-origin/test/gen-skill-docs.test.ts +1049 -0
- package/gstack-origin/test/global-discover.test.ts +187 -0
- package/gstack-origin/test/helpers/codex-session-runner.ts +282 -0
- package/gstack-origin/test/helpers/e2e-helpers.ts +239 -0
- package/gstack-origin/test/helpers/eval-store.test.ts +548 -0
- package/gstack-origin/test/helpers/eval-store.ts +689 -0
- package/gstack-origin/test/helpers/gemini-session-runner.test.ts +104 -0
- package/gstack-origin/test/helpers/gemini-session-runner.ts +201 -0
- package/gstack-origin/test/helpers/llm-judge.ts +130 -0
- package/gstack-origin/test/helpers/observability.test.ts +283 -0
- package/gstack-origin/test/helpers/session-runner.test.ts +96 -0
- package/gstack-origin/test/helpers/session-runner.ts +357 -0
- package/gstack-origin/test/helpers/skill-parser.ts +206 -0
- package/gstack-origin/test/helpers/touchfiles.ts +260 -0
- package/gstack-origin/test/hook-scripts.test.ts +373 -0
- package/gstack-origin/test/skill-e2e-browse.test.ts +293 -0
- package/gstack-origin/test/skill-e2e-deploy.test.ts +279 -0
- package/gstack-origin/test/skill-e2e-design.test.ts +614 -0
- package/gstack-origin/test/skill-e2e-plan.test.ts +538 -0
- package/gstack-origin/test/skill-e2e-qa-bugs.test.ts +194 -0
- package/gstack-origin/test/skill-e2e-qa-workflow.test.ts +412 -0
- package/gstack-origin/test/skill-e2e-review.test.ts +535 -0
- package/gstack-origin/test/skill-e2e-workflow.test.ts +586 -0
- package/gstack-origin/test/skill-e2e.test.ts +3325 -0
- package/gstack-origin/test/skill-llm-eval.test.ts +787 -0
- package/gstack-origin/test/skill-parser.test.ts +179 -0
- package/gstack-origin/test/skill-routing-e2e.test.ts +605 -0
- package/gstack-origin/test/skill-validation.test.ts +1520 -0
- package/gstack-origin/test/telemetry.test.ts +278 -0
- package/gstack-origin/test/touchfiles.test.ts +262 -0
- package/gstack-origin/unfreeze/SKILL.md +40 -0
- package/gstack-origin/unfreeze/SKILL.md.tmpl +38 -0
- package/package.json +38 -0
- package/scripts/install-antigravity-skill.ps1 +33 -0
- package/scripts/install-antigravity-skill.sh +41 -0
- package/scripts/sync-gstack-origin.ps1 +37 -0
- package/scripts/sync-gstack-origin.sh +35 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* skill:check — Health summary for all SKILL.md files.
|
|
4
|
+
*
|
|
5
|
+
* Reports:
|
|
6
|
+
* - Command validation (valid/invalid/snapshot errors)
|
|
7
|
+
* - Template coverage (which SKILL.md files have .tmpl sources)
|
|
8
|
+
* - Freshness check (generated files match committed files)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { validateSkill } from '../test/helpers/skill-parser';
|
|
12
|
+
import * as fs from 'fs';
|
|
13
|
+
import * as path from 'path';
|
|
14
|
+
import { execSync } from 'child_process';
|
|
15
|
+
|
|
16
|
+
const ROOT = path.resolve(import.meta.dir, '..');
|
|
17
|
+
|
|
18
|
+
// Find all SKILL.md files
|
|
19
|
+
const SKILL_FILES = [
|
|
20
|
+
'SKILL.md',
|
|
21
|
+
'browse/SKILL.md',
|
|
22
|
+
'qa/SKILL.md',
|
|
23
|
+
'qa-only/SKILL.md',
|
|
24
|
+
'ship/SKILL.md',
|
|
25
|
+
'review/SKILL.md',
|
|
26
|
+
'retro/SKILL.md',
|
|
27
|
+
'plan-ceo-review/SKILL.md',
|
|
28
|
+
'plan-eng-review/SKILL.md',
|
|
29
|
+
'setup-browser-cookies/SKILL.md',
|
|
30
|
+
'plan-design-review/SKILL.md',
|
|
31
|
+
'design-review/SKILL.md',
|
|
32
|
+
'gstack-upgrade/SKILL.md',
|
|
33
|
+
'document-release/SKILL.md',
|
|
34
|
+
'canary/SKILL.md',
|
|
35
|
+
'benchmark/SKILL.md',
|
|
36
|
+
'land-and-deploy/SKILL.md',
|
|
37
|
+
'setup-deploy/SKILL.md',
|
|
38
|
+
'cso/SKILL.md',
|
|
39
|
+
].filter(f => fs.existsSync(path.join(ROOT, f)));
|
|
40
|
+
|
|
41
|
+
let hasErrors = false;
|
|
42
|
+
|
|
43
|
+
// ─── Skills ─────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
console.log(' Skills:');
|
|
46
|
+
for (const file of SKILL_FILES) {
|
|
47
|
+
const fullPath = path.join(ROOT, file);
|
|
48
|
+
const result = validateSkill(fullPath);
|
|
49
|
+
|
|
50
|
+
if (result.warnings.length > 0) {
|
|
51
|
+
console.log(` \u26a0\ufe0f ${file.padEnd(30)} — ${result.warnings.join(', ')}`);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const totalValid = result.valid.length;
|
|
56
|
+
const totalInvalid = result.invalid.length;
|
|
57
|
+
const totalSnapErrors = result.snapshotFlagErrors.length;
|
|
58
|
+
|
|
59
|
+
if (totalInvalid > 0 || totalSnapErrors > 0) {
|
|
60
|
+
hasErrors = true;
|
|
61
|
+
console.log(` \u274c ${file.padEnd(30)} — ${totalValid} valid, ${totalInvalid} invalid, ${totalSnapErrors} snapshot errors`);
|
|
62
|
+
for (const inv of result.invalid) {
|
|
63
|
+
console.log(` line ${inv.line}: unknown command '${inv.command}'`);
|
|
64
|
+
}
|
|
65
|
+
for (const se of result.snapshotFlagErrors) {
|
|
66
|
+
console.log(` line ${se.command.line}: ${se.error}`);
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
console.log(` \u2705 ${file.padEnd(30)} — ${totalValid} commands, all valid`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ─── Templates ──────────────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
console.log('\n Templates:');
|
|
76
|
+
const TEMPLATES = [
|
|
77
|
+
{ tmpl: 'SKILL.md.tmpl', output: 'SKILL.md' },
|
|
78
|
+
{ tmpl: 'browse/SKILL.md.tmpl', output: 'browse/SKILL.md' },
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
for (const { tmpl, output } of TEMPLATES) {
|
|
82
|
+
const tmplPath = path.join(ROOT, tmpl);
|
|
83
|
+
const outPath = path.join(ROOT, output);
|
|
84
|
+
if (!fs.existsSync(tmplPath)) {
|
|
85
|
+
console.log(` \u26a0\ufe0f ${output.padEnd(30)} — no template`);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (!fs.existsSync(outPath)) {
|
|
89
|
+
hasErrors = true;
|
|
90
|
+
console.log(` \u274c ${output.padEnd(30)} — generated file missing! Run: bun run gen:skill-docs`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
console.log(` \u2705 ${tmpl.padEnd(30)} \u2192 ${output}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Skills without templates
|
|
97
|
+
for (const file of SKILL_FILES) {
|
|
98
|
+
const tmplPath = path.join(ROOT, file + '.tmpl');
|
|
99
|
+
if (!fs.existsSync(tmplPath) && !TEMPLATES.some(t => t.output === file)) {
|
|
100
|
+
console.log(` \u26a0\ufe0f ${file.padEnd(30)} — no template (OK if no $B commands)`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// ─── Codex Skills ───────────────────────────────────────────
|
|
105
|
+
|
|
106
|
+
const AGENTS_DIR = path.join(ROOT, '.agents', 'skills');
|
|
107
|
+
if (fs.existsSync(AGENTS_DIR)) {
|
|
108
|
+
console.log('\n Codex Skills (.agents/skills/):');
|
|
109
|
+
const codexDirs = fs.readdirSync(AGENTS_DIR).sort();
|
|
110
|
+
let codexCount = 0;
|
|
111
|
+
let codexMissing = 0;
|
|
112
|
+
for (const dir of codexDirs) {
|
|
113
|
+
const skillMd = path.join(AGENTS_DIR, dir, 'SKILL.md');
|
|
114
|
+
if (fs.existsSync(skillMd)) {
|
|
115
|
+
codexCount++;
|
|
116
|
+
const content = fs.readFileSync(skillMd, 'utf-8');
|
|
117
|
+
// Quick validation: must have frontmatter with name + description only
|
|
118
|
+
const hasClaude = content.includes('.claude/skills');
|
|
119
|
+
if (hasClaude) {
|
|
120
|
+
hasErrors = true;
|
|
121
|
+
console.log(` \u274c ${dir.padEnd(30)} — contains .claude/skills reference`);
|
|
122
|
+
} else {
|
|
123
|
+
console.log(` \u2705 ${dir.padEnd(30)} — OK`);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
codexMissing++;
|
|
127
|
+
hasErrors = true;
|
|
128
|
+
console.log(` \u274c ${dir.padEnd(30)} — SKILL.md missing`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
console.log(` Total: ${codexCount} skills, ${codexMissing} missing`);
|
|
132
|
+
} else {
|
|
133
|
+
console.log('\n Codex Skills: .agents/skills/ not found (run: bun run gen:skill-docs --host codex)');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// ─── Freshness ──────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
console.log('\n Freshness (Claude):');
|
|
139
|
+
try {
|
|
140
|
+
execSync('bun run scripts/gen-skill-docs.ts --dry-run', { cwd: ROOT, stdio: 'pipe' });
|
|
141
|
+
console.log(' \u2705 All Claude generated files are fresh');
|
|
142
|
+
} catch (err: any) {
|
|
143
|
+
hasErrors = true;
|
|
144
|
+
const output = err.stdout?.toString() || '';
|
|
145
|
+
console.log(' \u274c Claude generated files are stale:');
|
|
146
|
+
for (const line of output.split('\n').filter((l: string) => l.startsWith('STALE'))) {
|
|
147
|
+
console.log(` ${line}`);
|
|
148
|
+
}
|
|
149
|
+
console.log(' Run: bun run gen:skill-docs');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
console.log('\n Freshness (Codex):');
|
|
153
|
+
try {
|
|
154
|
+
execSync('bun run scripts/gen-skill-docs.ts --host codex --dry-run', { cwd: ROOT, stdio: 'pipe' });
|
|
155
|
+
console.log(' \u2705 All Codex generated files are fresh');
|
|
156
|
+
} catch (err: any) {
|
|
157
|
+
hasErrors = true;
|
|
158
|
+
const output = err.stdout?.toString() || '';
|
|
159
|
+
console.log(' \u274c Codex generated files are stale:');
|
|
160
|
+
for (const line of output.split('\n').filter((l: string) => l.startsWith('STALE'))) {
|
|
161
|
+
console.log(` ${line}`);
|
|
162
|
+
}
|
|
163
|
+
console.log(' Run: bun run gen:skill-docs --host codex');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
console.log('');
|
|
167
|
+
process.exit(hasErrors ? 1 : 0);
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# gstack setup — build browser binary + register skills with Claude Code / Codex
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
if ! command -v bun >/dev/null 2>&1; then
|
|
6
|
+
echo "Error: bun is required but not installed." >&2
|
|
7
|
+
echo "Install it: curl -fsSL https://bun.sh/install | bash" >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
GSTACK_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
12
|
+
SKILLS_DIR="$(dirname "$GSTACK_DIR")"
|
|
13
|
+
BROWSE_BIN="$GSTACK_DIR/browse/dist/browse"
|
|
14
|
+
|
|
15
|
+
IS_WINDOWS=0
|
|
16
|
+
case "$(uname -s)" in
|
|
17
|
+
MINGW*|MSYS*|CYGWIN*|Windows_NT) IS_WINDOWS=1 ;;
|
|
18
|
+
esac
|
|
19
|
+
|
|
20
|
+
# ─── Parse --host flag ─────────────────────────────────────────
|
|
21
|
+
HOST="claude"
|
|
22
|
+
while [ $# -gt 0 ]; do
|
|
23
|
+
case "$1" in
|
|
24
|
+
--host) HOST="$2"; shift 2 ;;
|
|
25
|
+
--host=*) HOST="${1#--host=}"; shift ;;
|
|
26
|
+
*) shift ;;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
case "$HOST" in
|
|
31
|
+
claude|codex|auto) ;;
|
|
32
|
+
*) echo "Unknown --host value: $HOST (expected claude, codex, or auto)" >&2; exit 1 ;;
|
|
33
|
+
esac
|
|
34
|
+
|
|
35
|
+
# For auto: detect which agents are installed
|
|
36
|
+
INSTALL_CLAUDE=0
|
|
37
|
+
INSTALL_CODEX=0
|
|
38
|
+
if [ "$HOST" = "auto" ]; then
|
|
39
|
+
command -v claude >/dev/null 2>&1 && INSTALL_CLAUDE=1
|
|
40
|
+
command -v codex >/dev/null 2>&1 && INSTALL_CODEX=1
|
|
41
|
+
# If neither found, default to claude
|
|
42
|
+
if [ "$INSTALL_CLAUDE" -eq 0 ] && [ "$INSTALL_CODEX" -eq 0 ]; then
|
|
43
|
+
INSTALL_CLAUDE=1
|
|
44
|
+
fi
|
|
45
|
+
elif [ "$HOST" = "claude" ]; then
|
|
46
|
+
INSTALL_CLAUDE=1
|
|
47
|
+
elif [ "$HOST" = "codex" ]; then
|
|
48
|
+
INSTALL_CODEX=1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
ensure_playwright_browser() {
|
|
52
|
+
if [ "$IS_WINDOWS" -eq 1 ]; then
|
|
53
|
+
# On Windows, Bun can't launch Chromium due to broken pipe handling
|
|
54
|
+
# (oven-sh/bun#4253). Use Node.js to verify Chromium works instead.
|
|
55
|
+
(
|
|
56
|
+
cd "$GSTACK_DIR"
|
|
57
|
+
node -e "const { chromium } = require('playwright'); (async () => { const b = await chromium.launch(); await b.close(); })()" 2>/dev/null
|
|
58
|
+
)
|
|
59
|
+
else
|
|
60
|
+
(
|
|
61
|
+
cd "$GSTACK_DIR"
|
|
62
|
+
bun --eval 'import { chromium } from "playwright"; const browser = await chromium.launch(); await browser.close();'
|
|
63
|
+
) >/dev/null 2>&1
|
|
64
|
+
fi
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# 1. Build browse binary if needed (smart rebuild: stale sources, package.json, lock)
|
|
68
|
+
NEEDS_BUILD=0
|
|
69
|
+
if [ ! -x "$BROWSE_BIN" ]; then
|
|
70
|
+
NEEDS_BUILD=1
|
|
71
|
+
elif [ -n "$(find "$GSTACK_DIR/browse/src" -type f -newer "$BROWSE_BIN" -print -quit 2>/dev/null)" ]; then
|
|
72
|
+
NEEDS_BUILD=1
|
|
73
|
+
elif [ "$GSTACK_DIR/package.json" -nt "$BROWSE_BIN" ]; then
|
|
74
|
+
NEEDS_BUILD=1
|
|
75
|
+
elif [ -f "$GSTACK_DIR/bun.lock" ] && [ "$GSTACK_DIR/bun.lock" -nt "$BROWSE_BIN" ]; then
|
|
76
|
+
NEEDS_BUILD=1
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [ "$NEEDS_BUILD" -eq 1 ]; then
|
|
80
|
+
echo "Building browse binary..."
|
|
81
|
+
(
|
|
82
|
+
cd "$GSTACK_DIR"
|
|
83
|
+
bun install
|
|
84
|
+
bun run build
|
|
85
|
+
)
|
|
86
|
+
# Safety net: write .version if build script didn't (e.g., git not available during build)
|
|
87
|
+
if [ ! -f "$GSTACK_DIR/browse/dist/.version" ]; then
|
|
88
|
+
git -C "$GSTACK_DIR" rev-parse HEAD > "$GSTACK_DIR/browse/dist/.version" 2>/dev/null || true
|
|
89
|
+
fi
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
if [ ! -x "$BROWSE_BIN" ]; then
|
|
93
|
+
echo "gstack setup failed: browse binary missing at $BROWSE_BIN" >&2
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
# 2. Ensure Playwright's Chromium is available
|
|
98
|
+
if ! ensure_playwright_browser; then
|
|
99
|
+
echo "Installing Playwright Chromium..."
|
|
100
|
+
(
|
|
101
|
+
cd "$GSTACK_DIR"
|
|
102
|
+
bunx playwright install chromium
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
if [ "$IS_WINDOWS" -eq 1 ]; then
|
|
106
|
+
# On Windows, Node.js launches Chromium (not Bun — see oven-sh/bun#4253).
|
|
107
|
+
# Ensure playwright is importable by Node from the gstack directory.
|
|
108
|
+
if ! command -v node >/dev/null 2>&1; then
|
|
109
|
+
echo "gstack setup failed: Node.js is required on Windows (Bun cannot launch Chromium due to a pipe bug)" >&2
|
|
110
|
+
echo " Install Node.js: https://nodejs.org/" >&2
|
|
111
|
+
exit 1
|
|
112
|
+
fi
|
|
113
|
+
echo "Windows detected — verifying Node.js can load Playwright..."
|
|
114
|
+
(
|
|
115
|
+
cd "$GSTACK_DIR"
|
|
116
|
+
# Bun's node_modules already has playwright; verify Node can require it
|
|
117
|
+
node -e "require('playwright')" 2>/dev/null || npm install --no-save playwright
|
|
118
|
+
)
|
|
119
|
+
fi
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
if ! ensure_playwright_browser; then
|
|
123
|
+
if [ "$IS_WINDOWS" -eq 1 ]; then
|
|
124
|
+
echo "gstack setup failed: Playwright Chromium could not be launched via Node.js" >&2
|
|
125
|
+
echo " This is a known issue with Bun on Windows (oven-sh/bun#4253)." >&2
|
|
126
|
+
echo " Ensure Node.js is installed and 'node -e \"require('playwright')\"' works." >&2
|
|
127
|
+
else
|
|
128
|
+
echo "gstack setup failed: Playwright Chromium could not be launched" >&2
|
|
129
|
+
fi
|
|
130
|
+
exit 1
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
# 3. Ensure ~/.gstack global state directory exists
|
|
134
|
+
mkdir -p "$HOME/.gstack/projects"
|
|
135
|
+
|
|
136
|
+
# ─── Helper: link Claude skill subdirectories into a skills parent directory ──
|
|
137
|
+
link_claude_skill_dirs() {
|
|
138
|
+
local gstack_dir="$1"
|
|
139
|
+
local skills_dir="$2"
|
|
140
|
+
local linked=()
|
|
141
|
+
for skill_dir in "$gstack_dir"/*/; do
|
|
142
|
+
if [ -f "$skill_dir/SKILL.md" ]; then
|
|
143
|
+
skill_name="$(basename "$skill_dir")"
|
|
144
|
+
# Skip node_modules
|
|
145
|
+
[ "$skill_name" = "node_modules" ] && continue
|
|
146
|
+
target="$skills_dir/$skill_name"
|
|
147
|
+
# Create or update symlink; skip if a real file/directory exists
|
|
148
|
+
if [ -L "$target" ] || [ ! -e "$target" ]; then
|
|
149
|
+
ln -snf "gstack/$skill_name" "$target"
|
|
150
|
+
linked+=("$skill_name")
|
|
151
|
+
fi
|
|
152
|
+
fi
|
|
153
|
+
done
|
|
154
|
+
if [ ${#linked[@]} -gt 0 ]; then
|
|
155
|
+
echo " linked skills: ${linked[*]}"
|
|
156
|
+
fi
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
# ─── Helper: link generated Codex skills into a skills parent directory ──
|
|
160
|
+
# Installs from .agents/skills/gstack-* (the generated Codex-format skills)
|
|
161
|
+
# instead of source dirs (which have Claude paths).
|
|
162
|
+
link_codex_skill_dirs() {
|
|
163
|
+
local gstack_dir="$1"
|
|
164
|
+
local skills_dir="$2"
|
|
165
|
+
local agents_dir="$gstack_dir/.agents/skills"
|
|
166
|
+
local linked=()
|
|
167
|
+
|
|
168
|
+
if [ ! -d "$agents_dir" ]; then
|
|
169
|
+
echo " warning: no .agents/skills/ directory found — run 'bun run build' first" >&2
|
|
170
|
+
return 1
|
|
171
|
+
fi
|
|
172
|
+
|
|
173
|
+
for skill_dir in "$agents_dir"/gstack*/; do
|
|
174
|
+
if [ -f "$skill_dir/SKILL.md" ]; then
|
|
175
|
+
skill_name="$(basename "$skill_dir")"
|
|
176
|
+
target="$skills_dir/$skill_name"
|
|
177
|
+
# Create or update symlink
|
|
178
|
+
if [ -L "$target" ] || [ ! -e "$target" ]; then
|
|
179
|
+
ln -snf "$skill_dir" "$target"
|
|
180
|
+
linked+=("$skill_name")
|
|
181
|
+
fi
|
|
182
|
+
fi
|
|
183
|
+
done
|
|
184
|
+
if [ ${#linked[@]} -gt 0 ]; then
|
|
185
|
+
echo " linked skills: ${linked[*]}"
|
|
186
|
+
fi
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
# ─── Helper: create .agents/skills/gstack/ sidecar symlinks ──────────
|
|
190
|
+
# Codex/Gemini/Cursor read skills from .agents/skills/. We link runtime
|
|
191
|
+
# assets (bin/, browse/dist/, review/, qa/, etc.) so skill templates can
|
|
192
|
+
# resolve paths like $SKILL_ROOT/review/design-checklist.md.
|
|
193
|
+
create_agents_sidecar() {
|
|
194
|
+
local repo_root="$1"
|
|
195
|
+
local agents_gstack="$repo_root/.agents/skills/gstack"
|
|
196
|
+
mkdir -p "$agents_gstack"
|
|
197
|
+
|
|
198
|
+
# Sidecar directories that skills reference at runtime
|
|
199
|
+
for asset in bin browse review qa; do
|
|
200
|
+
local src="$GSTACK_DIR/$asset"
|
|
201
|
+
local dst="$agents_gstack/$asset"
|
|
202
|
+
if [ -d "$src" ] || [ -f "$src" ]; then
|
|
203
|
+
if [ -L "$dst" ] || [ ! -e "$dst" ]; then
|
|
204
|
+
ln -snf "$src" "$dst"
|
|
205
|
+
fi
|
|
206
|
+
fi
|
|
207
|
+
done
|
|
208
|
+
|
|
209
|
+
# Sidecar files that skills reference at runtime
|
|
210
|
+
for file in ETHOS.md; do
|
|
211
|
+
local src="$GSTACK_DIR/$file"
|
|
212
|
+
local dst="$agents_gstack/$file"
|
|
213
|
+
if [ -f "$src" ]; then
|
|
214
|
+
if [ -L "$dst" ] || [ ! -e "$dst" ]; then
|
|
215
|
+
ln -snf "$src" "$dst"
|
|
216
|
+
fi
|
|
217
|
+
fi
|
|
218
|
+
done
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
# 4. Install for Claude (default)
|
|
222
|
+
SKILLS_BASENAME="$(basename "$SKILLS_DIR")"
|
|
223
|
+
if [ "$INSTALL_CLAUDE" -eq 1 ]; then
|
|
224
|
+
if [ "$SKILLS_BASENAME" = "skills" ]; then
|
|
225
|
+
link_claude_skill_dirs "$GSTACK_DIR" "$SKILLS_DIR"
|
|
226
|
+
echo "gstack ready (claude)."
|
|
227
|
+
echo " browse: $BROWSE_BIN"
|
|
228
|
+
else
|
|
229
|
+
echo "gstack ready (claude)."
|
|
230
|
+
echo " browse: $BROWSE_BIN"
|
|
231
|
+
echo " (skipped skill symlinks — not inside .claude/skills/)"
|
|
232
|
+
fi
|
|
233
|
+
fi
|
|
234
|
+
|
|
235
|
+
# 5. Install for Codex
|
|
236
|
+
if [ "$INSTALL_CODEX" -eq 1 ]; then
|
|
237
|
+
CODEX_SKILLS="$HOME/.codex/skills"
|
|
238
|
+
CODEX_GSTACK="$CODEX_SKILLS/gstack"
|
|
239
|
+
mkdir -p "$CODEX_SKILLS"
|
|
240
|
+
|
|
241
|
+
# Symlink gstack source for runtime assets (bin/, browse/dist/)
|
|
242
|
+
if [ -L "$CODEX_GSTACK" ] || [ ! -e "$CODEX_GSTACK" ]; then
|
|
243
|
+
ln -snf "$GSTACK_DIR" "$CODEX_GSTACK"
|
|
244
|
+
fi
|
|
245
|
+
# Install generated Codex-format skills (not Claude source dirs)
|
|
246
|
+
link_codex_skill_dirs "$GSTACK_DIR" "$CODEX_SKILLS"
|
|
247
|
+
|
|
248
|
+
echo "gstack ready (codex)."
|
|
249
|
+
echo " browse: $BROWSE_BIN"
|
|
250
|
+
echo " codex skills: $CODEX_SKILLS"
|
|
251
|
+
fi
|
|
252
|
+
|
|
253
|
+
# 6. Create .agents/ sidecar symlinks (useful for Codex/Gemini/Cursor workspace-local)
|
|
254
|
+
if [ "$INSTALL_CODEX" -eq 1 ]; then
|
|
255
|
+
# Detect repo root: if we're inside a skills directory, go up two levels
|
|
256
|
+
if [ "$SKILLS_BASENAME" = "skills" ]; then
|
|
257
|
+
REPO_ROOT="$(dirname "$SKILLS_DIR")"
|
|
258
|
+
else
|
|
259
|
+
REPO_ROOT="$GSTACK_DIR"
|
|
260
|
+
fi
|
|
261
|
+
create_agents_sidecar "$REPO_ROOT"
|
|
262
|
+
fi
|
|
263
|
+
|
|
264
|
+
# 7. First-time welcome + legacy cleanup
|
|
265
|
+
if [ ! -d "$HOME/.gstack" ]; then
|
|
266
|
+
mkdir -p "$HOME/.gstack"
|
|
267
|
+
echo " Welcome! Run /gstack-upgrade anytime to stay current."
|
|
268
|
+
fi
|
|
269
|
+
rm -f /tmp/gstack-latest-version
|