Welcome to GovtInvoice Discussions! #89
Replies: 4 comments
|
Hi everyone, and thanks @seetadev for opening this up. I came in via the DMP 2026 Agentic Invoice Co-Pilot issue (#37). The piece that pulled me in is the "Trust Boundary" between agent suggestions and finalized, paid records. In public-sector billing, a confidently hallucinated total that slips into an immutable, auto-settled invoice is a major liability. Glad to be here and to learn from everyone! |
|
Hi @seetadev, @aspiringsecurity, @prithagupta and everyone in the thread: Sharing my DMP 2026 proposal here, as requested in the Issue #37 thread comment. Full design doc + visuals attached below; this comment is the high-level summary. Repo POC: github.com/zsklav/invoice-guard (working code, ~60-case property test pinned in CI) TL;DRLLM-generated invoices in public-sector billing are useful only if every finalized record is provably correct. This proposal hardens GovtInvoice by inserting a deterministic validation gate between any agent suggestion and any irreversible state (IPFS pin, on-chain settlement), plus a payment-adapter interface so the core flow survives x402 / MPP / ERC-8004 spec churn. Both layers are already prototyped in The single verified safety property the design carries:
What's different from a save-time checkThe structural problem I'm trying to address: the same My W1–W2 deliverable:
Issue #48 closes by construction the moment this lands. Existing save-time validators continue to live underneath the gate as additional defenses. Three architectural layers, strict directionality
Layer 1 — Agentic Drafting Zone (FastAPI + LangChain). Proposes drafts; architecturally prohibited from writing to finalized state. Layer 2 — Deterministic Validation Gate (POC: Layer 3 — Immutable Finalization. First-class integration with The angle nobody's named yet — payment-adapter interface for spec volatilityThe brief names three settlement standards: x402 (programmable HTTP payments), MPP / Tempo (multi-party / streaming), ERC-8004 (agent-driven payments). None are finalized; all three are likely to change shape over 12–18 months. A naive implementation hardcodes whichever rail looks most stable today and breaks on the next spec revision. The defensible design is an adapter boundary: class PaymentAdapter(Protocol):
def can_settle(self, invoice: FinalizedInvoice) -> bool: ...
def settle(self, invoice: FinalizedInvoice) -> SettlementReceipt: ...
def supports_milestones(self) -> bool: ...
def supports_multi_recipient(self) -> bool: ...
class X402Adapter(PaymentAdapter): ...
class MPPAdapter(PaymentAdapter): ...
class ERC8004Adapter(PaymentAdapter): ...
class MockAdapter(PaymentAdapter): ... # for tests / demosThe core flow only ever calls
12-week plan (phase-gated, mentor-verifiable)
What this proposal does NOT claimHonest scoping so the committee knows where the work ends:
Two wireframes — the operational dashboard this would ship with
One question for the maintainers (W0 alignment)Would you prefer the validation gate as:
Both have scaffolding in Engagement already underway
Thanks for reading looking forward to feedback from the committee and anyone else in the thread. Vanshikha |
|
Hey @seetadev @prithagupta @aspiringsecurity, I’m Neha Yadav, a sophomore at IIIT Guwahati, and I’ve been actively exploring and contributing to GovtInvoice over the past few days, mainly around SocialCalc workflows, invoice generation UX, save/export flows, and Web3-related integrations. Here’s a summary of my contributions so far: Save Flow + UX Fixes• PR #85 — fixed async save flow handling issues in the React app While working on these, I spent time understanding the existing save lifecycle, workbook state handling, and how SocialCalc flows interact with the Ionic UI layer. Web3 / Storage Integration• PR #88 — added Lighthouse/IPFS integration for decentralized invoice storage This adds a “Save to IPFS” workflow using Lighthouse along with CID + gateway URL generation for uploaded invoice data. Export Workflow Improvements• PR #90 — added CSV export support for SocialCalc invoice data This involved parsing serialized spreadsheet content into structured CSV output while supporting formula/result handling and both PWA + hybrid/mobile export flows. Structured Invoice Generation Workflow• PR #93 — added structured invoice metadata header generation directly inside the spreadsheet workflow This contribution focused on improving the current spreadsheet-first UX by introducing structured invoice input fields that automatically generate invoice headers and starter line-item sections directly into the SocialCalc sheet. One thing I’ve genuinely found very interesting while exploring the project is how GovtInvoice is evolving beyond a simple spreadsheet interface into a broader workflow around structured invoice generation, AI-assisted flows, decentralized storage, and Web3-enabled payments. That direction honestly feels very exciting to contribute to and learn from. I’m still actively exploring the codebase and would genuinely appreciate feedback on any of the PRs whenever maintainers get time to review them. Also, if there are any specific modules, roadmap areas, or issues where contributors are especially needed, I’d really love to contribute there as well. Looking forward to learning and contributing more with the community. |
Proposal Discussion — Agentic Invoice Co-Pilot | Harshit Kandpal, IIT BhilaiHello @seetadev, @aspiringsecurity, and @prithagupta, I'm Harshit Kandpal, a first-year CSE undergraduate at **IIT Bhilai **. I've submitted my proposal for the Agentic Invoice Co-Pilot under DMP 2026 a. I want to use this discussion to walk through my background, my codebase understanding, the architecture I've designed, and invite feedback from the mentors. BackgroundMy work sits at the intersection of AI systems, blockchain infrastructure, and production full-stack engineering. I've shipped real systems under real constraints across large open-source ecosystems and production environments. Open Source — Large Production Ecosystems
Achievements
Contributions to This RepositoryBefore writing a single line of my proposal, I made three targeted PRs to seetadev/GovtInvoice to understand the system from the inside: 1. Firestore-based rate limiting 2. Authentication enumeration hardening 3. Spreadsheet grid toggle These weren't surface-level changes. Each one required tracing real execution paths through the app, which is why the architecture I'm proposing is grounded in how the codebase actually works. System UnderstandingAfter studying the repository thoroughly, I identified seven core subsystems:
The critical architectural insight: All invoice operations route through the SocialCalc workbook bridge. This means an AI system cannot simply output flat JSON — it must produce or patch a coordinate-mapped workbook structure. My design handles this by separating concerns: AI outputs a clean normalized invoice schema, and a dedicated conversion utility handles all workbook patching, cloning the existing template and updating only editable cells while preserving every formula and formatting rule untouched. Proposed ArchitectureOverview
The system is organized into four layers:
This layered separation means existing workflows — editing, saving, syncing, exporting — are never at risk of regression. Layer 1 — AI Invoice Generation & ValidationThe user opens the AI Prompt Modal and describes the invoice in natural language or fills a structured form. The request goes to The AI outputs a normalized invoice schema — not SocialCalc workbook data directly. This schema contains:
A parallel validation pipeline then checks:
Validation warnings surface as dismissible chips in Layer 2 — Workbook Conversion & Filecoin Archival
Firebase continues storing editable working documents. Filecoin stores tamper-evident archival snapshots. These are two separate concerns — operational storage vs audit storage — kept cleanly separated.
Layer 3 — Payment & Audit
The payment flow is intentionally straightforward and verifiable: This creates a permanent, verifiable link between the archived invoice (CID on Filecoin) and its payment (txHash on-chain). Both are displayed together as proof in the UI, with links to the decentralized gateway and block explorer. Native apps register custom URL schemes; the PWA uses query-parameter routing — so deep links resolve correctly across all three deployment targets. Relevant Past ProjectsAuthrNet — Decentralized Publishing Platform IIT Bhilai RAG Agent Inter IIT Adobe Hackathon — AI Image Segmentation (12th / 23 IITs) FOSSEE Internship — IIT Bombay Implementation TimelineMonth 1 — AI Layer (Mid-point milestone deliverable)
Month 2 — Workbook Conversion + Filecoin Archival
Month 3 — Payments, Deep Linking, Testing, Deployment
Stretch goals (time permitting): I'm happy to discuss any part of the architecture, technical tradeoffs, or implementation choices. Looking forward to feedback from the mentors. — Harshit Kandpal |







Uh oh!
There was an error while loading. Please reload this page.
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
All reactions