Skip to content

[RAG API] Bootstrap the package and define generic contracts #2

Description

@rica-v3

Parent and project

Objective

Bootstrap the independently buildable generic-rag distribution and define the minimal immutable public values and injected protocols needed by projection and retrieval.

In scope

  • Apply the approved repository-engineering bootstrap and add the project-owned README, Python package manifest, module index, source/test/docs layout, and CI.
  • Publish immutable validated values for opaque corpus/document/revision/query/hit/result and projection receipts.
  • Publish narrow injected protocols for embedding, vector indexing, lexical retrieval, clocks where needed, and explicit resource borrowing.
  • Use tuple-based string attributes rather than application objects or unconstrained Any.
  • Define generic typed exceptions and import-time side-effect guarantees.
  • Provide deterministic test fakes owned by tests, never production.
  • Document compatibility, lifecycle, privacy-neutral boundaries, and semantic versioning expectations.

Out of scope

Projection/chunking algorithms, semantic/hybrid retrieval, vendor adapters, network behavior, credentials, application-specific types, dynamic imports, or story integration.

Acceptance criteria

  • python -m build produces a clean installable wheel and sdist.
  • generic_rag imports in a clean Python 3.11+ process with no third-party dependency or I/O.
  • Public values reject invalid types, unsafe empty identities, and inconsistent bounds deterministically.
  • Protocols make resource ownership and synchronous behavior explicit.
  • A guard proves production code cannot import story_writing_agents.
  • Public exports, docs, tests, and PYTHON_MODULE_INDEX.md agree.

Verification

Focused public-contract tests, clean-install/import test, build metadata validation, dependency/import scan, compileall, and diff review.

Dependencies and risks

No implementation prerequisite. This is the first executable leaf. Public contract drift would propagate to every consumer, so additions remain minimal and intentional.

Gates

github_planning_gate = pending until Project metadata and a Development-linked task branch are verified. modularity_gate = required; the modularity maintainer owns this package bootstrap and index.

Activity

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

Metadata

Metadata

Assignees

Labels

area:apiPublic generic models and protocolsarea:documentationUser and API documentationarea:testingAutomated verification and test infrastructureenhancementNew feature or requestwave:10Execution wave 10

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions