helix-forge/prompts/custodian-conventions/prompt.md
tegwick 883409665f
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Package the reusable prompt collection under prompts/
HF-WP-0005. The prompts used to drive work across HelixForge repositories
existed only as text pasted between sessions. They are now Canned Prompt Format
v0.2 packages with declared inputs, parameters and output contracts.

Seven packages: repo-orient (merging "what is this repo about" with "what
should we do now" as a `depth` parameter), repo-register, repo-advance,
commit-sync, scope-audit, gap-workplan, session-close.

"Go on implement, please" is deliberately not packaged. It is conversational
continuation with no contract to declare, and packaging it would produce an
artifact whose only content is the word "continue".

Every one of these prompts assumed the operator's setup — the State Hub is a
read model, workplans originate as files and are never registered by hand, a
session closes with a progress event. That assumption is what made them
personal rather than reusable. helix/custodian-conventions states those rules
once as a fragment composed by every package, so they are versioned,
improvable in one place, and present for an agent that has never seen this
fleet.

helix/commit-sync-routine exists for a narrower reason. repo-advance first
composed the whole commit-sync package, which itself composes the conventions,
so the rendered prompt carried the conventions block twice — CPF inclusion does
not deduplicate, and a diamond dependency renders shared content once per path.
Factoring the routine out removes the diamond and is a better factoring
regardless. Recorded upstream as canned-prompts CANP-WP-0004-T03.

helix/session-close composes practice/pqrst-estimate, so the canonical PQRST
block is embedded verbatim. hall-of-helix CLOSING.md says the canonical prompt
still governs when you have no pqrst-practice checkout, without saying how it
reaches you; this is how. evals/pqrst-embedded.yaml fails if the canonical text
stops being embedded verbatim, rather than letting the package quietly become a
paraphrase.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bjefh8NUiEiahN4JLwoSKM

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 388925@bnt-lap001
Assistant-Session: 3507023f-e0fd-4a1e-9d90-a0d4217d1502
2026-09-06 17:15:13 +02:00

45 lines
2.1 KiB
Markdown

## Operating conventions
You are working inside a Custodian-fleet repository. These rules hold for the
whole session.
**Orient before acting.** Read `.custodian-brief.md` for the offline brief, then
`INTENT.md`, `SCOPE.md` and `AGENTS.md`. The repo's `AGENTS.md` carries its
topic id and workplan prefix. Scan `workplans/` for files whose `status` is
`ready`, `active` or `blocked`, and check the inbox:
```bash
curl -s "{{ hub_base }}/messages/?to_agent={{ agent }}&unread_only=true"
```
**The State Hub is a read model.** Local files are authoritative; the hub
reflects them after sync, never the reverse. Never register workplans or tasks
by hand — not via `POST /workplans/`, `POST /tasks/`, the legacy
`/workstreams/` routes, nor `statehub create-workstream` / `create-task`. Write
the workplan file in the repo, commit, and let the sync register it and write
the ids back. Manual registration creates duplicates.
The sanctioned direct writes are resolving a decision, posting progress events,
and updating task status to reflect work already done.
**Work originates as files.** A workplan is `workplans/<PREFIX>-NNNN-<slug>.md`
with frontmatter (`id`, `type`, `title`, `domain`, `repo`, `status`, `owner`,
`topic_slug`, `created`, `updated`) and one `task` block per `##` section
carrying `id`, `status` and `priority`. Statuses run
`todo``progress``done`, with `wait` for blocked and `cancel` for stopped.
Use `proposed` for a new draft and `ready` only after review against the current
repo state.
**Report honestly.** If tests fail, say so and show the output. If a step was
skipped, say which. Do not describe work as complete until it is verified. An
unfinished task stays unfinished — invented completions corrupt the record that
later sessions depend on.
**Close with evidence.** Update task statuses in the workplan files you touched,
hand off actionable leftovers as live work records rather than parking them in
prose, run the repo's sync, and log at least one progress event:
```bash
curl -s -X POST {{ hub_base }}/progress/ -H 'Content-Type: application/json' \
-d '{"summary":"what was done","event_type":"note","author":"{{ agent }}"}'
```