Skip to content
Myr

prompt.ts

This file

Path

scripts/lib/swarm/prompt.ts

36 lines · 1.3 KiB · TypeScript

Last changed by

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

History of this file

Take it

Merge build/comments-ops into mainoscabrielbefore adoptione4c407e

lines 1–2why, one step back
1// Zero-install: only what a contributor gets from the ask's page and the project's
2// AGENTS.md, and nothing about how the platform judges an answer.

Merge branch 'build/702-swarm-plan'oscabrielbefore adoption8496778

lines 3–36why, one step back
3import { Brand } from "@repo/brand";
4import type { AskId, ProjectName } from "@repo/protocol/ids";5import { Option } from "effect";67export const brief = (input: {8 readonly ask: AskId;9 readonly project: ProjectName;10 readonly remote: string;11 readonly askMarkdown: string;12 readonly nudge: Option.Option<string>;13}): string =>14 [15 `You have claimed the ask \`${input.ask}\` in the project ${input.project}. Answer it.`,16 "",17 `The current directory is your clone of ${input.remote}, the fork your claim gave you. Push your answer there.`,18 "",19 "---",20 "",21 input.askMarkdown.trimEnd(),22 "",23 "---",24 "",25 "How to answer:",26 "",27 "1. Read the project's AGENTS.md, then the ask above.",28 `2. Change only files in the ask's territory, and make its check pass: \`${Brand.cli} check\` runs the project's checks here, before you push.`,29 "3. Commit, then `git push` to origin.",30 `4. Run \`${Brand.cli} status --project ${input.project}\` for the verdict. A refusal says what is wrong and what to run next: fix it, commit and push again.`,31 ...Option.match(input.nudge, {32 onNone: () => [],33 onSome: (nudge) => ["", `Note: ${nudge}`],34 }),35 "",36 ].join("\n");