lithermes-ai 0.5.1 → 0.8.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.
- package/README.md +6 -4
- package/README_Ko-KR.md +3 -2
- package/assets/lithermes-plugin/README.md +6 -3
- package/assets/lithermes-plugin/__init__.py +37 -8
- package/assets/lithermes-plugin/core.py +98 -0
- package/assets/lithermes-plugin/payload-version.json +61 -49
- package/assets/lithermes-plugin/plugin.yaml +1 -1
- package/assets/lithermes-plugin/skills/comment-checker/SKILL.md +3 -3
- package/assets/lithermes-plugin/skills/deep-interview/SKILL.md +307 -0
- package/assets/lithermes-plugin/skills/git-master/SKILL.md +130 -0
- package/assets/lithermes-plugin/skills/init-deep/SKILL.md +198 -0
- package/assets/lithermes-plugin/skills/rules/SKILL.md +32 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,12 +57,14 @@ Restart any running Hermes CLI or Hermes gateway process. Then open Hermes and t
|
|
|
57
57
|
- Interactive install spinner keeps terminal installs lively while redirected or scripted installs stay plain; use `npx lithermes-ai install --yes --no-spinner` for quiet terminal installs.
|
|
58
58
|
- `start-work`: open or dry-run a LitHermes plan inside Hermes.
|
|
59
59
|
- LitHermes workflow skill set: `ai-slop-remover`, `comment-checker`,
|
|
60
|
-
`debugging`, `frontend-ui-ux`, `
|
|
60
|
+
`debugging`, `deep-interview`, `frontend-ui-ux`, `git-master`, `init-deep`,
|
|
61
|
+
`lsp`, `programming`, `refactor`,
|
|
61
62
|
`remove-ai-slops`, `review-work`, `rules`, `start-work`, `lit-plan`,
|
|
62
63
|
`litgoal`, and `litwork` are installed as `lithermes:*` skills.
|
|
63
|
-
- The full plugin payload — the `pre_llm_call` / `subagent_stop`
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
- The full plugin payload — the `pre_llm_call` / `subagent_stop` hooks, every
|
|
65
|
+
skill, and the durable goal tooling — ships in the bundle exactly as installed,
|
|
66
|
+
so each release is reproducible and auditable. Repo-rule loading is handled by
|
|
67
|
+
Hermes' native context-files feature, not a LitHermes hook.
|
|
66
68
|
|
|
67
69
|
## Requirements
|
|
68
70
|
|
package/README_Ko-KR.md
CHANGED
|
@@ -57,10 +57,11 @@ npx lithermes-ai install --yes
|
|
|
57
57
|
- interactive install spinner가 terminal 설치는 더 생동감 있게 보여주고, redirect/script 설치는 기존처럼 plain output을 유지합니다. 조용한 terminal 설치가 필요하면 `npx lithermes-ai install --yes --no-spinner`를 사용합니다.
|
|
58
58
|
- `start-work`: LitHermes plan을 Hermes 작업으로 엽니다.
|
|
59
59
|
- LitHermes workflow skill set: `ai-slop-remover`, `comment-checker`,
|
|
60
|
-
`debugging`, `frontend-ui-ux`, `
|
|
60
|
+
`debugging`, `deep-interview`, `frontend-ui-ux`, `git-master`, `init-deep`,
|
|
61
|
+
`lsp`, `programming`, `refactor`,
|
|
61
62
|
`remove-ai-slops`, `review-work`, `rules`, `start-work`, `lit-plan`,
|
|
62
63
|
`litgoal`, `litwork`가 `lithermes:*` skill로 함께 설치됩니다.
|
|
63
|
-
- 전체 plugin payload — `pre_llm_call` / `subagent_stop`
|
|
64
|
+
- 전체 plugin payload — `pre_llm_call` / `subagent_stop`
|
|
64
65
|
hook, 모든 skill, durable goal tooling — 이 설치 상태 그대로 번들에 들어가므로,
|
|
65
66
|
각 릴리스는 재현 가능하고 감사할 수 있습니다.
|
|
66
67
|
|
|
@@ -14,7 +14,9 @@ first-class Hermes skills:
|
|
|
14
14
|
session goal manager; criteria + evidence use the durable `goal_*` tools.
|
|
15
15
|
- Explicit skills are available as:
|
|
16
16
|
`lithermes:ai-slop-remover`, `lithermes:comment-checker`,
|
|
17
|
-
`lithermes:debugging`, `lithermes:
|
|
17
|
+
`lithermes:debugging`, `lithermes:deep-interview`,
|
|
18
|
+
`lithermes:frontend-ui-ux`, `lithermes:git-master`,
|
|
19
|
+
`lithermes:init-deep`, `lithermes:lsp`,
|
|
18
20
|
`lithermes:programming`, `lithermes:refactor`,
|
|
19
21
|
`lithermes:remove-ai-slops`, `lithermes:review-work`,
|
|
20
22
|
`lithermes:rules`, `lithermes:start-work`, `lithermes:lit-plan`,
|
|
@@ -36,5 +38,6 @@ plugins:
|
|
|
36
38
|
The bundled workflow reference is adapted for LitHermes command names and
|
|
37
39
|
Hermes gateway behavior. LitHermes runs entirely on Hermes-native primitives
|
|
38
40
|
(`delegate_task`, the durable `goal_*` tools, and the `pre_llm_call` /
|
|
39
|
-
`subagent_stop`
|
|
40
|
-
prompt-runtime installer in the plugin payload.
|
|
41
|
+
`subagent_stop` hooks) and ships no external
|
|
42
|
+
prompt-runtime installer in the plugin payload. Repo-rule loading is handled by
|
|
43
|
+
Hermes' native context-files feature, not a LitHermes hook.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import functools
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import Any
|
|
5
6
|
|
|
@@ -22,10 +23,22 @@ PORTED_SKILLS = [
|
|
|
22
23
|
"debugging",
|
|
23
24
|
"Run the LitHermes hypothesis-driven debugging workflow.",
|
|
24
25
|
),
|
|
26
|
+
(
|
|
27
|
+
"deep-interview",
|
|
28
|
+
"Run the LitHermes Socratic deep-interview clarity gate before planning.",
|
|
29
|
+
),
|
|
25
30
|
(
|
|
26
31
|
"frontend-ui-ux",
|
|
27
32
|
"Apply the LitHermes frontend UI/UX review discipline.",
|
|
28
33
|
),
|
|
34
|
+
(
|
|
35
|
+
"git-master",
|
|
36
|
+
"Run the LitHermes git-history specialist for commits, rebases, blame, and bisect.",
|
|
37
|
+
),
|
|
38
|
+
(
|
|
39
|
+
"init-deep",
|
|
40
|
+
"Generate a hierarchical AGENTS.md knowledge base with the LitHermes onboarding workflow.",
|
|
41
|
+
),
|
|
29
42
|
(
|
|
30
43
|
"lsp",
|
|
31
44
|
"Use Hermes' native LSP diagnostics with LitHermes LSP guidance.",
|
|
@@ -103,6 +116,16 @@ def _handle_lithermes_cli(args) -> int:
|
|
|
103
116
|
return 1
|
|
104
117
|
|
|
105
118
|
|
|
119
|
+
def _ignited(handler):
|
|
120
|
+
"""Wrap a slash-command handler so its display prints the LITBURN banner."""
|
|
121
|
+
|
|
122
|
+
@functools.wraps(handler)
|
|
123
|
+
def wrapped(user_args):
|
|
124
|
+
return core.ignite(handler(user_args))
|
|
125
|
+
|
|
126
|
+
return wrapped
|
|
127
|
+
|
|
128
|
+
|
|
106
129
|
def register(ctx) -> None:
|
|
107
130
|
base = Path(__file__).resolve().parent
|
|
108
131
|
|
|
@@ -124,52 +147,58 @@ def register(ctx) -> None:
|
|
|
124
147
|
|
|
125
148
|
ctx.register_command(
|
|
126
149
|
"lit-plan",
|
|
127
|
-
core.command_lit_plan,
|
|
150
|
+
_ignited(core.command_lit_plan),
|
|
128
151
|
description="Create a durable Litwork implementation plan",
|
|
129
152
|
args_hint='"what to build"',
|
|
130
153
|
)
|
|
131
154
|
ctx.register_command(
|
|
132
155
|
"litwork-plan",
|
|
133
|
-
core.command_lit_plan,
|
|
156
|
+
_ignited(core.command_lit_plan),
|
|
134
157
|
description="Alias for /lit-plan",
|
|
135
158
|
args_hint='"what to build"',
|
|
136
159
|
)
|
|
137
160
|
ctx.register_command(
|
|
138
161
|
"lit",
|
|
139
|
-
core.command_lit,
|
|
162
|
+
_ignited(core.command_lit),
|
|
140
163
|
description="Start an Litwork run and execute the task immediately",
|
|
141
164
|
args_hint='"task" [--completion-promise TEXT] [--strategy reset|continue]',
|
|
142
165
|
)
|
|
143
166
|
ctx.register_command(
|
|
144
167
|
"lit-loop",
|
|
145
|
-
core.command_lit_loop,
|
|
168
|
+
_ignited(core.command_lit_loop),
|
|
146
169
|
description="Start an Litwork run and execute the task immediately",
|
|
147
170
|
args_hint='"task" [--completion-promise TEXT] [--strategy reset|continue]',
|
|
148
171
|
)
|
|
149
172
|
ctx.register_command(
|
|
150
173
|
"litwork-loop",
|
|
151
|
-
core.command_lit_loop,
|
|
174
|
+
_ignited(core.command_lit_loop),
|
|
152
175
|
description="Alias for /lit-loop",
|
|
153
176
|
args_hint='"task" [--completion-promise TEXT] [--strategy reset|continue]',
|
|
154
177
|
)
|
|
155
178
|
ctx.register_command(
|
|
156
179
|
"litgoal",
|
|
157
|
-
core.command_litgoal,
|
|
180
|
+
_ignited(core.command_litgoal),
|
|
158
181
|
description="Open or inspect the LitHermes litgoal durable runtime",
|
|
159
182
|
args_hint='["objective"] [--worktree PATH]',
|
|
160
183
|
)
|
|
161
184
|
ctx.register_command(
|
|
162
185
|
"review-work",
|
|
163
|
-
core.command_review_work,
|
|
186
|
+
_ignited(core.command_review_work),
|
|
164
187
|
description="Run the LitHermes 5-lane review orchestrator on the current diff",
|
|
165
188
|
args_hint="[--base REF]",
|
|
166
189
|
)
|
|
167
190
|
ctx.register_command(
|
|
168
191
|
"start-work",
|
|
169
|
-
core.command_start_work,
|
|
192
|
+
_ignited(core.command_start_work),
|
|
170
193
|
description="Open or dry-run a LitHermes plan against a workspace",
|
|
171
194
|
args_hint="[plan-name] [--worktree PATH] [--dry-run]",
|
|
172
195
|
)
|
|
196
|
+
ctx.register_command(
|
|
197
|
+
"deep-interview",
|
|
198
|
+
_ignited(core.command_deep_interview),
|
|
199
|
+
description="Run the LitHermes Socratic clarity gate before planning/execution",
|
|
200
|
+
args_hint="[--quick|--standard|--deep] <idea>",
|
|
201
|
+
)
|
|
173
202
|
|
|
174
203
|
for name, description in PORTED_SKILLS:
|
|
175
204
|
ctx.register_skill(
|
|
@@ -33,9 +33,16 @@ DIRECT_LIT_PATTERN = re.compile(r"^\s*(?:lit|litwork)\b\s+(?P<task>.+?)\s*$", re
|
|
|
33
33
|
MAX_TASK_LEN = 4000
|
|
34
34
|
_SLUG_PATTERN = re.compile(r"[^a-z0-9]+")
|
|
35
35
|
|
|
36
|
+
# Deterministic ignite banner. Printed verbatim on every LitHermes slash-command
|
|
37
|
+
# display (the only user-visible plugin channel); also instructed into LIT_CONTEXT
|
|
38
|
+
# for the bare-`lit` keyword path (best-effort — that path only reaches the model).
|
|
39
|
+
LITBURN_BANNER = "🔥 LITBURN IGNITED 🔥"
|
|
40
|
+
|
|
41
|
+
|
|
36
42
|
LIT_CONTEXT = "\n".join(
|
|
37
43
|
[
|
|
38
44
|
"<lithermes-litwork>",
|
|
45
|
+
f"FIRST, open your reply with this exact line so the user sees Litwork engage: {LITBURN_BANNER}",
|
|
39
46
|
"The user invoked Litwork/LitHermes. Operate in a durable, evidence-first loop:",
|
|
40
47
|
"- restate the concrete completion promise before changing files;",
|
|
41
48
|
"- keep the implementation scoped to the current repository and existing Hermes patterns;",
|
|
@@ -210,9 +217,53 @@ def _extract_run_context_task(message: str) -> str:
|
|
|
210
217
|
return _clamp_task(m.group("task")) if m else ""
|
|
211
218
|
|
|
212
219
|
|
|
220
|
+
# Slash-command handlers are dispatched as handler(user_args) with NO session_id,
|
|
221
|
+
# so they cannot bind the native /goal themselves. They instead embed this marker
|
|
222
|
+
# in their agent_message; pre_llm_call (which DOES receive session_id) reads it and
|
|
223
|
+
# performs the bind. /lit & /lit-loop bind via the run-context block; /litgoal &
|
|
224
|
+
# /lit-plan declare an objective and bind via this marker.
|
|
225
|
+
_BIND_GOAL_PATTERN = re.compile(
|
|
226
|
+
r"<lithermes-bind-goal>(?P<obj>.+?)</lithermes-bind-goal>", re.DOTALL
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def _extract_bind_goal(message: str) -> str:
|
|
231
|
+
m = _BIND_GOAL_PATTERN.search(message)
|
|
232
|
+
return _clamp_task(m.group("obj")) if m else ""
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def bind_goal_marker(objective: str) -> str:
|
|
236
|
+
"""Render the bind-goal marker a command embeds so pre_llm_call binds /goal."""
|
|
237
|
+
objective = (objective or "").strip()
|
|
238
|
+
return f"<lithermes-bind-goal>{objective}</lithermes-bind-goal>" if objective else ""
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def ignite(result: str | dict[str, str]) -> str | dict[str, str]:
|
|
242
|
+
"""Prepend the LITBURN banner to a command result's user-visible display.
|
|
243
|
+
|
|
244
|
+
``display`` is the one channel Hermes prints to the user verbatim
|
|
245
|
+
(cli.py _cprint), so the banner deterministically fires on every LitHermes
|
|
246
|
+
slash command. agent_message (model-facing) is left untouched.
|
|
247
|
+
"""
|
|
248
|
+
if isinstance(result, dict):
|
|
249
|
+
display = result.get("display")
|
|
250
|
+
if display and not str(display).startswith(LITBURN_BANNER):
|
|
251
|
+
return {**result, "display": f"{LITBURN_BANNER}\n{display}"}
|
|
252
|
+
return result
|
|
253
|
+
if isinstance(result, str) and result.strip() and not result.startswith(LITBURN_BANNER):
|
|
254
|
+
return f"{LITBURN_BANNER}\n{result}"
|
|
255
|
+
return result
|
|
256
|
+
|
|
257
|
+
|
|
213
258
|
def pre_llm_call(**kwargs: Any) -> dict[str, str] | None:
|
|
214
259
|
user_message = str(kwargs.get("user_message") or "")
|
|
215
260
|
session_id = str(kwargs.get("session_id") or "")
|
|
261
|
+
# /litgoal & /lit-plan declare an objective via the bind-goal marker. Bind it
|
|
262
|
+
# (we have session_id here) and stop — those messages are self-contained.
|
|
263
|
+
bind_obj = _extract_bind_goal(user_message)
|
|
264
|
+
if bind_obj:
|
|
265
|
+
bind_native_goal(session_id, bind_obj)
|
|
266
|
+
return None
|
|
216
267
|
# The /lit command injects a run-context message. Bind the native goal from
|
|
217
268
|
# it (we have session_id here), then skip re-injecting context.
|
|
218
269
|
if "<lithermes-run-context>" in user_message:
|
|
@@ -629,6 +680,7 @@ def build_plan_agent_message(brief: str, plan: Path, workspace: Path) -> str:
|
|
|
629
680
|
"goal tools (goal_set / goal_add_criterion / goal_evidence / goal_complete) and inspect",
|
|
630
681
|
"with `hermes lithermes goal status`.",
|
|
631
682
|
"</lithermes-plan-context>",
|
|
683
|
+
bind_goal_marker(brief),
|
|
632
684
|
]
|
|
633
685
|
)
|
|
634
686
|
|
|
@@ -799,12 +851,58 @@ def command_litgoal(raw_args: str) -> dict[str, str]:
|
|
|
799
851
|
"Load the lithermes:litgoal skill for the full discipline.",
|
|
800
852
|
"</lithermes-litgoal-command>",
|
|
801
853
|
]
|
|
854
|
+
# When an objective is given, bind the native /goal too (pre_llm_call reads
|
|
855
|
+
# this marker — slash handlers have no session_id). Inspect-only /litgoal
|
|
856
|
+
# (no objective) leaves any active goal untouched.
|
|
857
|
+
marker = bind_goal_marker(objective)
|
|
858
|
+
if marker:
|
|
859
|
+
agent_lines.append(marker)
|
|
802
860
|
return {
|
|
803
861
|
"display": f"{intro}\nState dir: {lithermes_dir(workspace) / 'litgoal'}",
|
|
804
862
|
"agent_message": "\n".join(agent_lines),
|
|
805
863
|
}
|
|
806
864
|
|
|
807
865
|
|
|
866
|
+
def command_deep_interview(raw_args: str) -> dict[str, str]:
|
|
867
|
+
args = parse_args(raw_args)
|
|
868
|
+
workspace = workspace_from_option(args.options.get("worktree"))
|
|
869
|
+
# `--quick|--standard|--deep` are bare profile flags, but parse_args greedily
|
|
870
|
+
# binds the next bare word as a flag value — so `--quick build a widget` would
|
|
871
|
+
# consume "build". Recover any such word back into the idea text.
|
|
872
|
+
profile = "standard"
|
|
873
|
+
for flag in ("deep", "quick", "standard"):
|
|
874
|
+
value = args.options.get(flag)
|
|
875
|
+
if value:
|
|
876
|
+
profile = flag
|
|
877
|
+
if isinstance(value, str):
|
|
878
|
+
args.positional.insert(0, value)
|
|
879
|
+
break
|
|
880
|
+
idea = _join_positional(args.positional)
|
|
881
|
+
agent_lines = [
|
|
882
|
+
idea or "Run a deep-interview clarification pass before planning.",
|
|
883
|
+
"",
|
|
884
|
+
"<lithermes-deep-interview-command>",
|
|
885
|
+
f"workspace: {workspace}",
|
|
886
|
+
f"profile: {profile}",
|
|
887
|
+
"Run the LitHermes deep-interview clarity gate — load the lithermes:deep-interview skill",
|
|
888
|
+
"and follow it. This is a requirements mode, NOT implementation:",
|
|
889
|
+
"- one Socratic question per round, intent before detail; re-score ambiguity each round;",
|
|
890
|
+
"- gather repo facts with read-only search / delegate_task before asking the user;",
|
|
891
|
+
"- keep Non-goals + Decision Boundaries explicit and run one pressure pass before crystallizing;",
|
|
892
|
+
"- persist state under .hermes/lithermes/deep-interview/<slug>-state.json so it can resume.",
|
|
893
|
+
"When the spec is ready, do NOT build here — hand off: /lit-plan to plan it, or /lit-loop to",
|
|
894
|
+
"execute it, carrying the non-goals, decision boundaries, and acceptance criteria forward.",
|
|
895
|
+
"</lithermes-deep-interview-command>",
|
|
896
|
+
]
|
|
897
|
+
return {
|
|
898
|
+
"display": (
|
|
899
|
+
f"Opened the LitHermes deep-interview clarity gate ({profile} profile).\n"
|
|
900
|
+
"Requirements mode — clarifies, then hands off to /lit-plan or /lit-loop."
|
|
901
|
+
),
|
|
902
|
+
"agent_message": "\n".join(agent_lines),
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
|
|
808
906
|
def command_start_work(raw_args: str) -> str | dict[str, str]:
|
|
809
907
|
args = parse_args(raw_args)
|
|
810
908
|
workspace = workspace_from_option(args.options.get("worktree"))
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"syncedAt": "2026-06-
|
|
2
|
+
"syncedAt": "2026-06-14T03:56:58.019Z",
|
|
3
3
|
"source": "source-reference",
|
|
4
|
-
"sourceHash": "
|
|
4
|
+
"sourceHash": "23886fd1b52dc30433f8886ba15ccedbc3d134ba8f0b99b7a90a83d07c0351fe",
|
|
5
5
|
"files": [
|
|
6
|
+
{
|
|
7
|
+
"path": "NOTICE.md",
|
|
8
|
+
"sha256": "452ad24ca1ecd65e2f2ab0f21ff6c1cefb13aacf0db875f327b62027106685ab"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"path": "README.md",
|
|
12
|
+
"sha256": "e0bc7d60f61a8d35df9f6287876e236e59e80e871261558701375a12cc4e4feb"
|
|
13
|
+
},
|
|
6
14
|
{
|
|
7
15
|
"path": "__init__.py",
|
|
8
|
-
"sha256": "
|
|
16
|
+
"sha256": "14951813219a77f7074ff8ca36e26cc46b66b0987f28dbcf1827c9bcfa98d65c"
|
|
9
17
|
},
|
|
10
18
|
{
|
|
11
19
|
"path": "core.py",
|
|
12
|
-
"sha256": "
|
|
20
|
+
"sha256": "da2888e70b560697eaf81fe29d0b92a36e8e0563ab3bcab95c34472533faa937"
|
|
13
21
|
},
|
|
14
22
|
{
|
|
15
23
|
"path": "litgoal/__init__.py",
|
|
@@ -39,17 +47,9 @@
|
|
|
39
47
|
"path": "litgoal/tools.py",
|
|
40
48
|
"sha256": "2e12124666c4dab32087af11c76c970656077e449cca1dbb4f299bab2efdd24a"
|
|
41
49
|
},
|
|
42
|
-
{
|
|
43
|
-
"path": "NOTICE.md",
|
|
44
|
-
"sha256": "452ad24ca1ecd65e2f2ab0f21ff6c1cefb13aacf0db875f327b62027106685ab"
|
|
45
|
-
},
|
|
46
50
|
{
|
|
47
51
|
"path": "plugin.yaml",
|
|
48
|
-
"sha256": "
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "README.md",
|
|
52
|
-
"sha256": "d67b9f8d74aa861483cc28144eefc417493a3d2ac3cf6a6204c77235886b6d6c"
|
|
52
|
+
"sha256": "4b8a31a093d883cf1714250564955c3d8ca87889887780515a7df15ed317e732"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"path": "skills/ai-slop-remover/SKILL.md",
|
|
@@ -57,7 +57,11 @@
|
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"path": "skills/comment-checker/SKILL.md",
|
|
60
|
-
"sha256": "
|
|
60
|
+
"sha256": "2fb1c4de76d1cc340b63f92141d36d0a351325d9c9411b9af622dd8b6fca5567"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "skills/debugging/SKILL.md",
|
|
64
|
+
"sha256": "aff2ca5765f490ed1e45d2eaa77c48db3ef98cec12fa10ebff3f91b82eab1254"
|
|
61
65
|
},
|
|
62
66
|
{
|
|
63
67
|
"path": "skills/debugging/references/methodology/00-setup.md",
|
|
@@ -132,13 +136,21 @@
|
|
|
132
136
|
"sha256": "0123de928e1e88186487adfee0b69d7a886c596fdd0c5132256cf9319fea466e"
|
|
133
137
|
},
|
|
134
138
|
{
|
|
135
|
-
"path": "skills/
|
|
136
|
-
"sha256": "
|
|
139
|
+
"path": "skills/deep-interview/SKILL.md",
|
|
140
|
+
"sha256": "4f8e7217b72724921cdc68b5214cc99d7b45ec51fd05b237fac20c75fc35988c"
|
|
137
141
|
},
|
|
138
142
|
{
|
|
139
143
|
"path": "skills/frontend-ui-ux/SKILL.md",
|
|
140
144
|
"sha256": "914667044f135563658ceac733a085a6bbdd71a00a5f4030f73d43444e0388f7"
|
|
141
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"path": "skills/git-master/SKILL.md",
|
|
148
|
+
"sha256": "31d59a91767423094fd84ed668c8b8c7e14d515cd17e3845d91a0ce4aa0144c8"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"path": "skills/init-deep/SKILL.md",
|
|
152
|
+
"sha256": "f571334ad9150fd93ef57fcc9dd85d240812649975811e63045ff2a72e84260b"
|
|
153
|
+
},
|
|
142
154
|
{
|
|
143
155
|
"path": "skills/lit-plan/SKILL.md",
|
|
144
156
|
"sha256": "1f09901f9bb8f19b92add59c3613231228c8b5b7adbefae1cb3eb5cf7c3c61dc"
|
|
@@ -159,6 +171,14 @@
|
|
|
159
171
|
"path": "skills/lsp/SKILL.md",
|
|
160
172
|
"sha256": "3e793aaa158156dd60ec11add7375050bbeeb7b3eb77497f1c432d0842abff5c"
|
|
161
173
|
},
|
|
174
|
+
{
|
|
175
|
+
"path": "skills/programming/SKILL.md",
|
|
176
|
+
"sha256": "ffb201197e7386c848f8efb9b90d0a024d7b8000e8bea1b13b0ed7a83627a56b"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"path": "skills/programming/references/go/README.md",
|
|
180
|
+
"sha256": "faedb8ab4e13f4ff03ad3497f3ed44df1b5b71463b741a58ee61b60ddb68b188"
|
|
181
|
+
},
|
|
162
182
|
{
|
|
163
183
|
"path": "skills/programming/references/go/backend-stack.md",
|
|
164
184
|
"sha256": "1ba7769bfe7cd7a001251fabf01133a9df7eaae700705eecb3261955e4cfbfa9"
|
|
@@ -203,10 +223,6 @@
|
|
|
203
223
|
"path": "skills/programming/references/go/one-liners.md",
|
|
204
224
|
"sha256": "ff354a8700a9987ad21f4fb0cf4d5695857cae093c42358bc3eef13826f8ddfb"
|
|
205
225
|
},
|
|
206
|
-
{
|
|
207
|
-
"path": "skills/programming/references/go/README.md",
|
|
208
|
-
"sha256": "faedb8ab4e13f4ff03ad3497f3ed44df1b5b71463b741a58ee61b60ddb68b188"
|
|
209
|
-
},
|
|
210
226
|
{
|
|
211
227
|
"path": "skills/programming/references/go/sqlc-pgx.md",
|
|
212
228
|
"sha256": "26243d7b26e3ffadce87b4f78739e6582c69d5c144af89f2ef55c076b5e1b399"
|
|
@@ -219,6 +235,10 @@
|
|
|
219
235
|
"path": "skills/programming/references/go/type-patterns.md",
|
|
220
236
|
"sha256": "87d930ed6cdc57b3c20aae802679a4f419f77b5fcf4a630a6973271cc62545c7"
|
|
221
237
|
},
|
|
238
|
+
{
|
|
239
|
+
"path": "skills/programming/references/python/README.md",
|
|
240
|
+
"sha256": "23ef4282a10fce99de314ddc3c8d93eca79c92f256c87cf8caa54a2ee703e738"
|
|
241
|
+
},
|
|
222
242
|
{
|
|
223
243
|
"path": "skills/programming/references/python/async-anyio.md",
|
|
224
244
|
"sha256": "26e069cfc9debf45ff1629d0246a6831c64a33f8e595976f8cb19d4b5647ca95"
|
|
@@ -263,10 +283,6 @@
|
|
|
263
283
|
"path": "skills/programming/references/python/pyproject-strict.md",
|
|
264
284
|
"sha256": "655eb106a165d3730d656a9689ac98a00abf7d32cc89f2decaf33ddf43ac0e45"
|
|
265
285
|
},
|
|
266
|
-
{
|
|
267
|
-
"path": "skills/programming/references/python/README.md",
|
|
268
|
-
"sha256": "23ef4282a10fce99de314ddc3c8d93eca79c92f256c87cf8caa54a2ee703e738"
|
|
269
|
-
},
|
|
270
286
|
{
|
|
271
287
|
"path": "skills/programming/references/python/textual-tui.md",
|
|
272
288
|
"sha256": "bf59c001a76b30777882b2c729321d809a2a81bf75b720e72da1c38a3e7708d9"
|
|
@@ -275,18 +291,22 @@
|
|
|
275
291
|
"path": "skills/programming/references/python/type-patterns.md",
|
|
276
292
|
"sha256": "4fa0bf3c7e82c6a7141c54aac9e1703cd9ce86122903dbe2fe00700930ca4626"
|
|
277
293
|
},
|
|
278
|
-
{
|
|
279
|
-
"path": "skills/programming/references/rust-ub/miri-sanitizers-loom.md",
|
|
280
|
-
"sha256": "b3b56208978286dd975440fa1f28d01b9ed05b23d33a1faaa904e62ca310c4e8"
|
|
281
|
-
},
|
|
282
294
|
{
|
|
283
295
|
"path": "skills/programming/references/rust-ub/README.md",
|
|
284
296
|
"sha256": "25300ebe1a467f47695959b00964ded8c560e51bb5d92dffe178f9d3f24b87a9"
|
|
285
297
|
},
|
|
298
|
+
{
|
|
299
|
+
"path": "skills/programming/references/rust-ub/miri-sanitizers-loom.md",
|
|
300
|
+
"sha256": "b3b56208978286dd975440fa1f28d01b9ed05b23d33a1faaa904e62ca310c4e8"
|
|
301
|
+
},
|
|
286
302
|
{
|
|
287
303
|
"path": "skills/programming/references/rust-ub/ub-taxonomy.md",
|
|
288
304
|
"sha256": "7c0b369732920f6e59e67fa2f7a9a10fa4ba5b0a23b95ddd1aa2c4011a661326"
|
|
289
305
|
},
|
|
306
|
+
{
|
|
307
|
+
"path": "skills/programming/references/rust/README.md",
|
|
308
|
+
"sha256": "7502ee277c86df00388ea7cdbc5b54fc743d4eacab8b4015cd00ad0483ead727"
|
|
309
|
+
},
|
|
290
310
|
{
|
|
291
311
|
"path": "skills/programming/references/rust/async-tokio.md",
|
|
292
312
|
"sha256": "48e54d0b4be71fe1765e9bc62e0073a767abd966e29d4b456ae1326d0dc7b760"
|
|
@@ -319,10 +339,6 @@
|
|
|
319
339
|
"path": "skills/programming/references/rust/proptest-insta.md",
|
|
320
340
|
"sha256": "be787a4e174f55062931b70c53027a6c46423e3473608b315ac800b52325c3d1"
|
|
321
341
|
},
|
|
322
|
-
{
|
|
323
|
-
"path": "skills/programming/references/rust/README.md",
|
|
324
|
-
"sha256": "7502ee277c86df00388ea7cdbc5b54fc743d4eacab8b4015cd00ad0483ead727"
|
|
325
|
-
},
|
|
326
342
|
{
|
|
327
343
|
"path": "skills/programming/references/rust/type-state.md",
|
|
328
344
|
"sha256": "3dc21686fa0b2f1cb0c6206e38b800aa8b9ecf482d02faa9c1c4fd925da051e5"
|
|
@@ -335,6 +351,10 @@
|
|
|
335
351
|
"path": "skills/programming/references/rust/zero-cost-safety.md",
|
|
336
352
|
"sha256": "a03623f9e0d80cdb5c2addddb97b27932c84adb5232b2d659442ba5e74e37bbb"
|
|
337
353
|
},
|
|
354
|
+
{
|
|
355
|
+
"path": "skills/programming/references/typescript/README.md",
|
|
356
|
+
"sha256": "c54f997b70659b574ce805196aefd9978354da5f73d5fdb6defbce1abf11041e"
|
|
357
|
+
},
|
|
338
358
|
{
|
|
339
359
|
"path": "skills/programming/references/typescript/backend-hono.md",
|
|
340
360
|
"sha256": "7df19dd33da142423412ad4a0fa67a8b800e79d200adc62e20d05bcb15ff8e4f"
|
|
@@ -351,10 +371,6 @@
|
|
|
351
371
|
"path": "skills/programming/references/typescript/error-handling.md",
|
|
352
372
|
"sha256": "5d99ea45d454723b1d8292357a7a20b434801101336863df89e000c67bf1e807"
|
|
353
373
|
},
|
|
354
|
-
{
|
|
355
|
-
"path": "skills/programming/references/typescript/README.md",
|
|
356
|
-
"sha256": "c54f997b70659b574ce805196aefd9978354da5f73d5fdb6defbce1abf11041e"
|
|
357
|
-
},
|
|
358
374
|
{
|
|
359
375
|
"path": "skills/programming/references/typescript/tsconfig-strict.md",
|
|
360
376
|
"sha256": "e844903aa4dcf9c5e45592eccbbf04d6146c602c70067c72be74f523b0e2134d"
|
|
@@ -383,6 +399,14 @@
|
|
|
383
399
|
"path": "skills/programming/scripts/go/templates/AGENTS.md.tmpl",
|
|
384
400
|
"sha256": "ac81f2614b1417dfc5b0ca21c40ee74c357b55a97c92cb02db84ac418587c744"
|
|
385
401
|
},
|
|
402
|
+
{
|
|
403
|
+
"path": "skills/programming/scripts/go/templates/README.md.tmpl",
|
|
404
|
+
"sha256": "b0780490defb300a8ec5cd46555074ab58f9147d298964ff5ce2a40d24dde066"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"path": "skills/programming/scripts/go/templates/Taskfile.yml",
|
|
408
|
+
"sha256": "eb59766ea776398a4109383dc279c13673dbad3645f1a2a4f70da92bd08f48b6"
|
|
409
|
+
},
|
|
386
410
|
{
|
|
387
411
|
"path": "skills/programming/scripts/go/templates/ci.yml",
|
|
388
412
|
"sha256": "8403a5a4dd6d55773aa651600dc95d01bfc2462ce6756903ec3d2a4330371df7"
|
|
@@ -399,18 +423,10 @@
|
|
|
399
423
|
"path": "skills/programming/scripts/go/templates/main.go.tmpl",
|
|
400
424
|
"sha256": "de00e3621a5e9e7c4639936f3822bdffc512c7fd04bc089144f0e3f49c8e31a5"
|
|
401
425
|
},
|
|
402
|
-
{
|
|
403
|
-
"path": "skills/programming/scripts/go/templates/README.md.tmpl",
|
|
404
|
-
"sha256": "b0780490defb300a8ec5cd46555074ab58f9147d298964ff5ce2a40d24dde066"
|
|
405
|
-
},
|
|
406
426
|
{
|
|
407
427
|
"path": "skills/programming/scripts/go/templates/run.go",
|
|
408
428
|
"sha256": "b59b73b7d0fe0122531d4523b8d72be3517bee015af41358e18edb18f183823f"
|
|
409
429
|
},
|
|
410
|
-
{
|
|
411
|
-
"path": "skills/programming/scripts/go/templates/Taskfile.yml",
|
|
412
|
-
"sha256": "eb59766ea776398a4109383dc279c13673dbad3645f1a2a4f70da92bd08f48b6"
|
|
413
|
-
},
|
|
414
430
|
{
|
|
415
431
|
"path": "skills/programming/scripts/python/check-no-excuse-rules.py",
|
|
416
432
|
"sha256": "2b2f629dcbbf05f2ab533d23ecab0825d5c6d091e5a5837090200e93afdc0767"
|
|
@@ -443,10 +459,6 @@
|
|
|
443
459
|
"path": "skills/programming/scripts/typescript/new-project.ts",
|
|
444
460
|
"sha256": "495e5add86f0ca9819f537e51083c34b6480e1f7d147ded7c9cf93fdbe48ccc5"
|
|
445
461
|
},
|
|
446
|
-
{
|
|
447
|
-
"path": "skills/programming/SKILL.md",
|
|
448
|
-
"sha256": "ffb201197e7386c848f8efb9b90d0a024d7b8000e8bea1b13b0ed7a83627a56b"
|
|
449
|
-
},
|
|
450
462
|
{
|
|
451
463
|
"path": "skills/refactor/SKILL.md",
|
|
452
464
|
"sha256": "d4e160e256b5a5e1fae4170edeee7a6bc8e2338bbebec797e24f07ea70687a10"
|
|
@@ -461,7 +473,7 @@
|
|
|
461
473
|
},
|
|
462
474
|
{
|
|
463
475
|
"path": "skills/rules/SKILL.md",
|
|
464
|
-
"sha256": "
|
|
476
|
+
"sha256": "bc0a046745c455b5abb5ff8966d1d19245bf41576a44ed9be2c7917198ddbc03"
|
|
465
477
|
},
|
|
466
478
|
{
|
|
467
479
|
"path": "skills/start-work/SKILL.md",
|
|
@@ -5,9 +5,9 @@ description: Use after edits to self-review the comments you just wrote or touch
|
|
|
5
5
|
|
|
6
6
|
# Comment Checker
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
The LitHermes plugin registers only the `pre_llm_call` and `subagent_stop` hooks —
|
|
9
|
+
it wires **no** per-edit hook that fires after a write or edit. So this is not an
|
|
10
|
+
automatic gate; it is a discipline **you self-apply** immediately after you change a
|
|
11
11
|
file. Treat every successful write/edit/patch as the trigger to run the checklist below
|
|
12
12
|
on the comments in that diff before you move on.
|
|
13
13
|
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-interview
|
|
3
|
+
description: Socratic deep-interview loop that turns a vague idea into an execution-ready spec, using a quantitative ambiguity score to gate when requirements are clear enough to build. Use this BEFORE planning or implementation whenever a request is broad, underspecified, or missing acceptance criteria — or when the user says "interview me", "ask me everything", "don't assume", or "deep interview". Invoke directly with /deep-interview.
|
|
4
|
+
argument-hint: "[--quick|--standard|--deep] <idea or vague description>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<Purpose>
|
|
8
|
+
Deep Interview is an intent-first Socratic clarification loop that runs before planning or implementation. It turns vague ideas into execution-ready specifications by asking targeted questions about why the user wants a change, how far it should go, what should stay out of scope, and what the implementer may decide without confirmation. In LitHermes it is the clarity gate that feeds `/lit-plan` and then `/lit-loop`.
|
|
9
|
+
</Purpose>
|
|
10
|
+
|
|
11
|
+
<Use_When>
|
|
12
|
+
- The request is broad, ambiguous, or missing concrete acceptance criteria
|
|
13
|
+
- The user says "deep interview", "interview me", "ask me everything", or "don't assume"
|
|
14
|
+
- The user wants to avoid misaligned implementation from underspecified requirements
|
|
15
|
+
- You need a clear requirements artifact before handing off to planning or implementation
|
|
16
|
+
</Use_When>
|
|
17
|
+
|
|
18
|
+
<Do_Not_Use_When>
|
|
19
|
+
- The request already has concrete file/symbol targets and clear acceptance criteria
|
|
20
|
+
- The user explicitly asks to skip planning/interview and execute immediately
|
|
21
|
+
- The user asks for lightweight, open-ended brainstorming only
|
|
22
|
+
- A complete spec/plan already exists and execution should start
|
|
23
|
+
</Do_Not_Use_When>
|
|
24
|
+
|
|
25
|
+
<Why_This_Exists>
|
|
26
|
+
Execution quality is usually bottlenecked by intent clarity, not just missing implementation detail. A single expansion pass often misses why the user wants a change, where the scope should stop, which tradeoffs are unacceptable, and which decisions still require user approval. This workflow applies Socratic pressure + quantitative ambiguity scoring so downstream planning and execution begin with an explicit, testable, intent-aligned spec.
|
|
27
|
+
</Why_This_Exists>
|
|
28
|
+
|
|
29
|
+
<Depth_Profiles>
|
|
30
|
+
| Profile | Flag | Target ambiguity | Max rounds | Use for |
|
|
31
|
+
|---------|------|-----------------:|-----------:|---------|
|
|
32
|
+
| Quick | `--quick` | ≤ 30% | 5 | Fast pre-spec pass |
|
|
33
|
+
| Standard *(default)* | `--standard` | ≤ 20% | 12 | Full requirement interview |
|
|
34
|
+
| Deep | `--deep` | ≤ 15% | 20 | High-rigor exploration |
|
|
35
|
+
|
|
36
|
+
If no flag is provided, use **Standard**.
|
|
37
|
+
</Depth_Profiles>
|
|
38
|
+
|
|
39
|
+
<Execution_Policy>
|
|
40
|
+
- Ask ONE question per round (never batch)
|
|
41
|
+
- Ask about intent and boundaries before implementation detail
|
|
42
|
+
- Target the weakest clarity dimension each round after applying the stage-priority rules below
|
|
43
|
+
- Treat every answer as a claim to pressure-test before moving on: the next question should usually demand evidence or examples, expose a hidden assumption, force a tradeoff or boundary, or reframe root cause vs symptom
|
|
44
|
+
- Do not rotate to a new clarity dimension just for coverage when the current answer is still vague; stay on the same thread until one layer deeper, one assumption clearer, or one boundary tighter
|
|
45
|
+
- Before crystallizing, complete at least one explicit pressure pass that revisits an earlier answer with a deeper, assumption-focused, or tradeoff-focused follow-up
|
|
46
|
+
- Gather codebase facts with read-only search tools (or a read-only `delegate_task` exploration child) before asking the user about internals
|
|
47
|
+
- Keep exploration prompts narrow and concrete; fall back to the user only for facts that can't be discovered directly
|
|
48
|
+
- Always run a preflight context intake before the first interview question
|
|
49
|
+
- Reduce user effort: ask only the highest-leverage unresolved question, and never ask the user for codebase facts you can discover yourself
|
|
50
|
+
- For brownfield work, prefer evidence-backed confirmation questions such as "I found X in Y. Should this change follow that pattern?"
|
|
51
|
+
- Ask each round as one concise plain-text question (the Hermes reply channel has no structured multiple-choice prompt); render the ambiguity meter immediately above it
|
|
52
|
+
- Re-score ambiguity after each answer and show progress transparently
|
|
53
|
+
- Do not hand off to execution while ambiguity remains above threshold unless the user explicitly opts to proceed with warning
|
|
54
|
+
- Do not crystallize or hand off while `Non-goals` or `Decision Boundaries` remain unresolved, even if the weighted ambiguity threshold is met
|
|
55
|
+
- Treat early exit as a safety valve, not the default success path
|
|
56
|
+
- Persist progress to a state file after each round so the interview can resume if interrupted
|
|
57
|
+
</Execution_Policy>
|
|
58
|
+
|
|
59
|
+
<Steps>
|
|
60
|
+
|
|
61
|
+
## Phase 0: Preflight Context Intake
|
|
62
|
+
|
|
63
|
+
1. Parse `{{ARGUMENTS}}` and derive a short task slug.
|
|
64
|
+
2. Attempt to load the latest relevant context snapshot from `.hermes/lithermes/deep-interview/{slug}-context.md`.
|
|
65
|
+
3. If no snapshot exists, create a minimum context snapshot with:
|
|
66
|
+
- Task statement
|
|
67
|
+
- Desired outcome
|
|
68
|
+
- Stated solution (what the user asked for)
|
|
69
|
+
- Probable intent hypothesis (why they likely want it)
|
|
70
|
+
- Known facts/evidence
|
|
71
|
+
- Constraints
|
|
72
|
+
- Unknowns/open questions
|
|
73
|
+
- Decision-boundary unknowns
|
|
74
|
+
- Likely codebase touchpoints
|
|
75
|
+
4. Save the snapshot to `.hermes/lithermes/deep-interview/{slug}-context.md` and reference it in the state file.
|
|
76
|
+
|
|
77
|
+
## Phase 1: Initialize
|
|
78
|
+
|
|
79
|
+
1. Parse `{{ARGUMENTS}}` and depth profile (`--quick|--standard|--deep`).
|
|
80
|
+
2. Detect project context:
|
|
81
|
+
- Classify **brownfield** (existing codebase target) vs **greenfield** using read-only search.
|
|
82
|
+
- For brownfield, collect relevant codebase context before questioning.
|
|
83
|
+
3. Initialize the state file at `.hermes/lithermes/deep-interview/{slug}-state.json`. Set `threshold` and `max_rounds` from the chosen profile (see the Depth Profiles table) — the values below are illustrative:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"active": true,
|
|
88
|
+
"current_phase": "deep-interview",
|
|
89
|
+
"state": {
|
|
90
|
+
"interview_id": "<uuid>",
|
|
91
|
+
"profile": "quick|standard|deep",
|
|
92
|
+
"type": "greenfield|brownfield",
|
|
93
|
+
"initial_idea": "<user input>",
|
|
94
|
+
"rounds": [],
|
|
95
|
+
"current_ambiguity": 1.0,
|
|
96
|
+
"threshold": 0.2,
|
|
97
|
+
"max_rounds": 12,
|
|
98
|
+
"challenge_modes_used": [],
|
|
99
|
+
"codebase_context": null,
|
|
100
|
+
"current_stage": "intent-first",
|
|
101
|
+
"current_focus": "intent",
|
|
102
|
+
"context_snapshot_path": ".hermes/lithermes/deep-interview/<slug>-context.md"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
4. Announce kickoff with a compact banner so the user immediately understands the contract (profile, target, budget, starting point). Render it before the first question:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
🎯 Deep Interview · {Quick|Standard|Deep} · {greenfield|brownfield}
|
|
111
|
+
Goal turn "{short initial idea}" into an execution-ready spec
|
|
112
|
+
Target ambiguity ≤ {threshold}% · Budget up to {max_rounds} rounds
|
|
113
|
+
Starting ambiguity {score}% · One question per round, intent before detail
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Phase 2: Socratic Interview Loop
|
|
117
|
+
|
|
118
|
+
Repeat until ambiguity `<= threshold`, the pressure pass is complete, the readiness gates are explicit, the user exits with warning, or max rounds are reached.
|
|
119
|
+
|
|
120
|
+
### 2a) Generate next question
|
|
121
|
+
Use:
|
|
122
|
+
- Original idea
|
|
123
|
+
- Prior Q&A rounds
|
|
124
|
+
- Current dimension scores
|
|
125
|
+
- Brownfield context (if any)
|
|
126
|
+
- Activated challenge mode injection (Phase 3)
|
|
127
|
+
|
|
128
|
+
Target the lowest-scoring dimension, but respect stage priority:
|
|
129
|
+
- **Stage 1 — Intent-first:** Intent, Outcome, Scope, Non-goals, Decision Boundaries
|
|
130
|
+
- **Stage 2 — Feasibility:** Constraints, Success Criteria
|
|
131
|
+
- **Stage 3 — Brownfield grounding:** Context Clarity (brownfield only)
|
|
132
|
+
|
|
133
|
+
Follow-up pressure ladder after each answer:
|
|
134
|
+
1. Ask for a concrete example, counterexample, or evidence signal behind the latest claim
|
|
135
|
+
2. Probe the hidden assumption, dependency, or belief that makes the claim true
|
|
136
|
+
3. Force a boundary or tradeoff: what would you explicitly not do, defer, or reject?
|
|
137
|
+
4. If the answer still describes symptoms, reframe toward essence / root cause before moving on
|
|
138
|
+
|
|
139
|
+
Prefer staying on the same thread for multiple rounds when it has the highest leverage. Breadth without pressure is not progress.
|
|
140
|
+
|
|
141
|
+
Detailed dimensions:
|
|
142
|
+
- Intent Clarity — why the user wants this
|
|
143
|
+
- Outcome Clarity — what end state they want
|
|
144
|
+
- Scope Clarity — how far the change should go
|
|
145
|
+
- Constraint Clarity — technical or business limits that must hold
|
|
146
|
+
- Success Criteria Clarity — how completion will be judged
|
|
147
|
+
- Context Clarity — existing codebase understanding (brownfield only)
|
|
148
|
+
|
|
149
|
+
`Non-goals` and `Decision Boundaries` are mandatory readiness gates. Ask about them early and keep revisiting them until they are explicit.
|
|
150
|
+
|
|
151
|
+
### 2b) Ask the question
|
|
152
|
+
Lead with a one-glance ambiguity meter so the user always sees how close the spec is to ready and how much budget remains. The meter is a *draining gauge*: the filled cells represent the ambiguity that still remains, and a `┊` tick marks the target — the job each round is to drain the filled edge down to or under the tick.
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Round {n}/{max_rounds} · Stage {1-3}: {stage name} · Focus: {weakest_dimension}
|
|
156
|
+
Ambiguity {score}% [███████░░░░░░░░░░░░░░░] target ≤ {threshold}%
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then ask exactly one plain-text question.
|
|
160
|
+
|
|
161
|
+
### 2c) Score ambiguity
|
|
162
|
+
Score each weighted dimension in `[0.0, 1.0]` with justification + gap.
|
|
163
|
+
|
|
164
|
+
Greenfield: `ambiguity = 1 - (intent × 0.30 + outcome × 0.25 + scope × 0.20 + constraints × 0.15 + success × 0.10)`
|
|
165
|
+
|
|
166
|
+
Brownfield: `ambiguity = 1 - (intent × 0.25 + outcome × 0.20 + scope × 0.20 + constraints × 0.15 + success × 0.10 + context × 0.10)`
|
|
167
|
+
|
|
168
|
+
Readiness gate:
|
|
169
|
+
- `Non-goals` must be explicit
|
|
170
|
+
- `Decision Boundaries` must be explicit
|
|
171
|
+
- A pressure pass must be complete: at least one earlier answer has been revisited with an evidence, assumption, or tradeoff follow-up
|
|
172
|
+
- If either gate is unresolved, or the pressure pass is incomplete, continue interviewing even when weighted ambiguity is below threshold
|
|
173
|
+
|
|
174
|
+
### 2d) Report progress
|
|
175
|
+
After scoring, show a compact breakdown so the user sees *what moved* and *what's still blocking readiness*. The readiness gates are shown every round (not just at the end), because they can block crystallization even when the weighted score is already under threshold.
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Clarity
|
|
179
|
+
Intent ▓▓▓▓▓▓▓▓░░ 0.80 why they want it — clear
|
|
180
|
+
Outcome ▓▓▓▓▓▓░░░░ 0.60 end state — partially defined
|
|
181
|
+
Scope ▓▓▓▓░░░░░░ 0.40 ← weakest, next focus
|
|
182
|
+
Constraints ▓▓▓▓▓▓▓░░░ 0.70 limits mostly known
|
|
183
|
+
Success ▓▓▓░░░░░░░ 0.30 no acceptance criteria yet
|
|
184
|
+
(Context) ▓▓▓▓▓░░░░░ 0.50 brownfield only
|
|
185
|
+
|
|
186
|
+
Readiness gates
|
|
187
|
+
✅ Non-goals explicit ⬜ Decision Boundaries ✅ Pressure pass done
|
|
188
|
+
→ blocked by: Decision Boundaries (not yet explicit)
|
|
189
|
+
|
|
190
|
+
Ambiguity {prev}% → {new}% · Next: {weakest_dimension}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Use `✅` for met gates and `⬜` for open ones, and name what's blocking. If all gates are met and ambiguity is under threshold, say so plainly: "All gates met — ready to crystallize."
|
|
194
|
+
|
|
195
|
+
### 2e) Persist state
|
|
196
|
+
Append the round result and updated scores to the state file.
|
|
197
|
+
|
|
198
|
+
### 2f) Round controls
|
|
199
|
+
- Do not offer early exit before the first explicit assumption probe and one persistent follow-up have happened
|
|
200
|
+
- Round 4+: allow explicit early exit with risk warning. Make it visible once available — add a quiet footer line, e.g. `(You can say "good enough" to stop early and crystallize with the current clarity.)`
|
|
201
|
+
- Soft warning at profile midpoint (e.g., round 3/6/10 depending on profile): surface remaining budget, e.g. `⚠️ Round {n}/{max_rounds} — {remaining} rounds left before the cap.`
|
|
202
|
+
- Hard cap at profile `max_rounds`
|
|
203
|
+
|
|
204
|
+
## Phase 3: Challenge Modes (assumption stress tests)
|
|
205
|
+
|
|
206
|
+
Use each mode once when applicable. These are normal escalation tools, not rare rescue moves:
|
|
207
|
+
|
|
208
|
+
- **Contrarian** (round 2+ or immediately when an answer rests on an untested assumption): challenge core assumptions
|
|
209
|
+
- **Simplifier** (round 4+ or when scope expands faster than outcome clarity): probe minimal viable scope
|
|
210
|
+
- **Essence** (round 5+ and ambiguity > 0.25, or when the user keeps describing symptoms): ask for essence-level reframing
|
|
211
|
+
|
|
212
|
+
Track used modes in the state file to prevent repetition.
|
|
213
|
+
|
|
214
|
+
## Phase 4: Crystallize Artifacts
|
|
215
|
+
|
|
216
|
+
When threshold is met (or user exits with warning / hard cap):
|
|
217
|
+
|
|
218
|
+
1. Write the interview transcript summary to `.hermes/lithermes/deep-interview/{slug}-transcript.md`.
|
|
219
|
+
2. Write the execution-ready spec to `.hermes/lithermes/deep-interview/{slug}-spec.md`.
|
|
220
|
+
|
|
221
|
+
Spec should include:
|
|
222
|
+
- Metadata (profile, rounds, final ambiguity, threshold, context type)
|
|
223
|
+
- Context snapshot reference/path (for downstream reuse)
|
|
224
|
+
- Clarity breakdown table
|
|
225
|
+
- Intent (why the user wants this)
|
|
226
|
+
- Desired Outcome
|
|
227
|
+
- In-Scope
|
|
228
|
+
- Out-of-Scope / Non-goals
|
|
229
|
+
- Decision Boundaries (what the implementer may decide without confirmation)
|
|
230
|
+
- Constraints
|
|
231
|
+
- Testable acceptance criteria
|
|
232
|
+
- Assumptions exposed + resolutions
|
|
233
|
+
- Pressure-pass findings (which answer was revisited, and what changed)
|
|
234
|
+
- Brownfield evidence vs inference notes for any repository-grounded confirmation questions
|
|
235
|
+
- Technical context findings
|
|
236
|
+
- Full or condensed transcript
|
|
237
|
+
|
|
238
|
+
## Phase 5: Handoff
|
|
239
|
+
|
|
240
|
+
Deep-interview is a requirements mode. When the spec is ready, hand off to planning or implementation — do **not** implement directly here. The spec is the requirements source of truth: preserve intent, non-goals, decision boundaries, acceptance criteria, and any residual-risk warning across the handoff.
|
|
241
|
+
|
|
242
|
+
Present a short menu of next steps and let the user choose:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
Spec ready → .hermes/lithermes/deep-interview/{slug}-spec.md · final ambiguity {score}%{ · residual risk: <reason>}
|
|
246
|
+
|
|
247
|
+
1. Plan /lit-plan — turn the spec into a detailed implementation/architecture plan first
|
|
248
|
+
2. Build /lit-loop — implement directly; the spec is strong enough to start
|
|
249
|
+
3. Refine keep interviewing — ambiguity or boundaries are still too loose
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
When handing the spec to `/lit-plan` or `/lit-loop`:
|
|
253
|
+
- Pass the spec file as the requirements source of truth; don't re-run the interview unless the user asks to refine.
|
|
254
|
+
- Carry the non-goals, decision boundaries, and acceptance criteria forward as binding constraints.
|
|
255
|
+
|
|
256
|
+
**Residual-Risk Rule:** if the interview ended via early exit, hard-cap completion, or proceed-with-warning, state that residual risk explicitly in the handoff so the downstream step knows it inherited a partially clarified brief.
|
|
257
|
+
|
|
258
|
+
</Steps>
|
|
259
|
+
|
|
260
|
+
<Tool_Usage>
|
|
261
|
+
- Use read-only search tools (or a read-only `delegate_task` exploration child) for codebase fact gathering
|
|
262
|
+
- Ask each interview round as a single concise plain-text question; keep the same stage order
|
|
263
|
+
- Persist round state to `.hermes/lithermes/deep-interview/{slug}-state.json` for resumability; read it back to resume
|
|
264
|
+
- Read/write the context snapshot at `.hermes/lithermes/deep-interview/{slug}-context.md`
|
|
265
|
+
- Save transcript and spec artifacts to `.hermes/lithermes/deep-interview/{slug}-transcript.md` and `.hermes/lithermes/deep-interview/{slug}-spec.md`
|
|
266
|
+
</Tool_Usage>
|
|
267
|
+
|
|
268
|
+
<Escalation_And_Stop_Conditions>
|
|
269
|
+
- User says stop/cancel/abort -> persist state and stop
|
|
270
|
+
- Ambiguity stalls for 3 rounds (+/- 0.05) -> force Essence mode once
|
|
271
|
+
- Max rounds reached -> proceed with explicit residual-risk warning
|
|
272
|
+
- All dimensions >= 0.9 -> allow early crystallization even before max rounds
|
|
273
|
+
</Escalation_And_Stop_Conditions>
|
|
274
|
+
|
|
275
|
+
<Final_Checklist>
|
|
276
|
+
- [ ] Preflight context snapshot exists at `.hermes/lithermes/deep-interview/{slug}-context.md`
|
|
277
|
+
- [ ] Progress strip (round budget + ambiguity bar) shown each round
|
|
278
|
+
- [ ] Readiness-gate status (`Non-goals`, `Decision Boundaries`, pressure pass) shown each round with what's blocking
|
|
279
|
+
- [ ] Intent-first stage priority used before implementation detail
|
|
280
|
+
- [ ] Weakest-dimension targeting used within the active stage
|
|
281
|
+
- [ ] At least one explicit assumption probe happened before crystallization
|
|
282
|
+
- [ ] At least one persistent follow-up / pressure pass deepened a prior answer
|
|
283
|
+
- [ ] Challenge modes triggered at thresholds (when applicable)
|
|
284
|
+
- [ ] Transcript written to `.hermes/lithermes/deep-interview/{slug}-transcript.md`
|
|
285
|
+
- [ ] Spec written to `.hermes/lithermes/deep-interview/{slug}-spec.md`
|
|
286
|
+
- [ ] Brownfield questions use evidence-backed confirmation when applicable
|
|
287
|
+
- [ ] Next-step handoff menu presented (`/lit-plan` / `/lit-loop` / Refine)
|
|
288
|
+
- [ ] No direct implementation performed in this mode
|
|
289
|
+
</Final_Checklist>
|
|
290
|
+
|
|
291
|
+
<Advanced>
|
|
292
|
+
## Resume
|
|
293
|
+
|
|
294
|
+
If interrupted, rerun the skill. Resume by reading the persisted state file (`.hermes/lithermes/deep-interview/{slug}-state.json`) and continuing from the last completed round.
|
|
295
|
+
|
|
296
|
+
## Recommended pipeline
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
deep-interview → /lit-plan → /lit-loop
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
- Stage 1 (deep-interview): clarity gate — this skill
|
|
303
|
+
- Stage 2 (`/lit-plan`): feasibility + architecture gate
|
|
304
|
+
- Stage 3 (`/lit-loop`): build + QA + validation gate
|
|
305
|
+
</Advanced>
|
|
306
|
+
|
|
307
|
+
Task: {{ARGUMENTS}}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-master
|
|
3
|
+
description: "MUST USE whenever a task needs a commit or git-history investigation. Covers atomic commits, staging, commit-message style, rebase, squash, fixup/autosquash, blame, bisect, reflog, git log -S/-G, and questions like who wrote this or when was this added. Do not use for ordinary code edits unless the user asks for git work."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Git Master
|
|
7
|
+
|
|
8
|
+
The LitHermes git-history specialist for Hermes. Use this skill when the user
|
|
9
|
+
asks you to operate on Git history or answer a Git-history question. Be exact,
|
|
10
|
+
conservative, and evidence-led. Read the repository state before you infer anything.
|
|
11
|
+
|
|
12
|
+
## LitHermes publish boundary
|
|
13
|
+
|
|
14
|
+
Commit, push, force-push, and history rewrites are outward-facing or hard-to-reverse
|
|
15
|
+
operations. Per LitHermes discipline, do **not** commit, push, force-push, reset,
|
|
16
|
+
stash-pop, or rewrite history unless the user explicitly authorized that exact
|
|
17
|
+
operation. Investigative requests report findings and stop.
|
|
18
|
+
|
|
19
|
+
## Mode Gate
|
|
20
|
+
|
|
21
|
+
Classify the request first:
|
|
22
|
+
|
|
23
|
+
- `COMMIT`: stage and commit local changes.
|
|
24
|
+
- `REBASE`: rebase, squash, fixup, autosquash, reorder, split, or otherwise rewrite branch history.
|
|
25
|
+
- `HISTORY`: answer when, where, who, why, or which commit changed something.
|
|
26
|
+
- `STATUS`: inspect branch, diff, or working-tree state without changing it.
|
|
27
|
+
|
|
28
|
+
If the request is only investigative, report findings and stop.
|
|
29
|
+
|
|
30
|
+
## Ground Truth
|
|
31
|
+
|
|
32
|
+
Gather independent facts first (these are read-only and safe to run in parallel):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git status --short
|
|
36
|
+
git diff --stat
|
|
37
|
+
git diff --staged --stat
|
|
38
|
+
git branch --show-current
|
|
39
|
+
git log -30 --oneline
|
|
40
|
+
git rev-parse --abbrev-ref @{upstream}
|
|
41
|
+
git merge-base HEAD origin/main
|
|
42
|
+
git merge-base HEAD origin/master
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Missing upstream or missing `main`/`master` is normal. Fall back to the best
|
|
46
|
+
available branch or report the missing fact. Never treat a failed lookup as proof.
|
|
47
|
+
|
|
48
|
+
## Commit Mode
|
|
49
|
+
|
|
50
|
+
Commit only the user's requested changes. Preserve unrelated dirty work.
|
|
51
|
+
|
|
52
|
+
1. Detect message style from recent history (`git log -30 --pretty=format:%s`). Use the
|
|
53
|
+
dominant local pattern, language, and casing. Do not default to Conventional
|
|
54
|
+
Commits unless the repo already uses them.
|
|
55
|
+
2. Inspect the full diff, not only filenames. Separate unrelated user edits from the
|
|
56
|
+
requested commit.
|
|
57
|
+
3. Build atomic groups by behavior, module, and revertability. Keep implementation and
|
|
58
|
+
its direct tests together.
|
|
59
|
+
4. Prefer multiple commits for unrelated concerns. A single commit is acceptable only
|
|
60
|
+
when the changed files form one indivisible behavior or the user explicitly asks for one.
|
|
61
|
+
5. Stage by path or hunk so each commit contains only its atomic group.
|
|
62
|
+
6. Before each commit, verify `git diff --staged --stat` and enough staged diff to prove
|
|
63
|
+
the group is right.
|
|
64
|
+
7. Commit with the detected style. After each commit, verify `git log -1 --oneline`.
|
|
65
|
+
|
|
66
|
+
Grouping rules:
|
|
67
|
+
|
|
68
|
+
- Split different features, modules, generated artifacts, config, docs, and test-only
|
|
69
|
+
changes unless they are inseparable.
|
|
70
|
+
- Keep generated files with the source change that produced them when omitting them
|
|
71
|
+
would leave the repo inconsistent.
|
|
72
|
+
- Never hide failing or unrelated changes inside a broad commit.
|
|
73
|
+
- Follow the user's git conventions (e.g. no AI/co-author attribution when the repo or
|
|
74
|
+
the user's rules forbid it).
|
|
75
|
+
|
|
76
|
+
Final report: list commit hashes, messages, and any remaining uncommitted files.
|
|
77
|
+
|
|
78
|
+
## Rebase Mode
|
|
79
|
+
|
|
80
|
+
History rewriting is a shared-impact operation.
|
|
81
|
+
|
|
82
|
+
- Never rebase or rewrite `main`, `master`, `dev`, release branches, or a protected
|
|
83
|
+
branch unless the user explicitly named that exact operation.
|
|
84
|
+
- If commits may already be pushed, ask before force-pushing. Use `--force-with-lease`,
|
|
85
|
+
never plain `--force`.
|
|
86
|
+
- If the worktree is dirty, preserve it intentionally before rebasing. Do not stash-pop
|
|
87
|
+
over conflicts without checking what changed.
|
|
88
|
+
- For fixups, prefer `git commit --fixup=<hash>` then
|
|
89
|
+
`GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <base>`.
|
|
90
|
+
- For conflicts, read the conflicting files and resolve by intent. Do not choose
|
|
91
|
+
ours/theirs blindly.
|
|
92
|
+
- If a rebase goes wrong, run `git rebase --abort` first. Use reflog only after
|
|
93
|
+
explaining the recovery path.
|
|
94
|
+
|
|
95
|
+
After rewriting, run the relevant tests or at least the project's cheapest smoke check,
|
|
96
|
+
then show the new branch log from base to HEAD.
|
|
97
|
+
|
|
98
|
+
## History Mode
|
|
99
|
+
|
|
100
|
+
Choose the Git tool by the question:
|
|
101
|
+
|
|
102
|
+
- `git log -S "text"`: when the count of an exact string changed.
|
|
103
|
+
- `git log -G "regex"`: when diffs touched lines matching a pattern.
|
|
104
|
+
- `git blame -L start,end -- file`: who last changed specific lines.
|
|
105
|
+
- `git log --follow -- file`: history across renames for one file.
|
|
106
|
+
- `git show <hash>`: inspect the commit that appears relevant.
|
|
107
|
+
- `git bisect`: find the first bad commit when there is a deterministic pass/fail
|
|
108
|
+
command and known good/bad bounds.
|
|
109
|
+
- `git reflog`: recover or explain recent local history movement.
|
|
110
|
+
|
|
111
|
+
Always cite the exact command evidence in the answer: commit hash, subject, file path,
|
|
112
|
+
and line or diff context when relevant. If the evidence is ambiguous, say what remains
|
|
113
|
+
unproven.
|
|
114
|
+
|
|
115
|
+
## Safety Checks
|
|
116
|
+
|
|
117
|
+
Before any write to Git history:
|
|
118
|
+
|
|
119
|
+
- Current branch is known.
|
|
120
|
+
- Dirty work is accounted for.
|
|
121
|
+
- Upstream/pushed status is known or explicitly unknown.
|
|
122
|
+
- The operation matches an explicit user request and authorization.
|
|
123
|
+
- Recovery path is known (`rebase --abort`, reflog hash, or untouched worktree).
|
|
124
|
+
|
|
125
|
+
Before finishing:
|
|
126
|
+
|
|
127
|
+
- Run the most relevant verification available for the changed behavior or history
|
|
128
|
+
operation (Manual QA evidence where a behavior changed).
|
|
129
|
+
- Report commands that passed and any command you could not run.
|
|
130
|
+
- Leave the worktree state explicit.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-deep
|
|
3
|
+
description: "Initialize a hierarchical AGENTS.md knowledge base for a repository — a root AGENTS.md plus complexity-scored subdirectory files. Use when the user wants to bootstrap or refresh project knowledge for Hermes, onboard a codebase, generate AGENTS.md guidance (reading any existing CLAUDE.md for context), or map an unfamiliar repo. Adapted for Hermes: discovery and parallel generation via delegate_task children + Hermes lsp tools."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Init-Deep — hierarchical AGENTS.md generator (Hermes)
|
|
7
|
+
|
|
8
|
+
Generate hierarchical `AGENTS.md` files: a root knowledge base plus complexity-scored subdirectory
|
|
9
|
+
files. This is the LitHermes onboarding/knowledge-base skill, re-authored for Hermes surfaces:
|
|
10
|
+
read-only `delegate_task` children for discovery, Hermes' `lsp` tools for the code map, and parallel
|
|
11
|
+
`delegate_task` fan-out for generation. (`AGENTS.md` is the file Hermes loads natively as project
|
|
12
|
+
context — see the `lithermes:rules` skill.)
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
init-deep # Update mode: modify existing AGENTS.md + create new where warranted
|
|
18
|
+
init-deep --create-new # Read existing → remove all → regenerate from scratch
|
|
19
|
+
init-deep --max-depth=2 # Limit directory depth (default: 3)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Workflow (high level)
|
|
23
|
+
|
|
24
|
+
1. **Discovery + analysis** (concurrent) — read-only `delegate_task` children + local bash structure +
|
|
25
|
+
`lsp` code map + read existing AGENTS.md.
|
|
26
|
+
2. **Score & decide** — determine AGENTS.md locations from merged findings.
|
|
27
|
+
3. **Generate** — root first, then subdirectories in parallel.
|
|
28
|
+
4. **Review** — deduplicate, trim, validate.
|
|
29
|
+
|
|
30
|
+
Track all four phases explicitly and report each one `pending → in_progress → completed` as you go
|
|
31
|
+
(Hermes has no TodoWrite tool; keep the running state in your reply or a working note).
|
|
32
|
+
|
|
33
|
+
## Phase 1 — Discovery + analysis (concurrent)
|
|
34
|
+
|
|
35
|
+
Mark "discovery" in_progress.
|
|
36
|
+
|
|
37
|
+
### Fan out read-only discovery children immediately
|
|
38
|
+
|
|
39
|
+
Dispatch the discovery lanes as read-only `delegate_task` children — pass a `tasks` array so they run
|
|
40
|
+
concurrently and the parent blocks until all return. Each child is self-contained (goal + scope +
|
|
41
|
+
"read-only, return findings only"). Suggested lanes (one child each):
|
|
42
|
+
|
|
43
|
+
- **Structure** — predict standard patterns for the detected language; report deviations only.
|
|
44
|
+
- **Entry points** — find main/entry files; report non-standard organization.
|
|
45
|
+
- **Conventions** — find config files (`.eslintrc`, `pyproject.toml`, `.editorconfig`, …); report
|
|
46
|
+
project-specific rules.
|
|
47
|
+
- **Anti-patterns** — find `DO NOT` / `NEVER` / `ALWAYS` / `DEPRECATED` markers; list forbidden patterns.
|
|
48
|
+
- **Build/CI** — find `.github/workflows`, `Makefile`, `Taskfile`; report non-standard patterns.
|
|
49
|
+
- **Tests** — find test configs and structure; report unique conventions.
|
|
50
|
+
|
|
51
|
+
**Dynamic scaling** — after the bash pass below, add MORE `delegate_task` children based on project
|
|
52
|
+
scale (never a static count):
|
|
53
|
+
|
|
54
|
+
| Factor | Threshold | Additional children |
|
|
55
|
+
|--------|-----------|---------------------|
|
|
56
|
+
| Total files | >100 | +1 per 100 files |
|
|
57
|
+
| Total lines | >10k | +1 per 10k lines |
|
|
58
|
+
| Directory depth | ≥4 | +2 for deep exploration |
|
|
59
|
+
| Large files (>500 lines) | >10 files | +1 for complexity hotspots |
|
|
60
|
+
| Monorepo | detected | +1 per package/workspace |
|
|
61
|
+
| Multiple languages | >1 | +1 per language |
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
total_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)
|
|
65
|
+
total_lines=$(find . -type f \( -name "*.ts" -o -name "*.py" -o -name "*.go" \) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')
|
|
66
|
+
large_files=$(find . -type f \( -name "*.ts" -o -name "*.py" \) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {c++} END {print c+0}')
|
|
67
|
+
max_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
For very broad repos, split the fan-out across several `delegate_task` batches rather than one giant
|
|
71
|
+
batch, but keep every child read-only.
|
|
72
|
+
|
|
73
|
+
### Main session: concurrent local analysis
|
|
74
|
+
|
|
75
|
+
While the discovery children run, the main session does:
|
|
76
|
+
|
|
77
|
+
**1. Bash structural analysis**
|
|
78
|
+
```bash
|
|
79
|
+
# Directory depth distribution
|
|
80
|
+
find . -type d -not -path '*/.*' -not -path '*/node_modules/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c
|
|
81
|
+
# Files per directory (top 30)
|
|
82
|
+
find . -type f -not -path '*/.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30
|
|
83
|
+
# Existing knowledge bases
|
|
84
|
+
find . -type f \( -name "AGENTS.md" -o -name "CLAUDE.md" \) -not -path '*/node_modules/*' 2>/dev/null
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**2. Read existing AGENTS.md** — for each file found, read it and extract key insights,
|
|
88
|
+
conventions, and anti-patterns into an EXISTING map. With `--create-new`, read ALL existing files
|
|
89
|
+
first (preserve context), THEN delete, THEN regenerate.
|
|
90
|
+
|
|
91
|
+
**3. LSP code map (if available)** — use Hermes' `lsp` tools: `lsp.status` to list configured servers,
|
|
92
|
+
then `lsp.symbols` for entry-point/workspace symbols (`class` / `interface` / `function`) and
|
|
93
|
+
`lsp.find_references` on the top exports to gauge centrality. If no server is configured, fall back to
|
|
94
|
+
the discovery children + plain search. (See the `lithermes:lsp` skill.)
|
|
95
|
+
|
|
96
|
+
Merge bash + LSP + existing + child findings. Mark "discovery" completed.
|
|
97
|
+
|
|
98
|
+
## Phase 2 — Scoring & location decision
|
|
99
|
+
|
|
100
|
+
Mark "scoring" in_progress.
|
|
101
|
+
|
|
102
|
+
### Scoring matrix
|
|
103
|
+
|
|
104
|
+
| Factor | Weight | High threshold | Source |
|
|
105
|
+
|--------|--------|----------------|--------|
|
|
106
|
+
| File count | 3× | >20 | bash |
|
|
107
|
+
| Subdir count | 2× | >5 | bash |
|
|
108
|
+
| Code ratio | 2× | >70% | bash |
|
|
109
|
+
| Unique patterns | 1× | has own config | child |
|
|
110
|
+
| Module boundary | 2× | has `index.ts`/`__init__.py` | bash |
|
|
111
|
+
| Symbol density | 2× | >30 symbols | LSP |
|
|
112
|
+
| Export count | 2× | >10 exports | LSP |
|
|
113
|
+
| Reference centrality | 3× | >20 refs | LSP |
|
|
114
|
+
|
|
115
|
+
### Decision rules
|
|
116
|
+
|
|
117
|
+
| Score | Action |
|
|
118
|
+
|-------|--------|
|
|
119
|
+
| Root (`.`) | ALWAYS create |
|
|
120
|
+
| >15 | Create AGENTS.md |
|
|
121
|
+
| 8–15 | Create if it is a distinct domain |
|
|
122
|
+
| <8 | Skip (parent covers it) |
|
|
123
|
+
|
|
124
|
+
Mark "scoring" completed.
|
|
125
|
+
|
|
126
|
+
## Phase 3 — Generate AGENTS.md
|
|
127
|
+
|
|
128
|
+
Mark "generate" in_progress.
|
|
129
|
+
|
|
130
|
+
**File-writing rule:** if `AGENTS.md` already exists at the target path, edit it in place; if not,
|
|
131
|
+
create it. NEVER overwrite an existing file — check existence first (via the discovery results or a
|
|
132
|
+
read).
|
|
133
|
+
|
|
134
|
+
### Root AGENTS.md (full treatment)
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
# PROJECT KNOWLEDGE BASE
|
|
138
|
+
**Generated:** {TIMESTAMP} **Commit:** {SHORT_SHA} **Branch:** {BRANCH}
|
|
139
|
+
|
|
140
|
+
## OVERVIEW
|
|
141
|
+
{1–2 sentences: what + core stack}
|
|
142
|
+
|
|
143
|
+
## STRUCTURE
|
|
144
|
+
{tree with non-obvious purposes only}
|
|
145
|
+
|
|
146
|
+
## WHERE TO LOOK
|
|
147
|
+
| Task | Location | Notes |
|
|
148
|
+
|
|
149
|
+
## CODE MAP
|
|
150
|
+
{from LSP — skip if unavailable or project <10 files}
|
|
151
|
+
|
|
152
|
+
## CONVENTIONS
|
|
153
|
+
{ONLY deviations from standard}
|
|
154
|
+
|
|
155
|
+
## ANTI-PATTERNS (THIS PROJECT)
|
|
156
|
+
{explicitly forbidden here}
|
|
157
|
+
|
|
158
|
+
## COMMANDS
|
|
159
|
+
{dev / test / build}
|
|
160
|
+
|
|
161
|
+
## NOTES
|
|
162
|
+
{gotchas}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Quality gate: 50–150 lines, no generic advice, no obvious info.
|
|
166
|
+
|
|
167
|
+
### Subdirectory AGENTS.md (parallel)
|
|
168
|
+
|
|
169
|
+
Generate each non-root location in parallel — dispatch one writing `delegate_task` child per location
|
|
170
|
+
(batch them in one `delegate_task` call). Each child gets a `TASK:` line plus `DELIVERABLE` (the
|
|
171
|
+
AGENTS.md), `SCOPE` (this directory only), and `VERIFY` (30–80 lines, never repeats parent content;
|
|
172
|
+
sections: OVERVIEW 1 line, STRUCTURE if >5 subdirs, WHERE TO LOOK, CONVENTIONS if different,
|
|
173
|
+
ANTI-PATTERNS). Wait for all. Mark "generate" completed.
|
|
174
|
+
|
|
175
|
+
## Phase 4 — Review & deduplicate
|
|
176
|
+
|
|
177
|
+
Mark "review" in_progress. For each generated file: remove generic advice, remove parent duplicates,
|
|
178
|
+
trim to the size limits, verify telegraphic style. Mark "review" completed.
|
|
179
|
+
|
|
180
|
+
## Final report
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
=== init-deep complete ===
|
|
184
|
+
Mode: {update | create-new}
|
|
185
|
+
Files: [OK] ./AGENTS.md (root, {N} lines) · [OK] ./src/hooks/AGENTS.md ({N} lines)
|
|
186
|
+
Dirs analyzed: {N} · Created: {N} · Updated: {N}
|
|
187
|
+
Hierarchy: ./AGENTS.md └── src/hooks/AGENTS.md
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Anti-patterns
|
|
191
|
+
|
|
192
|
+
- **Static child count** — vary discovery `delegate_task` children by project size/depth (see the scaling table).
|
|
193
|
+
- **Sequential execution** — run discovery children + LSP concurrently; generate subdirectories in parallel.
|
|
194
|
+
- **Ignoring existing** — ALWAYS read existing AGENTS.md first, even with `--create-new`.
|
|
195
|
+
- **Over-documenting** — not every directory needs an AGENTS.md.
|
|
196
|
+
- **Redundancy** — a child file never repeats its parent.
|
|
197
|
+
- **Generic content** — remove anything that applies to all projects.
|
|
198
|
+
- **Verbose style** — telegraphic or die.
|
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rules
|
|
3
|
-
description: Use when the user asks about LitHermes repo-rule loading, injected project
|
|
3
|
+
description: Use when the user asks about LitHermes/Hermes repo-rule loading, injected project context files, supported file locations, discovery order, or how repository instructions reach the model.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Repo Rules
|
|
7
7
|
|
|
8
|
-
Repo
|
|
9
|
-
|
|
8
|
+
Repo-rule loading in a LitHermes workspace is provided by **Hermes' native
|
|
9
|
+
context-files feature**, not by a LitHermes plugin engine. Hermes discovers and
|
|
10
|
+
injects your repository instruction files automatically; the LitHermes plugin
|
|
11
|
+
does not register its own rules hook (it registers only `pre_llm_call` and
|
|
12
|
+
`subagent_stop`) and does not re-implement rule loading. This skill documents how
|
|
13
|
+
the native behavior works so you can rely on it and apply matched guidance.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
- file-specific rules are surfaced as guidance the model self-applies whenever it
|
|
13
|
-
edits a matching file (there is no per-edit plugin hook in Hermes; the matching
|
|
14
|
-
rule text is treated as a standing instruction the model checks before/after edits)
|
|
15
|
+
## What Hermes loads
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
At session start Hermes loads the project context file from your working
|
|
18
|
+
directory into the system prompt. As the agent reads files in subdirectories
|
|
19
|
+
during the session, it **progressively discovers** context files there and
|
|
20
|
+
injects them when they become relevant — so subdirectory guidance appears only
|
|
21
|
+
when needed and the system prompt stays cache-stable.
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
Only **one** project context type is loaded per session (first match wins):
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `.cursor/rules/**/*.md`
|
|
27
|
-
- `.github/instructions/**/*.md`
|
|
28
|
-
- `.github/copilot-instructions.md`
|
|
25
|
+
1. `.hermes.md` / `HERMES.md` — project instructions (highest priority)
|
|
26
|
+
2. `AGENTS.md` — primary project conventions / architecture
|
|
27
|
+
3. `CLAUDE.md` — Claude Code context files (also detected)
|
|
28
|
+
4. `.cursorrules` — Cursor IDE conventions
|
|
29
|
+
5. `.cursor/rules/*.mdc` — Cursor IDE rule modules
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
`SOUL.md` is loaded independently as the agent identity and is global to the
|
|
32
|
+
Hermes instance (read from `HERMES_HOME/SOUL.md` only), not per-project.
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
- `HERMES_RULES_MAX_RULE_CHARS=<number>`
|
|
35
|
-
- `HERMES_RULES_MAX_RESULT_CHARS=<number>`
|
|
36
|
-
- `HERMES_RULES_ENABLED_SOURCES=AGENTS.md,.hermes/rules`
|
|
34
|
+
Discovered context files go through Hermes' security scan, so malicious or
|
|
35
|
+
prompt-injecting files are blocked before they reach the model.
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
## How LitHermes uses it
|
|
38
|
+
|
|
39
|
+
- There is no per-edit plugin hook in Hermes' LitHermes plugin, so file-specific
|
|
40
|
+
guidance you read from a discovered `AGENTS.md`/`CLAUDE.md` is a **standing
|
|
41
|
+
instruction you self-apply** before and after edits to matching files.
|
|
42
|
+
- Repo rules only add context; they never rewrite tool output.
|
|
43
|
+
|
|
44
|
+
For the authoritative, version-specific details (priority, subdirectory
|
|
45
|
+
discovery, and the security scan) see the Hermes "Context Files" documentation.
|