Skip to content

RFC: IND AS XBRL support via shared xbrl engine + ind_as adapter (upload → graph v1) #60

Description

@MHa55anY

Summary

This RFC proposes adding support for Indian IND AS XBRL filings in RoboSystems so they can be ingested and queried similarly to SEC XBRL, without extending the SEC EDGAR adapter into a multi-jurisdiction catch-all. The approach is a shared XBRL engine (adapters/xbrl/) plus a separate IND AS adapter (adapters/ind_as/), with a minimal v1: upload filings (S3/local) → Arelle-based processing → queryable graph. Automated India portal crawling, a shared India repository, MCP, and full SEC-feature parity are explicitly out of scope for v1.

Motivation: Problem

Today RoboSystems’ XBRL path is centered on SEC EDGAR + US filing/taxonomy assumptions (adapters/sec/). Indian companies file under the IND AS taxonomy with different packaging and distribution constraints. Those filings cannot currently enter the same parse → graph → query path.

Extending adapters/sec/ to also mean “India” would couple two jurisdictions, data sources, and operational models (EDGAR rate limits, EFM, SEC shared-repo ops, etc.) and works against clear module boundaries.

An external spike (Arelle successfully loading IND AS taxonomy-based reports) suggests the parse side is feasible; what we need is an agreed in-repo architecture before implementation PRs.

Motivation: Why Now?

  • Demand for querying non-US XBRL (IND AS) is a natural extension of the platform’s financial graph story.
  • A working Arelle + IND AS spike exists outside the repo, so design discussion can be grounded in something real.
  • Upstream SEC has become more SEC-specific (FactSet/report lifecycle, shared-master ops, etc.), which makes “bolt India onto sec/” a worse default than extracting a thin shared XBRL layer.
  • Aligning on boundaries now avoids a large, hard-to-review contribution and rework later.

Proposed Design: Overview

Principles

  1. Separation of concerns: SEC stays the SEC product; IND AS is its own adapter; shared XBRL mechanics live in a neutral module.
  2. Arelle for instance/DTS truth; a thin curated (or later generated) semantic profile for product-level canonical concepts — not hand-maintaining the full taxonomy as Python classes.
  3. Minimal vertical slice for v1 that is queryable and extensible; defer product/ops surface area.

High-level layout

adapters/xbrl/          # shared engine: Arelle load, normalize facts/structures
adapters/ind_as/        # India-specific: taxonomy packages, upload ingest, wiring
adapters/sec/           # remains EDGAR/SEC; may gradually call into xbrl/ later

v1 flow

  1. Operator/user places an IND AS filing package in S3 or local path
  2. ind_as adapter invokes xbrl (Arelle + taxonomy cache/packages)
  3. Emit a stable intermediate representation (subset OK) aligned where practical with existing SEC/reporting graph concepts (facts, elements, contexts, report linkage)
  4. Materialize into a normal user/demo graph
  5. Query via existing API/Cypher (success = basic facts / statement structure retrievable)

Explicit non-goals for v1

  • India government/exchange bot crawling (sites often restrict automated download; APIs unclear)
  • Shared repository for India (manifest, billing, platform-wide corpus like SEC)
  • MCP / agent tooling (easy to add later once the graph exists)
  • Full parity with SEC (narratives, iXBRL item extraction, corpus knowledge artifacts, incremental shared-master parking, ticker auto-resolve, full enrichment)

Proposed Design: Detailed Design

Architecture

  • adapters/xbrl/

    • Taxonomy-agnostic Arelle session/load helpers (instance + DTS / taxonomy packages; offline cache)
    • Normalization: facts, contexts, units, elements, basic presentation/structure → intermediate tables/parquet (or documented subset of current SEC processor outputs)
    • No EDGAR, no EFM-only assumptions in the core path
  • adapters/ind_as/

    • IND AS taxonomy package/bundle management
    • Ingest entrypoint: S3 URI or local path → process one filing (batch later)
    • Thin taxonomy semantic profile (optional in earliest PR): map a small set of concepts to canonical tags if needed for v1 queries; prefer deriving structure from Arelle first
  • adapters/sec/

    • Unchanged behavior initially
    • Optional follow-up: migrate shared pieces into xbrl/ behind SEC-compatible wrappers (incremental, no big-bang rewrite in the first IND AS PR)

Data model

  • Prefer reusing existing reporting/graph shapes (e.g. Report / Fact / Element / related edges, FactSet only if low-cost) so query patterns don’t permanently fork.
  • v1 may populate a subset of fields; document gaps vs SEC.
  • Do not require corpus-level knowledge artifacts for v1.

Ingest & runtime

  • Source: S3/local upload only in v1.
  • Target: private/user or demo graph (not a new shared ind repository).
  • Orchestration: smallest useful surface — CLI/just recipe and/or a single Dagster job later; full nightly pipeline not required for the RFC approval bar.

APIs / product surface

  • v1: existing graph query APIs / Cypher.
  • MCP: Phase 1.5+ (optional), after data is queryable.

Extension points (foundation)

Hook v1 Later
Filing source S3/local Approved bulk/API source if available
Taxonomy profile IND AS packages + thin optional map Generated profiles, richer canonical concepts
Shared repository Manifest + billing + hosted corpus (SEC-like)
Enrichment / MCP Semantic enricher parity, MCP tools

Implementation approach for first PRs

  1. RFC approval / direction from maintainers
  2. Small foundational PR(s): introduce xbrl skeleton and/or extract one SEC-safe shared helper with no behavior change
  3. Spike PR or follow-up: one real IND AS package → intermediate shape → graph → documented example queries
  4. Grow enrichment, automation, shared-repo only after the slice works

Alternatives Considered

Alternative Pros Cons
A. Extend adapters/sec/ for IND AS Faster short-term if we only copy processors Couples jurisdictions; fights SOLID; SEC ops/assumptions leak into India
B. Shared adapters/xbrl/ + adapters/ind_as/ (this RFC) Clear boundaries; reusable for future taxonomies; incremental extraction Slightly more upfront structure; needs care not to over-abstract
C. IND AS-only adapter with duplicated Arelle/processing Isolated; no SEC touch Duplication; harder to keep graph contracts aligned
D. v1 as shared India repository like SEC Product parity narrative Needs hosting, legal/source strategy, billing/manifest, crawler or bulk feed — too large for first contribution

Why this approach: B gives a solid, extensible foundation with the smallest honest v1 (upload → graph → query), while leaving shared-repo and MCP as deliberate later phases.

Implementation: Phases

  1. Phase 0 — Alignment: This RFC; confirm package layout and non-goals.
  2. Phase 1 — Foundation: xbrl module boundaries; optional no-behavior-change extraction from SEC; IND AS taxonomy cache/packages loadable via Arelle.
  3. Phase 2 — Vertical slice: S3/local ingest → process → materialize → example Cypher/API queries on a demo/user graph.
  4. Phase 3 — Harden: Better error handling, tests with redistributable fixtures, docs/just recipe.
  5. Phase 4+ (optional): Thin semantic profile; MCP; shared repository if product decides to host an India corpus; any legitimate automated source.

Implementation: Dependencies

  • Arelle (already used by SEC)
  • IND AS taxonomy packages (versioning/cache strategy)
  • Sample IND AS filings suitable for tests (licensing/redistribution must be respected; synthetic or clearly allowed fixtures preferred in-repo)
  • Existing graph materialization / query stack
  • Maintainer guidance on how aggressively to share code with sec/ in Phase 1 vs duplicate temporarily

Risks & Mitigations

Risk Mitigation
Over-abstraction in xbrl/ before second taxonomy is real Keep xbrl/ thin; only share what IND AS + SEC both need; extract incrementally
IND AS instance/DTS differences break SEC-shaped processors Document schema deltas; allow subset output in v1; spike early with real filings
Taxonomy / filing redistribution constraints Don’t commit proprietary filings; use S3 for real data; fixtures only if permitted
Scope creep toward SEC parity or shared repo Hard non-goals in RFC; success = queryable vertical slice
India source automation expectations State upload-only; crawler blocked until lawful API/bulk channel

Open Questions

  • Are maintainers aligned on adapters/xbrl/ + adapters/ind_as/, vs a thinner “IND AS-only first, extract xbrl/ later”?
  • For v1 graph shape: strict subset of current SEC reporting nodes/edges, vs allow a slightly India-specific schema with a mapping document?
  • Preferred v1 entrypoint: just/CLI only, or also a single Dagster job?
  • Any existing plans for non-US XBRL / IFRS that this should align with?
  • Guidance on taxonomy package bundling (similar to SEC’s Arelle schema bundles) vs download-at-runtime with cache?

References

  • robosystems/adapters/README.md — shared repository vs private adapter pattern
  • robosystems/adapters/sec/README.md — current XBRL → graph pipeline
  • .github/CONTRIBUTING.md — Feature → RFC → Spec workflow
  • External spike: local Arelle loading of IND AS taxonomy-based reports (outside this repo)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions