Skip to content
ActionPotential

About this demo

Everything here is sample data. The people, companies, quotes and phone numbers are made up.

The AI is simulated, and its output is labelled Simulated. Nothing is sent to anyone.

Kiro Lab

How Kiro built ActionPotential, and what its MCP server sees

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.

Simulated offline queue and MCP

Kiro integration and privacy check

What the Kiro power receives through MCP, with personal data removed

“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

Expo Mode in a phone frame

Preview with sample data
Expo Mode · Delhi Stationery Expo

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

Offline queue (each capture syncs once)
  • Card photo · HotSynced once

    Needs a quote this week

  • Card photo · WarmSynced once

    Card only, no email

  • Card photo · WarmSynced once

    Browsing, took the catalogue

  • Card photo · HotSynced once

    Asked for the art kit price list

  • Card photo · HotSynced once

    Wants 2,000 notebooks before term starts

Preview with sample data: nothing here is saved or sent, and no camera opens.

Spec-driven build

Three specs, each written as requirements, then design, then tasks

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.

  1. requirements.md
  2. design.md
  3. tasks.md

Steering

8 steering files Kiro reads while it works

Some are always in Kiro's context; others join when a matching file is open, or when asked for by name.

  • build-workflow.mdAlways included

    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.mdAlways included

    Product: ActionPotential. Who the product is for, its promise, the non-goals and the rule that splits [GP] from [Post-GP] work.

  • structure.mdAlways included

    Structure, naming and tests. The folder layout, naming, where tests go and the working rules for every task.

  • tech.mdAlways included

    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.mdWhen a matching file is open

    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/**

  • prompts.mdWhen a matching file is open

    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/**

  • ui.mdWhen a matching file is open

    GUI standards. Design tokens, themes, contrast, accessibility, motion, phone-first layout and the Simulated labels.

    Matches app/**/*.tsx, components/**, styles/**

  • copy-voice.mdWhen asked by name

    Copy voice (#copy-voice). The plain-English voice for product copy, docs and drafts, with the banned words and example sentences.

Agent hooks

Hooks H1 to H10: the checks that run as Kiro edits

Each hook file names its trigger and the files it matches, and runs one Node script, so the same command works on every system.

The agent hooks, with the trigger, the files matched, the script run and what each does
HookTriggerMatchesRunsWhat it does
H1 Parser guardFile saved PostFileSavesrc/modules/import-[^/]+/.*\.ts$scripts/hooks/h1-parser-guard.tsRuns the saved importer's unit and property tests and hands the failing case to the agent.
H2 RLS guardFile created PostFileCreatedb/migrations/.*\.sql$scripts/hooks/h2-rls-guard.tsAdds the missing workspace_id, forced row-level security and policy to a new migration, then fails if anything is still missing.
H3 Append-only guardFile saved PostFileSavedb/migrations/.*\.sql$scripts/hooks/h3-append-only-guard.tsChecks that audit_log, the consent tables and ledger_checkpoints keep their no-update and no-delete triggers.
H4 Prompt red-teamFile saved PostFileSaveprompts/.*scripts/hooks/h4-prompt-red-team.tsRuns the red-team cases of the saved prompt's purpose.
H5 Copy and claimsFile saved PostFileSave(app/.*\.tsx|components/.*\.tsx|docs/.*)$scripts/hooks/h5-copy-and-claims.tsChecks the saved page, component or doc for banned words and claims.
H6 Contrast and axeFile saved PostFileSavestyles/.*scripts/hooks/h6-contrast-and-axe.tsRecomputes every declared text and background contrast pair, then runs the axe suite at 1440 px and 360 px.
H7 Secret scanBefore a tool runs PreToolUseshellscripts/hooks/h7-secret-scan.tsBefore 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 syncFile saved PostFileSave\.kiro/specs/action-potential/requirements\.md$scripts/hooks/h8-spec-sync.tsReports the tasks and tests that cite each changed requirement id.
H9 Demo seed refreshFile saved PostFileSaveseed/.*scripts/hooks/h9-demo-seed-refresh.tsRebuilds the demo seed, checks its sample files parse to the promised counts, then runs the demo and seed tests.
H10 Docs pageAfter a spec task PostTaskExec.*scripts/hooks/h10-docs-page.tsAfter a task, reminds the agent to update the feature's docs page and the build log.

MCP servers

The servers Kiro uses to build, and the one the App gives Kiro

.kiro/settings/mcp.json configures 4 build-time servers. Every key in it is an environment reference, never a value.

Build-time MCP servers
ServerStarted withWhat it is for
postgresnpx @modelcontextprotocol/server-postgres · reads AP_READONLY_DATABASE_URLRead-only SQL against a development database, through the connection in AP_READONLY_DATABASE_URL.
browsernpx @playwright/mcp@latestBrowser automation with Playwright, to open and check pages.
fetchuvx mcp-server-fetch@2026.11.27 · 17 allowed hostsReads web pages from a fixed list of documentation and DPDP sites only; every other host is refused, redirects included.
githubnpx @modelcontextprotocol/server-github · reads GITHUB_PERSONAL_ACCESS_TOKENIssues and pull requests on GitHub, with a token from the environment.

The ActionPotential MCP server: 9 tools, read and draft only

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.

today
What needs you: reviews waiting, follow-ups due, revival candidates, drafts waiting, and the recent and coming Events with their dates.
search_people
Find people by name, organisation, event or tag. A withdrawn person shows only the status withdrawn.
people_without_basis
List the people with no consent in force for any purpose, so no message can be drafted for them. Reads only; consent is recorded in the App.
get_timeline
One person's timeline across sources, with evidence.
import_status
Progress and findings of an import. Without an id, the newest import.
explain_consent
The basis, receipts and history of consent for a person, in plain words. Changes nothing.
revival_candidates
Ranked stalled deals with the reason each stalled.
draft_follow_up
Create a draft for your approval. It goes through the consent check and is never sent.
verify_ledger
Verify the workspace's consent chain and report the first break, if any.

Kiro power

The action-potential power, version 0.1.0

Ask 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

3 custom agents, each with its own tools and steering

  • 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

80 build log entries

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.