home/productivity/foreman-prompt-template

Foreman — prompt template

GPTClaudeDeepSeek··496 copies·updated 2026-07-14
foreman-prompt-template.prompt
# Foreman — prompt template

<!-- foreman:practices lastmod:2026-07-10
     source-a: https://code.claude.com/docs/en/best-practices.md
     source-b: https://code.claude.com/docs/en/sub-agents.md
     source-c: Anthropic Prompting 101 — Code w/ Claude 2025-05-22
     source-d: https://code.claude.com/docs/en/about-claude/models/prompting-fable5 -->

The handed-off session — whether run via `TaskCreate` in this session, a
background `Agent`, or copy-pasted elsewhere — has **zero memory** of this
conversation. Fill every required section. A self-contained prompt is not
optional — it is the only way the handed-off work can act correctly.

---

## Template

**Craft-time environment check (do this now, once, while assembling — not
an instruction for the spawned session to act on later):**

0. **One mechanical call covers persona/custom-sections/omissions.** Run
   `node ${CLAUDE_PLUGIN_ROOT}/scripts/render-sections.js` — always (it
   resolves a project root from `$CLAUDE_PROJECT_DIR`/cwd and fails soft
   to defaults when no `.foreman/config.json` exists). One JSON object:
   `{"usePersona": bool, "sections": [{"tag", "xml"}], "omit": [...],
   "warnings": [...]}`. All of it is project **declaration** — foreman
   never inspects which style plugins the operator runs.
   - `usePersona` — default `true` when missing/unparseable. Controls only
     the opening of `task_context` below: persona sentence vs domain
     framing.
   - `sections` — the config's validated `customSections`. Inline every
     `sections[].xml` value verbatim, in order, at the `[CUSTOM SECTIONS]`
     placeholder below — never invent, edit, or reorder; remove the
     placeholder line if empty.
   - `omit` — the config's validated `omitSections` (only `tone`/
     `example`/`background`/`output_format` are ever valid; guardrail tags
     can't appear). Drop each listed block from the assembled prompt — a
     project-level omit beats a per-prompt selection. One
     destination-scoped exception: an omitted `tone` STAYS when the chosen
     destination is a background `Agent` — output styles govern only
     main-loop sessions (a pasted interactive session, or `TaskCreate` run
     here), never a background agent's, so the omission's premise fails
     there; the kept default still self-yields if a style does govern. The
     other three tags have no destination dependence.
   - `warnings` — surface briefly to the user (skipped entries from a
     malformed config); never blocks assembly.

fill the variables

This prompt has 2 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{CLAUDE_PLUGIN_ROOT}{"usePersona": bool, "sections": [{"tag", "xml"}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo V-Songbird/foreman (MIT). A "Foreman — prompt template" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

V-Songbird/foreman · MIT