winter-super-cli 2026.6.24 → 2026.6.27

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 (123) hide show
  1. package/CHANGELOG.md +28 -5
  2. package/README.md +85 -0
  3. package/package.json +5 -1
  4. package/resources/local/gsap-skills/.claude-plugin/marketplace.json +20 -0
  5. package/resources/local/gsap-skills/.claude-plugin/plugin.json +6 -0
  6. package/resources/local/gsap-skills/.cursor-plugin/marketplace.json +13 -0
  7. package/resources/local/gsap-skills/.cursor-plugin/plugin.json +22 -0
  8. package/resources/local/gsap-skills/.github/copilot-instructions.md +17 -0
  9. package/resources/local/gsap-skills/.github/instructions/react.instructions.md +15 -0
  10. package/resources/local/gsap-skills/.github/instructions/scrolltrigger.instructions.md +18 -0
  11. package/resources/local/gsap-skills/AGENTS.md +27 -0
  12. package/resources/local/gsap-skills/CLAUDE.md +1 -0
  13. package/resources/local/gsap-skills/GEMINI.md +1 -0
  14. package/resources/local/gsap-skills/LICENSE +21 -0
  15. package/resources/local/gsap-skills/README.md +163 -0
  16. package/resources/local/gsap-skills/assets/gsap-green.svg +7 -0
  17. package/resources/local/gsap-skills/assets/gsap-icon-inverted.svg +15 -0
  18. package/resources/local/gsap-skills/assets/gsap-icon-square.svg +1 -0
  19. package/resources/local/gsap-skills/assets/gsap-white.svg +7 -0
  20. package/resources/local/gsap-skills/examples/README.md +29 -0
  21. package/resources/local/gsap-skills/examples/nuxt/app/app.vue +3 -0
  22. package/resources/local/gsap-skills/examples/nuxt/app/composables/useGSAP.ts +91 -0
  23. package/resources/local/gsap-skills/examples/nuxt/app/pages/index.vue +55 -0
  24. package/resources/local/gsap-skills/examples/nuxt/nuxt.config.ts +4 -0
  25. package/resources/local/gsap-skills/examples/nuxt/package.json +18 -0
  26. package/resources/local/gsap-skills/examples/react/App.jsx +46 -0
  27. package/resources/local/gsap-skills/examples/react/index.html +12 -0
  28. package/resources/local/gsap-skills/examples/react/main.jsx +9 -0
  29. package/resources/local/gsap-skills/examples/react/package.json +21 -0
  30. package/resources/local/gsap-skills/examples/react/vite.config.js +7 -0
  31. package/resources/local/gsap-skills/examples/vanilla/index.html +33 -0
  32. package/resources/local/gsap-skills/examples/vanilla/main.js +36 -0
  33. package/resources/local/gsap-skills/examples/vue/app.vue +47 -0
  34. package/resources/local/gsap-skills/examples/vue/index.html +15 -0
  35. package/resources/local/gsap-skills/examples/vue/main.js +9 -0
  36. package/resources/local/gsap-skills/examples/vue/package.json +19 -0
  37. package/resources/local/gsap-skills/examples/vue/vite.config.js +7 -0
  38. package/resources/local/gsap-skills/skills/gsap-core/SKILL.md +254 -0
  39. package/resources/local/gsap-skills/skills/gsap-frameworks/SKILL.md +266 -0
  40. package/resources/local/gsap-skills/skills/gsap-performance/SKILL.md +79 -0
  41. package/resources/local/gsap-skills/skills/gsap-plugins/SKILL.md +433 -0
  42. package/resources/local/gsap-skills/skills/gsap-react/SKILL.md +136 -0
  43. package/resources/local/gsap-skills/skills/gsap-scrolltrigger/SKILL.md +296 -0
  44. package/resources/local/gsap-skills/skills/gsap-timeline/SKILL.md +107 -0
  45. package/resources/local/gsap-skills/skills/gsap-utils/SKILL.md +284 -0
  46. package/resources/local/gsap-skills/skills/llms.txt +39 -0
  47. package/resources/local/hermes-agent-core/AGENTS.md +1132 -0
  48. package/resources/local/hermes-agent-core/LICENSE +21 -0
  49. package/resources/local/hermes-agent-core/README.md +215 -0
  50. package/resources/local/hermes-agent-core/docs/2026-05-07-s6-overlay-dynamic-subagent-gateways.md +434 -0
  51. package/resources/local/hermes-agent-core/hermes-already-has-routines.md +160 -0
  52. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/DESCRIPTION.md +3 -0
  53. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/claude-code/SKILL.md +745 -0
  54. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/codex/SKILL.md +130 -0
  55. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/hermes-agent/SKILL.md +1021 -0
  56. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/SKILL.md +277 -0
  57. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/templates/pmb-codex-lane-prompt.md +57 -0
  58. package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/opencode/SKILL.md +219 -0
  59. package/resources/local/hermes-agent-core/skills/github/DESCRIPTION.md +3 -0
  60. package/resources/local/hermes-agent-core/skills/github/codebase-inspection/SKILL.md +116 -0
  61. package/resources/local/hermes-agent-core/skills/github/github-auth/SKILL.md +247 -0
  62. package/resources/local/hermes-agent-core/skills/github/github-auth/scripts/gh-env.sh +66 -0
  63. package/resources/local/hermes-agent-core/skills/github/github-code-review/SKILL.md +481 -0
  64. package/resources/local/hermes-agent-core/skills/github/github-code-review/references/review-output-template.md +74 -0
  65. package/resources/local/hermes-agent-core/skills/github/github-issues/SKILL.md +370 -0
  66. package/resources/local/hermes-agent-core/skills/github/github-issues/templates/bug-report.md +35 -0
  67. package/resources/local/hermes-agent-core/skills/github/github-issues/templates/feature-request.md +31 -0
  68. package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/SKILL.md +367 -0
  69. package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  70. package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
  71. package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  72. package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
  73. package/resources/local/hermes-agent-core/skills/github/github-repo-management/SKILL.md +516 -0
  74. package/resources/local/hermes-agent-core/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
  75. package/resources/local/hermes-agent-core/skills/mcp/DESCRIPTION.md +3 -0
  76. package/resources/local/hermes-agent-core/skills/mcp/native-mcp/SKILL.md +357 -0
  77. package/resources/local/hermes-agent-core/skills/software-development/debugging-hermes-tui-commands/SKILL.md +152 -0
  78. package/resources/local/hermes-agent-core/skills/software-development/hermes-agent-skill-authoring/SKILL.md +165 -0
  79. package/resources/local/hermes-agent-core/skills/software-development/hermes-s6-container-supervision/SKILL.md +176 -0
  80. package/resources/local/hermes-agent-core/skills/software-development/node-inspect-debugger/SKILL.md +319 -0
  81. package/resources/local/hermes-agent-core/skills/software-development/plan/SKILL.md +58 -0
  82. package/resources/local/hermes-agent-core/skills/software-development/python-debugpy/SKILL.md +375 -0
  83. package/resources/local/hermes-agent-core/skills/software-development/requesting-code-review/SKILL.md +280 -0
  84. package/resources/local/hermes-agent-core/skills/software-development/spike/SKILL.md +197 -0
  85. package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/SKILL.md +352 -0
  86. package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/context-budget-discipline.md +53 -0
  87. package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/gates-taxonomy.md +93 -0
  88. package/resources/local/hermes-agent-core/skills/software-development/systematic-debugging/SKILL.md +367 -0
  89. package/resources/local/hermes-agent-core/skills/software-development/test-driven-development/SKILL.md +343 -0
  90. package/resources/local/hermes-agent-core/skills/software-development/writing-plans/SKILL.md +297 -0
  91. package/resources/local/manifest.json +12 -0
  92. package/rule.md +2 -0
  93. package/scripts/audit-pack.js +5 -0
  94. package/scripts/smoke-browser.js +53 -0
  95. package/scripts/smoke-package.js +38 -4
  96. package/skill.md +36 -4
  97. package/skills/gsap.md +26 -0
  98. package/skills/hermes-agent.md +17 -0
  99. package/src/agent/agent-definitions.js +4 -4
  100. package/src/agent/runtime.js +179 -5
  101. package/src/agent/subagent-child.js +44 -0
  102. package/src/ai/capability-scorecard.js +193 -14
  103. package/src/ai/hermes-core.js +77 -0
  104. package/src/ai/model-capabilities.js +42 -2
  105. package/src/ai/prompts/system-prompt.js +18 -2
  106. package/src/ai/small-model-amplifier.js +35 -7
  107. package/src/ai/workflow-selector.js +22 -1
  108. package/src/cli/commands.js +46 -2
  109. package/src/cli/config.js +45 -6
  110. package/src/cli/context-loader.js +253 -9
  111. package/src/cli/conversation-format.js +5 -0
  112. package/src/cli/input-controller.js +79 -10
  113. package/src/cli/prompt-builder.js +47 -8
  114. package/src/cli/repl-commands.js +115 -0
  115. package/src/cli/repl.js +343 -85
  116. package/src/cli/slash-commands.js +4 -2
  117. package/src/cli/tui.js +133 -37
  118. package/src/mcp/client.js +54 -11
  119. package/src/mcp/presets.js +114 -0
  120. package/src/tools/agent.js +316 -25
  121. package/src/tools/executor.js +412 -12
  122. package/src/tools/permission.js +20 -17
  123. package/winter.d.ts +112 -10
@@ -0,0 +1,277 @@
1
+ ---
2
+ name: kanban-codex-lane
3
+ description: Use when a Hermes Kanban worker wants to run Codex CLI as an isolated implementation lane while Hermes keeps ownership of task lifecycle, reconciliation, testing, and handoff.
4
+ version: 1.0.0
5
+ author: Hermes Agent
6
+ license: MIT
7
+ metadata:
8
+ hermes:
9
+ tags: [kanban, codex, worktrees, autonomous-agents, prediction-market-bot]
10
+ related_skills: [kanban-worker, codex, hermes-agent]
11
+ ---
12
+
13
+ # Kanban Codex Lane
14
+
15
+ ## Overview
16
+
17
+ This skill defines the lightweight Hermes+Codex dual-lane convention for Kanban workers. Hermes is always the task owner: it calls `kanban_show`, decides whether Codex is appropriate, creates or selects an isolated workspace, starts and monitors Codex, reconciles any diff, runs verification, and writes the final `kanban_complete` or `kanban_block` handoff. Codex is an input lane only. Codex output is not a task completion signal, not a trusted reviewer, and not allowed to write durable Kanban state directly.
18
+
19
+ The convention exists so a Hermes worker can use Codex for bounded implementation help without changing the dispatcher. The dispatcher must still spawn Hermes workers. A worker may optionally spawn Codex inside its own run, then accept, partially accept, or reject the lane after independent review and tests.
20
+
21
+ ## When to Use
22
+
23
+ Use the Codex lane when all of these are true:
24
+
25
+ - The Kanban task is a coding, refactor, documentation, test, or mechanical migration task with clear acceptance criteria.
26
+ - A bounded diff can be evaluated by Hermes in one run.
27
+ - The repo can be copied or checked out in an isolated git worktree/branch.
28
+ - Hermes can run the relevant tests itself after Codex exits.
29
+ - The prompt can state all safety constraints and files that must not change.
30
+
31
+ Do not use the Codex lane when any of these are true:
32
+
33
+ - The task requires human judgment that is not already captured in the Kanban body.
34
+ - The worker lacks repo access, Codex auth, or time to reconcile the result.
35
+ - The change touches secrets, credential stores, private user data, or production order-entry systems.
36
+ - A small direct edit is faster and safer than spawning another agent.
37
+ - The task is research-only and should produce a written handoff rather than a diff.
38
+ - The worker would be tempted to mark Done based only on Codex self-report.
39
+
40
+ ## Ownership Rules
41
+
42
+ 1. Hermes owns the Kanban lifecycle. Codex must never call `kanban_complete`, `kanban_block`, `kanban_create`, gateway messaging, or any Hermes board CLI as a substitute for the worker.
43
+ 2. Hermes owns final acceptance. Treat Codex commits/diffs as untrusted patches until reviewed and verified.
44
+ 3. Hermes owns test execution. Codex may run tests, but those runs are advisory; repeat required verification from Hermes with the repo's canonical wrapper.
45
+ 4. Hermes owns safety. If Codex changes safety boundaries, risk gates, live trading behavior, or secrets handling, reject the lane even if tests pass.
46
+ 5. Hermes owns cleanup. Kill stuck Codex processes and remove temporary worktrees when they are no longer needed.
47
+
48
+ ## Required Worktree and Branch Pattern
49
+
50
+ Never run Codex directly in a shared dirty checkout. Use a branch/worktree name that ties the lane to the Kanban task and keeps untrusted edits isolated.
51
+
52
+ Recommended variables:
53
+
54
+ ```bash
55
+ TASK_ID="${HERMES_KANBAN_TASK:-t_manual}"
56
+ REPO="/path/to/repo"
57
+ BASE="$(git -C "$REPO" rev-parse --abbrev-ref HEAD)"
58
+ SAFE_TASK="$(printf '%s' "$TASK_ID" | tr -cd '[:alnum:]_-')"
59
+ BRANCH="codex/${SAFE_TASK}/$(date -u +%Y%m%d%H%M%S)"
60
+ WORKTREE="/tmp/${SAFE_TASK}-codex-lane"
61
+ ```
62
+
63
+ Create the isolated lane:
64
+
65
+ ```bash
66
+ git -C "$REPO" fetch --all --prune
67
+ git -C "$REPO" worktree add -b "$BRANCH" "$WORKTREE" "$BASE"
68
+ git -C "$WORKTREE" status --short --branch
69
+ ```
70
+
71
+ If the current Kanban workspace is already an isolated git worktree created for this task, you may create a sibling Codex branch inside it only if `git status --short` is clean except for intentional Hermes edits. Otherwise create a separate temporary worktree and cherry-pick or copy accepted commits back after reconciliation.
72
+
73
+ Cleanup after reconciliation:
74
+
75
+ ```bash
76
+ git -C "$REPO" worktree remove "$WORKTREE"
77
+ git -C "$REPO" branch -D "$BRANCH" # only after accepted commits were copied/cherry-picked or intentionally rejected
78
+ ```
79
+
80
+ Keep the worktree if it is needed as an artifact for review; record it in `codex_lane.artifacts` and mention it in the handoff.
81
+
82
+ ## Codex Capability Checks
83
+
84
+ Run these before spawning Codex. Missing Codex is a normal reason to skip the lane, not a task blocker if Hermes can do the task directly.
85
+
86
+ ```bash
87
+ command -v codex
88
+ codex --version
89
+ codex features list | grep -i goals || true
90
+ ```
91
+
92
+ If `/goal` support is required, enable or launch with the feature flag only after checking availability:
93
+
94
+ ```bash
95
+ codex features enable goals || true
96
+ codex --enable goals --version
97
+ ```
98
+
99
+ Authentication can be via `OPENAI_API_KEY` or the Codex CLI OAuth state (often `~/.codex/auth.json`). Do not print token files. A missing `OPENAI_API_KEY` is not proof that auth is unavailable.
100
+
101
+ ## Mode Selection
102
+
103
+ Use `codex exec` for bounded one-shot edits where Codex should exit on its own:
104
+
105
+ ```python
106
+ terminal(
107
+ command="codex exec --full-auto '$(cat /tmp/codex_prompt.md)'",
108
+ workdir=WORKTREE,
109
+ background=True,
110
+ pty=True,
111
+ notify_on_complete=True,
112
+ )
113
+ ```
114
+
115
+ Use Codex `/goal` only for broader multi-step work that benefits from durable objective tracking. Launch interactively in a PTY/tmux session or with `codex --enable goals` if the feature is disabled by default. Keep the goal objective self-contained: repo path, task id, safety constraints, allowed scope, acceptance criteria, tests, and commit expectations.
116
+
117
+ Example `/goal` objective text to paste into Codex:
118
+
119
+ ```text
120
+ /goal Work in this repository only: <WORKTREE>. Task: <TASK_ID> <TITLE>.
121
+ Hermes owns the Kanban lifecycle; do not call Hermes kanban tools or messaging.
122
+ Create small commits on branch <BRANCH>. Follow the PMB safety constraints in the prompt.
123
+ Run the requested verification commands and report exact outputs. Stop after producing a diff and summary.
124
+ ```
125
+
126
+ Do not use `--yolo` for prediction-market-bot or safety-sensitive repos. Prefer `--full-auto` inside the isolated worktree, then rely on Hermes reconciliation.
127
+
128
+ ## Prompt Construction
129
+
130
+ Use the linked template at `templates/pmb-codex-lane-prompt.md` for prediction-market-bot work. For other repos, keep the same structure and replace the PMB-specific safety block with repo-specific invariants.
131
+
132
+ Every Codex prompt must include:
133
+
134
+ - `task_id`, title, and full Kanban acceptance criteria.
135
+ - Repo path, worktree path, branch name, and allowed file scope.
136
+ - Explicit statement: Hermes owns Kanban lifecycle; Codex is an input lane only.
137
+ - Required output: concise summary, files changed, commits, tests run, and known risks.
138
+ - Prohibited actions: secrets access, external messaging, board mutation, unrelated refactors, dependency upgrades unless required.
139
+ - Verification commands Codex may run and commands Hermes will run afterward.
140
+
141
+ For PMB, include these mandatory safety constraints verbatim:
142
+
143
+ ```text
144
+ PMB safety constraints:
145
+ - live-SIM is paper-only; do not add or enable live REST order entry.
146
+ - Never use market orders.
147
+ - Do not add execution crossing or bypass price/risk checks.
148
+ - Do not fake passive fills, fills, PnL, order states, or reconciliation evidence.
149
+ - Do not weaken risk gates, limits, kill switches, or fail-closed behavior.
150
+ - Keep research/selection outside the C++ hot path unless explicitly requested.
151
+ - Do not read, print, write, or require secrets/tokens/credentials.
152
+ ```
153
+
154
+ ## Monitoring, Timeout, and Kill Behavior
155
+
156
+ Start long Codex lanes in the background with PTY and completion notification:
157
+
158
+ ```python
159
+ result = terminal(
160
+ command="codex exec --full-auto '$(cat /tmp/codex_prompt.md)'",
161
+ workdir=WORKTREE,
162
+ background=True,
163
+ pty=True,
164
+ notify_on_complete=True,
165
+ )
166
+ session_id = result["session_id"]
167
+ ```
168
+
169
+ Monitor without interfering:
170
+
171
+ ```python
172
+ process(action="poll", session_id=session_id)
173
+ process(action="log", session_id=session_id, limit=200)
174
+ process(action="wait", session_id=session_id, timeout=300)
175
+ ```
176
+
177
+ Send a Kanban heartbeat every few minutes for lanes longer than two minutes, e.g. `kanban_heartbeat(note="Codex lane running in <WORKTREE>; waiting for tests/diff")`.
178
+
179
+ Kill conditions:
180
+
181
+ - No useful output for the task's remaining runtime budget.
182
+ - Codex requests secrets, production credentials, or external permissions.
183
+ - Codex attempts to modify files outside the worktree.
184
+ - Codex starts unrelated rewrites or dependency churn.
185
+ - Codex is still running near the worker timeout and no safe partial artifact exists.
186
+
187
+ Kill command:
188
+
189
+ ```python
190
+ process(action="kill", session_id=session_id)
191
+ ```
192
+
193
+ After kill, inspect `git status --short`, preserve useful patches only if safe, and record `codex_lane.result: timed_out` or `rejected` with a concrete `rejected_reason`.
194
+
195
+ ## Reconciliation Checklist
196
+
197
+ Hermes must perform this checklist before accepting any Codex lane result:
198
+
199
+ - [ ] `git -C <WORKTREE> status --short --branch` shows only expected files.
200
+ - [ ] `git -C <WORKTREE> diff --stat` and `git diff` were reviewed by Hermes.
201
+ - [ ] No secrets, credentials, generated caches, unrelated data, or local artifacts are included.
202
+ - [ ] PMB safety constraints were preserved: no live REST order entry, no market orders, no execution crossing, no fake passive fills/PnL, no risk-gate weakening, no secrets.
203
+ - [ ] Codex commits are small enough to cherry-pick or squash cleanly.
204
+ - [ ] Hermes ran the canonical tests itself, using `scripts/run_tests.sh` for Hermes Agent or the repo's documented wrapper for other repos.
205
+ - [ ] Any Codex-run tests are listed separately from Hermes-run tests.
206
+ - [ ] Accepted commits/diffs were applied to the Hermes-owned workspace/branch.
207
+ - [ ] Rejected or partial work has a concrete reason and artifact path if useful.
208
+
209
+ Acceptance outcomes:
210
+
211
+ - `accepted`: Codex diff/commits were reviewed, applied, and verified.
212
+ - `partial`: Some Codex work was accepted after edits or cherry-picks; rejected parts are documented.
213
+ - `rejected`: No Codex changes were accepted; reason is documented.
214
+ - `timed_out`: Codex exceeded the lane budget; useful artifacts may or may not exist.
215
+
216
+ ## kanban_complete Metadata Schema
217
+
218
+ Include this object under `metadata.codex_lane` for every task where the lane was considered. If Codex was not used, set `used: false` and explain why in `rejected_reason` or a sibling `notes` field.
219
+
220
+ ```json
221
+ {
222
+ "codex_lane": {
223
+ "used": true,
224
+ "mode": "exec | goal | skipped",
225
+ "worktree": "/absolute/path/to/codex/worktree",
226
+ "branch": "codex/t_caa69668/20260508100000",
227
+ "command": "codex exec --full-auto ...",
228
+ "result": "accepted | rejected | partial | timed_out",
229
+ "accepted_commits": ["<sha1>", "<sha2>"],
230
+ "rejected_reason": "empty when fully accepted; otherwise concrete reason",
231
+ "tests_run": [
232
+ {"command": "scripts/run_tests.sh tests/tools/test_x.py", "exit_code": 0, "owner": "hermes"},
233
+ {"command": "codex-reported: npm test", "exit_code": 0, "owner": "codex"}
234
+ ],
235
+ "artifacts": ["/absolute/path/to/log-or-patch"]
236
+ }
237
+ }
238
+ ```
239
+
240
+ For tasks that intentionally skip Codex:
241
+
242
+ ```json
243
+ {
244
+ "codex_lane": {
245
+ "used": false,
246
+ "mode": "skipped",
247
+ "worktree": null,
248
+ "branch": null,
249
+ "command": null,
250
+ "result": "rejected",
251
+ "accepted_commits": [],
252
+ "rejected_reason": "Direct Hermes edit was smaller and safer than spawning Codex.",
253
+ "tests_run": [],
254
+ "artifacts": []
255
+ }
256
+ }
257
+ ```
258
+
259
+ ## Common Pitfalls
260
+
261
+ 1. Treating Codex self-report as verification. Always inspect the diff and rerun tests from Hermes.
262
+ 2. Running Codex in the user's dirty main checkout. Always isolate in a worktree/branch.
263
+ 3. Letting Codex own Kanban. Codex may summarize progress, but Hermes writes board state.
264
+ 4. Forgetting PMB safety invariants in the prompt. Missing safety text is a lane setup failure.
265
+ 5. Using `/goal` for quick edits. Prefer `codex exec` unless durable multi-step continuation is needed.
266
+ 6. Killing a stuck lane without recording why. `rejected_reason` must explain the decision.
267
+ 7. Accepting broad unrelated cleanup because tests pass. Reject or cherry-pick only the scoped changes.
268
+
269
+ ## Verification Checklist
270
+
271
+ - [ ] Codex was skipped or started only after `command -v codex`, `codex --version`, and optional goals feature checks.
272
+ - [ ] Codex ran only in an isolated worktree/branch.
273
+ - [ ] Prompt included task scope, ownership rules, PMB safety constraints when applicable, and verification commands.
274
+ - [ ] Hermes reviewed `git diff` and safety-sensitive files.
275
+ - [ ] Hermes ran canonical tests independently.
276
+ - [ ] `kanban_complete.metadata.codex_lane` follows the schema above.
277
+ - [ ] Temporary processes and unnecessary worktrees were cleaned up.
@@ -0,0 +1,57 @@
1
+ # PMB Codex Lane Prompt Template
2
+
3
+ Use this template when a Hermes Kanban worker chooses to run Codex as an implementation lane for prediction-market-bot. Fill every bracketed field before launching Codex. Do not include secrets.
4
+
5
+ ```text
6
+ You are Codex CLI running as an input lane for a Hermes Kanban worker.
7
+
8
+ Ownership:
9
+ - Hermes owns the Kanban task lifecycle, final review, test verification, and handoff.
10
+ - You are an implementation lane only. Do not call Hermes kanban tools, Hermes CLI board commands, messaging gateways, or external notification tools.
11
+ - Produce a scoped diff/commits and a concise report; do not mark any task complete.
12
+
13
+ Task:
14
+ - task_id: [KANBAN_TASK_ID]
15
+ - title: [KANBAN_TITLE]
16
+ - acceptance criteria:
17
+ [PASTE_ACCEPTANCE_CRITERIA]
18
+
19
+ Repository and isolation:
20
+ - repo: [REPO_PATH]
21
+ - worktree: [CODEX_WORKTREE_PATH]
22
+ - branch: [CODEX_BRANCH]
23
+ - allowed files/scope: [ALLOWED_FILES_OR_DIRECTORIES]
24
+ - forbidden files/scope: [FORBIDDEN_FILES_OR_DIRECTORIES]
25
+
26
+ PMB safety constraints:
27
+ - live-SIM is paper-only; do not add or enable live REST order entry.
28
+ - Never use market orders.
29
+ - Do not add execution crossing or bypass price/risk checks.
30
+ - Do not fake passive fills, fills, PnL, order states, or reconciliation evidence.
31
+ - Do not weaken risk gates, limits, kill switches, or fail-closed behavior.
32
+ - Keep research/selection outside the C++ hot path unless explicitly requested.
33
+ - Do not read, print, write, or require secrets/tokens/credentials.
34
+
35
+ Implementation constraints:
36
+ - Follow existing project conventions and style.
37
+ - Keep diffs small and reviewable.
38
+ - Do not perform unrelated refactors, dependency upgrades, formatting sweeps, or generated-file churn.
39
+ - If a requirement is unsafe or ambiguous, stop and report the blocker instead of guessing.
40
+ - Commit only if asked by the Hermes worker; if committing, use small commits with clear subjects.
41
+
42
+ Verification you may run:
43
+ - [COMMAND_1]
44
+ - [COMMAND_2]
45
+
46
+ Verification Hermes will rerun independently:
47
+ - [HERMES_COMMAND_1]
48
+ - [HERMES_COMMAND_2]
49
+
50
+ Required final report:
51
+ - Summary of changes.
52
+ - Files changed.
53
+ - Commit SHAs, if any.
54
+ - Tests/commands run with exit codes.
55
+ - Safety constraints checked.
56
+ - Known risks or incomplete items.
57
+ ```
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: opencode
3
+ description: "Delegate coding to OpenCode CLI (features, PR review)."
4
+ version: 1.2.0
5
+ author: Hermes Agent
6
+ license: MIT
7
+ platforms: [linux, macos, windows]
8
+ metadata:
9
+ hermes:
10
+ tags: [Coding-Agent, OpenCode, Autonomous, Refactoring, Code-Review]
11
+ related_skills: [claude-code, codex, hermes-agent]
12
+ ---
13
+
14
+ # OpenCode CLI
15
+
16
+ Use [OpenCode](https://opencode.ai) as an autonomous coding worker orchestrated by Hermes terminal/process tools. OpenCode is a provider-agnostic, open-source AI coding agent with a TUI and CLI.
17
+
18
+ ## When to Use
19
+
20
+ - User explicitly asks to use OpenCode
21
+ - You want an external coding agent to implement/refactor/review code
22
+ - You need long-running coding sessions with progress checks
23
+ - You want parallel task execution in isolated workdirs/worktrees
24
+
25
+ ## Prerequisites
26
+
27
+ - OpenCode installed: `npm i -g opencode-ai@latest` or `brew install anomalyco/tap/opencode`
28
+ - Auth configured: `opencode auth login` or set provider env vars (OPENROUTER_API_KEY, etc.)
29
+ - Verify: `opencode auth list` should show at least one provider
30
+ - Git repository for code tasks (recommended)
31
+ - `pty=true` for interactive TUI sessions
32
+
33
+ ## Binary Resolution (Important)
34
+
35
+ Shell environments may resolve different OpenCode binaries. If behavior differs between your terminal and Hermes, check:
36
+
37
+ ```
38
+ terminal(command="which -a opencode")
39
+ terminal(command="opencode --version")
40
+ ```
41
+
42
+ If needed, pin an explicit binary path:
43
+
44
+ ```
45
+ terminal(command="$HOME/.opencode/bin/opencode run '...'", workdir="~/project", pty=true)
46
+ ```
47
+
48
+ ## One-Shot Tasks
49
+
50
+ Use `opencode run` for bounded, non-interactive tasks:
51
+
52
+ ```
53
+ terminal(command="opencode run 'Add retry logic to API calls and update tests'", workdir="~/project")
54
+ ```
55
+
56
+ Attach context files with `-f`:
57
+
58
+ ```
59
+ terminal(command="opencode run 'Review this config for security issues' -f config.yaml -f .env.example", workdir="~/project")
60
+ ```
61
+
62
+ Show model thinking with `--thinking`:
63
+
64
+ ```
65
+ terminal(command="opencode run 'Debug why tests fail in CI' --thinking", workdir="~/project")
66
+ ```
67
+
68
+ Force a specific model:
69
+
70
+ ```
71
+ terminal(command="opencode run 'Refactor auth module' --model openrouter/anthropic/claude-sonnet-4", workdir="~/project")
72
+ ```
73
+
74
+ ## Interactive Sessions (Background)
75
+
76
+ For iterative work requiring multiple exchanges, start the TUI in background:
77
+
78
+ ```
79
+ terminal(command="opencode", workdir="~/project", background=true, pty=true)
80
+ # Returns session_id
81
+
82
+ # Send a prompt
83
+ process(action="submit", session_id="<id>", data="Implement OAuth refresh flow and add tests")
84
+
85
+ # Monitor progress
86
+ process(action="poll", session_id="<id>")
87
+ process(action="log", session_id="<id>")
88
+
89
+ # Send follow-up input
90
+ process(action="submit", session_id="<id>", data="Now add error handling for token expiry")
91
+
92
+ # Exit cleanly — Ctrl+C
93
+ process(action="write", session_id="<id>", data="\x03")
94
+ # Or just kill the process
95
+ process(action="kill", session_id="<id>")
96
+ ```
97
+
98
+ **Important:** Do NOT use `/exit` — it is not a valid OpenCode command and will open an agent selector dialog instead. Use Ctrl+C (`\x03`) or `process(action="kill")` to exit.
99
+
100
+ ### TUI Keybindings
101
+
102
+ | Key | Action |
103
+ |-----|--------|
104
+ | `Enter` | Submit message (press twice if needed) |
105
+ | `Tab` | Switch between agents (build/plan) |
106
+ | `Ctrl+P` | Open command palette |
107
+ | `Ctrl+X L` | Switch session |
108
+ | `Ctrl+X M` | Switch model |
109
+ | `Ctrl+X N` | New session |
110
+ | `Ctrl+X E` | Open editor |
111
+ | `Ctrl+C` | Exit OpenCode |
112
+
113
+ ### Resuming Sessions
114
+
115
+ After exiting, OpenCode prints a session ID. Resume with:
116
+
117
+ ```
118
+ terminal(command="opencode -c", workdir="~/project", background=true, pty=true) # Continue last session
119
+ terminal(command="opencode -s ses_abc123", workdir="~/project", background=true, pty=true) # Specific session
120
+ ```
121
+
122
+ ## Common Flags
123
+
124
+ | Flag | Use |
125
+ |------|-----|
126
+ | `run 'prompt'` | One-shot execution and exit |
127
+ | `--continue` / `-c` | Continue the last OpenCode session |
128
+ | `--session <id>` / `-s` | Continue a specific session |
129
+ | `--agent <name>` | Choose OpenCode agent (build or plan) |
130
+ | `--model provider/model` | Force specific model |
131
+ | `--format json` | Machine-readable output/events |
132
+ | `--file <path>` / `-f` | Attach file(s) to the message |
133
+ | `--thinking` | Show model thinking blocks |
134
+ | `--variant <level>` | Reasoning effort (high, max, minimal) |
135
+ | `--title <name>` | Name the session |
136
+ | `--attach <url>` | Connect to a running opencode server |
137
+
138
+ ## Procedure
139
+
140
+ 1. Verify tool readiness:
141
+ - `terminal(command="opencode --version")`
142
+ - `terminal(command="opencode auth list")`
143
+ 2. For bounded tasks, use `opencode run '...'` (no pty needed).
144
+ 3. For iterative tasks, start `opencode` with `background=true, pty=true`.
145
+ 4. Monitor long tasks with `process(action="poll"|"log")`.
146
+ 5. If OpenCode asks for input, respond via `process(action="submit", ...)`.
147
+ 6. Exit with `process(action="write", data="\x03")` or `process(action="kill")`.
148
+ 7. Summarize file changes, test results, and next steps back to user.
149
+
150
+ ## PR Review Workflow
151
+
152
+ OpenCode has a built-in PR command:
153
+
154
+ ```
155
+ terminal(command="opencode pr 42", workdir="~/project", pty=true)
156
+ ```
157
+
158
+ Or review in a temporary clone for isolation:
159
+
160
+ ```
161
+ terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && opencode run 'Review this PR vs main. Report bugs, security risks, test gaps, and style issues.' -f $(git diff origin/main --name-only | head -20 | tr '\n' ' ')", pty=true)
162
+ ```
163
+
164
+ ## Parallel Work Pattern
165
+
166
+ Use separate workdirs/worktrees to avoid collisions:
167
+
168
+ ```
169
+ terminal(command="opencode run 'Fix issue #101 and commit'", workdir="/tmp/issue-101", background=true, pty=true)
170
+ terminal(command="opencode run 'Add parser regression tests and commit'", workdir="/tmp/issue-102", background=true, pty=true)
171
+ process(action="list")
172
+ ```
173
+
174
+ ## Session & Cost Management
175
+
176
+ List past sessions:
177
+
178
+ ```
179
+ terminal(command="opencode session list")
180
+ ```
181
+
182
+ Check token usage and costs:
183
+
184
+ ```
185
+ terminal(command="opencode stats")
186
+ terminal(command="opencode stats --days 7 --models anthropic/claude-sonnet-4")
187
+ ```
188
+
189
+ ## Pitfalls
190
+
191
+ - Interactive `opencode` (TUI) sessions require `pty=true`. The `opencode run` command does NOT need pty.
192
+ - `/exit` is NOT a valid command — it opens an agent selector. Use Ctrl+C to exit the TUI.
193
+ - PATH mismatch can select the wrong OpenCode binary/model config.
194
+ - If OpenCode appears stuck, inspect logs before killing:
195
+ - `process(action="log", session_id="<id>")`
196
+ - Avoid sharing one working directory across parallel OpenCode sessions.
197
+ - Enter may need to be pressed twice to submit in the TUI (once to finalize text, once to send).
198
+
199
+ ## Verification
200
+
201
+ Smoke test:
202
+
203
+ ```
204
+ terminal(command="opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'")
205
+ ```
206
+
207
+ Success criteria:
208
+ - Output includes `OPENCODE_SMOKE_OK`
209
+ - Command exits without provider/model errors
210
+ - For code tasks: expected files changed and tests pass
211
+
212
+ ## Rules
213
+
214
+ 1. Prefer `opencode run` for one-shot automation — it's simpler and doesn't need pty.
215
+ 2. Use interactive background mode only when iteration is needed.
216
+ 3. Always scope OpenCode sessions to a single repo/workdir.
217
+ 4. For long tasks, provide progress updates from `process` logs.
218
+ 5. Report concrete outcomes (files changed, tests, remaining risks).
219
+ 6. Exit interactive sessions with Ctrl+C or kill, never `/exit`.
@@ -0,0 +1,3 @@
1
+ ---
2
+ description: GitHub workflow skills for managing repositories, pull requests, code reviews, issues, and CI/CD pipelines using the gh CLI and git via terminal.
3
+ ---
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: codebase-inspection
3
+ description: "Inspect codebases w/ pygount: LOC, languages, ratios."
4
+ version: 1.0.0
5
+ author: Hermes Agent
6
+ license: MIT
7
+ platforms: [linux, macos, windows]
8
+ metadata:
9
+ hermes:
10
+ tags: [LOC, Code Analysis, pygount, Codebase, Metrics, Repository]
11
+ related_skills: [github-repo-management]
12
+ prerequisites:
13
+ commands: [pygount]
14
+ ---
15
+
16
+ # Codebase Inspection with pygount
17
+
18
+ Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using `pygount`.
19
+
20
+ ## When to Use
21
+
22
+ - User asks for LOC (lines of code) count
23
+ - User wants a language breakdown of a repo
24
+ - User asks about codebase size or composition
25
+ - User wants code-vs-comment ratios
26
+ - General "how big is this repo" questions
27
+
28
+ ## Prerequisites
29
+
30
+ ```bash
31
+ pip install --break-system-packages pygount 2>/dev/null || pip install pygount
32
+ ```
33
+
34
+ ## 1. Basic Summary (Most Common)
35
+
36
+ Get a full language breakdown with file counts, code lines, and comment lines:
37
+
38
+ ```bash
39
+ cd /path/to/repo
40
+ pygount --format=summary \
41
+ --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,*.egg-info" \
42
+ .
43
+ ```
44
+
45
+ **IMPORTANT:** Always use `--folders-to-skip` to exclude dependency/build directories, otherwise pygount will crawl them and take a very long time or hang.
46
+
47
+ ## 2. Common Folder Exclusions
48
+
49
+ Adjust based on the project type:
50
+
51
+ ```bash
52
+ # Python projects
53
+ --folders-to-skip=".git,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,.mypy_cache"
54
+
55
+ # JavaScript/TypeScript projects
56
+ --folders-to-skip=".git,node_modules,dist,build,.next,.cache,.turbo,coverage"
57
+
58
+ # General catch-all
59
+ --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,vendor,third_party"
60
+ ```
61
+
62
+ ## 3. Filter by Specific Language
63
+
64
+ ```bash
65
+ # Only count Python files
66
+ pygount --suffix=py --format=summary .
67
+
68
+ # Only count Python and YAML
69
+ pygount --suffix=py,yaml,yml --format=summary .
70
+ ```
71
+
72
+ ## 4. Detailed File-by-File Output
73
+
74
+ ```bash
75
+ # Default format shows per-file breakdown
76
+ pygount --folders-to-skip=".git,node_modules,venv" .
77
+
78
+ # Sort by code lines (pipe through sort)
79
+ pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20
80
+ ```
81
+
82
+ ## 5. Output Formats
83
+
84
+ ```bash
85
+ # Summary table (default recommendation)
86
+ pygount --format=summary .
87
+
88
+ # JSON output for programmatic use
89
+ pygount --format=json .
90
+
91
+ # Pipe-friendly: Language, file count, code, docs, empty, string
92
+ pygount --format=summary . 2>/dev/null
93
+ ```
94
+
95
+ ## 6. Interpreting Results
96
+
97
+ The summary table columns:
98
+ - **Language** — detected programming language
99
+ - **Files** — number of files of that language
100
+ - **Code** — lines of actual code (executable/declarative)
101
+ - **Comment** — lines that are comments or documentation
102
+ - **%** — percentage of total
103
+
104
+ Special pseudo-languages:
105
+ - `__empty__` — empty files
106
+ - `__binary__` — binary files (images, compiled, etc.)
107
+ - `__generated__` — auto-generated files (detected heuristically)
108
+ - `__duplicate__` — files with identical content
109
+ - `__unknown__` — unrecognized file types
110
+
111
+ ## Pitfalls
112
+
113
+ 1. **Always exclude .git, node_modules, venv** — without `--folders-to-skip`, pygount will crawl everything and may take minutes or hang on large dependency trees.
114
+ 2. **Markdown shows 0 code lines** — pygount classifies all Markdown content as comments, not code. This is expected behavior.
115
+ 3. **JSON files show low code counts** — pygount may count JSON lines conservatively. For accurate JSON line counts, use `wc -l` directly.
116
+ 4. **Large monorepos** — for very large repos, consider using `--suffix` to target specific languages rather than scanning everything.