Skip to content

Source command#33

Merged
danielrothmann merged 5 commits into
mainfrom
feature/source
Jan 18, 2026
Merged

Source command#33
danielrothmann merged 5 commits into
mainfrom
feature/source

Conversation

@danielrothmann
Copy link
Copy Markdown
Member

@danielrothmann danielrothmann commented Jan 18, 2026

This PR introduced as new CLI command that I thought would be useful when working with agents. Commonly, an agent will successfully query data about entities, but if those are then to be edited, a workspace-wide grep needs to be performed to find the source file to edit.

firm source helps this process along by explicitly getting the source file path for a given entity or schema. This helps reduce ambiguity when combining CLI and raw-DSL workflows.

We achieve this in a simple way by searching parsed DSL from the workspace. This can be achieved before workspace + graph is built. So long as workspaces aren't huge, I'm thinking this is performant enough for a one-off without mixing concerns by storing source paths in internal data models.

Reference:

firm source <target_type> <target_id>

Arguments:

  • target_type - Entity type (e.g., person, organization) or schema
  • target_id - Entity ID or schema name

Examples:

# Find where a person entity is defined
firm source person john_doe

# Find where an organization is defined
firm source organization acme_corp

# Find where a schema is defined
firm source schema project

@danielrothmann danielrothmann self-assigned this Jan 18, 2026
@danielrothmann danielrothmann merged commit 68f08c5 into main Jan 18, 2026
1 check passed
@danielrothmann danielrothmann deleted the feature/source branch January 18, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant