Skip to main content
Compliance is cheapest when it is designed in, not bolted on after a finding. This playbook is for developers who already have the Keldyn MCP server connected in Claude Code, Cursor, or another MCP client. Use the prompts below at each stage of the software development lifecycle (SDLC) so your agent writes against your organization’s controls from the first session, then keeps the work aligned as you design, implement, review, and ship.
Every MCP tool call runs as you, scoped to the team you selected at sign-in. Marking a control complete, saving evidence, or recording a risk disposition writes to your live Keldyn workspace. Ask the agent to show its plan before it saves, and keep a person accountable for what ships — see Responsible use.

How to use this guide

  • Copy a prompt, fill the placeholders, then send it to your agent. Replace <USE_CASE_ID> with a real use case UUID (list-use-cases if you don’t have one). Replace scoped paths (apps/api) with your package or service.
  • Prefer the built-in MCP prompts (start-dev, review-changes, review-codebase, generate-architecture, collect-evidence, remediate-insufficient-evidence) when they match the job. They load your live controls and standing security rules automatically. The freeform prompts in this guide tell the agent when and how to invoke those workflows.
  • Do not paste secrets, source dumps, or customer data into prompts that reach Keldyn. The agent should read the repo locally and send only the tool arguments Keldyn needs (ids, status, evidence notes).

Before you start

1

Connect the MCP server

Follow Keldyn MCP server and sign in to the team that owns the system you are building.
2

Open the repository

Run the agent from the repo (or monorepo package) that implements the system, so it can read code, diffs, and tests.
3

Know the use case

Have the use case id ready, or ask the agent to find it. Org-level and use-case tracking are separate — pass useCaseId whenever you mean the use case.

The SDLC at a glance

1. Kick off — compliant from the first line

start-dev is the pre-development counterpart to the review prompts. It loads each applicable control’s developer guidance (developerPrompt) so the agent treats those rules as standing requirements for the session, instead of discovering them at review time. Run it at the start of every new chat that will write or change code.
Without a use case, start-dev merges org controls plus developer-relevant controls from every team use case (including use-case-only frameworks such as CASA):
Add repo-specific rules (for example the contents of a KELDYN.md) as extra instructions:
If you skip start-dev and jump straight to implementation, the agent will still can look up controls later — but it is more likely to write a first draft that review then has to unwind. Priming first is the cheapest compliance step in the SDLC.

2. Register a new system

When you are starting a product, service, or AI feature that is not yet a Keldyn use case, create it and assign the frameworks it must satisfy before you generate an architecture or write the first feature.
Then attach the frameworks that apply (SOC 2, ISO 27001, GDPR, CASA, AppSec, and so on):
Controls only appear after a framework is assigned and scoped. If list-controls comes back empty, check the use case’s frameworks first. See Frameworks & controls.

3. Design — model the system and find issues early

Threat modeling and architecture-based control checks need a saved Threagile model. Infer it from the code (and infrastructure-as-code), then analyze it before you commit to a design that is expensive to unwind. Full walkthrough: Generate an architecture from your codebase.
Once it is saved, run analysis:
Work the highest-severity batch first (the tool returns up to 32 issues per call):
Design-time analysis is not a substitute for code review. Architecture checks catch missing auth on a link or an unencrypted datastore; review-changes catches the implementation that forgot the middleware.

4. Implement — write to the acceptance criteria

Keep start-dev in the session, then pull the specific controls your change will touch. Ask for the full requirement, developer guidance, and acceptance criteria — not just the title.
For a concrete feature, bind the work to those criteria up front:
If work is already tracked as tasks:
Only mark a control complete when the code (or a dated N/A reason) genuinely meets its acceptance criteria. Infra, policy, and hosting-platform controls usually cannot be closed from application code alone — leave those as tasks or notes, not complete.

5. Review — before you commit or open a PR

review-changes is not a generic code review. It loads each code-relevant control’s PR review criterion and judges only your current diff against those controls — including regressions against prior evidence on controls already marked Implemented. Run it on every meaningful change, before you commit.
Scope it to a branch or a path:
Then fix and re-run:
Once you have a baseline (review-codebase or a completed controls-to-code pass), review-changes is the day-to-day habit. Re-scanning the whole repo on every PR is slower and easier to skip.

6. Baseline an existing codebase

Use review-codebase when you inherit a repo, add a new framework, or want a periodic audit of a package — not for every commit.
Scope it in a monorepo:
Turn the report into tracking (the controls-to-code loop):

7. Evidence — prove it, then record it

Positive evidence is what auditors (and future you) will read. collect-evidence scans for proof that code-related controls already hold, then waits for you before saving.
If recorded evidence failed acceptance criteria (status Insufficient Evidence or an open linked finding), remediate it instead of inventing coverage:
For a deeper implement + test + evidence loop, see Address and evidence controls.

8. Ship and stay current

Compliance is not a one-off gate. After merge and as the system changes, keep three things in sync: the architecture model, risk dispositions, and control evidence.

Before you merge

After you ship a control fix

After a significant design change

New services, stores, or integrations go stale in the threat model if you do not refresh it.
Disposition every remaining Threagile risk — fixed, accepted (with who/why), or out of scope. Full loop: Resolve architecture risks.

Periodic hygiene

Prompt cheatsheet

Copy-paste starters. Fill placeholders; prefer the named MCP prompt when one exists.

Ground rules while you work

  • Controls over convenience. If guidance conflicts with a request, the agent should surface the tension and prefer the control-compliant option.
  • File-backed evidence only. Paths and short “how” notes beat “we do encryption.”
  • No silent N/A. If a control is out of scope, record a dated reason (ignored / Not Applicable) instead of leaving it Pending Review.
  • Human approval on writes. Status, evidence, risk acceptance, and Trust Center changes need a person to confirm.
  • Do not weaken a control to make a feature easier without an explicit, recorded decision.

Next steps

Keldyn MCP server

Connect your client and see the full tool and prompt catalog.

From controls to code

Read controls, analyze the repo, mark what’s done, and open tasks for gaps.

Address & evidence controls

Implement each code-relevant control and back it with a test plus evidence paths.

Architecture from code

Infer a Threagile model from the repository and analyze it.

Resolve architecture risks

Give every CWE a documented disposition: fixed, accepted, or out of scope.

Responsible use

What KC is for, what it isn’t, and where judgement stays with a person.