Skip to main content

Ways of working

The contract every agent (human or AI) signs implicitly when they pick up a ticket from 05-agents.md. The constraints in 00-README.md are restated here with operational mechanics.


Branch policy

  • main — protected, deploys to prod via .github/workflows/deploy.yml.
  • dev — protected, deploys nothing automatically; integration branch for the whole team.
  • All work happens on dev (per the user's branch-workflow note in ~/.claude/projects/.../memory/MEMORY.md).
  • PRs go from devmain only when:
    • a phase exit gate is met, OR
    • a sprint exit gate is met and accumulated commits have been reviewed.
  • No chore/*, feat/*, fix/* feature branches. The branching policy is dev + main only.

Commit-time gates (run automatically by pre-commit hook + CI)

  1. tsc --noEmit — zero errors.
  2. eslint . — zero errors (warnings allowed but reviewed).
  3. jest --findRelatedTests <staged> — green.
  4. Secret scan — staged content does not contain any of the patterns enumerated in 00-README.md standing constraint #10.
  5. Forbidden-payload-key scan — Express handler files do not introduce any of image|template|pixel|depth|frame|raw_face|raw_finger.
  6. ADR-trail scan — new dependencies in package.json have a matching ADR; new circuit version (changed *.zkey) has a matching ADR.
  7. Commit-message gate — subject ≤ 72 chars, imperative mood (rejected if starts with feat:, fix:, WIP, [brackets], or contains an emoji); body contains no Co-Authored-By: Claude.

Override (--no-verify) is disallowed. CI runs the same gates and rejects the merge if any commit on the branch fails them.


Sub-agent rules

The security-reviewer and cryptographer-reviewer sub-agents are invoked automatically on PRs that touch sensitive paths. The mapping:

Touched pathInvokes
src/middleware/tenant-auth.tssecurity-reviewer
src/services/api-keys.ts, src/services/tenants.tssecurity-reviewer
src/services/jwt.ts, src/services/key-management.tssecurity-reviewer + cryptographer-reviewer
src/routes/v1/zkp.ts, src/services/zkp.ts, src/services/proof-pairing.tssecurity-reviewer + cryptographer-reviewer
src/services/identity.ts, src/services/attestation.tssecurity-reviewer + cryptographer-reviewer
src/services/audit.ts, src/services/platform.ts (audit-write paths)security-reviewer + cryptographer-reviewer
circuits/**cryptographer-reviewer
contracts/**cryptographer-reviewer + security-reviewer
any new hash construction (introduced by ADR)cryptographer-reviewer

The PR is not mergeable until the relevant sub-agent posts an explicit APPROVE row in the PR thread. REQUEST_CHANGES blocks the merge.


Plan mode

Mandatory for any change touching ≥ 5 files OR any of:

  • src/services/zkp.ts
  • src/services/identity.ts
  • src/services/api-keys.ts
  • src/services/audit.ts
  • src/middleware/tenant-auth.ts
  • src/routes/v1/zkp.ts, src/routes/v1/identity.ts
  • circuits/**
  • contracts/**
  • mobile/prover/**
  • mobile/keystore/**

Skipping plan mode → PR is reverted, agent is reminded.


Definition of Ready (per ticket)

A ticket is ready to be picked up when:

  • Commit ID + subject documented in 04-commits.md.
  • Files-to-touch listed.
  • Test-to-pass listed.
  • Owning agent role number assigned.
  • Dependencies on prior commits resolved (or explicitly known and tracked).
  • ADRs needed (if any) referenced.

A ticket that is not Ready is escalated to the line VP within 24 h.


Definition of Done (per commit)

  • Commit subject ≤ 72 chars, imperative, no prefix, no emoji.
  • Commit body explains the why; references audit-finding / pain-point ID where applicable.
  • Pre-commit hook green.
  • CI green on the branch the commit lives on.
  • Test that was added passes; tests that existed before still pass.
  • Sub-agent review (where applicable) posted APPROVE.
  • ADR (if any) landed.
  • Documentation (docs/threat_model.md, docs/api_contract.md, docs/error_codes.md) updated where applicable.

Definition of Done (per sprint)

  • All anchor commits in the sprint are merged into dev.
  • All Friday status updates posted; blockers resolved or escalated.
  • Sprint retrospective held; lessons captured in docs/team/retros/<sprint-N>.md.
  • Phase exit gate (if applicable) confirmed green.

Definition of Done (per release)

  • All sprint exit gates within the release green.
  • Security-reviewer + cryptographer-reviewer signed off on the release artefact.
  • Threat model current with release scope.
  • Audit-findings doc shows all in-scope findings closed.
  • Deploy pipeline green on main.
  • Release notes published.
  • Rollback plan tested in staging within the past 7 days.

Daily cadence

Time ISTEventAttendeesOutput
09:30Engineering standup (15 min)All engineering agentsBlockers, plan for the day
10:00Sub-agent review queue checkRole 26, 27PR-review backlog cleared
14:00Mobile sync (Mon, Wed, Fri only, 20 min)Roles 4, 17, 18, 19Device-fleet state, prover progress
16:00Backend + crypto sync (Tue, Thu only, 20 min)Roles 2, 6, 7, 8, 11, 12, 13Audit-chain progress, prover spec
18:00 (Fri)Weekly status postsAll 50 agents4-line status to channel

Weekly cadence

DayEvent
Mon AMSprint planning (sprint start) or progress review (mid-sprint) — Role 1 + VPs
Wed PMCross-line architecture sync — Role 1 + VPs
Fri PMFriday status posts; line VPs read all 50
Fri PM (end of sprint)Sprint retrospective + next-sprint dispatch

Monthly cadence

DateEventOutput
1st of monthPhase progress review with Role 1 + Role 28 + Role 36 + Role 42Phase exit-gate status
15th of monthRisk register review with Role 40Updated risk register
Last FridayCost / spend review with Role 50Budget vs. actual

Escalation

IssueEscalate toWithin
Engineering technical blockerLine VP (Roles 2, 3, 4, 5)Same day
Security / crypto open questionRoles 26, 27Same day
Compliance / regulator questionRole 36Same day
Customer escalationRole 42 → Role 464 h
Severity-1 production incidentRoles 5, 21, 26 → Role 1Pageable, 15 min
Sub-agent REQUEST_CHANGES not addressedRole 124 h
Phase exit gate at riskRole 1 + line VPs1 week before gate

Documentation hygiene

Every PR is responsible for keeping these documents current:

  • docs/api_contract.md — new endpoint, changed endpoint, deprecated endpoint.
  • docs/error_codes.md — new error code.
  • docs/threat_model.md — new attack vector mitigated, new attack vector identified.
  • docs/security/audit-findings.md — finding closed (with the closing commit hash).
  • adr/<n>.md — new ADR (numbered sequentially).
  • docs/plan/bfsi-v1/04-commits.md — commit listed in the table (yes, this doc).
  • docs/plan/bfsi-v1/05-agents.md — agent's ticket marked complete in their week.

CI lints 04-commits.md and 05-agents.md for commit IDs that don't match any merged commit, and for commits in git log that don't appear in the plan.


When the plan is wrong

The plan in this directory is a working hypothesis. It is wrong in details, and probably wrong in shape too. The expected escalation:

  1. Agent notices the plan does not match reality.
  2. Agent posts a plan-change-proposal in the team channel with three lines: what is wrong, what should it be, what is the impact.
  3. The owning role (per 03-team.md) responds within 24 h.
  4. If the change passes review, a PR updates the relevant document and the new plan is in effect from merge time.
  5. The ADR trail captures the rationale if the change is material.

Do not silently work to a different plan. Update the plan, then work to the updated plan.


LAST_UPDATED: 2026-05-27