Skip to content

feat: expose project-map.json bootstrap as idempotent simplicio-mapper index command #88

@wesleysimplicio

Description

@wesleysimplicio

Open this issue inside simplicio-mapper. Read the repo (AGENTS.md,
README.md, existing CLI subcommands) before implementing. Adapt naming /
module layout to what's already there.

Why

simplicio-sprint (issue wesleysimplicio/simplicio-sprint#273) needs to invoke
simplicio-mapper index <repo> automatically when the target repo lacks
.simplicio/project-map.json. The mapper currently has indexing logic — this
issue is about making it a stable, scriptable command that sendsprint can call
on every run without paying full cost.

What SendSprint expects

  • A single entry point — simplicio-mapper index <path> (or the equivalent
    subcommand your CLI already exposes).
  • Idempotent: re-running with a fresh index detects via repo hash /
    mtime / git rev and short-circuits in <200 ms.
  • Quiet by default: only emit progress when --verbose; stay silent on
    successful no-op so it doesn't pollute sendsprint logs.
  • Structured output: --json produces a stable schema sendsprint can
    parse (paths produced, item counts, skipped reason).
  • Clear exit codes: 0 = wrote/refreshed, 1 = failure, 2 = skipped
    (already fresh).

Acceptance

  • simplicio-mapper index . produces or refreshes
    .simplicio/project-map.json (and precedent-index.json if you ship it).
  • Re-run on an unchanged repo: exit code 2, <200 ms.
  • --json is a stable contract documented in README.md.
  • Tests cover the three paths (fresh / refresh / no-op).

Out of scope

Refs: wesleysimplicio/simplicio-sprint#273, wesleysimplicio/simplicio-sprint#262, wesleysimplicio/simplicio-sprint#279.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions