Planning baseline for the final build. Last reviewed: 2026-08-01 23:34 IST. This file assigns remaining work; it does not claim that the work is already implemented.
precaution.mdremains mandatory for every payment/demo step.
Ship one coherent, judge-verifiable flow:
goal + budget
→ OpenAI-assisted intent and preference parsing
→ deterministic specialist negotiation over one finite pot
→ user chooses options inside each slice (minimum viable taste step)
→ user approves the exact allocation and choices
→ merchant-specific Prava sandbox authorization
→ amount/merchant-scoped credential attempt
→ honest checkout outcome
→ per-line audit receipt
Deliberate targets: Prava Overall, Visa Intelligent Commerce, OpenAI, and Localhost. Senso is conditional on real API access arriving early enough to change a merchant decision. NANDA is conditional on the core flow and public deployment being complete. Linq is cut.
-
Use one server-side OpenAI project/service-account key for the running Humsafar service, loaded only from
OPENAI_API_KEY. Do not create or expose a separate key for Flights, Stay, Food, Guide, or Mediator. -
If organizers gave credits/keys to multiple participants, each credential stays with its owner. Pick one team project credential for the demo runtime; do not paste several participant keys into source or distribute them to the browser.
-
Logical separation comes from distinct OpenAI
Agentdefinitions, instructions, tools, and structured output schemas—not from separate API keys. -
The intent definition is presented as the Budget Strategy Agent: it may choose categories and preference weights, but the deterministic engine alone turns provider prices into integer-paise allocations.
-
Use the Python OpenAI Agents SDK, which uses the Responses API by default. Keep models configurable through environment variables. The current official resolver names
gpt-5.6-solas the latest reasoning target; perform one account/model smoke check before making it the demo default. Use a cheaper, lower-latency account-supported model for repeated specialist calls. -
Configure sensitive-data protection before the first run:
OPENAI_API_KEY= HUMSAFAR_SPECIALIST_MODEL= HUMSAFAR_REASONING_MODEL=gpt-5.6-sol OPENAI_AGENTS_TRACE_INCLUDE_SENSITIVE_DATA=0 OPENAI_AGENTS_DONT_LOG_MODEL_DATA=1 OPENAI_AGENTS_DONT_LOG_TOOL_DATA=1
-
One trace/group ID maps to one Humsafar
runId. Traces may show agent names, reasoning stages, and sanitized option metadata; they must never contain API keys, payment tokens, CVVs, expiry, session tokens, or raw Prava responses.
Official references:
- Agents SDK: https://openai.github.io/openai-agents-python/
- Agent configuration and orchestration: https://openai.github.io/openai-agents-python/agents/
- Tracing and sensitive-data controls: https://openai.github.io/openai-agents-python/tracing/
| Logical agent | Model responsibility | Deterministic validation |
|---|---|---|
| Budget Strategy Agent | Parse an arbitrary goal into the subset of flights, stay, food, guide; extract user emphasis and constraints |
Reject unknown categories, invalid weights, invented budget, or missing required fields; the deterministic engine alone computes money |
| Four Specialist Agents | Explain the trade-off around real discovered options and the engine-provided ask/floor | Cannot set allocations, prices, merchant IDs, mandate IDs, or payment state; every stated amount must match supplied data |
| Mediator Explainer | Explain why the deterministic engine accepted concessions and the final split | Cannot edit the split or end condition; fallback text remains available |
| Taste Assistant | Summarize differences among shortlisted options without inventing ratings/reviews | User chooses; timeout uses the deterministic ranking rule and is labeled agent-timeout |
No OpenAI agent receives mintScopedCard, report-status, checkout, filesystem,
shell, or secret-reading tools. Payment execution remains ordinary audited code
after explicit human approval.
- Prava stays on SDK/API sandbox. MCP/CLI and production remain outside the critical path.
- One listed mandate belongs to one merchant. Never describe the target one-tap multi-merchant experience as implemented.
- Use a separate mandate for the over-cap proof and successful checkout unless Prava confirms that a failed cap attempt leaves a one-time mandate usable.
THRESHOLD_EXCEEDEDmust be propagated as structured data and observed before claiming card-network cap enforcement.- Credential issuance is not checkout. Report only the processor/merchant's actual outcome.
- If only one category uses a genuine Prava sandbox path, the run is mixed-mode and the other three purchases remain individually labeled fixtures.
Preethesh drafts these additions in INTERFACES.md; Jeswin and Deepthi review
them before dependent implementation:
- A
runIdon new command/approval/choice APIs and their related events. - Approval records bind
approvalRequestId, allocation/choice digest, expiry, and one-shot consumption. A stale approval can never authorize another run. mintScopedCardtransient result addstransactionId,dynamicCvv,expiryMonth,expiryYear,source: "sandbox", and structurederrorCode; all credential fields are redacted bysafe()and excluded from events/receipts.- A backend merchant-to-mandate resolver closes the current cross-process gap; Python must not depend on manually duplicating backend in-memory state.
- Result provenance distinguishes
fixture,sandbox, and genuine production data, with a separateenvironment: "test" | "production" | nullfor discovery inventory. - The taste step is conditionally accepted after the Prava gate. Minimum
slice: stable option IDs, two or more in-budget options,
choice_requested, run-correlatedPOST /api/choices, timeout, andchoice_made. Photos are polish and are cut first.
Branch: preethesh/integrations-backend
Priority 0 — unblock the core:
- Finalize the shared contract additions above and notify both teammates.
- Verify the local Prava sandbox key with
npm run prava:verify; never expose the key or team card. - Add sanitized structured Prava failure propagation, including
errorCode, without logging raw responses. - Implement the backend mandate resolver/sync contract used by Python.
- Implement run-correlated, expiring, one-shot approval storage and endpoints.
- Extend the transient checkout credential contract and prove secret fields never enter logs, SSE events, receipts, or exceptions.
Priority 1 — evidence:
- Create the hosted mandate session only when the human/browser is ready; verify the resulting mandate/merchant/cap.
- Run one deliberate over-cap proof on its own mandate and preserve only sanitized evidence.
- Validate one merchant/test-processor checkout boundary, report the observed
result truthfully, and expose a
sandboxresult envelope. - Add
POST /api/choices, stable option IDs,environment, and the minimal taste-step state only after steps 1–9 are green.
Priority 2 — track/deployment:
- Deploy the backend with
INTERNAL_API_TOKEN, same-origin/CORS decisions, HTTPS, health checks, and no secrets in build output. - Integrate real Senso only if access arrives before the cutoff and a test proves it changes the merchant choice. Otherwise leave it unclaimed.
Acceptance criteria:
- No external call occurs before sandbox verification.
- Prava failures remain distinguishable and sanitized.
- No credential reaches logs/events/receipts.
- One observed sandbox checkout outcome and one observed cap result have private timestamps/response IDs and public redacted evidence.
- Node tests, audit, syntax, diff, and secret scans pass.
Branch: jeswin/agent-core
Priority 0 — meaningful OpenAI use without moving money:
- Add a pinned Python dependency definition for
openai-agentsand retain a zero-key deterministic mode. - Replace the Chat Completions-only narrator with Agents SDK
Agent+Runnercomponents and structured outputs. - Implement Intent Agent parsing with a strict four-category allow-list, bounded priorities, validation, timeout, and keyword fallback.
- Implement four specialist agent identities and the mediator explainer. They receive real options and engine-generated figures; they cannot change prices, asks, floors, allocations, or convergence.
- Add sanitized run tracing with one trace/group per
runId; disable sensitive model/tool capture by default.
Priority 1 — payment/approval orchestration:
- Move the over-cap proof before purchase, target the actually selected merchant, and classify only the structured backend result.
- Consume Preethesh's mandate resolver; remove the need for a manually shared Python environment registry.
- Add a polled approval implementation bound to
runIdand allocation/choice digest. Decline or timeout mints nothing. - Extend
ScopedCard.safe()to redact every transient credential field. - Implement the minimal taste-step pause/timeout and buy exactly the chosen option after the Prava gate is proven.
Acceptance criteria:
- A missing/dead OpenAI key produces the same deterministic allocations and a complete run.
- Structured agent output cannot introduce unknown categories or money.
- Tests inject a fake runner; routine tests make no paid network calls.
- One opt-in smoke run proves the Agents SDK path and produces a sanitized trace with recognizable specialist identities.
- Budget sweeps, approval-before-mint, no-secret-event, cap classification, and timeout tests pass.
Branch: deepthi/frontend-demo
Priority 0 — make the current dashboard operable:
- Build editable goal and budget submission against a run-creation endpoint; preserve the mock/demo mode.
- Build the run-correlated approval UI showing the exact allocation and chosen options, expiry/countdown, approve/decline, and timeout state.
- Render
fixture,sandbox,production, andenvironment=testdistinctly; keep unknown provenance pessimistic. - Show OpenAI agent identity and stage in the deliberation/audit view without exposing chain-of-thought or sensitive traces.
Priority 1 — taste step after the Prava gate:
- Implement the minimum option-choice panel: two or more in-budget choices, honest rating/ranking basis, countdown, and user-vs-timeout attribution.
- Add photos only if real returned photos exist and the minimum flow is stable.
Priority 2 — ship and submit:
- Deploy the frontend against the HTTPS backend using a same-origin production path for SSE.
- Create the root
README.md, architecture diagram, setup instructions, disclosure, exact source labels, and track-evidence sections. - Record the demo with secrets redacted; show the genuine sandbox evidence, OpenAI agent behavior, deterministic budget guarantee, and mixed-mode labels.
- Complete Devfolio fields, screenshots, technologies, lessons, and publish early enough to verify the status is Submitted.
Acceptance criteria:
- A judge can enter a goal/budget, choose, approve/decline, and understand every result without narration.
- Fixture, sandbox, test-inventory, timeout, declined, and successful states are visually unambiguous.
- Reducer, render, accessibility, production build, SSE reconnect, and mobile layout checks pass.
- Video/README/Devfolio use identical claims and disclosures.
| Gate | Required result | Owners who may proceed afterward |
|---|---|---|
| G0 — docs/contracts | This plan plus reviewed interface additions | All three develop on personal branches |
| G1 — credential checks | Prava and OpenAI smoke checks succeed without exposing keys | Preethesh sandbox ceremony; Jeswin opt-in Agents run |
| G2 — backend primitives | Run/approval, mandate resolver, structured card result | Jeswin approval/card integration; Deepthi live forms |
| G3 — agent core | Agents SDK fallback, approval gate, corrected cap order | Full-stack dry run |
| G4 — Prava evidence | Honest cap and checkout outcomes recorded | Taste step, deployment, track polish |
| G5 — product integration | UI input/approval/provenance and complete SSE run | Video and final submission |
| G6 — release | HTTPS deploy, all tests, secret scan, redacted evidence | Publish Devfolio |
Contracts merge first from Preethesh. Jeswin and Deepthi may build tests against
the reviewed shapes in parallel, but neither merges dependent behavior until
the contract commit is on main. Every person pushes only their assigned branch
and merges after review/conflict/tests; no force pushes.
- First 4 hours: G0–G2, sandbox verification, OpenAI fake-runner work, frontend form/approval shell.
- Next 5 hours: agent integration plus deliberate Prava ceremony/proofs.
- Next 5 hours: full-stack integration and minimum taste step.
- Next 5 hours: deployment, README, screenshots and video.
- Remaining buffer: two complete rehearsals, fixes, Devfolio publish.
Cut in this order if any gate slips:
- Taste-step photos and visual polish.
- NANDA.
- Senso.
- Taste step entirely, reverting to the tested deterministic agent pick.
- Localhost-specific polish beyond a stable deployment.
Never cut the genuine Prava sandbox evidence, truthful labeling, explicit approval, OpenAI's meaningful structured role, demo video, or disclosure.
- The repo starts from documented commands with gitignored local secrets.
- All Node, Python, frontend render/build, security and secret checks pass.
- The deterministic engine never allocates or spends above budget.
- OpenAI Agents materially interpret the goal and explain grounded trade-offs, while failure degrades cleanly without changing money.
- No credential or sensitive trace data is stored or emitted.
- Prava evidence is genuine sandbox evidence and described exactly as observed.
- Every purchase line carries honest provenance; mixed-mode remains explicit.
- The public deployment, README, video and submitted Devfolio project agree.
Landed locally on Preethesh's branch and awaiting the one-shot merge:
- Dynamic five-screen journey with structured trip intake and no hard-coded destination list.
- Browser-started Python multi-agent run using backend provider discovery and trust checks.
- OpenAI narration enabled only when configured; deterministic money remains authoritative.
- Validated one-shot choice API; every selected option is affordable and bound into the approval digest.
- Choice now occurs before approval, and execution uses the approved option rather than selecting afterward.
- Run status, concurrency protection, child-process backpressure protection, and same-origin token proxy.
- Destination-aware fallback for arbitrary origin/destination/duration and requested journey mode; Duffel uses optional provider context, while a cached/keyless Nominatim client geocodes stays and Google remains an override.
- No router advisory chain: the five linear screens use the native History API; production audit is clean.
Still external/release work, not silently treated as complete: configure OpenAI,
Duffel, and Google server credentials; add real merchant booking adapters and
the passenger/contact fields they require; obtain transactional guide, rail,
restaurant, and local-transport partner access; deploy HTTPS; record and
publish the demo/submission. Prava sandbox delegation/cap evidence is already
complete, but it is not a merchant booking. See PRODUCTION-INTEGRATIONS.md.