Intent
Identify what the author is trying to accomplish, even when proposed code quality is weak.
Inputs
Accept any of:
- Raw text request
- GitHub issue URL
- GitHub PR URL
- Commit hash + message + diff snippet
Optional controls (soft extensions):
context_budget: minimal | standard | broad (default standard)
external_findings: prior findings, review notes, or claim lists to reconcile
alignment_check: true | false (default false) or explicit natural-language request
pr_body_draft: true | false (default false) or explicit natural-language request
pr_body_style: concise | standard | detailed (default standard)
Consider a control "requested" when either:
- The structured flag is provided in input, or
- The prompt explicitly asks for that behavior (for example: "validate alignment" or "draft PR body").
If a URL is provided and gh is available, fetch only the context needed for the selected budget.
Default workflow
- Gather enough context to infer intent, scoped by
context_budget.
- Infer core problem, desired outcome, affected users/systems, and non-goals.
- Ground every inference in concrete evidence from primary artifacts.
- If evidence is ambiguous or conflicting, state the conflict explicitly and lower confidence.
- If inputs are missing, ask for the minimum needed inputs and provide a provisional draft with assumptions.
- Choose output shape from request intent:
- General intent request: use the default 7-section contract.
- Intent + optional extensions: return default contract, then append requested extension block(s).
- Explicit extension-only request: return only requested extension block(s), anchored to intent.
Context budget rubric
minimal: prompt plus one primary artifact (issue body, PR description, or diff summary)
standard: add linked issue/PR context, diff direction, and recent discussion/review comments
broad: add related artifacts that could materially change intent inference
- Stop when additional context no longer changes inferred intent.
External findings reconciliation (optional)
- Treat each
external_findings item as a claim, not ground truth.
- Validate claims against primary evidence before accepting them.
- Use statuses:
valid | partially_valid | invalid | unverified.
- Keep unresolved conflicts explicit and carry them into confidence + missing inputs.
Default output contract
For general intent requests, return exactly these seven sections in this order:
- Intent (one sentence)
- Who/what is affected
- Evidence for inferred intent (concrete signals only)
- Non-goals (what this request is not trying to solve)
- Confidence (
high | medium | low) + one-line rationale
- Missing inputs (max 5 bullets)
- PR-ready intent summary (copy/paste text)
Optional extensions (only when requested)
When requested, use one of:
default + extension(s): keep sections 1-7 unchanged, then append extension block(s).
extension-only: return only requested extension block(s) when the user explicitly asks for only alignment validation or only PR body drafting.
Alignment check: include
Intent Baseline
Alignment Verdict (aligned | partially_aligned | misaligned)
Claim Validation Table with columns: Claim | Status | Evidence | Impact
- Use statuses in every row:
valid | partially_valid | invalid | unverified
Gaps vs Intent
Confidence (high | medium | low) + one-line rationale
Missing Inputs (max 5 bullets)
PR body draft: include
Proposed PR Body (lead with intent; keep implementation detail secondary)
Applied? (no by default)
- If explicitly requested to apply and tooling allows: include
Target URL and Fields Changed
Rules
- Treat poor implementation quality as separate from intent quality.
- Use implementation details only as evidence to infer intent.
- Do not propose implementation, architecture, testing strategy, or rollout plans.
- Prefer user-facing outcomes over code-churn descriptions.
- If evidence is weak, ambiguous, or conflicting, say so explicitly.
- If uncertainty can be resolved, ask direct missing-input questions.
GitHub handling
- Issue: prioritize stated pain, repro details, and impact.
- PR: prioritize stated pain plus diff direction, linked issues, and review comments.
- In all cases, avoid over-fetching; gather only enough context to infer intent.
If input is insufficient
Return Missing inputs first, then provide a provisional intent draft with explicit assumptions.
1---2name: intent3description: Extract the underlying intent behind a request, issue, PR, or diff. Focus on problem and desired outcome; do not propose implementation, testing strategy, or rollout plans.4---56# Intent78Identify what the author is trying to accomplish, even when proposed code quality is weak.910## Inputs11Accept any of:12- Raw text request13- GitHub issue URL14- GitHub PR URL15- Commit hash + message + diff snippet1617Optional controls (soft extensions):18- `context_budget`: `minimal` | `standard` | `broad` (default `standard`)19- `external_findings`: prior findings, review notes, or claim lists to reconcile20- `alignment_check`: `true` | `false` (default `false`) or explicit natural-language request21- `pr_body_draft`: `true` | `false` (default `false`) or explicit natural-language request22- `pr_body_style`: `concise` | `standard` | `detailed` (default `standard`)2324Consider a control "requested" when either:25- The structured flag is provided in input, or26- The prompt explicitly asks for that behavior (for example: "validate alignment" or "draft PR body").2728If a URL is provided and `gh` is available, fetch only the context needed for the selected budget.2930## Default workflow311. Gather enough context to infer intent, scoped by `context_budget`.322. Infer core problem, desired outcome, affected users/systems, and non-goals.333. Ground every inference in concrete evidence from primary artifacts.344. If evidence is ambiguous or conflicting, state the conflict explicitly and lower confidence.355. If inputs are missing, ask for the minimum needed inputs and provide a provisional draft with assumptions.366. Choose output shape from request intent:37 - General intent request: use the default 7-section contract.38 - Intent + optional extensions: return default contract, then append requested extension block(s).39 - Explicit extension-only request: return only requested extension block(s), anchored to intent.4041## Context budget rubric42- `minimal`: prompt plus one primary artifact (issue body, PR description, or diff summary)43- `standard`: add linked issue/PR context, diff direction, and recent discussion/review comments44- `broad`: add related artifacts that could materially change intent inference45- Stop when additional context no longer changes inferred intent.4647## External findings reconciliation (optional)48- Treat each `external_findings` item as a claim, not ground truth.49- Validate claims against primary evidence before accepting them.50- Use statuses: `valid` | `partially_valid` | `invalid` | `unverified`.51- Keep unresolved conflicts explicit and carry them into confidence + missing inputs.5253## Default output contract54For general intent requests, return exactly these seven sections in this order:55561. **Intent (one sentence)**572. **Who/what is affected**583. **Evidence for inferred intent** (concrete signals only)594. **Non-goals** (what this request is not trying to solve)605. **Confidence** (`high` | `medium` | `low`) + one-line rationale616. **Missing inputs** (max 5 bullets)627. **PR-ready intent summary** (copy/paste text)6364## Optional extensions (only when requested)65When requested, use one of:66- `default + extension(s)`: keep sections 1-7 unchanged, then append extension block(s).67- `extension-only`: return only requested extension block(s) when the user explicitly asks for only alignment validation or only PR body drafting.6869- Alignment check: include70 - `Intent Baseline`71 - `Alignment Verdict` (`aligned` | `partially_aligned` | `misaligned`)72 - `Claim Validation Table` with columns: `Claim | Status | Evidence | Impact`73 - Use statuses in every row: `valid` | `partially_valid` | `invalid` | `unverified`74 - `Gaps vs Intent`75 - `Confidence` (`high` | `medium` | `low`) + one-line rationale76 - `Missing Inputs` (max 5 bullets)77- PR body draft: include78 - `Proposed PR Body` (lead with intent; keep implementation detail secondary)79 - `Applied?` (`no` by default)80 - If explicitly requested to apply and tooling allows: include `Target URL` and `Fields Changed`8182## Rules83- Treat poor implementation quality as separate from intent quality.84- Use implementation details only as evidence to infer intent.85- Do not propose implementation, architecture, testing strategy, or rollout plans.86- Prefer user-facing outcomes over code-churn descriptions.87- If evidence is weak, ambiguous, or conflicting, say so explicitly.88- If uncertainty can be resolved, ask direct missing-input questions.8990## GitHub handling91- Issue: prioritize stated pain, repro details, and impact.92- PR: prioritize stated pain plus diff direction, linked issues, and review comments.93- In all cases, avoid over-fetching; gather only enough context to infer intent.9495## If input is insufficient96Return `Missing inputs` first, then provide a provisional intent draft with explicit assumptions.