Skip to content

feat(#291): mapify preset list + preset add commands (Slice 1)#370

Merged
azalio merged 3 commits into
mainfrom
claude/compassionate-cerf-eynfn6
Jul 18, 2026
Merged

feat(#291): mapify preset list + preset add commands (Slice 1)#370
azalio merged 3 commits into
mainfrom
claude/compassionate-cerf-eynfn6

Conversation

@azalio

@azalio azalio commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

First slice of SpecKit-style preset composition (#291). Adds the mapify preset sub-command group with two commands:

  • mapify preset list [project-path] — scans .map/presets/<name>/manifest.json and displays installed presets in a Rich table; --json flag for machine-readable output; gracefully handles missing or malformed manifests
  • mapify preset add --from <path> [project-path] — installs a preset from a local directory into .map/presets/<id>/; validates manifest.json contains required id, title, version keys; --force to overwrite; rejects path-traversal preset IDs (/, ..)

Preset manifest format

{
  "id": "lean",
  "title": "Lean Workflow",
  "version": "1.0.0",
  "description": "Simplified workflow for small teams",
  "strategies": {}
}

Presets live at .map/presets/<id>/ in the target project.

Tests

29 new tests in tests/test_preset_commands.py covering 8 test classes (PC1–PC8): empty project, installed presets, missing/malformed manifests, JSON output, valid add, invalid inputs, force-overwrite, and conflict detection.

Full suite: 3915 passed, 4 skipped, 0 failures.

Closes part of #291 (composition/rendering layer follows in subsequent slices).


Generated by Claude Code

claude added 3 commits July 18, 2026 06:45
…visory

- Add .map/scripts/classify_scope.py — standalone CLI (stdlib-only, no
  mapify_cli import) that reads scale thresholds from .map/config.yaml
  using the same dotted-key parsing as map_orchestrator.py and classifies
  --files/--lines inputs into trivial/small/medium/large brackets (#287)

- Replace inline python3 -c "sys.path.insert(0,'src')..." blocks in the
  Scale Advisory sections of both Claude and Codex map-plan SKILL templates
  with a clean call to the new script — fixes the dev-repo path hack that
  would fail in user projects where mapify_cli is installed as a package

- Add 36 tests in tests/test_classify_scope_script.py covering default
  thresholds (SC1), dotted-key config overrides (SC2), boundary conditions
  (SC3), auto_enabled flag (SC4), JSON output contract (SC5), invalid input
  rejection (SC6), and rendered script presence in all output paths (SC7)
Implements the first slice of SpecKit-style preset composition (#291):
- Adds `preset_app` Typer sub-group registered as `mapify preset`
- `mapify preset list [project-path]`: scans .map/presets/<name>/manifest.json
  and displays installed presets; --json flag for machine-readable output;
  gracefully handles missing or malformed manifests
- `mapify preset add --from <path> [project-path]`: installs a preset from a
  local directory into .map/presets/<id>/; validates manifest.json has id/title/
  version; --force to overwrite; rejects path-traversal preset IDs
- 29 new tests in tests/test_preset_commands.py covering PC1-PC8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011jmbBkJwJByEJGXFAihgh8
@azalio
azalio merged commit f05ba1d into main Jul 18, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@azalio, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cfe819f-9add-4117-ab3c-9d9cb5e15bfa

📥 Commits

Reviewing files that changed from the base of the PR and between bc75f18 and 1367f6d.

📒 Files selected for processing (13)
  • .agents/skills/map-plan/SKILL.md
  • .claude/skills/map-plan/SKILL.md
  • .map/scripts/classify_scope.py
  • docs/ARCHITECTURE.md
  • src/mapify_cli/__init__.py
  • src/mapify_cli/templates/codex/skills/map-plan/SKILL.md
  • src/mapify_cli/templates/map/scripts/classify_scope.py
  • src/mapify_cli/templates/skills/map-plan/SKILL.md
  • src/mapify_cli/templates_src/codex/skills/map-plan/SKILL.md.jinja
  • src/mapify_cli/templates_src/map/scripts/classify_scope.py.jinja
  • src/mapify_cli/templates_src/skills/map-plan/SKILL.md.jinja
  • tests/test_classify_scope_script.py
  • tests/test_preset_commands.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-eynfn6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

azalio pushed a commit that referenced this pull request Jul 18, 2026
All three slices (PRs #370/#371/#372) merged; update issue tracker section.

Co-Authored-By: Claude <noreply@anthropic.com>
azalio added a commit that referenced this pull request Jul 18, 2026
…ports (#373)

* docs: mark #291 preset composition as CLOSED in ARCHITECTURE.md

All three slices (PRs #370/#371/#372) merged; update issue tracker section.

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(#363): add /map-architecture skill for architecture-deepening reports

Adds the opt-in architecture-deepening report workflow as a new
`/map-architecture` skill. The skill ranks codebase areas by recent
git hotspot frequency and design-friction signals (shallow interface,
low locality, seam leakage, hard-to-test, ADR conflict), writes a
ranked Markdown+Mermaid candidate report under
`.map/<branch>/architecture-report/`, and waits for the user to pick
one candidate before any code changes begin.

Key design choices:
- Three phases: scope → report → select (no implementation in skill)
- Explicit "do not implement yet" guardrail at every decision point
- Companion report.json for future eval assertions
- Hands off to /map-plan (score ≥ 6) or /map-fast (score < 6) after pick
- Deferral notes in .map/architecture-notes.md to avoid re-surfacing

Also registers the skill in skill-rules.json with 7 keywords and 3
intent patterns, adds it to WORKFLOW_EFFORT_PROFILES in test_skills.py
(effort: medium/adaptive), and updates the skill count guard in
test_skills_consistency.py from 19 → 20.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants