Prd To Goal logo

Prd To Goal

Community
yonatangross
prd-to-goal

Decomposes a PRD, issue, or spec into a copy-pasteable single `/goal until ..., or stop after N turns` line. Use when running /goal against a spec, to reduce acceptance criteria to AND-joined boolean assertions.

Overview

Publisheryonatangross
Repositoryorchestkit
Skill nameprd-to-goal
Stars
298
Forks
35
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by yonatangross on GitHub. Read the source before you install it.

Installation

Install the Prd To Goal AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/prd-to-goal
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yonatangross/orchestkit.git /tmp/orchestkit
mkdir -p .claude/skills
cp -r /tmp/orchestkit/plugins/ork/skills/prd-to-goal .claude/skills/prd-to-goal
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prd To Goal in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prd To Goal on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prd To Goal is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

prd-to-goal — PRD → /goal Decomposition

Converts a PRD / issue / spec into a single copy-pasteable /goal line. The hard part of /goal is not running it — it is writing an until clause that is convergent (terminates), falsifiable (testable boolean), and observable (the agent can actually check it without subjective judgement). This skill makes that decomposition reproducible.

1. When to use

Use it when:

  • You have a written PRD, GitHub issue, or spec and want to run /goal against it.
  • Past /goal runs drifted, looped, or burned tokens because the until clause was vague (until tests pass, until done, until design is good).
  • You need to justify the abort budget — turns, tokens, no-progress threshold.

Skip it when:

  • One-shot bug fix where the failing test is the acceptance criterion. Just run /goal until pnpm test -- auth.spec.ts passes.
  • No written PRD exists. Run write-prd first — vibes do not decompose.
  • The work is destructive or irreversible (DB migrations, mass file deletes). /goal retries; you do not want retries on DROP TABLE.

2. Inputs the skill accepts

InputHow
Pasted PRD textProvide as the argument, or paste into the chat after invoking.
GitHub issuegh issue view <N> --json title,body,labels — the skill reads body.
Spec filePath to a Markdown / text file; the skill Reads it.
ADR / design docSame as spec file.

3. The decomposition algorithm

  1. Extract acceptance criteria. Pull every MUST, SHOULD, Definition of Done, Acceptance Criteria, and checkbox-style line. If the doc has none, stop and tell the user to run write-prd first — there is nothing to converge on.
  2. Map each criterion to an observable boolean. Each criterion must reduce to a single shell-checkable assertion. Examples of observable state:
    • test -f path/to/file (file exists)
    • pnpm test -- pattern passes (test command exits 0)
    • gh pr view <N> --json state | jq -r .state == "MERGED"
    • wc -l < src/auth.ts returns a number within bound
    • pnpm lint exits 0
    • curl -sf $URL returns 2xx
  3. Reject non-observable criteria. Drop or rewrite criteria that depend on subjective judgement (code is clean, design feels right, users are happy). Either find a proxy (lint exits 0, Lighthouse score > 90, NPS survey ID exists) or surface the criterion back to the user as out of scope for /goal.
  4. Compose the until clause. AND-join the observable assertions in priority order — the cheapest, most likely-to-fail check first so the loop short-circuits early. Three to five assertions is the sweet spot; more than seven usually means the PRD is two PRDs.
  5. Fold the budget INTO the same condition. Claude Code accepts one goal per session, replace-on-set, and the bound is written inside that single condition (…, or stop after 15 turns). It is not a second command. Sensible turn caps:
    • 15 for a single feature, 30 for a refactor, 5 for a bug fix.

    Never emit a second /goal line. A second line does not add a rail — it parses as a fresh condition, REPLACES the first, and leaves the session goaled on the budget alone with every acceptance assertion discarded. The abort-if form this skill used to emit was never Claude Code syntax at all: grep -c -a -F 'abort-if' against the 2.1.226 binary returns 0, and it appears in none of the 357 archived changelogs. Verified 2026-08-08 (#3312).

4. Output template

The skill emits exactly ONE line, ready to paste:

/goal until <assertion_1> AND <assertion_2> AND <assertion_3>, or stop after <N> turns

Emit the line first, on its own. A fenced code block around it is fine, since the user copies it out. Any notes (assertion ordering, what a grep cannot prove) go after the line and stay short. Never emit a second /goal line, and never emit a goal line at all when the input has no observable acceptance criteria (step 1 of the algorithm): say so and point at write-prd instead.

Optional: rubric emission (.claude/rubric.json)

When the user wants graded feedback beyond pass/fail booleans, the skill MAY also emit .claude/rubric.json conforming to ork-rubric/1.0 (schema: ${CLAUDE_PLUGIN_ROOT}/shared/rubric.schema.json), mapping each acceptance criterion to one dimension:

json
{
  "rubric": "ork-rubric/1.0",
  "skill": "prd-to-goal",
  "dimensions": [
    { "name": "regression_test_added", "weight": 0.4, "min_pass": 8, "min_blocker": 3 },
    { "name": "auth_suite_green",      "weight": 0.4, "min_pass": 10, "min_blocker": 5 },
    { "name": "lint_clean",            "weight": 0.2, "min_pass": 10, "min_blocker": 0 }
  ]
}

Scores are 0–10 (min_pass = soft floor, min_blocker = hard blocker regardless of composite); dimension weights MUST sum to 1.0 — see the schema for the full contract.

The file is deliberately user-editable before the /goal run — that is the point. Adjusting weights and min_pass thresholds is how the user injects judgement into the loop without rewriting assertions (rubric-as-environment-feedback, Lance Martin 2026-06-09). The post-timeout grader (§8) treats the rubric, if present, as the user's intent — senior to the literal assertion text.

5. Worked examples

Example A — Bug fix PRD

Input (issue body):

Title: Login fails on emails containing "+"
Acceptance Criteria:
- New regression test in tests/auth/test_login.py covers email with "+"
- The new test passes
- All existing auth tests still pass

Output:

/goal until test -f tests/auth/test_login.py AND pnpm test -- tests/auth/test_login.py passes AND pnpm test -- tests/auth passes, or stop after 5 turns

Rationale: file existence is the cheapest check; the targeted test is the regression gate; the broad auth suite catches collateral damage.

Example B — Feature PRD

Input (PRD excerpt):

Feature: User Avatar Endpoint
MUST:
- New route GET /users/:id/avatar registered
- Returns 200 with { url: string, updatedAt: ISO8601 } for known user
- Returns 404 for unknown user
- Integration test covers both cases
- OpenAPI spec updated

Output:

/goal until grep -q "users/:id/avatar" src/routes/users.ts AND pnpm test -- tests/integration/users.avatar.spec.ts passes AND grep -q "/users/{id}/avatar" openapi.yaml AND pnpm lint passes, or stop after 15 turns

Rationale: route grep catches a handler that was stubbed but never wired; the integration spec encodes both 200 and 404; OpenAPI grep enforces the docs MUST; lint guards against half-typed code shipping.

Example C — Refactor PRD

Input (PRD excerpt):

Refactor: split monolithic src/auth.ts (1842 LOC) into per-strategy files
Definition of Done:
- src/auth.ts under 200 LOC
- New files in src/auth/strategies/*.ts cover oauth, jwt, password
- All auth tests still pass
- Lint clean
- No new files outside src/auth/

Output:

/goal until [ $(wc -l < src/auth.ts) -lt 200 ] AND test -f src/auth/strategies/oauth.ts AND test -f src/auth/strategies/jwt.ts AND test -f src/auth/strategies/password.ts AND pnpm test -- tests/auth passes AND pnpm lint passes, or stop after 30 turns

Rationale: the LOC bound is the convergent signal — without it, /goal can keep "improving" forever. File-existence checks pin the structural decomposition; tests + lint guard correctness. Higher budget because refactors run longer than bug fixes.

6. Recipe Library — pre-built loops

Where §3–5 generate a custom /goal line from a spec, the recipe library ships ready-made ones for the recurring autonomous loops. Each is a loop shape wrapped around an ork worker skill, following the same convergent / falsifiable / budgeted rules as a generated line.

RecipeUse whenWorker
🧪 Coverage climbraise coverage to a target, meaningfullycover
🔴 Production error sweepclear a backlog of actionable errorsfix-issue
📚 Docs-drift sweepdocs / reference drifted from codeaudit-full
⚡ Page-load budgeta page exceeds its latency budgetperformance
🧹 Repository cleanupstale memory / state accumulateddream
✅ Quality streakdon't trust a single green (flaky suite)verify
🎫 Ticket → PR-readydrive an issue to a CI-green PRfix-issue → create-pr
🧼 Type/lint zeroclear a type/lint backlog without suppressionsfixer agent

Full recipes — the exact single-line /goal until …, or stop after N turns lines, convergent signal, and per-recipe guardrail: references/recipe-library.md. That file is the in-repo source intended for an ork-loops pack on skills.sh (not yet built; the channel Forward Future's Loop Library uses), so the loop recipes can travel while ork supplies the machinery each pass runs on.

7. Anti-patterns

BadWhy it failsGood
/goal until tests passWhich tests? Existing or new? On which command? The agent can pick whatever subset is already green and claim done./goal until pnpm test -- tests/auth/test_login.py passes AND pnpm test -- tests/auth passes
/goal until the code looks cleanNot falsifiable. The agent cannot check "looks clean" — it will either declare victory immediately or never./goal until pnpm lint passes AND [ $(wc -l < src/auth.ts) -lt 200 ]
/goal until doneUnbounded. There is no terminating condition; combined with a generous , or stop after 50 turns this is how runs eat 500K tokens overnight.Pick 3–5 observable assertions. If you cannot, the PRD is not ready — go to write-prd.

8. Post-timeout assertion grader

If the /goal loop hits its turn bound, do NOT retry the same line and do NOT let the looping agent critique its own assertions. Spawn a FRESH-context grader that audits the assertion set itself:

python
# Bare-eval pattern — independent context window, zero shared state:
Bash("CLAUDE_CODE_FORK_SUBAGENT=1 claude -p --bare \"$(cat /tmp/grader-prompt.txt)\"")
# or: Agent(subagent_type="general-purpose", prompt=grader_prompt)  # fresh spawn, no producer prose

The grader receives the /goal line, .claude/rubric.json (if emitted), a compressed summary of the last N turns, and freshly regenerated repo-state evidence. It returns one verdict:

VerdictDiagnosisAction
tightenAssertions too weak — agent could satisfy them without real successRe-run with the stricter revised line
loosenAssertions unsatisfiable as written (wrong path, impossible bound, pre-broken suite)Re-run with the achievable revised line
abortTask genuinely blocked (missing access, contradictory spec, broken env)Stop; surface the blocker to the user

Grading must happen in an independent context window — never self-critique (verifier sub-agents outperform self-critique because the grader does not share the producer's context; Lance Martin, 2026-06-09). Budget: one grader call per timeout, and the grader never loops itself.

Full pattern (prompt template, independence rules, worked example): ${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/assertion-grader.md.

9. Related skills

  • ork:write-prd — if the input has no acceptance criteria, run this first.
  • ork:brainstorm — useful when the PRD itself is contested and you want options before writing the goal.
  • ork:audit-full — after /goal exits, run audit-full to confirm the assertions actually held end-to-end (the loop trusts the boolean; audit re-checks the intent).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Prd To Goal AI skill do?

Decomposes a PRD, issue, or spec into a copy-pasteable single `/goal until ..., or stop after N turns` line. Use when running /goal against a spec, to reduce acceptance criteria to AND-joined boolean assertions.

Why use Prd To Goal on TypingMind?

Because you install it once and use it with any model. Prd To Goal is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prd To Goal in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/prd-to-goal. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Prd To Goal?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prd To Goal?

As many as you like. As long as a model supports skills, you can use Prd To Goal with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prd To Goal AI skill free?

Yes. It is published on GitHub by yonatangross under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇