ActionPotential (the original spec)
12 design sections. Kiro workflow: requirements-first.
Kiro Lab
Every part below is a file in the repository, counted when this page opens: the specs Kiro built from, the rules and checks it worked under, and the MCP server and power it can use. The privacy check runs the power's prompt against a sandbox workspace built from sample data.
Kiro integration and privacy check
“Using ActionPotential, tell me who from yesterday's expo I should follow up with first.”
The withdrawn person appears only as { status: withdrawn }: no name, phone or email reaches the power.
Run the prompt to see the real answer
Step 1: choose capture mode
This preview shows Card photo only. Badge QR and Voice note work in Expo Mode on a phone.
Step 2: tag the lead
Needs a quote this week
Card only, no email
Browsing, took the catalogue
Asked for the art kit price list
Wants 2,000 notebooks before term starts
Preview with sample data: nothing here is saved or sent, and no camera opens.
Spec-driven build
Every task names the requirement ids it serves, and the tests cite the same ids. Tasks are ticked in tasks.md as they are done.
requirements.mddesign.mdtasks.md12 design sections. Kiro workflow: requirements-first.
13 design sections.
9 design sections.
Steering
Some are always in Kiro's context; others join when a matching file is open, or when asked for by name.
Build workflow (owner standing instruction, 2026-12-01; CR-02 waves added 2026-12-03). How the CR-01 spec is built: a whole phase at a time, a gate at the end of each phase, park and continue, one report per phase.
Product: ActionPotential. Who the product is for, its promise, the non-goals and the rule that splits [GP] from [Post-GP] work.
Structure, naming and tests. The folder layout, naming, where tests go and the working rules for every task.
Technology standards. The stack and the backend rules: tenancy and RLS, append-only records, audit, provider ports, the AI gateway, the consent gate and secrets.
Compliance rules. Consent and import rules: lawful bases under the DPDP Act, minors, channels, what may never be done or claimed, and retention.
Matches src/modules/consent/**, src/modules/import-*/**, src/modules/drafts/**
AI prompt rules. How each AI purpose is laid out under prompts/, with its rules: untrusted data blocks, schema-only output, verbatim quotes, guards and red-team cases.
Matches prompts/**
GUI standards. Design tokens, themes, contrast, accessibility, motion, phone-first layout and the Simulated labels.
Matches app/**/*.tsx, components/**, styles/**
Copy voice (#copy-voice). The plain-English voice for product copy, docs and drafts, with the banned words and example sentences.
Agent hooks
Each hook file names its trigger and the files it matches, and runs one Node script, so the same command works on every system.
| Hook | Trigger | Matches | Runs | What it does |
|---|---|---|---|---|
| H1 Parser guard | File saved PostFileSave | src/modules/import-[^/]+/.*\.ts$ | scripts/hooks/h1-parser-guard.ts | Runs the saved importer's unit and property tests and hands the failing case to the agent. |
| H2 RLS guard | File created PostFileCreate | db/migrations/.*\.sql$ | scripts/hooks/h2-rls-guard.ts | Adds the missing workspace_id, forced row-level security and policy to a new migration, then fails if anything is still missing. |
| H3 Append-only guard | File saved PostFileSave | db/migrations/.*\.sql$ | scripts/hooks/h3-append-only-guard.ts | Checks that audit_log, the consent tables and ledger_checkpoints keep their no-update and no-delete triggers. |
| H4 Prompt red-team | File saved PostFileSave | prompts/.* | scripts/hooks/h4-prompt-red-team.ts | Runs the red-team cases of the saved prompt's purpose. |
| H5 Copy and claims | File saved PostFileSave | (app/.*\.tsx|components/.*\.tsx|docs/.*)$ | scripts/hooks/h5-copy-and-claims.ts | Checks the saved page, component or doc for banned words and claims. |
| H6 Contrast and axe | File saved PostFileSave | styles/.* | scripts/hooks/h6-contrast-and-axe.ts | Recomputes every declared text and background contrast pair, then runs the axe suite at 1440 px and 360 px. |
| H7 Secret scan | Before a tool runs PreToolUse | shell | scripts/hooks/h7-secret-scan.ts | Before the agent's shell runs 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 PostFileSave | \.kiro/specs/action-potential/requirements\.md$ | scripts/hooks/h8-spec-sync.ts | Reports the tasks and tests that cite each changed requirement id. |
| H9 Demo seed refresh | File saved PostFileSave | seed/.* | scripts/hooks/h9-demo-seed-refresh.ts | 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 PostTaskExec | .* | scripts/hooks/h10-docs-page.ts | After a task, reminds the agent to update the feature's docs page and the build log. |
MCP servers
.kiro/settings/mcp.json configures 4 build-time servers. Every key in it is an environment reference, never a value.
| Server | Started with | What it is for |
|---|---|---|
postgres | npx @modelcontextprotocol/server-postgres · reads AP_READONLY_DATABASE_URL | Read-only SQL against a development database, through the connection in AP_READONLY_DATABASE_URL. |
browser | npx @playwright/mcp@latest | Browser automation with Playwright, to open and check pages. |
fetch | uvx mcp-server-fetch@2026.11.27 · 17 allowed hosts | 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 · reads GITHUB_PERSONAL_ACCESS_TOKEN | Issues and pull requests on GitHub, with a token from the environment. |
Each tool calls the same module the App's pages call, inside one workspace's row-level security. Approving, handing over, sending, withdrawing and deleting stay clicks in the App.
Kiro power
action-potential power, version 0.1.0Ask ActionPotential who to follow up first after an event, draft the messages for your approval, and check the consent records. Reads and drafts only: approving and handing over stay a click in the App.
Starts action-potential with node --experimental-strip-types ${AP_HOME}/mcp/main.ts, with AP_MCP_KEY, AP_DATABASE_URL, AP_APP_BASE_URL, AP_CONSENT_MASTER_KEY, AP_AUTH_SECRET, AP_SANDBOX_MODE from the environment.
Verify the workspace's Consent Ledger and list the people with no basis to contact them. Use it when the user asks to check consent, audit the ledger, or find who cannot be contacted.
After an Event (an expo, trade show or open day), list the hot leads in follow-up order, draft a follow-up for each person who can be contacted, for the owner's approval, and report the consent gaps. Use it for prompts like "who from yesterday's expo should I follow up first".
Custom agents
Reviews consent, import and draft code against the compliance steering file.
Tools: read, shell. Steering: compliance.md.
Edits product copy and docs to the ActionPotential voice and checks banned words and claims.
Tools: read, write, shell. Steering: copy-voice.md, ui.md.
Writes an importer parser and its unit and property tests (node:test) from a format description.
Tools: read, write, shell. Steering: structure.md, tech.md, compliance.md.
Build log
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. Hook H10 asks for an entry after each task.