Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/mostashraf/ai-sdlc-harness/refinegit clone --depth 1 https://github.com/MostAshraf/ai-sdlc-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/mostashraf/ai-sdlc-harness/refine)<a href="https://agentmods.dev/commands/mostashraf/ai-sdlc-harness/refine"><img src="https://agentmods.dev/badge/commands/mostashraf/ai-sdlc-harness/refine.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00568 |
| Opus 5 | $0.00000 | $0.00284 |
| Sonnet 5 | $0.00000 | $0.00114 |
| Haiku 4.5 | $0.00000 | $0.00057 |
Grade A, and why
refine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/story-workflow refine
Interactive, section-by-section restructuring of a story into the canonical
template through a collaborative conversation. Slower than improve on purpose.
For most sessions
improveis the better choice. Reach forrefinewhen a story is complex or contentious and you want to work through it one section at a time, confirming each before moving on.
Steps
- Fetch the work item per
shared/provider-io.md(title, description, acceptance criteria, state, links). - Session notes: if the user passed notes after the id, use them. If not, ask once: "Any notes from the refinement session — bullet points, rough notes, decisions? If not, I'll work from the work item." Notes capture PO clarifications and scope calls that never made it into the item.
- Load
templates/story-template.md(the target format) and, for terminology,shared/context.md. - Work the template one section at a time, proposing content and getting
approval before moving on:
- Context — draft the business "why"; ask if it's captured correctly.
- Description — one
As a … I want … so that …. If it spans multiple capabilities, flag a possible split before continuing. - Acceptance Criteria — draft Given/When/Then, happy path first then error/edge cases; present them together and ask what's missing.
- Out of Scope — propose explicit exclusions from the notes and context; ask what else to exclude.
- Open Questions — collect unresolved items, tag each
[PO]/[Tech]/[Team], ask if any remain. - Technical Notes — leave empty; it's populated by
groom. If the user volunteers technical context, note it but say the full analysis isgroom.
- Assemble the complete story and present it whole for a final review.
- Post on approval per
shared/provider-io.md— a comment on remote providers; forlocal-markdown, offer the in-place overwrite of the source file (this command is one of the two that may rewrite a story in place).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 45 lines · 0 tokens per session scan A 02a66e98d028
refine is a command published in the GitHub repository MostAshraf/ai-sdlc-harness (18 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 568 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
add-phase
Add phase to end of current milestone in roadmap.
insert-phase
Insert urgent work as decimal phase (e.g., 72.1) between existing phases.
remove-phase
Remove a future phase from roadmap and renumber subsequent phases.
research-phase
Research how to implement a phase (standalone — usually use /pbr:plan-phase instead).
reapply-patches
Reapply local modifications after a PBR update.
update
Update PBR to latest version with changelog display.