Skip to content

Rust Mapper emits zero contextFiles for seeds #164

Description

@Tanmay-008

Currently, the Rust mapper does not populate contextFiles for any mapped seeds. When an AI agent processes a Rust feature, it receives zero dependency context (no Cargo.toml, no sibling modules, no entry points). This is a critical gap compared to other language mappers (Go, Node, Python, C/C++) which provide rich context out of the box, leading to potential hallucinations regarding project dependencies and architecture.

Expected Behavior

The Rust mapper should dynamically resolve and attach relevant context files to FeatureSeed outputs. Specifically:

  • Manifests: Every Rust seed should include its closest Cargo.toml as a context file.
  • Sibling Entries: If a crate has both src/main.rs and src/lib.rs, they should be cross-linked (since binaries often import from their own library).
  • Module Tracking: Entry files (main.rs, lib.rs) should be parsed for mod foo; or pub mod foo; declarations. The mapper should resolve these to - their actual files (e.g. src/foo.rs or src/foo/mod.rs) and include them in the context to provide the AI with the crate's module tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions