Docs
Loading the page
Loading the page
The specs, steering files, hooks, MCP servers, Kiro power and custom agents behind the build, with links to each file.
ActionPotential was built from Kiro specs, with steering files, ten agent hooks, build-time MCP servers and three custom agents. The App also ships its own MCP server and a Kiro power, so Kiro can read a workspace and draft messages for approval. This page lists each part with a link to its files. The Kiro Lab page shows the same parts with counts read from the files each time it opens, and runs the power's demo prompt against a sandbox workspace.
The sections below follow the build: the specs first, then the rules and checks Kiro worked under, then what the App offers Kiro in return.
Each spec has three files, written in this order: requirements.md (EARS requirements with acceptance criteria ids), design.md (the design and its correctness properties) and tasks.md (the build tasks, each naming the requirement ids it serves and the tasks it depends on). The original spec's .config.kiro records the workflow as requirements first.
| Spec | Requirements | Acceptance criteria | Correctness properties | Tasks | Sub-tasks |
|---|---|---|---|---|---|
| ActionPotential | 46 | 427 (AC-R ids) | 15 (AC-P1 to AC-P14, with AC-P8 split in two) | 58 | 117 |
| Change request 01 | 60 | 222 (CR1-R ids) | 12 (CR1-P1 to CR1-P12) | 66 | 113 |
| Change request 02 | 47 | 128 (CR2-R ids) | 13 (CR2-P1 to CR2-P13) | 86 | 0 |
npm run spec:sync (hook H8) reports the tasks and tests that cite each changed requirement id.tasks.md as they are done. The Kiro Lab page shows how many are ticked today.PRD/ActionPotential-prd-addendum-01.md). Its steering file build-workflow.md sets how it is built: a whole phase at a time, with a gate at the end of each phase.Eight files in .kiro/steering/. Kiro includes them always, when a matching file is open, or when asked by name.
| File | Included | What it does |
|---|---|---|
product.md | Always | Who the product is for, its promise, the non-goals and the rule that splits [GP] from [Post-GP] work |
tech.md | Always | The stack and the backend rules: tenancy and RLS, append-only records, audit, provider ports, the AI gateway, the consent gate and secrets |
structure.md | Always | The folder layout, naming, where tests go and the working rules for every task |
build-workflow.md | Always | How the specs are built: a whole wave at a time, a gate at the end of each wave, park and continue, one report per wave; CR-02's zones, contracts, migration slots and branches |
compliance.md | Consent, import and draft code | Consent and import rules: lawful bases under the DPDP Act, minors, channels, what may never be done or claimed, and retention |
prompts.md | Files under prompts/ | How each AI purpose is laid out, with its rules: untrusted data blocks, schema-only output, verbatim quotes, guards and red-team cases |
ui.md | Pages, components and styles | Design tokens, themes, contrast, accessibility, motion, phone-first layout and the Simulated labels |
copy-voice.md | By name (#copy-voice) | The plain-English voice for product copy, docs and drafts, with the banned words and example sentences |
Ten files in .kiro/hooks/. Each runs node --experimental-strip-types scripts/hooks/<hook>.ts, so the same command works on Windows, macOS and Linux.
| Hook | Trigger | Runs when | What it does |
|---|---|---|---|
| H1 Parser guard | File saved | An importer file under src/modules/import-*/ | Runs that importer's unit and property tests and hands the failing case to the agent |
| H2 RLS guard | File created | A migration under db/migrations/ | Adds the missing workspace_id, forced row-level security and policy, then fails if anything is still missing |
| H3 Append-only guard | File saved | A migration | Checks that audit_log, the consent tables and ledger_checkpoints keep their no-update and no-delete triggers |
| H4 Prompt red-team | File saved | A file under prompts/ | Runs the red-team cases of that prompt's purpose |
| H5 Copy and claims | File saved | A page, a component or a doc | Checks the file for banned words and claims |
| H6 Contrast and axe | File saved | A file under styles/ | Recomputes every declared text and background pair, then runs the axe suite at 1440 px and 360 px |
| H7 Secret scan | Before a tool runs | The agent's shell tool | Before a git commit, scans the staged changes for secrets and personal data and blocks the commit when it finds any |
| H8 Spec sync | File saved | The original spec's requirements.md | Reports the tasks and tests that cite each changed requirement id, for the original, CR-01 and CR-02 specs |
| H9 Demo seed refresh | File saved | A file under seed/ | Rebuilds the demo seed, checks its sample files parse to the promised counts, then runs the demo and seed tests |
| H10 Docs page | After a spec task | Every task | Reminds the agent to update the feature's docs page and the build log |
.kiro/settings/mcp.json configures four servers for building the App. Every key in it is an environment reference, never a value.
| Server | Started with | What it is for |
|---|---|---|
postgres | npx @modelcontextprotocol/server-postgres | Read-only SQL against a development database, through AP_READONLY_DATABASE_URL |
browser | npx @playwright/mcp | Browser automation with Playwright, to open and check pages |
fetch | uvx mcp-server-fetch | Reads web pages from a fixed list of documentation and DPDP sites only; every other host is refused, redirects included |
github | npx @modelcontextprotocol/server-github | Issues and pull requests on GitHub, with GITHUB_PERSONAL_ACCESS_TOKEN from the environment |
The App's own server (mcp/server.ts, started by mcp/main.ts) reads one workspace and drafts for approval. Each tool calls the same module the App's pages call, inside that workspace's row-level security (mcp/pg-adapters.ts).
| Tool | What it returns or does |
|---|---|
today | Reviews waiting, follow-ups due, revival candidates, drafts waiting, and the recent and coming events with their dates |
search_people | People by name, organisation, event or tag. A withdrawn person shows only the status withdrawn |
people_without_basis | The people with no consent in force for any purpose, with or without a tag or event; reads only |
get_timeline | One person's history across sources, with evidence |
import_status | An import's progress and findings |
explain_consent | A person's basis, receipts and history; changes nothing |
revival_candidates | Stalled deals, highest score first, with the reason each stalled |
draft_follow_up | Creates a draft. The consent check decides whether it is waiting or blocked |
verify_ledger | Checks the consent chain and names the first break, if any |
The server never approves, hands over, sends, withdraws or deletes: those are clicks in the App. The key, the process and the limits are in The MCP server and the Kiro Power.
power/ packages the server for Kiro:
plugin.json: the power's name (action-potential), version and description.mcp.json: starts mcp/main.ts with Node, with the key, the database URL and the other settings as environment references only.dev.kiro/INSTRUCTIONS.md: setup, the tools and the rules Kiro follows.event-follow-up lists an event's hot leads in follow-up order, drafts a follow-up for each person who can be contacted and reports the consent gaps; consent-audit verifies the consent chain and lists the people with no basis to contact them.Three files in .kiro/agents/.
| Agent | Tools | Steering it loads | What it does |
|---|---|---|---|
compliance-reviewer | read, shell | compliance.md | Reviews consent, import and draft code against the compliance steering file and reports findings |
copy-editor | read, write, shell | copy-voice.md, ui.md | Edits product copy and docs to the ActionPotential voice and checks banned words and claims |
importer-builder | read, write, shell | structure.md, tech.md, compliance.md | Writes an importer parser and its unit and property tests from a format description |
docs/build-log.md (also at /docs/build-log) has one entry per task or session: what it produced, the requirement ids it served, and the tests that ran or did not run, with the reason. It is append-only. Hook H10 asks for an entry after each task.
"Run the Kiro power prompt" on /lab runs the power's demo prompt the way the event-follow-up skill starts: it calls today, then search_people for "expo", then search_people for the organisation of a sample person who withdrew consent. The calls go through the App's MCP server code in the web process, with a sandbox workspace's own MCP key. The sandbox is built from the demo seed, used for 24 hours and then deleted like a demo copy.
The answer is the JSON the power would receive: each tool's result, the AI tokens the run used and the injection check of each result. The withdrawn person appears only as { "status": "withdrawn" }. Before the answer is shown, the App checks that no name, email or phone of a withdrawn sample person is in it, and withholds the answer if one is. These two tools read stored data and call no AI model, so the token counts are 0.
| What you see | What to do |
|---|---|
| A count on the Kiro Lab page reads 0 | That file is not in this build of the App. The links still open the files on GitHub. |
| "The privacy check could not run right now" | The sandbox needs the App's database. Try again in a moment; the rest of the page works without it. |
| "Too many requests" after running the check | The check runs at most 30 times a minute from one address. Wait for the time shown. |
| The answer was withheld | The redaction check found details of a withdrawn person. Nothing was shown. Report it with the time of the run. |