Skip to content
OTFotf
All posts

Why the 20+ tested prompts in every OTF kit matter as much as the code itself

D
DaveAuthor
7 min read
Why the 20+ tested prompts in every OTF kit matter as much as the code itself

The promise of “AI-assisted coding” only lands when the model fits to your codebase like a glove, not a shotgun. That bridge is built from more than clean function signatures and tight components. Pattern-matched context, sharp prompts, and agent-side instructions — all rigorously tested — are as vital as the code itself. Every OTF kit ships with 20+ prompts and rules files built for this purpose. Here’s why that prompt library matters as much as the code, and what it enables when AI extends your own product, not just a demo repo.

The pain: out-of-the-box AI coding tools guess, not extend

Install a new coding agent or “AI IDE” and point it at your repo: the pitch is instant productivity. The reality is hallucinated conventions, broken file trees, and “fixes” that break tests. Models predict on the stats of public repos, not the specifics of yours. That’s not a failure of the idea — it’s how contextless prompting works.

You don’t want generated boilerplate. You want the agent to wire a feature into your architecture, style, and project shape, as if it was an onboarded teammate. Building that illusion is impossible without calibrated prompts and rules.

Thesis: your prompt library is as much infrastructure as your code

If you want repeatable, testable AI extension of real products, not just single-file stubs, you need a prompt library tailored to your domain. Every prompt, rules file, and context exposer deserves the same version control, review, and shipping discipline as your app code. OTF bakes that in.

11 production screens. Auth, DB, Stripe — all wired.

The SaaS Dashboard Kit ships everything already connected. No Vercel config, no Supabase account. Live demo at saas.otf-kit.dev.

See the live demo

1. Prompt structure is code — version, test, and ship it

Every AI tool integrates a prompt somewhere: for “explain this file”, “add a feature”, “refactor”, “fix this test”. A prompt is not just a hint — it’s the exact interface between your code conventions and the language model’s context window.

OTF kits ship a folder of prompts, structured by task and model, ready for inspection:

ai/prompts/
  add-feature.md
  refactor-component.md
  fix-test.md
  CLAUDE.md
  .cursorrules

A single change in project structure — a new folder, auth flow overhaul, refactor to modular styles — means the prompt should be touched, tested, and tracked. Version it with the same discipline you apply to the code.

2. Instructions files (CLAUDE.md, .cursorrules) set ground truth

This is where guessing stops. A well-formed CLAUDE.md does more than introduce the project. It cements the agent’s operating manual: folder purposes, naming conventions, architectural boundaries, even what not to automate.

Example snippet from a shipped CLAUDE.md:

## Project conventions

- All new screens live in /features/
- Do not mutate files under /vendor/
- Use PascalCase for React components
- Use ./api/ for server actions, colocated with entity modules

## Code style

- Never use default exports
- Import utilities from /lib/
- SCSS modules only, no inline styles

Agents that consume this file go from “statistically plausible change” to “follows your exact rules.” Coupled with .cursorrules (Cursor IDE’s agent instruction format), you get model-agnostic, enforceable constraints. The agent adapts when you update the file, zero retraining needed.

3. Test-driven prompts: not just words, but workflows

A prompt that “works on my repo” is a red herring. Every prompt in OTF’s template kits ships with an attached suite of prompt+context examples, verified against the base codebase. This means that when you use an agent — Claude, Cursor, GPT, whatever — you get predictable extensions, not magic that only lands the first time.

Here’s how actual prompt testing looks in-practice (pseudo):

// ai/prompts/add-feature.test.ts

import { generateFeature } from '@otfdashkit/ai-agent' // thin wrapper over agent API

test('extend dashboard with custom metric chart', async () => {
  const prompt = fs.readFileSync('ai/prompts/add-feature.md', 'utf-8')
  const result = await generateFeature({
    prompt,
    context: baseDashboardContext,
    instructions: CLAUDE_MD,
  })
  expect(result.files).toContain('/features/MetricsChart.tsx')
  expect(result.diff).toMatch(/<Chart type="custom-metric"/)
})

Every edit to the prompt — new constraints, filename tweaks, style guidelines — is run through the same test rig as any code lint or format check.

4. One prompt per workflow: explicit, discoverable

A “do everything” system prompt is as useful as a swiss-army knife with glue instead of joints. OTF ships separate prompts for each atomic task — fixing a test, wiring a new screen, refactoring an entity, adding an endpoint. Every one is human-readable and can be invoked manually or by an agent, not just in a magic black box workflow.

Folder structure in every kit:

ai/prompts/
  add-auth-flow.md
  fix-signup-bug.md
  scaffold-report-page.md
  refactor-store.md
...

This separation means you can tune and extend the workflows you use — not just hope the tool “gets it” on a generic summary. When you want to automate ticket-churn, the right prompt is already waiting.

5. Real-world alignment: prompts tuned to tested code, not just docs

Most “AI-first” templates collapse under real project load because the prompts assume the code matches the docs. But every real product. has quirks, half-fixed migrations, style drift, edge cases not in the README. OTF starts with repo inspection — then adjusts every shipped prompt so that a fresh agent run lands working code, not broken half-matches.

Example adjustment (actual OTF kit fork):

The base prompt generated /features/profile.tsx — but the kit uses per-screen folders, so the CLAUDE.md specifies:
“All new profile screens live in /features/profile/ProfileScreen.tsx.”
The test runs, fails, prompt is revised, now passes — and ships locked in to the kit.

You don’t ship a “good prompt”; you ship a prompt that runs green to your codebase, every time.

scene — diagram of ai/prompts/ folder with “add feature”, “fix test”, “scaffold page” all

6. Concrete HOW: use these prompts in your own agent, today

Every OTF kit puts these prompts to work out of the box. Whether you spin up a local Claude CLI, wire Cursor’s Tasks to the .cursorrules, or hit a model from an OpenRouter task runner, the exact path is always visible, testable, and owned.

Example: wire up a task that runs OTF's “add-feature” prompt with Claude-3 on your own kit.

# Export your OpenRouter key and model name
export OPENROUTER_API_KEY=sk-or-xxx
export MODEL=claude-3-opus

# Run the agent with custom prompt and base context
otf-agent --prompt ai/prompts/add-feature.md \
          --instructions ai/prompts/CLAUDE.md \
          --context src/ \
          --model $MODEL

To run the same exact workflow in Cursor, reference the .cursorrules in your file tree and select the matching task.
For code editors that let you set system prompts (Claude Code, Lovable, Bolt), paste the needed project context and drop in the supplied prompt.

Every time you change your architecture or style, update the prompt library — not a black-box tool config — and watch agents adapt instantly.

7. OTF as the durable layer under the tool churn

Nothing in the prompt structure is hardwired to a single tool or model. Claude, Bolt, Cursor, Claude Code, plain OpenAI — the same prompt+rules+context triplet runs everywhere, because the OTF kit treats your prompt library as versioned, ownable infrastructure. When the model gets faster, cheaper, or more accurate, swap the runner — your code and prompt library stay. The durable interface is code + prompts + constraints, not bet-the-farm lock-in.

scene — evolution timeline of agent tools, OTF prompt+rules layer stays constant while too

That’s the engine behind “agents that extend your codebase, not just autocomplete it”.

What this enables: composable, real-world automation without model babysitting

  • Onboard a new model: Add the model to your agent runner, nothing else changes — prompts and instructions spell out your house style
  • Scale to new platforms: Same prompt library extends both your web UI and your mobile app — never repeating work
  • Ship new features: Write one prompt for new endpoints, screens, flows — agents know where the code should land and how it must look
  • Refactor with confidence: Agent runs update the repo, tests verify, OTF’s prompt library ensures alignment

Lesson: prompts are code — version, test, ship

If you want agents that do more than generate plausible boilerplate, treat your prompt and instructions library as inseparable from your code. OTF ships this discipline so your AI tools become team members, not interns with no onboarding. The path to reliable automation isn’t locked in a model — it’s in your version-controlled prompt library, paired to your real repo, just as critical as every component you ship.

ai-toolsagentsbackend
OTF SaaS Dashboard Kit

Ship the product, not the setup.

  • 11 production screens — auth, billing, team, analytics, settings
  • Real Postgres + Stripe + Better Auth, all wired on day 1
  • CLAUDE.md pre-tuned so your agent extends instead of regenerates