pub fn cmd_context(
beans_dir: &Path,
id: &str,
json: bool,
structure_only: bool,
) -> Result<()>Expand description
Assemble complete agent context for a bean — the single source of truth.
Outputs everything an agent needs to implement this bean:
- Bean spec — ID, title, verify, priority, status, description, acceptance
- Previous attempts — what was tried and failed
- Project rules — conventions from RULES.md
- Dependency context — sibling beans that produce required artifacts
- File structure — function signatures and imports
- File contents — full source of referenced files
File paths are merged from explicit bean.paths field (priority) and
regex-extracted paths from the description (fills gaps).
When structure_only is true, only structural summaries are emitted.