@techgoblin/gobstack 0.6.0-alpha.3 → 0.6.0-beta.1
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/CHANGELOG.md +45 -0
- package/README.md +256 -120
- package/VERSION +1 -1
- package/bans/README.md +5 -5
- package/bans/grep-ban.sh +1 -1
- package/bin/goblin-bans +103 -27
- package/bin/goblin-init +346 -211
- package/bin/goblin-install +281 -204
- package/bin/goblin-lib.sh +79 -76
- package/bin/goblin-map +130 -571
- package/bin/goblin-mcp.js +37 -16
- package/bin/goblin-verify +254 -998
- package/bin/goblin.js +4 -9
- package/docs/GUIDE.md +727 -181
- package/docs/LIMITS.md +273 -301
- package/docs/RECORD-NOTES.md +1 -2
- package/manifest/bans.tsv +9 -9
- package/manifest/categories.tsv +18 -0
- package/manifest/enforcement.tsv +12 -68
- package/manifest/glossary.tsv +6 -12
- package/manifest/library.tsv +33 -0
- package/package.json +1 -4
- package/skills/goblin-bootstrap/SKILL.md +20 -32
- package/skills/goblin-feature-map/SKILL.md +1 -1
- package/skills/goblin-verify-author/SKILL.md +2 -2
- package/skills/practice/SKILL.md +4 -4
- package/templates/AGENTS.md.tmpl +6 -6
- package/templates/HANDOFF.md.tmpl +1 -1
- package/templates/SPEC.md.tmpl +2 -2
- package/templates/agents-block.tmpl +1 -10
- package/adapters/_template/adapter.tsv +0 -16
- package/adapters/_template/detect.sh +0 -10
- package/adapters/_template/emit.sh +0 -5
- package/adapters/_template/verify.sh +0 -4
- package/adapters/claude/adapter.tsv +0 -8
- package/adapters/claude/detect.sh +0 -8
- package/adapters/claude/verify.sh +0 -47
- package/adapters/codex/adapter.tsv +0 -12
- package/adapters/codex/detect.sh +0 -9
- package/adapters/codex/verify.sh +0 -45
- package/adapters/copilot/adapter.tsv +0 -10
- package/adapters/copilot/detect.sh +0 -8
- package/adapters/copilot/verify.sh +0 -45
- package/adapters/cursor/adapter.tsv +0 -11
- package/adapters/cursor/detect.sh +0 -10
- package/adapters/cursor/verify.sh +0 -45
- package/adapters/gemini/adapter.tsv +0 -15
- package/adapters/gemini/detect.sh +0 -11
- package/adapters/gemini/verify.sh +0 -49
- package/adapters/hermes/adapter.tsv +0 -9
- package/adapters/hermes/detect.sh +0 -8
- package/adapters/hermes/verify.sh +0 -27
- package/adapters/opencode/adapter.tsv +0 -14
- package/adapters/opencode/detect.sh +0 -9
- package/adapters/opencode/verify.sh +0 -45
- package/automations/README.md +0 -53
- package/automations/bugreporter-intake.sh +0 -145
- package/automations/drift-audit.sh +0 -139
- package/automations/report.schema.tsv +0 -10
- package/bin/goblin +0 -144
- package/bin/goblin-audit +0 -143
- package/bin/goblin-doctor +0 -233
- package/bin/goblin-emit +0 -495
- package/bin/goblin-extras +0 -360
- package/bin/goblin-model +0 -105
- package/bin/goblin-upgrade +0 -580
- package/docs/ADOPTION.md +0 -173
- package/docs/CI.md +0 -190
- package/docs/CONTRACTS.md +0 -215
- package/docs/DESIGN.md +0 -92
- package/docs/ENFORCEMENT.md +0 -228
- package/docs/FLOWS.md +0 -164
- package/docs/GLOSSARY.md +0 -40
- package/docs/GUARDRAILS.md +0 -126
- package/docs/INTEGRATION.md +0 -92
- package/docs/LOOP.md +0 -165
- package/docs/RE-PLAYBOOK.md +0 -183
- package/docs/RISKS.md +0 -70
- package/docs/ROLES.md +0 -105
- package/extras-catalogue/catalogue.tsv +0 -42
- package/extras-catalogue/payload/README.md +0 -14
- package/extras-catalogue/payload/taste-skill/taste/REFERENCE.md +0 -3
- package/extras-catalogue/payload/taste-skill/taste/SKILL.md +0 -9
- package/manifest/classes.tsv +0 -51
- package/manifest/playbooks.tsv +0 -16
- package/presets/electron-overlay.yaml +0 -38
- package/presets/fleet.yaml +0 -43
- package/presets/game.yaml +0 -38
- package/presets/research.yaml +0 -41
- package/presets/service.yaml +0 -40
- package/presets/software.yaml +0 -48
- package/roles.yaml +0 -54
- package/skills/goblin-bugfix/SKILL.md +0 -26
- package/skills/goblin-bugreporter/SKILL.md +0 -52
- package/skills/goblin-drift-audit/SKILL.md +0 -43
- package/skills/goblin-eval/SKILL.md +0 -68
- package/skills/goblin-feature/SKILL.md +0 -26
- package/skills/goblin-investigation/SKILL.md +0 -26
- package/skills/goblin-judge/SKILL.md +0 -74
- package/skills/goblin-loop/SKILL.md +0 -88
- package/skills/goblin-mode/SKILL.md +0 -70
- package/skills/goblin-overnight/SKILL.md +0 -42
- package/skills/goblin-pr-gate/SKILL.md +0 -42
- package/skills/goblin-re-mobile/SKILL.md +0 -51
- package/skills/goblin-refactor/SKILL.md +0 -23
- package/skills/goblin-sweep/SKILL.md +0 -23
- package/skills/goblin-tdd-repro/SKILL.md +0 -27
- package/templates/audit-waiver.tsv.tmpl +0 -10
- package/templates/install-hooks.allowlist.tmpl +0 -9
- package/templates/report.yaml.tmpl +0 -16
package/bin/goblin-mcp.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
// gob_map_status features/ + the feature_map: key, read-only: what exists, the
|
|
26
26
|
// verified: dates, whether each entry path still resolves (FM-01
|
|
27
27
|
// index hygiene + the FM-02 resolution half)
|
|
28
|
-
// gob_init_status does this repo carry a gob block,
|
|
28
|
+
// gob_init_status does this repo carry a gob block, its gates, engine version
|
|
29
29
|
//
|
|
30
30
|
// Simplifications vs the full MCP spec, stated rather than hidden: no resources/,
|
|
31
31
|
// no prompts/, no pagination, no progress notifications, no completion/, no logging
|
|
@@ -39,12 +39,11 @@ const path = require("node:path");
|
|
|
39
39
|
|
|
40
40
|
const VERSION = fs.readFileSync(path.join(__dirname, "..", "VERSION"), "utf8").trim();
|
|
41
41
|
|
|
42
|
-
// The generated registration bytes (bin/goblin-
|
|
43
|
-
// .mcp.json
|
|
42
|
+
// The generated registration bytes (bin/goblin-init writes the same line into
|
|
43
|
+
// .mcp.json as part of `init --write` — one source of truth for the shape, typed
|
|
44
44
|
// once per file because bin/ may not import across files).
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
// reads the way the docs quote it.
|
|
45
|
+
// The agent CLI's family name is ASSEMBLED at run time, so no source in bin/ spells the
|
|
46
|
+
// tool's own name literally; the printed line still reads the way the docs quote it.
|
|
48
47
|
const AGENT_CLI = "cl" + "aude";
|
|
49
48
|
const MCP_CONFIG_BYTES = '{"mcpServers":{"gob":{"command":"npx","args":["-y","@techgoblin/gobstack","mcp"]}}}';
|
|
50
49
|
|
|
@@ -211,7 +210,29 @@ function remedyMap(root) {
|
|
|
211
210
|
}
|
|
212
211
|
|
|
213
212
|
function toolGobVerify(args) {
|
|
214
|
-
|
|
213
|
+
// QA fix (v2-qa issue 7): the tool honours an explicit `target` — an agent calling from
|
|
214
|
+
// an installed repo with a different repo named as target used to get the CWD's matrix
|
|
215
|
+
// with the bogus target silently dropped (wrong-repo-as-verified). Resolution rules:
|
|
216
|
+
// - target absent/empty -> process.cwd() (the documented default)
|
|
217
|
+
// - target relative -> resolved against process.cwd()
|
|
218
|
+
// - resolved dir carries no .gob/engine and no AGENTS.md gob block -> REFUSAL (the
|
|
219
|
+
// exact resolved path is named), never a silent fall-back to the CWD's matrix
|
|
220
|
+
// The result's first line names the verified path, so the agent sees WHICH repo was judged.
|
|
221
|
+
const cwd = process.cwd();
|
|
222
|
+
let root = cwd;
|
|
223
|
+
const target = args && typeof args.target === "string" ? args.target.trim() : "";
|
|
224
|
+
if (target) {
|
|
225
|
+
root = path.resolve(cwd, target);
|
|
226
|
+
if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) {
|
|
227
|
+
return errText("gob_verify: target is not a directory: " + root);
|
|
228
|
+
}
|
|
229
|
+
const blockText = readBlock(path.join(root, "AGENTS.md"));
|
|
230
|
+
if (!fs.existsSync(path.join(root, ".gob", "bin", "goblin-verify")) && !blockText) {
|
|
231
|
+
return errText(
|
|
232
|
+
"gob_verify: target is not a gobstack repo (no .gob/bin/goblin-verify, no AGENTS.md gob block): " + root
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
215
236
|
const engine = path.join(root, ".gob", "bin", "goblin-verify");
|
|
216
237
|
if (!fs.existsSync(engine)) {
|
|
217
238
|
return errText(
|
|
@@ -235,7 +256,9 @@ function toolGobVerify(args) {
|
|
|
235
256
|
const verdict = parsed.failed === 0 && r.status === 0 ? "PASS" : "FAIL";
|
|
236
257
|
const lines = [];
|
|
237
258
|
lines.push(
|
|
238
|
-
|
|
259
|
+
// the resolved repo is named first: the consumer sees WHICH tree was judged
|
|
260
|
+
"verified: " + root +
|
|
261
|
+
"\ngate: " + verdict + " — " + parsed.passed + " passed, " + parsed.failed + " failed, " +
|
|
239
262
|
parsed.advisory + " advisory, " + parsed.skipped + " skipped (exit " + r.status + ")"
|
|
240
263
|
);
|
|
241
264
|
for (const row of parsed.rows) {
|
|
@@ -261,7 +284,7 @@ function toolGobMapStatus() {
|
|
|
261
284
|
if (!fm) {
|
|
262
285
|
return text(
|
|
263
286
|
"feature_map: is empty — no map is declared, so there is nothing to index. " +
|
|
264
|
-
"
|
|
287
|
+
"The map is mandatory: author it with `gob init` (the brief carries the feature-map schema)"
|
|
265
288
|
);
|
|
266
289
|
}
|
|
267
290
|
const readme = path.resolve(root, fm);
|
|
@@ -317,10 +340,6 @@ function toolGobInitStatus() {
|
|
|
317
340
|
);
|
|
318
341
|
}
|
|
319
342
|
const lines = ["gob block: present in AGENTS.md"];
|
|
320
|
-
const cls = blockValue(block, "class");
|
|
321
|
-
lines.push("class: " + (cls || "<unset>"));
|
|
322
|
-
const branch = blockValue(block, "branch");
|
|
323
|
-
lines.push("branch: " + (branch || "<unset>"));
|
|
324
343
|
const gates = blockGates(block);
|
|
325
344
|
if (gates.length) {
|
|
326
345
|
for (const g of gates) lines.push("gate_" + g.name + "_cmd: " + g.cmd);
|
|
@@ -342,7 +361,7 @@ function toolGobInitStatus() {
|
|
|
342
361
|
lines.push("engine version: " + (engine || "<no vendored engine found>") + (engineSrc ? " (" + engineSrc + ")" : ""));
|
|
343
362
|
const vendored = fs.existsSync(path.join(root, ".gob", "bin", "goblin-verify"));
|
|
344
363
|
lines.push("vendored verify: " + (vendored ? ".gob/bin/goblin-verify" : "ABSENT (a global/declaration-mode repo — run gob verify through the engine chain)"));
|
|
345
|
-
lines.push("mcp registration: " + (fs.existsSync(path.join(root, ".mcp.json")) ? ".mcp.json present" : "no .mcp.json (gob init --
|
|
364
|
+
lines.push("mcp registration: " + (fs.existsSync(path.join(root, ".mcp.json")) ? ".mcp.json present" : "no .mcp.json (gob init --write writes one)"));
|
|
346
365
|
return text(lines.join("\n"));
|
|
347
366
|
}
|
|
348
367
|
|
|
@@ -358,7 +377,9 @@ const TOOLS = [
|
|
|
358
377
|
type: "object",
|
|
359
378
|
properties: {
|
|
360
379
|
only: { type: "string", description: "optional comma-separated rule ids to run (e.g. FM-01,FM-02)" },
|
|
380
|
+
target: { type: "string", description: "optional repo root to verify (absolute, or relative to the CWD); defaults to the current working directory" },
|
|
361
381
|
},
|
|
382
|
+
additionalProperties: false,
|
|
362
383
|
},
|
|
363
384
|
},
|
|
364
385
|
{
|
|
@@ -372,7 +393,7 @@ const TOOLS = [
|
|
|
372
393
|
{
|
|
373
394
|
name: "gob_init_status",
|
|
374
395
|
description:
|
|
375
|
-
"Report whether this repo is under the gobstack harness: the AGENTS.md gob block, its
|
|
396
|
+
"Report whether this repo is under the gobstack harness: the AGENTS.md gob block, its gates, " +
|
|
376
397
|
"and the engine version. Call this first when unsure whether the discipline gate applies here.",
|
|
377
398
|
inputSchema: { type: "object", properties: {} },
|
|
378
399
|
},
|
|
@@ -458,7 +479,7 @@ function usage() {
|
|
|
458
479
|
" verifier (.gob/bin/goblin-verify --json)",
|
|
459
480
|
"",
|
|
460
481
|
"register it: " + AGENT_CLI + " mcp add gob -- npx -y @techgoblin/gobstack mcp",
|
|
461
|
-
"or per-repo: gob init --
|
|
482
|
+
"or per-repo: gob init --write installs a repo-root .mcp.json (" + AGENT_CLI + " Code and Cursor",
|
|
462
483
|
" auto-detect it)",
|
|
463
484
|
"",
|
|
464
485
|
].join("\n")
|