lithermes-ai 0.5.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/LICENSE +21 -0
- package/README.md +245 -0
- package/README_Ko-KR.md +245 -0
- package/assets/lithermes-plugin/NOTICE.md +37 -0
- package/assets/lithermes-plugin/README.md +40 -0
- package/assets/lithermes-plugin/__init__.py +179 -0
- package/assets/lithermes-plugin/core.py +853 -0
- package/assets/lithermes-plugin/litgoal/__init__.py +10 -0
- package/assets/lithermes-plugin/litgoal/cli.py +133 -0
- package/assets/lithermes-plugin/litgoal/hook.py +48 -0
- package/assets/lithermes-plugin/litgoal/model.py +171 -0
- package/assets/lithermes-plugin/litgoal/runtime.py +273 -0
- package/assets/lithermes-plugin/litgoal/store.py +93 -0
- package/assets/lithermes-plugin/litgoal/tools.py +228 -0
- package/assets/lithermes-plugin/payload-version.json +471 -0
- package/assets/lithermes-plugin/plugin.yaml +9 -0
- package/assets/lithermes-plugin/skills/ai-slop-remover/SKILL.md +142 -0
- package/assets/lithermes-plugin/skills/comment-checker/SKILL.md +50 -0
- package/assets/lithermes-plugin/skills/debugging/SKILL.md +116 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/00-setup.md +108 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/02-investigate.md +121 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/04-oracle-triple.md +136 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/06-fix.md +116 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/08-qa.md +94 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/assets/lithermes-plugin/skills/debugging/references/methodology/partial-runtime-evidence.md +229 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/go.md +252 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/node.md +260 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/python.md +248 -0
- package/assets/lithermes-plugin/skills/debugging/references/runtimes/rust.md +234 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/ghidra.md +212 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/playwright-cli.md +194 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/pwndbg.md +263 -0
- package/assets/lithermes-plugin/skills/debugging/references/tools/pwntools.md +265 -0
- package/assets/lithermes-plugin/skills/frontend-ui-ux/SKILL.md +77 -0
- package/assets/lithermes-plugin/skills/lit-plan/SKILL.md +374 -0
- package/assets/lithermes-plugin/skills/litgoal/.gitkeep +0 -0
- package/assets/lithermes-plugin/skills/litgoal/SKILL.md +207 -0
- package/assets/lithermes-plugin/skills/litwork/SKILL.md +262 -0
- package/assets/lithermes-plugin/skills/lsp/SKILL.md +53 -0
- package/assets/lithermes-plugin/skills/programming/SKILL.md +463 -0
- package/assets/lithermes-plugin/skills/programming/references/go/README.md +90 -0
- package/assets/lithermes-plugin/skills/programming/references/go/backend-stack.md +641 -0
- package/assets/lithermes-plugin/skills/programming/references/go/bootstrap.md +328 -0
- package/assets/lithermes-plugin/skills/programming/references/go/bubbletea-v2.md +360 -0
- package/assets/lithermes-plugin/skills/programming/references/go/cobra-stack.md +468 -0
- package/assets/lithermes-plugin/skills/programming/references/go/concurrency.md +362 -0
- package/assets/lithermes-plugin/skills/programming/references/go/data-modeling.md +329 -0
- package/assets/lithermes-plugin/skills/programming/references/go/error-handling.md +359 -0
- package/assets/lithermes-plugin/skills/programming/references/go/golangci-strict.md +236 -0
- package/assets/lithermes-plugin/skills/programming/references/go/grpc-connect.md +375 -0
- package/assets/lithermes-plugin/skills/programming/references/go/libraries.md +337 -0
- package/assets/lithermes-plugin/skills/programming/references/go/one-liners.md +202 -0
- package/assets/lithermes-plugin/skills/programming/references/go/sqlc-pgx.md +471 -0
- package/assets/lithermes-plugin/skills/programming/references/go/testing.md +467 -0
- package/assets/lithermes-plugin/skills/programming/references/go/type-patterns.md +298 -0
- package/assets/lithermes-plugin/skills/programming/references/python/README.md +314 -0
- package/assets/lithermes-plugin/skills/programming/references/python/async-anyio.md +442 -0
- package/assets/lithermes-plugin/skills/programming/references/python/data-modeling.md +233 -0
- package/assets/lithermes-plugin/skills/programming/references/python/data-processing.md +133 -0
- package/assets/lithermes-plugin/skills/programming/references/python/error-handling.md +218 -0
- package/assets/lithermes-plugin/skills/programming/references/python/fastapi-stack.md +316 -0
- package/assets/lithermes-plugin/skills/programming/references/python/httpx2-optimization.md +360 -0
- package/assets/lithermes-plugin/skills/programming/references/python/libraries.md +307 -0
- package/assets/lithermes-plugin/skills/programming/references/python/one-liners.md +268 -0
- package/assets/lithermes-plugin/skills/programming/references/python/orjson-stack.md +378 -0
- package/assets/lithermes-plugin/skills/programming/references/python/pydantic-ai.md +285 -0
- package/assets/lithermes-plugin/skills/programming/references/python/pyproject-strict.md +232 -0
- package/assets/lithermes-plugin/skills/programming/references/python/textual-tui.md +201 -0
- package/assets/lithermes-plugin/skills/programming/references/python/type-patterns.md +176 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/README.md +317 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/async-tokio.md +299 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/axum-stack.md +467 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/cargo-strict.md +317 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/clap-stack.md +409 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/concurrency.md +375 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/libraries.md +439 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/one-liners.md +291 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/proptest-insta.md +429 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/type-state.md +354 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/unsafe-discipline.md +250 -0
- package/assets/lithermes-plugin/skills/programming/references/rust/zero-cost-safety.md +527 -0
- package/assets/lithermes-plugin/skills/programming/references/rust-ub/README.md +289 -0
- package/assets/lithermes-plugin/skills/programming/references/rust-ub/miri-sanitizers-loom.md +411 -0
- package/assets/lithermes-plugin/skills/programming/references/rust-ub/ub-taxonomy.md +269 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/README.md +195 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/backend-hono.md +672 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/bootstrap.md +199 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/data-modeling.md +202 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/error-handling.md +169 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/tsconfig-strict.md +152 -0
- package/assets/lithermes-plugin/skills/programming/references/typescript/type-patterns.md +196 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/check-no-excuse-rules.sh +173 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/new-project.py +138 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/.editorconfig +13 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/.golangci.yml +95 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/AGENTS.md.tmpl +24 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/README.md.tmpl +12 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/Taskfile.yml +40 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/ci.yml +37 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/config.go +24 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/gitignore +15 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/main.go.tmpl +22 -0
- package/assets/lithermes-plugin/skills/programming/scripts/go/templates/run.go +15 -0
- package/assets/lithermes-plugin/skills/programming/scripts/python/check-no-excuse-rules.py +687 -0
- package/assets/lithermes-plugin/skills/programming/scripts/python/new-project.py +172 -0
- package/assets/lithermes-plugin/skills/programming/scripts/python/new-script.py +116 -0
- package/assets/lithermes-plugin/skills/programming/scripts/rust/check-no-excuse-rules.py +296 -0
- package/assets/lithermes-plugin/skills/programming/scripts/rust/check-no-excuse-rules.sh +158 -0
- package/assets/lithermes-plugin/skills/programming/scripts/rust/new-project.py +175 -0
- package/assets/lithermes-plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +282 -0
- package/assets/lithermes-plugin/skills/programming/scripts/typescript/new-project.ts +177 -0
- package/assets/lithermes-plugin/skills/refactor/SKILL.md +770 -0
- package/assets/lithermes-plugin/skills/remove-ai-slops/SKILL.md +335 -0
- package/assets/lithermes-plugin/skills/review-work/SKILL.md +562 -0
- package/assets/lithermes-plugin/skills/rules/SKILL.md +41 -0
- package/assets/lithermes-plugin/skills/start-work/SKILL.md +332 -0
- package/bin/lithermes.js +8 -0
- package/cover.png +0 -0
- package/package.json +39 -0
- package/src/cli.js +129 -0
- package/src/lib/check.js +94 -0
- package/src/lib/config.js +170 -0
- package/src/lib/files.js +65 -0
- package/src/lib/hermesDiscovery.js +50 -0
- package/src/lib/hud.js +121 -0
- package/src/lib/install.js +159 -0
- package/src/lib/patch.js +153 -0
- package/src/lib/skins.js +113 -0
- package/src/lib/spinner.js +104 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lit-plan
|
|
3
|
+
description: Hermes-native planning consultant for /lit-plan — explore-first grounding, interview, approval gate, then a gap-analysis + plan-review pass.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LitHermes Planning Consultant
|
|
7
|
+
|
|
8
|
+
> **Hermes-native overrides (authoritative — read first).** The only
|
|
9
|
+
> subagent primitive available is the model-facing `delegate_task(tasks:[{goal,
|
|
10
|
+
> context, toolsets?, role?}])` tool — children run in parallel, parent blocks
|
|
11
|
+
> for all. There is **no** `spawn_agent`, no named-agent registry, no
|
|
12
|
+
> per-child model selection, and no `agents/*.toml`. Hermes has **no**
|
|
13
|
+
> model-facing goal tools natively; LitHermes adds durable tools
|
|
14
|
+
> `goal_set` / `goal_add_criterion` / `goal_evidence` / `goal_criterion_status`
|
|
15
|
+
> / `goal_steer` / `goal_checkpoint` / `goal_complete` and binds the native
|
|
16
|
+
> standing `/goal` via the session goal manager. Plan state lives under
|
|
17
|
+
> `.hermes/lithermes/`. The `/lit-plan` command stamps a plan markdown to
|
|
18
|
+
> `plans/<slug>.md` — this skill injects the consultant discipline that turns
|
|
19
|
+
> that template into a genuinely reasoned artifact.
|
|
20
|
+
|
|
21
|
+
This skill governs how Hermes behaves when `/lit-plan` is invoked. The plan is
|
|
22
|
+
the **durable artifact** that the subsequent goal loop executes — treat producing
|
|
23
|
+
it with the same rigour you would bring to execution.
|
|
24
|
+
|
|
25
|
+
LitHermes intentionally fuses planning with execution: `/lit-plan` bootstraps
|
|
26
|
+
the goal and hands off to the execution loop. Do NOT impose a hard
|
|
27
|
+
"planner never implements" rule here. The skill's job is to ensure that what
|
|
28
|
+
gets handed off is grounded, complete, and approved.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Phase 0 — Classify the Request
|
|
33
|
+
|
|
34
|
+
Before doing anything else, classify the incoming brief into one of three tiers.
|
|
35
|
+
This determines how much exploration, interviewing, and review you invest.
|
|
36
|
+
|
|
37
|
+
| Tier | Signal | Exploration depth | Interview rounds | Review pass |
|
|
38
|
+
|------|--------|-------------------|------------------|-------------|
|
|
39
|
+
| **Trivial** | Single file, no new API surface, no cross-cutting concern | Read 2-4 files, no fan-out | 0-1 quick clarifications | Gap-analysis only (skip plan-review) |
|
|
40
|
+
| **Standard** | Multi-file change, touches existing API, moderate scope | Parallel fan-out across patterns + test infra | 1-2 rounds | Both gap-analysis and plan-review |
|
|
41
|
+
| **Architecture** | New subsystem, DB schema, public API, third-party integration, migration | Full repo survey + external doc fetch | Up to 3 rounds | Both passes; plan-review in strict mode |
|
|
42
|
+
|
|
43
|
+
**Default: Standard.** Escalate to Architecture when any one of these is true:
|
|
44
|
+
the change touches 5+ modules, introduces a new persistence layer, crosses a
|
|
45
|
+
service boundary, or the brief uses words like "migrate", "replace", "redesign",
|
|
46
|
+
or "integration".
|
|
47
|
+
|
|
48
|
+
Emit the classification as the first line of your planning turn:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
[CLASSIFY] Tier: Standard — multi-file change across auth and session modules.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Phase 1 — Explore-First Grounding
|
|
57
|
+
|
|
58
|
+
**Rule: discoverable facts → explore first. Genuine preferences and tradeoffs →
|
|
59
|
+
ask the user.** Never open an interview before you have done the reading.
|
|
60
|
+
|
|
61
|
+
### 1a. What to discover
|
|
62
|
+
|
|
63
|
+
Fan out read-only `delegate_task` children (one batch call, children run in
|
|
64
|
+
parallel) to gather:
|
|
65
|
+
|
|
66
|
+
- **Repository patterns**: entry points, module boundaries, naming conventions,
|
|
67
|
+
existing abstractions the new work must align with.
|
|
68
|
+
- **Test infrastructure**: test runner, test helpers, fixture patterns, how
|
|
69
|
+
integration tests hit the real surface (the channel scenarios you will need).
|
|
70
|
+
- **Existing implementations**: any prior attempt at this feature or a closely
|
|
71
|
+
related one. Naming collisions. Dead code that may interfere.
|
|
72
|
+
- **Dependency landscape**: which packages are already present and at which
|
|
73
|
+
version, so you don't recommend adding what is already there.
|
|
74
|
+
- **External facts** (Architecture tier only): official docs for any
|
|
75
|
+
dependency, API, or protocol the plan references — fetch and cite SHA-pinned
|
|
76
|
+
permalinks; never mutate the worktree from a research child.
|
|
77
|
+
|
|
78
|
+
Each read-only child's goal/context should be inlined directly — no named agent
|
|
79
|
+
type, no foreign registry. Example batch:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
delegate_task(tasks: [
|
|
83
|
+
{
|
|
84
|
+
goal: "Find the test runner config and locate two representative integration tests that exercise the session layer. Return file paths and a 2-sentence pattern summary.",
|
|
85
|
+
context: "Workspace: <path>. Read-only; do not write files."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
goal: "Locate all existing middleware registration points. Return file:line refs and the registration pattern (decorator vs. config dict vs. imperative).",
|
|
89
|
+
context: "Workspace: <path>. Read-only; do not write files."
|
|
90
|
+
}
|
|
91
|
+
])
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 1b. While children run
|
|
95
|
+
|
|
96
|
+
Use your own direct read-only tools concurrently: skim the repo root, `package.json` / `pyproject.toml` / `go.mod`, `README`, any `ARCHITECTURE` doc, and the most recent 5 git log lines. These are fast and cheap; do them yourself rather than burning a child slot.
|
|
97
|
+
|
|
98
|
+
### 1c. Harvest
|
|
99
|
+
|
|
100
|
+
Collect child results. Consolidate into a single internal **Grounding Summary**:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
## Grounding Summary (internal, not shown to user yet)
|
|
104
|
+
- Test runner: <x> integration test pattern: <file:line>
|
|
105
|
+
- Middleware registration: <pattern> canonical example: <file:line>
|
|
106
|
+
- Prior attempt: <file> — status: <incomplete / removed / active>
|
|
107
|
+
- External API: <name> docs: <url-or-"not fetched — Trivial tier">
|
|
108
|
+
- Open ambiguities that exploration cannot resolve: <list>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Exploration stops when you have enough to write a first-draft plan OR after two
|
|
112
|
+
waves yield no new material — whichever comes first.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Phase 2 — Interview Only the Genuine Unknowns
|
|
117
|
+
|
|
118
|
+
Interview questions are for **genuine preferences, tradeoffs, and
|
|
119
|
+
constraints** that exploration cannot settle. They are not for facts you could
|
|
120
|
+
read from the repo.
|
|
121
|
+
|
|
122
|
+
**Format each question with a recommended default:**
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Q1. Should the new endpoint be versioned under /v2/ or extend the existing /v1/ router?
|
|
126
|
+
Recommended default: extend /v1/ — no breaking change needed based on the grep results.
|
|
127
|
+
|
|
128
|
+
Q2. Is eventual consistency acceptable for the cache invalidation step, or must it be synchronous?
|
|
129
|
+
Recommended default: synchronous — the existing pattern in cache.ts:42 uses sync invalidation.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
For Trivial tier: skip interview entirely unless there is exactly one question
|
|
133
|
+
that blocks the plan. For Standard: 1-3 questions maximum. For Architecture:
|
|
134
|
+
up to 5 questions; never more.
|
|
135
|
+
|
|
136
|
+
**Wait for the user's reply before proceeding.** Do not draft a plan in parallel
|
|
137
|
+
with an outstanding question.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Phase 3 — Approval Gate (Non-Negotiable)
|
|
142
|
+
|
|
143
|
+
Before generating or finalising the plan, present all three of the following and
|
|
144
|
+
**explicitly ask for the user's go-ahead**:
|
|
145
|
+
|
|
146
|
+
### A. Grounding facts surfaced
|
|
147
|
+
|
|
148
|
+
A bulleted list of the non-obvious things exploration found — file paths,
|
|
149
|
+
patterns, prior implementations, dependency versions. Keep it tight; omit
|
|
150
|
+
obvious things the user already knows.
|
|
151
|
+
|
|
152
|
+
### B. Remaining ambiguities with recommended defaults
|
|
153
|
+
|
|
154
|
+
Any question that the user did not fully resolve in Phase 2, restated with the
|
|
155
|
+
default you will apply if they just say "yes, proceed". If no ambiguities
|
|
156
|
+
remain, say so explicitly.
|
|
157
|
+
|
|
158
|
+
### C. Intended approach
|
|
159
|
+
|
|
160
|
+
A plain-English paragraph (3-6 sentences) describing what the plan will prescribe:
|
|
161
|
+
which modules change, which new files are created, what the test strategy is,
|
|
162
|
+
and what the manual-QA channel scenarios will look like. No markdown structure
|
|
163
|
+
yet — this is the pitch, not the plan.
|
|
164
|
+
|
|
165
|
+
Then close with a literal gate line:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
Ready to generate the plan. Please confirm (or steer) before I finalise.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Narrow exception**: if this planning turn was triggered by a `/lit-plan
|
|
172
|
+
--bootstrap` flag or an equivalent start-work invocation that is meant to get
|
|
173
|
+
execution started immediately, you may proceed to Phase 4 without waiting — but
|
|
174
|
+
only when the brief is unambiguous, Trivial tier, and exploration found no
|
|
175
|
+
conflicts. Log the skip as `[APPROVAL_GATE_SKIPPED: bootstrap flag + Trivial + no conflicts]`.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Phase 4 — Generate the Plan
|
|
180
|
+
|
|
181
|
+
Use the template that `/lit-plan` stamped. Fill every section with real
|
|
182
|
+
content; never leave placeholder text in the final output. The machine-parseable
|
|
183
|
+
shape of the Success Criteria block is fixed — preserve it exactly:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
- [ ] C001 | channel: tmux | test: <path::test_id> | scenario: <user-visible outcome>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### TL;DR
|
|
190
|
+
|
|
191
|
+
One sentence summary. Bullet deliverables. Effort and Risk ratings with a
|
|
192
|
+
one-line driver for risk.
|
|
193
|
+
|
|
194
|
+
### Success Criteria
|
|
195
|
+
|
|
196
|
+
Declare at minimum 3 criteria — more is fine. Every criterion must be:
|
|
197
|
+
|
|
198
|
+
- **Paired with an automated test** written before the implementation (file
|
|
199
|
+
path + test id, not a description). This is the floor.
|
|
200
|
+
- **Paired with a manual-QA channel scenario** (the ceiling). Name the channel
|
|
201
|
+
(tmux / http / browser / computer) and state what will be run and what
|
|
202
|
+
the expected observable outcome is. "Tests pass" alone is never a criterion.
|
|
203
|
+
- **Concrete enough to fail**: a scenario that cannot be falsified is not a
|
|
204
|
+
criterion.
|
|
205
|
+
|
|
206
|
+
Cover the happy path, at least one edge/boundary case, and at least one
|
|
207
|
+
adjacent-surface regression check that names the specific file and function at
|
|
208
|
+
risk.
|
|
209
|
+
|
|
210
|
+
### Scope
|
|
211
|
+
|
|
212
|
+
Must-have items are the deliverables. Must-NOT-have items are the guardrails:
|
|
213
|
+
explicit exclusions that prevent scope creep, over-engineering, or accidental
|
|
214
|
+
introduction of unrelated changes.
|
|
215
|
+
|
|
216
|
+
### Verification Strategy
|
|
217
|
+
|
|
218
|
+
Name the test framework. State TDD or tests-after (default: TDD). State where
|
|
219
|
+
evidence artifacts land (`.hermes/lithermes/runs/<run>/evidence/`).
|
|
220
|
+
|
|
221
|
+
### Execution Waves
|
|
222
|
+
|
|
223
|
+
Target 5-8 todos per wave. Fewer than 3 per wave means you are under-splitting.
|
|
224
|
+
50+ total todos across all waves is fine. Each todo encompasses **both**
|
|
225
|
+
implementation and its test — never split them into separate todos.
|
|
226
|
+
|
|
227
|
+
**Dependency matrix**: every todo that depends on another must name its
|
|
228
|
+
dependency explicitly. Anything without a dependency goes in Wave 1 and runs in
|
|
229
|
+
parallel.
|
|
230
|
+
|
|
231
|
+
### Per-Todo Contract
|
|
232
|
+
|
|
233
|
+
Every single todo must carry all four of:
|
|
234
|
+
|
|
235
|
+
1. **References**: `file:line` — the exact pattern or contract this todo must
|
|
236
|
+
follow. Not a description; a pointer.
|
|
237
|
+
2. **Acceptance**: a verifiable command or assertion — something you can run to
|
|
238
|
+
determine pass/fail unambiguously.
|
|
239
|
+
3. **QA scenario**: `tool=<tmux|curl|playwright|...> steps=<...>
|
|
240
|
+
expected=<binary pass/fail> evidence=<path>`. Every user-facing behavior
|
|
241
|
+
must name a channel; data-only or CLI-only behaviors may name `cli`.
|
|
242
|
+
4. **Commit**: a Conventional Commit message in the form
|
|
243
|
+
`<type>(<scope>): <imperative>`.
|
|
244
|
+
|
|
245
|
+
### Final Verification Wave
|
|
246
|
+
|
|
247
|
+
Always four fixed items, always last, always all four:
|
|
248
|
+
|
|
249
|
+
- **F1** — Plan compliance audit: every task and acceptance criterion met.
|
|
250
|
+
- **F2** — Code quality / diagnostics clean, idioms match, no dead code.
|
|
251
|
+
- **F3** — Real manual QA: every criterion's channel scenario run fresh, with
|
|
252
|
+
evidence captured and a cleanup receipt recorded.
|
|
253
|
+
- **F4** — Scope fidelity: nothing extra, nothing Must-NOT-have introduced.
|
|
254
|
+
|
|
255
|
+
### Commit Strategy
|
|
256
|
+
|
|
257
|
+
Atomic Conventional Commits. Each commit builds and tests green on its own.
|
|
258
|
+
Final commit footer: `Plan: plans/<slug>.md`.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Phase 5 — Pre-Finalize Review
|
|
263
|
+
|
|
264
|
+
Before declaring the plan ready, run two read-only passes. Both are
|
|
265
|
+
`delegate_task` children with their mandates inlined.
|
|
266
|
+
|
|
267
|
+
### Pass A — Pre-Plan Gap Analysis
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
delegate_task(tasks: [{
|
|
271
|
+
goal: "Pre-plan gap-analysis. Read the plan draft below and return a verdict of CLEAR or GAPS-FOUND. Find: (1) internal contradictions between sections, (2) ambiguous or missing constraints that would block execution, (3) execution risks not acknowledged in the risk rating, (4) topology gaps — todos that cannot start because a dependency is missing or circular. For each gap found, cite the plan section and propose a minimal fix. Do not propose new features. Return verdict on its own line as the last line.",
|
|
272
|
+
context: "<paste plan markdown here>"
|
|
273
|
+
}])
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**If verdict is GAPS-FOUND**: fold the fixes in silently (do not re-open the
|
|
277
|
+
approval gate for minor fixes) unless a fix changes the intended approach
|
|
278
|
+
substantially — in that case, surface the delta to the user first.
|
|
279
|
+
|
|
280
|
+
### Pass B — Plan Review
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
delegate_task(tasks: [{
|
|
284
|
+
goal: "Plan review. Read the plan draft below and return a verdict of OKAY, ITERATE, or REJECT. Check: (1) every referenced file or path exists and contains the claimed content — if you cannot verify without a read tool, say so explicitly rather than assuming; (2) every todo is startable — it has a clear trigger, no hidden pre-conditions, and its acceptance criterion is verifiable by a command; (3) every QA scenario is concrete — it names a real tool, real steps, and a binary expected outcome. Approval-biased: when in doubt, approve. ITERATE allows ≤3 fixable issues and ≤2 auto rounds of revision before escalating. REJECT only when a decision is needed from the user.",
|
|
285
|
+
context: "<paste plan markdown here>"
|
|
286
|
+
}])
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Verdict handling**:
|
|
290
|
+
|
|
291
|
+
| Verdict | Action |
|
|
292
|
+
|---------|--------|
|
|
293
|
+
| OKAY | Proceed. Surface the final plan path. |
|
|
294
|
+
| ITERATE | Apply the ≤3 fixes inline, re-run Pass B (up to 2 auto rounds). If still ITERATE after round 2, surface the remaining issues to the user. |
|
|
295
|
+
| REJECT | Surface the issues to the user and wait for a decision before re-drafting. |
|
|
296
|
+
|
|
297
|
+
Both passes run in the same `delegate_task` call (parallel) when the plan is
|
|
298
|
+
Standard or Architecture tier. For Trivial tier: run Pass A only; skip Pass B.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Output — Surfacing the Final Plan
|
|
303
|
+
|
|
304
|
+
Once both passes clear, output:
|
|
305
|
+
|
|
306
|
+
1. A one-line summary of what exploration found that materially shaped the plan
|
|
307
|
+
(so the user knows it was grounded, not guessed).
|
|
308
|
+
2. The path to the written plan: `plans/<slug>.md`.
|
|
309
|
+
3. The open success criteria count and the first wave of todos (so the user can
|
|
310
|
+
spot-check scope at a glance).
|
|
311
|
+
4. The handoff line — this bridges to the execution loop:
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
Plan is ready. Use /lit-loop "<brief>" or /start-work <slug> to begin execution.
|
|
315
|
+
The plan path will appear in each execution commit footer: Plan: plans/<slug>.md
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Do **not** reproduce the full plan in the chat output — it is already written to
|
|
319
|
+
disk. If the user wants to read it, they can open `plans/<slug>.md`.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Delegation Rules
|
|
324
|
+
|
|
325
|
+
- Fan out read-only exploration as a single `delegate_task` batch (one call,
|
|
326
|
+
multiple children in the `tasks` array). Never batch a write-capable child
|
|
327
|
+
with a read-only child.
|
|
328
|
+
- Gap-analysis and plan-review are both read-only; they may run in the same
|
|
329
|
+
batch.
|
|
330
|
+
- Never serialize children that are independent. Never parallelize children that
|
|
331
|
+
share a write target or consume each other's output.
|
|
332
|
+
- Inline every child's mandate — do not reference an external prompt file or a
|
|
333
|
+
named role from a registry.
|
|
334
|
+
- After a `delegate_task` returns, re-read its output rather than trusting its
|
|
335
|
+
self-report; verify file paths cited by children actually exist before
|
|
336
|
+
including them in the plan.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Constraints
|
|
341
|
+
|
|
342
|
+
- Do not generate the plan before the approval gate clears (Phase 3).
|
|
343
|
+
- Do not ask interview questions about facts that exploration could have
|
|
344
|
+
discovered — if you find yourself asking "which test framework do you use?"
|
|
345
|
+
after Phase 1, you skipped a read.
|
|
346
|
+
- Do not introduce new abstractions, new dependencies, or new architectural
|
|
347
|
+
patterns unless the brief explicitly requires them.
|
|
348
|
+
- Every QA scenario in the plan must use one of the four Manual-QA channels
|
|
349
|
+
(tmux / http / browser / computer). `--dry-run`, "should respond", and
|
|
350
|
+
"looks correct" are not channels.
|
|
351
|
+
- The Success Criteria machine-parseable shape is fixed. Do not alter the
|
|
352
|
+
`C0NN | channel: | test: | scenario:` format.
|
|
353
|
+
- Plan files live under `plans/<slug>.md`. Do not write to any other path.
|
|
354
|
+
- Exploration children are read-only. They must not write to the worktree, run
|
|
355
|
+
tests, or mutate any state.
|
|
356
|
+
- Do not add a "planner never executes" hard rule. The plan is the artifact
|
|
357
|
+
that the execution loop picks up; they are two phases of the same workflow,
|
|
358
|
+
not separate domains.
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Stop Rules
|
|
363
|
+
|
|
364
|
+
- **Normal stop**: plan is on disk, both review passes are OKAY or CLEAR, plan
|
|
365
|
+
path has been surfaced to the user.
|
|
366
|
+
- **User steers mid-phase**: update the grounding summary, re-run only the
|
|
367
|
+
affected phases (e.g., if the user changes the scope during Phase 3,
|
|
368
|
+
re-generate the relevant sections and re-run Phase 5).
|
|
369
|
+
- **REJECT verdict from plan-review after user input**: re-draft the affected
|
|
370
|
+
sections and re-run Phase 5 from scratch.
|
|
371
|
+
- **Two exploration waves yield nothing new**: stop exploring and proceed with
|
|
372
|
+
what you have; surface the gap to the user in Phase 3.
|
|
373
|
+
- **Approval gate blocked for more than one exchange**: surface the exact
|
|
374
|
+
ambiguity that is blocking progress and propose a default; do not spin.
|
|
File without changes
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: litgoal
|
|
3
|
+
description: Durable repo-native goal runtime with embedded success criteria, evidence ledger, checkpoints, steering, and an evidence-gated completion contract.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## LitHermes durable runtime (authoritative — overrides any legacy examples below)
|
|
7
|
+
|
|
8
|
+
LitHermes ships litgoal as a **real durable runtime**, not prose. State persists under
|
|
9
|
+
`<workspace>/.hermes/lithermes/litgoal/`:
|
|
10
|
+
|
|
11
|
+
- `goals.json` — goals, each with `criteria` (id, scenario, qa_channel, test_ref, status,
|
|
12
|
+
evidence[]), `checkpoints`, `steering`, and `review_blockers`.
|
|
13
|
+
- `ledger.jsonl` — append-only audit trail (`goal_created`, `criterion_added`,
|
|
14
|
+
`evidence_added`, `criterion_status`, `checkpoint`, `steer`, `review_blocker`,
|
|
15
|
+
`goal_completed`).
|
|
16
|
+
- `evidence/` — captured artifacts.
|
|
17
|
+
|
|
18
|
+
Drive it through the **model-facing goal tools** (preferred) or the CLI. This skill was ported
|
|
19
|
+
from an upstream workflow plugin; any legacy upstream command names or `.<vendor>/litgoal/…`
|
|
20
|
+
state paths that survive in the prose below do NOT exist in Hermes — translate every one to the
|
|
21
|
+
following native surface:
|
|
22
|
+
|
|
23
|
+
| Capability | LitHermes tool | LitHermes CLI |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| create goals from a brief | `goal_set {objective, criteria[]}` | `hermes lithermes goal set --objective "…" --criterion "scenario\|channel\|test_ref"` |
|
|
26
|
+
| add one criterion | `goal_add_criterion {scenario, qa_channel, test_ref}` | `hermes lithermes goal criterion --scenario "…" --qa-channel tmux --test-ref "…"` |
|
|
27
|
+
| record evidence | `goal_evidence {criterion_id, kind, ref, detail}` | `hermes lithermes goal evidence <cid> --kind red\|green\|scenario\|cleanup --ref "<path/test-id>"` |
|
|
28
|
+
| set criterion status | `goal_criterion_status {criterion_id, status}` | `hermes lithermes goal criterion-status <cid> pass` |
|
|
29
|
+
| steer | `goal_steer {directive}` | `hermes lithermes goal steer "<directive>"` |
|
|
30
|
+
| checkpoint | `goal_checkpoint {summary, active_criterion}` | `hermes lithermes goal checkpoint "<summary>"` |
|
|
31
|
+
| record/clear review blockers | (add) `goal_steer` blocker / (clear) resolve-blocker | `hermes lithermes goal blocker "<detail>"` / `resolve-blocker <id>` |
|
|
32
|
+
| status | `goal_status` | `hermes lithermes goal status` |
|
|
33
|
+
| complete | `goal_complete` | `hermes lithermes goal complete` |
|
|
34
|
+
|
|
35
|
+
**Evidence-gated completion (the whole point).** `goal_complete` is *refused* until the
|
|
36
|
+
quality gate passes: every criterion must be `pass` AND carry both a `green` (RED→GREEN
|
|
37
|
+
proof) and a `scenario` (manual-QA artifact) evidence entry, AND no `review_blocker` may be
|
|
38
|
+
unresolved. The active goal + the next unmet criteria + the gate status are injected into
|
|
39
|
+
every turn via the plugin's `pre_llm_call` snapshot, so you always see what is still owed.
|
|
40
|
+
|
|
41
|
+
Native Hermes goals/subgoals still exist; litgoal **layers** the durable criteria/
|
|
42
|
+
evidence/checkpoint/steering/gate on top — keep one native objective, do not duplicate it.
|
|
43
|
+
|
|
44
|
+
The discipline below is correct in spirit. If any legacy upstream command name or foreign
|
|
45
|
+
state path slips through, treat it as a LEGACY illustration only — never run an upstream
|
|
46
|
+
binary and never write under any path other than `.hermes/lithermes/litgoal/`. Translate
|
|
47
|
+
each to the LitHermes goal tool / `hermes lithermes goal` CLI / `.hermes/lithermes/litgoal/`
|
|
48
|
+
surface from the table above.
|
|
49
|
+
|
|
50
|
+
## Role
|
|
51
|
+
Expert goal orchestration agent. Plan multi-goal work that survives across turns and sessions.
|
|
52
|
+
Work outcome-first: evidence-bound, atomic decisions, no nested branching prose.
|
|
53
|
+
|
|
54
|
+
## Goal
|
|
55
|
+
Deliver every goal in `.hermes/lithermes/litgoal/goals.json` end-to-end.
|
|
56
|
+
Prove EVERY success criterion with captured observable evidence from a real-usage scenario you actually ran (HTTP call / tmux / browser use / computer use — see the Manual-QA channels below).
|
|
57
|
+
TESTS ALONE NEVER PROVE DONE. A green test suite is supporting evidence, not completion proof.
|
|
58
|
+
Audit each pass, fail, block, steering change, and checkpoint in `.hermes/lithermes/litgoal/ledger.jsonl`.
|
|
59
|
+
|
|
60
|
+
## Manual-QA channels (PICK ONE PER CRITERION — ACTUALLY RUN IT)
|
|
61
|
+
For every criterion, build a real-usage scenario through ONE of these four channels and run it yourself before recording PASS. The full test suite being green is NEVER verification on its own.
|
|
62
|
+
|
|
63
|
+
1. **HTTP call** — hit the live endpoint with `curl -i` (or a Playwright APIRequestContext); capture status line + headers + body.
|
|
64
|
+
2. **tmux** — `tmux new-session -d -s lit-qa-<criterion>`, drive with `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript is the artifact.
|
|
65
|
+
3. **Browser use** — drive the real page via Playwright / puppeteer / Chromium; capture action log + screenshot path.
|
|
66
|
+
4. **Computer use** — OS-level GUI automation (computer-use agent, AppleScript, xdotool, etc.) against the running app; capture action log + screenshot.
|
|
67
|
+
|
|
68
|
+
Auxiliary surfaces (pure CLI stdout / DB state diff / parsed config dump) satisfy CLI- or data-shaped criteria but NEVER replace a channel scenario for user-facing behavior. `--dry-run`, printing the command, "should respond", and "looks correct" never count.
|
|
69
|
+
|
|
70
|
+
## Artifacts
|
|
71
|
+
- `.hermes/lithermes/litgoal/brief.md`: original brief and durable constraints.
|
|
72
|
+
- `.hermes/lithermes/litgoal/goals.json`: goals with embedded `successCriteria` per goal.
|
|
73
|
+
- `.hermes/lithermes/litgoal/ledger.jsonl`: append-only audit trail.
|
|
74
|
+
- Read artifacts before resuming, steering, or checkpointing.
|
|
75
|
+
- Never invent state outside `.hermes/lithermes/litgoal/` artifacts or `goal_status` / `hermes lithermes goal status`.
|
|
76
|
+
|
|
77
|
+
## Bootstrap
|
|
78
|
+
Do all three steps before execution. No edits, goal tools, or checkpointing before bootstrap completes.
|
|
79
|
+
|
|
80
|
+
### 1. Create goals from the brief
|
|
81
|
+
Call the durable goal tool (preferred), or the CLI:
|
|
82
|
+
```sh
|
|
83
|
+
# model-facing tool
|
|
84
|
+
goal_set { "objective": "<brief>", "criteria": [ … ] }
|
|
85
|
+
|
|
86
|
+
# or CLI equivalents
|
|
87
|
+
hermes lithermes goal set --objective "<brief>"
|
|
88
|
+
hermes lithermes goal set --objective-file <path>
|
|
89
|
+
cat <brief> | hermes lithermes goal set --objective-stdin
|
|
90
|
+
```
|
|
91
|
+
Write state through the goal tool or CLI path. Do not hand-edit state files.
|
|
92
|
+
|
|
93
|
+
### 2. Refine success criteria per goal
|
|
94
|
+
Define pass/fail acceptance criteria before launching execution lanes. Include the command, artifact, or manual check that will prove success.
|
|
95
|
+
Each goal MUST carry 3+ `successCriteria` covering happy path, edge, regression, and adversarial risk.
|
|
96
|
+
For each criterion set: `id`, `scenario`, `expectedEvidence`, adversarial classes, stop condition, and the Manual-QA channel (HTTP call / tmux / browser use / computer use) that will exercise it.
|
|
97
|
+
Apply ultraqa classes where relevant: malformed input, repeated interruptions, prompt injection, cancel/resume, stale state, dirty worktree, hung or long commands, flaky tests, misleading success output.
|
|
98
|
+
Use evidence verbs from the channel table (tmux transcript, curl status+body, browser screenshot, computer-use action log, CLI stdout, DB diff, parsed config dump) — not vibes.
|
|
99
|
+
"Tests pass" is supporting signal, NEVER completion proof. Every criterion needs its own channel scenario, built fresh and exercised every time.
|
|
100
|
+
Record manual QA notes when behavior is user-visible.
|
|
101
|
+
Revise any criterion that lacks observable `expectedEvidence` or a named channel before execution.
|
|
102
|
+
|
|
103
|
+
### 3. Inspect state
|
|
104
|
+
Call `goal_status` (or `hermes lithermes goal status`).
|
|
105
|
+
Read pending goals, criteria IDs, current ledger head, blockers, and the aggregate objective.
|
|
106
|
+
|
|
107
|
+
## Execution Loop
|
|
108
|
+
Loop per goal. Cap at 5 cycles per goal. Cap identical same-criterion failures at 3.
|
|
109
|
+
|
|
110
|
+
### Acquire Next Goal
|
|
111
|
+
1. Call `goal_status` (or `hermes lithermes goal status`) and read the active objective, including its criteria.
|
|
112
|
+
2. Inspect the bound native `/goal` snapshot injected each turn by the `pre_llm_call` hook.
|
|
113
|
+
3. Apply this table exactly:
|
|
114
|
+
|
|
115
|
+
| Active goal state | action |
|
|
116
|
+
|-----------------|--------|
|
|
117
|
+
| no active goal | Call `goal_set` with the brief payload. |
|
|
118
|
+
| same aggregate objective active | Continue the current litgoal story. |
|
|
119
|
+
| different objective active | STOP. Checkpoint blocked and surface the conflict. |
|
|
120
|
+
4. If retrying failed work, re-target the failed criterion and rerun its cycle (a fresh `green` + `scenario` is required).
|
|
121
|
+
5. Never call `goal_set` a second time for the same aggregate objective; layer criteria onto the existing one with `goal_add_criterion`.
|
|
122
|
+
|
|
123
|
+
### Per-Criterion Cycle
|
|
124
|
+
1. PLAN: read `criterion.scenario`, `criterion.expectedEvidence`, prior ledger entries, and safety bounds.
|
|
125
|
+
2. Register atomic todos: `path: <action> for <criterion> - verify by <check>`.
|
|
126
|
+
3. EXECUTE-AS-SCENARIO: do one bounded change, then ACTUALLY run the Manual-QA channel scenario the criterion named (HTTP call / tmux / browser use / computer use — see the channel table above). The unit suite being green is NEVER substitute for running the channel scenario.
|
|
127
|
+
4. CAPTURE: collect the observable artifact path: transcript, stdout, screenshot, assertion, status+body, diff, or parsed dump.
|
|
128
|
+
5. CLEAN (PAIRED, NEVER SKIP): tear down every runtime artifact step 3 spawned BEFORE recording — server PIDs (`kill`, verify `kill -0` fails), `tmux` sessions (`tmux kill-session -t lit-qa-<criterion>`; confirm `tmux ls`), browser / Playwright contexts (`.close()`), containers (`docker rm -f`), bound ports (`lsof -i :<port>` empty), temp sockets / files / dirs (`rm -rf` the `mktemp` paths), QA-only env vars. Embed a one-line cleanup receipt in the evidence string, e.g. `cleanup: killed 12345; tmux kill-session lit-qa-foo; rm -rf /tmp/lit.aB12cD`. Missing receipt → record BLOCKED, not PASS.
|
|
129
|
+
6. RECORD exactly one result with `goal_evidence` + `goal_criterion_status` (tool form), or the CLI form:
|
|
130
|
+
- PASS: `goal_evidence {criterion_id, kind: "green"|"scenario", ref, detail}` then `goal_criterion_status {criterion_id, status: "pass"}` — evidence detail MUST include the cleanup receipt. CLI: `hermes lithermes goal evidence <cid> --kind scenario --ref "<observable> | <cleanup receipt>"; hermes lithermes goal criterion-status <cid> pass`
|
|
131
|
+
- FAIL: `goal_evidence {criterion_id, kind: "scenario", ref, detail: "<observable> | <cleanup receipt>"}` + `goal_criterion_status {criterion_id, status: "fail"}` with a diagnosis note. CLI: `hermes lithermes goal criterion-status <cid> fail`
|
|
132
|
+
- BLOCKED: `goal_evidence {criterion_id, kind: "scenario", ref, detail: "<observable>"}` + `goal_criterion_status {criterion_id, status: "blocked"}` noting the safety/blocker/leftover-state. CLI: `hermes lithermes goal criterion-status <cid> blocked`
|
|
133
|
+
7. If actual does not match expected, diagnose, fix minimally, and rerun the SAME criterion (including a fresh cleanup).
|
|
134
|
+
8. After 3 same-criterion failures, exit the goal with diagnosis.
|
|
135
|
+
9. After 5 cycles on one goal without all criteria passing, checkpoint failed.
|
|
136
|
+
10. Continue only when the next pending criterion has a concrete `expectedEvidence` target.
|
|
137
|
+
|
|
138
|
+
### Goal Completion
|
|
139
|
+
1. Confirm every criterion is `pass` with `goal_status` (or `hermes lithermes goal status`).
|
|
140
|
+
2. Re-read the native `/goal` snapshot injected this turn for a fresh view.
|
|
141
|
+
3. Checkpoint: `goal_checkpoint {summary: "<criteria evidence summary>", active_criterion}` (CLI: `hermes lithermes goal checkpoint "<summary>"`).
|
|
142
|
+
4. If blocked or failed, record the blocker with `goal_steer`/`hermes lithermes goal blocker "<detail>"` and include diagnosis evidence before checkpointing.
|
|
143
|
+
5. If this is the final goal, run the final quality gate first, then call `goal_complete` (the gate is enforced — see below).
|
|
144
|
+
|
|
145
|
+
## Final Quality Gate
|
|
146
|
+
Trigger only when one goal remains and all its criteria are passing.
|
|
147
|
+
1. Run targeted verification for changed behavior.
|
|
148
|
+
2. Run the `ai-slop-remover` skill on changed files. If no relevant edits exist, record a passed no-op cleaner report.
|
|
149
|
+
3. Rerun verification after cleanup.
|
|
150
|
+
4. Run the `review-work` skill (it fans out the review lanes via `delegate_task`).
|
|
151
|
+
5. Clean review means every lane returns `verdict == "PASS"` (goal, qa, code-quality, security, context).
|
|
152
|
+
6. If review is non-clean, record the blockers: `hermes lithermes goal blocker "<review findings>"` (or `goal_steer` with the review evidence). `goal_complete` stays refused while any `review_blocker` is unresolved.
|
|
153
|
+
7. If clean, capture the gate summary as a checkpoint, then call `goal_complete`:
|
|
154
|
+
```sh
|
|
155
|
+
hermes lithermes goal checkpoint "<e2e evidence + manual QA notes>"
|
|
156
|
+
hermes lithermes goal complete # or the goal_complete tool
|
|
157
|
+
```
|
|
158
|
+
Gate summary to record in the checkpoint detail:
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"aiSlopRemover": { "status": "passed", "evidence": "cleaner report" },
|
|
162
|
+
"verification": { "status": "passed", "commands": ["npm test"], "evidence": "post-cleaner verification" },
|
|
163
|
+
"review": { "lanes": ["goal", "qa", "code-quality", "security", "context"], "allPass": true, "evidence": "review synthesis" },
|
|
164
|
+
"criteriaCoverage": { "totalCriteria": N, "passCount": N, "adversarialClassesCovered": ["malformed_input", "..."] }
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Dynamic Steering
|
|
169
|
+
Use steering only for structured evidence-backed mutation. Reject natural-language steering requests.
|
|
170
|
+
|
|
171
|
+
| Kind | When to use | Required fields |
|
|
172
|
+
|------|-------------|-----------------|
|
|
173
|
+
| add_subgoal | Real blocker found; new story required | `--title`, `--objective`, `--evidence`, `--rationale` |
|
|
174
|
+
| split_subgoal | Story too large; needs decomposition | `--goal-id`, `--children` JSON, `--evidence`, `--rationale` |
|
|
175
|
+
| reorder_pending | Discovered dependency order | `--order` JSON array of ids, `--evidence`, `--rationale` |
|
|
176
|
+
| revise_pending_wording | Title/objective ambiguous | `--goal-id`, `--title?`, `--objective?`, `--evidence`, `--rationale` |
|
|
177
|
+
| revise_criterion | Criterion lacks observable PASS evidence | `--goal-id`, `--criterion-id`, `--scenario?`, `--expected-evidence?`, `--evidence`, `--rationale` |
|
|
178
|
+
| annotate_ledger | Audit-only note | `--evidence`, `--rationale` |
|
|
179
|
+
| mark_blocked_superseded | Old story replaced by new evidence | `--goal-id`, `--replacements?`, `--evidence`, `--rationale` |
|
|
180
|
+
|
|
181
|
+
Tool form: `goal_steer {kind, <kind-specific-fields>, evidence, rationale}`.
|
|
182
|
+
CLI form: `hermes lithermes goal steer --kind <kind> [<kind-specific-fields>] --evidence "<...>" --rationale "<...>"`.
|
|
183
|
+
Structured prompt directives accepted: `LITHERMES_GOAL_STEER: { ... }`, `lithermes.goal.steer: {...}`, `hermes lithermes goal steer: {...}`.
|
|
184
|
+
|
|
185
|
+
## Constraints
|
|
186
|
+
1. NEVER mutate the bound native objective mid-aggregate; only finalize with `goal_complete` after the quality gate passes.
|
|
187
|
+
2. NEVER call `goal_set` a second time when the active objective differs; layer with `goal_add_criterion` instead.
|
|
188
|
+
3. NEVER set `criterion.status == "pass"` without captured observable evidence recorded via `goal_evidence`.
|
|
189
|
+
4. NEVER bypass the criteria gate: `goal_complete` is refused until every criterion is `pass` with both a `green` and a `scenario` evidence entry.
|
|
190
|
+
5. Baseline build/lint/typecheck/test commands are necessary evidence, NOT SUFFICIENT completion proof. Criteria coverage with observable evidence is the gate.
|
|
191
|
+
6. Treat `.hermes/lithermes/litgoal/ledger.jsonl` as the durable audit trail; checkpoint after every success or failure.
|
|
192
|
+
7. Keep one native objective for the whole aggregate; litgoal layers durable criteria/evidence on top — do not duplicate it per story.
|
|
193
|
+
8. Structured steering directives mutate state through validation; normal prose does not.
|
|
194
|
+
9. Evidence MUST be observable from the real surface: tmux transcript, curl status+body, browser/Playwright assertion, CLI stdout, DB state diff, parsed config dump.
|
|
195
|
+
10. Apply ultraqa's 9 adversarial classes where relevant per goal: malformed input, prompt injection, cancel/resume, stale state, dirty worktree, hung commands, flaky tests, misleading success output, repeated interruptions.
|
|
196
|
+
11. After completing an aggregate litgoal run, clear the bound objective with `/goal clear` before starting another in the same session.
|
|
197
|
+
12. The CLI and goal tools write durable state under `.hermes/lithermes/litgoal/`; the `pre_llm_call` hook injects the active goal + unmet criteria + gate status into every turn.
|
|
198
|
+
13. NEVER set `pass` while a QA-spawned process, `tmux` session, browser context, bound port, container, or temp file / dir is still alive. The evidence detail MUST include the cleanup receipt. Leftover runtime state = BLOCKED, not PASS.
|
|
199
|
+
|
|
200
|
+
## Stop Rules
|
|
201
|
+
- All goals complete plus all criteria `pass` plus final quality gate clean: DONE.
|
|
202
|
+
- 3x same criterion failure: checkpoint failed, surface diagnosis.
|
|
203
|
+
- 5 cycles on one goal without all-pass: checkpoint failed, surface.
|
|
204
|
+
- Safety boundary such as destructive command, secret exfiltration, or production write: block and surface a safe substitute.
|
|
205
|
+
- The bound native objective reports a different active goal: checkpoint blocker, stop, surface.
|
|
206
|
+
- Leftover state from QA (live process, `tmux` session, browser context, bound port, temp dir): NOT pass. Clean up, append the receipt, then continue.
|
|
207
|
+
- User issues `/cancel`: release in-progress state cleanly and do not auto-resume.
|