Skip to content

v0.8.6 feat: /init — bootstrap AGENTS.md from the project's actual structure #386

@Hmbown

Description

@Hmbown

Pitch

Codex parity. `/init` walks the workspace, identifies the project type (Cargo, package.json, requirements.txt, etc.), and writes a starter `AGENTS.md` with sections the model can use to ground every future session:

  • Build/test commands (auto-detected from manifest)
  • Workspace layout (3-deep tree + module purpose comments where readable)
  • Conventions (commit-message style from `git log`, lint config, formatter)
  • Where to look first when picking up an unfamiliar task

Re-running `/init` shows a diff of the proposed update without overwriting unsaved changes.

Implementation sketch

  • Reuses `utils::summarize_project` and `utils::project_tree` for the layout block.
  • Shells out to `git log --oneline -20` for commit-style detection.
  • Detects `Cargo.toml` / `package.json` / `pyproject.toml` for build commands.
  • Writes via `write_atomic` so a bad detection doesn't trash a hand-written AGENTS.md.

Acceptance

  • `/init` in a fresh project creates a coherent AGENTS.md.
  • `/init` in a project that already has AGENTS.md shows a diff and asks before overwriting.
  • Detected build/test commands match what's in the project manifest.
  • Tests cover Cargo / npm / Python project shapes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.6Targeting v0.8.6

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions