harnery 0.31.2 → 0.31.4
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 +16 -16
- package/dist/core/agents/cli.js +48 -3
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-projector.js +36 -19
- package/dist/core/agents/state/heartbeat-writer.d.ts +27 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +43 -0
- package/dist/core/hooks/events/schema.d.ts +7 -6
- package/dist/core/hooks/events/schema.d.ts.map +1 -1
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +38 -0
- package/dist/core/workflow/proof.d.ts.map +1 -1
- package/dist/core/workflow/proof.js +24 -1
- package/dist/lib/browser/client.d.ts +6 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +1 -0
- package/dist/lib/instructions/splice.d.ts +1 -1
- package/dist/lib/instructions/splice.js +2 -2
- package/dist/lib/instructions/templates.js +18 -18
- package/package.json +1 -1
- package/src/core/agents/cli.ts +51 -4
- package/src/core/agents/state/heartbeat-projector.ts +36 -19
- package/src/core/agents/state/heartbeat-writer.ts +55 -0
- package/src/core/hooks/events/schema.ts +7 -6
- package/src/core/workflow/engine.ts +38 -0
- package/src/core/workflow/proof.ts +23 -1
- package/src/lib/browser/client.ts +7 -0
- package/src/lib/instructions/splice.ts +2 -2
- package/src/lib/instructions/templates.ts +18 -18
|
@@ -146,7 +146,7 @@ export interface SkillTemplate {
|
|
|
146
146
|
function decideBody(b: string): string {
|
|
147
147
|
return `The decision docket is a persistent queue for decisions you would otherwise
|
|
148
148
|
route to a human. It's built on the \`${b} decision\` engine. This skill is the
|
|
149
|
-
mechanics
|
|
149
|
+
mechanics: file, find precedent, claim, and resolve with evidence. *When* a
|
|
150
150
|
decision needs a human at all (versus one you settle yourself) is host policy;
|
|
151
151
|
if this project defines that rubric, follow it.
|
|
152
152
|
|
|
@@ -159,7 +159,7 @@ if this project defines that rubric, follow it.
|
|
|
159
159
|
## Capture (default)
|
|
160
160
|
|
|
161
161
|
1. **Check precedent first.** \`${b} decision search "<key terms>"\`. If a resolved
|
|
162
|
-
decision already answers this, cite it
|
|
162
|
+
decision already answers this, cite it; don't re-litigate.
|
|
163
163
|
2. **File it** when the choice has a second consumer (a human will want to see it,
|
|
164
164
|
or a future agent will face it again) or reversal is expensive. Skip the
|
|
165
165
|
docket for pure local mechanics (a variable name, one of two equivalent idioms).
|
|
@@ -172,7 +172,7 @@ if this project defines that rubric, follow it.
|
|
|
172
172
|
|
|
173
173
|
For a decision with real substance, write a brief to a file and pass
|
|
174
174
|
\`--brief <path>\` so the reviewer sees options + evidence, not a cold prompt.
|
|
175
|
-
3. **Proceed on your default.** Filing does not mean blocking
|
|
175
|
+
3. **Proceed on your default.** Filing does not mean blocking. Note the id in your
|
|
176
176
|
reply and keep working.
|
|
177
177
|
|
|
178
178
|
## Resolve (\`resolve <id>\`)
|
|
@@ -182,7 +182,7 @@ ${b} decision show <id> # read the question + context + any brief
|
|
|
182
182
|
${b} decision claim <id> # mark it deliberating (claimed by you)
|
|
183
183
|
\`\`\`
|
|
184
184
|
|
|
185
|
-
Research it for real
|
|
185
|
+
Research it for real: run the queries, read the files, compute the costs. Then
|
|
186
186
|
resolve with **cited evidence** (the engine rejects an evidence-free resolution):
|
|
187
187
|
|
|
188
188
|
\`\`\`bash
|
|
@@ -242,7 +242,7 @@ ${b} council list --mine --json
|
|
|
242
242
|
|
|
243
243
|
One section per council you're a member of: id + objective, round N (open /
|
|
244
244
|
collected) with N/M contributors, and your status (awaiting prompt / prompt ready
|
|
245
|
-
/ already contributed) with the next command to run. Stop after listing
|
|
245
|
+
/ already contributed) with the next command to run. Stop after listing; don't
|
|
246
246
|
auto-route into contribute.
|
|
247
247
|
|
|
248
248
|
## Create (\`create <objective>\`)
|
|
@@ -256,18 +256,18 @@ http://localhost:9000/councils/new?objective=<encoded>
|
|
|
256
256
|
|
|
257
257
|
If the dev server isn't up, start it with \`${b} web up\`.
|
|
258
258
|
|
|
259
|
-
## Contribute (\`contribute <id>\`)
|
|
259
|
+
## Contribute (\`contribute <id>\`): the guarded flow
|
|
260
260
|
|
|
261
261
|
Run these checks in order; refuse with a specific reason if any fails.
|
|
262
262
|
|
|
263
|
-
1. **Membership.** If your \`whoami\` name isn't in \`manifest.members\`, refuse
|
|
264
|
-
router likely meant a different agent's session.
|
|
265
|
-
2. **Already contributed.** If you're in \`current_round_contributors\`, refuse
|
|
266
|
-
|
|
263
|
+
1. **Membership.** If your \`whoami\` name isn't in \`manifest.members\`, refuse.
|
|
264
|
+
The router likely meant a different agent's session.
|
|
265
|
+
2. **Already contributed.** If you're in \`current_round_contributors\`, refuse.
|
|
266
|
+
Wait for the steward to advance the round.
|
|
267
267
|
3. **Prompt routing.** Find your entry in \`current_round_prompts\`. If none is
|
|
268
268
|
drafted for you, refuse (the steward must write one first). If the routed body
|
|
269
269
|
carries a \`<!-- council-route … member: <name> -->\` header naming a *different*
|
|
270
|
-
agent, refuse
|
|
270
|
+
agent, refuse: the wrong prompt was pasted into your session.
|
|
271
271
|
4. **Compose** per your prompt (read \`manifest.target_doc\` in full if set; strip
|
|
272
272
|
the route header before treating the body as instructions).
|
|
273
273
|
5. **Submit:**
|
|
@@ -282,20 +282,20 @@ Run these checks in order; refuse with a specific reason if any fails.
|
|
|
282
282
|
\`<trivial>\` angle-bracket tag on the final line (the exit-criterion parser keys
|
|
283
283
|
on it). When in doubt, lean \`<trivial>\`.
|
|
284
284
|
|
|
285
|
-
## Prompts (\`prompts <id>\`)
|
|
285
|
+
## Prompts (\`prompts <id>\`): steward
|
|
286
286
|
|
|
287
287
|
1. **Authority.** If your \`whoami\` name ≠ the council's \`steward\`, stop.
|
|
288
288
|
2. **Plan the round** from the target doc + prior rounds. Round 1 must include a
|
|
289
|
-
completeness critic
|
|
290
|
-
thing is NOT in this document at all
|
|
291
|
-
written?" Lens-scoped reviewers reliably miss whole absent dimensions.
|
|
289
|
+
completeness critic. Assign one member the explicit charge: "What important
|
|
290
|
+
thing is NOT in this document at all (a missing dimension, not a flaw in what's
|
|
291
|
+
written)?" Lens-scoped reviewers reliably miss whole absent dimensions.
|
|
292
292
|
3. **Draft + write** one prompt per member missing from \`current_round_prompts\`:
|
|
293
293
|
|
|
294
294
|
\`\`\`bash
|
|
295
295
|
${b} council prompt <id> agent-<Name> --message "..." # or --file <path>
|
|
296
296
|
\`\`\`
|
|
297
297
|
|
|
298
|
-
The CLI auto-prepends the \`<!-- council-route … -->\` header
|
|
298
|
+
The CLI auto-prepends the \`<!-- council-route … -->\` header; never write it by
|
|
299
299
|
hand. Every prompt must instruct the member to end with the literal
|
|
300
300
|
\`<substantive>\` / \`<trivial>\` tag.
|
|
301
301
|
|
|
@@ -315,7 +315,7 @@ export const SKILLS: SkillTemplate[] = [
|
|
|
315
315
|
buildOwnedSkill({
|
|
316
316
|
name: "harn-decide",
|
|
317
317
|
description:
|
|
318
|
-
"File a decision into the docket instead of blocking on a human
|
|
318
|
+
"File a decision into the docket instead of blocking on a human: search precedent, file it, and proceed on a reversible default; or pick up and resolve an open decision with cited evidence. Use whenever you're about to ask a human a decision-shaped question you could resolve yourself.",
|
|
319
319
|
argumentHint: "[<the decision / question you're facing> | resolve <id> | review]",
|
|
320
320
|
binName,
|
|
321
321
|
body: decideBody(binName),
|
|
@@ -328,7 +328,7 @@ export const SKILLS: SkillTemplate[] = [
|
|
|
328
328
|
buildOwnedSkill({
|
|
329
329
|
name: "harn-council",
|
|
330
330
|
description:
|
|
331
|
-
"Interact with the multi-agent council system: list / create / show / prompts (steward) / contribute (member). Guards against misrouting
|
|
331
|
+
"Interact with the multi-agent council system: list / create / show / prompts (steward) / contribute (member). Guards against misrouting: refuses to contribute when you aren't a member, have already contributed, or weren't routed a prompt.",
|
|
332
332
|
argumentHint:
|
|
333
333
|
"[<id-or-fragment> | create <objective> | contribute <id> | prompts <id> | show <id>]",
|
|
334
334
|
binName,
|