@techgoblin/gobstack 0.0.0-stage → 0.4.4-beta.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +351 -0
  2. package/LICENSE +21 -0
  3. package/README.md +217 -2
  4. package/VERSION +1 -0
  5. package/adapters/_template/adapter.tsv +16 -0
  6. package/adapters/_template/detect.sh +10 -0
  7. package/adapters/_template/emit.sh +5 -0
  8. package/adapters/_template/verify.sh +4 -0
  9. package/adapters/claude/adapter.tsv +8 -0
  10. package/adapters/claude/detect.sh +8 -0
  11. package/adapters/claude/verify.sh +47 -0
  12. package/adapters/codex/adapter.tsv +12 -0
  13. package/adapters/codex/detect.sh +9 -0
  14. package/adapters/codex/verify.sh +45 -0
  15. package/adapters/copilot/adapter.tsv +10 -0
  16. package/adapters/copilot/detect.sh +8 -0
  17. package/adapters/copilot/verify.sh +45 -0
  18. package/adapters/cursor/adapter.tsv +11 -0
  19. package/adapters/cursor/detect.sh +10 -0
  20. package/adapters/cursor/verify.sh +45 -0
  21. package/adapters/gemini/adapter.tsv +15 -0
  22. package/adapters/gemini/detect.sh +11 -0
  23. package/adapters/gemini/verify.sh +49 -0
  24. package/adapters/hermes/adapter.tsv +9 -0
  25. package/adapters/hermes/detect.sh +8 -0
  26. package/adapters/hermes/verify.sh +27 -0
  27. package/adapters/opencode/adapter.tsv +14 -0
  28. package/adapters/opencode/detect.sh +9 -0
  29. package/adapters/opencode/verify.sh +45 -0
  30. package/automations/README.md +53 -0
  31. package/automations/bugreporter-intake.sh +145 -0
  32. package/automations/drift-audit.sh +139 -0
  33. package/automations/report.schema.tsv +10 -0
  34. package/bans/README.md +82 -0
  35. package/bans/grep-ban.sh +84 -0
  36. package/bans/layer-check.sh +57 -0
  37. package/bin/goblin +119 -0
  38. package/bin/goblin-audit +145 -0
  39. package/bin/goblin-bans +178 -0
  40. package/bin/goblin-doctor +233 -0
  41. package/bin/goblin-emit +484 -0
  42. package/bin/goblin-init +519 -0
  43. package/bin/goblin-install +720 -0
  44. package/bin/goblin-lib.sh +289 -0
  45. package/bin/goblin-model +105 -0
  46. package/bin/goblin-upgrade +572 -0
  47. package/bin/goblin-verify +2798 -0
  48. package/bin/goblin.js +103 -0
  49. package/docs/ADOPTION.md +168 -0
  50. package/docs/CI.md +187 -0
  51. package/docs/CONTRACTS.md +197 -0
  52. package/docs/DESIGN.md +92 -0
  53. package/docs/ENFORCEMENT.md +225 -0
  54. package/docs/FLOWS.md +164 -0
  55. package/docs/GUARDRAILS.md +126 -0
  56. package/docs/GUIDE.md +610 -0
  57. package/docs/INTEGRATION.md +92 -0
  58. package/docs/LIMITS.md +591 -0
  59. package/docs/LOOP.md +165 -0
  60. package/docs/RE-PLAYBOOK.md +183 -0
  61. package/docs/RISKS.md +70 -0
  62. package/docs/ROLES.md +105 -0
  63. package/manifest/bans.tsv +9 -0
  64. package/manifest/classes.tsv +61 -0
  65. package/manifest/enforcement.tsv +88 -0
  66. package/manifest/glossary.tsv +25 -0
  67. package/manifest/playbooks.tsv +16 -0
  68. package/package.json +37 -4
  69. package/presets/A-shipped-software.yaml +48 -0
  70. package/presets/B-service-config.yaml +40 -0
  71. package/presets/C-game.yaml +38 -0
  72. package/presets/D-knowledge.yaml +41 -0
  73. package/presets/E-fleet-config.yaml +42 -0
  74. package/presets/F-electron.yaml +67 -0
  75. package/roles.yaml +54 -0
  76. package/skills/goblin-bootstrap/SKILL.md +51 -0
  77. package/skills/goblin-bugfix/SKILL.md +26 -0
  78. package/skills/goblin-bugreporter/SKILL.md +52 -0
  79. package/skills/goblin-drift-audit/SKILL.md +43 -0
  80. package/skills/goblin-eval/SKILL.md +68 -0
  81. package/skills/goblin-feature/SKILL.md +26 -0
  82. package/skills/goblin-feature-map/SKILL.md +140 -0
  83. package/skills/goblin-handoff/SKILL.md +28 -0
  84. package/skills/goblin-investigation/SKILL.md +26 -0
  85. package/skills/goblin-judge/SKILL.md +74 -0
  86. package/skills/goblin-loop/SKILL.md +88 -0
  87. package/skills/goblin-mode/SKILL.md +70 -0
  88. package/skills/goblin-overnight/SKILL.md +42 -0
  89. package/skills/goblin-pr-gate/SKILL.md +42 -0
  90. package/skills/goblin-re-mobile/SKILL.md +51 -0
  91. package/skills/goblin-refactor/SKILL.md +23 -0
  92. package/skills/goblin-sweep/SKILL.md +23 -0
  93. package/skills/goblin-tdd-repro/SKILL.md +27 -0
  94. package/skills/goblin-verify-author/SKILL.md +50 -0
  95. package/skills/practice/SKILL.md +37 -0
  96. package/templates/AGENTS.md.tmpl +23 -0
  97. package/templates/HANDOFF.md.tmpl +43 -0
  98. package/templates/SPEC.md.tmpl +34 -0
  99. package/templates/audit-waiver.tsv.tmpl +10 -0
  100. package/templates/boundary-waivers.tmpl +8 -0
  101. package/templates/checks/assert.mjs.tmpl +60 -0
  102. package/templates/checks/gate.sh.tmpl +29 -0
  103. package/templates/ci/goblin-gate.yml.tmpl +46 -0
  104. package/templates/goblin.yaml.tmpl +138 -0
  105. package/templates/install-hooks.allowlist.tmpl +9 -0
  106. package/templates/loop/decisions.tsv.tmpl +1 -0
  107. package/templates/loop/predicate.tmpl +16 -0
  108. package/templates/report.yaml.tmpl +16 -0
@@ -0,0 +1,92 @@
1
+ # Integration points
2
+
3
+ ## The kanban board
4
+
5
+ The board is the fleet's fan-out carrier and the only one with a model knob.
6
+
7
+ - `goblin-overnight` (P10) maps to `goal_mode: true` plus a turn budget. **Corrected 2026-09-25
8
+ (W3), measured in `hermes_cli/goals.py`:** the truth was weaker than this line claimed. The
9
+ auxiliary judge is called as `judge_goal(goal_text, last_response)` (`:1662`) — two positional
10
+ arguments and nothing else: **no contract, no subgoals, no quality gates** (the function takes all
11
+ three; this call site passes none), so it is not "the predicate re-check"; what it sees is the card's
12
+ goal text (truncated to 2000 chars) and the worker's own most recent response (truncated to
13
+ 4000) (`:39`, `:904-905`). The judge is an auxiliary model call at `temperature=0` (`:858-863`)
14
+ and the loop's whole state is `last_response`, `turns_used` and `nudged_to_finalize` — **there is
15
+ no progress detector at all** (`:1636-1638`). `wait` is downgraded to `continue` in a kanban loop
16
+ (`:1666-1667`), a judged-done worker that never finalises is nudged once and then **blocked**
17
+ (`:1676-1685`), and the budget (`DEFAULT_MAX_TURNS = 20`) is checked before each further turn
18
+ (`:1689-1696`). What goblin-stack adds on top is `docs/LOOP.md` and the eight rows
19
+ `JG-01`..`JG-03`, `LP-01`..`LP-05`; the terminal handoff gate is judged on the supplied summary
20
+ text and **allows the handoff when the judge breaks** (`tools/kanban_tools.py:414-424`,
21
+ `:447-477`).
22
+ - `goblin-pr-gate` (P7) maps to the board's review request and change-request verbs. The
23
+ verdict's `{head_sha, base_sha, patch_id, lanes, verdict}` lives in the card metadata **and**
24
+ in the committed `reviews/<slug>-<head7>.md`. The card is the routing record; the file is the
25
+ artifact the verifier can test (`PG-01`/`PG-02`/`PG-03`).
26
+ - `goblin-sweep` (P11) is one card per project, parented to the sweep card.
27
+
28
+ **Rule:** role-pinned fan-out goes through the board, never through a bare subagent spawn. See
29
+ `docs/ROLES.md` for the measured reason.
30
+
31
+ ## Cron
32
+
33
+ `goblin-sweep` is the cron-shaped playbook: enumerate by glob, one card per project, one line
34
+ back.
35
+
36
+ Measured constraint to state plainly: a non-interactive surface inherits the skills **trust**
37
+ decision and resolves the project root from the job's `workdir`. So **a sweep job whose `workdir`
38
+ is not inside a trusted repo loads none of goblin-stack's skills.** The installer prints the
39
+ `hermes skills trust` step, and `goblin-verify` cannot check it (it is a fleet-runtime property,
40
+ recorded as `MD-03`).
41
+
42
+ The answer to a lost bootstrap is the same as the answer to compaction: the mode skill is
43
+ loadable on demand and `AGENTS.md` names it, so recovery is reading one file rather than
44
+ depending on a hook. On this runtime `on_session_start` exists and cannot inject (its
45
+ return is discarded — it is an observer), and `pre_llm_call` can inject into the user
46
+ message; goblin-stack uses neither as its bootstrap, because recovery-by-reading-one-file
47
+ is strictly more robust than a hook that six of the seven platforms do not have.
48
+
49
+ ## Skills, and the precedence that decides which copy wins
50
+
51
+ goblin-stack **ships** skills and the installer **installs them into the project** at
52
+ `.hermes/skills/` — never into a profile.
53
+
54
+ Measured mechanism: the project tier is the highest precedence (`project → local → external`),
55
+ project dirs are treated as repo-owned so autonomous skill maintenance never rewrites them, the
56
+ code and its procedure are versioned together, and they need one `hermes skills trust` per repo.
57
+
58
+ Consequence a future agent must know rather than guess: **for a repo with goblin-stack
59
+ installed, the copy in `.hermes/skills/` wins.** Profiles keep only skills that are genuinely
60
+ cross-project. A shared library directory remains available in Hermes for a future shared
61
+ library, but it is deliberately unused here: it is read-only to maintenance as well, yet it is
62
+ *not* repo-versioned, and that is the property that matters.
63
+
64
+ ## The fleet's routing text — what goblin-stack ships and cannot fix
65
+
66
+ goblin-stack **does not edit the fleet's orchestrator constitution and cannot**: it writes
67
+ nothing outside its target repo.
68
+
69
+ It ships the corrected routing text here, as an escalation, because the measured defect is
70
+ high-cost and lives on the fleet side: the rule deciding *whether specialist work happens at
71
+ all* is **false where the orchestrator reads it first**. A bare subagent spawn cannot reach the
72
+ architect/coder/reviewer profiles; delegation that must land there goes through the board. The
73
+ orchestrator's own text says the opposite in its first lines, and the word "kanban" does not
74
+ appear there.
75
+
76
+ The one mechanical thing goblin-stack can do is lint its own artifacts: `MD-03`, plus a source
77
+ test that no shipped skill tells a worker to reach another profile with a bare subagent spawn.
78
+
79
+ ## The referenced standard
80
+
81
+ Referenced and hash-pinned, never moved, never superseded, never vendored. `.goblin/goblin.yaml`
82
+ carries `practice:` and `practice_sha256:`; `goblin-verify` compares. The `practice` skill's body
83
+ is a pointer and a mandate — read the standard at the configured path before starting work; if
84
+ the path is absent, say so and continue with the goblin-stack rules alone.
85
+
86
+ An edit to the standard that **is** intended is re-recorded with one explicit command,
87
+ `goblin-install --target <dir> --re-pin`, which rewrites that one config line and prints the old
88
+ and new hash; nothing re-pins automatically, because a self-updating pin would be the silent edit
89
+ it exists to catch (`docs/CONTRACTS.md`, "An edited standard is not a dead end").
90
+
91
+ Three existing consumers of that standard have its path baked in, and goblin-stack is not one of
92
+ them: it reads the path from config, so moving the standard is a one-line config change.