Skip to content

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

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

feat(#363): add /map-architecture skill for architecture-deepening reports#373
azalio merged 2 commits into
mainfrom
claude/compassionate-cerf-eynfn6

Conversation

@azalio

@azalio azalio commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds /map-architecture as a new opt-in skill that ranks codebase areas by recent git hotspot frequency and design-friction signals, generates a Markdown+Mermaid candidate report, and waits for the user to pick one candidate before any code changes
  • Registers map-architecture in skill-rules.json with 7 keywords and 3 intent patterns
  • Updates WORKFLOW_EFFORT_PROFILES in test_skills.py (medium/adaptive)
  • Updates skill count guard in test_skills_consistency.py from 19 → 20

What the skill does

Phase 1 — Scope: accepts an optional <module-path-or-pain-point> argument; falls back to git log --since="90 days ago" hotspot analysis, filtering out lock files, migrations, and generated output trees.

Phase 2 — Report: scores each candidate area on 6 design-friction signals (change frequency, shallow interface, low locality, seam leakage, hard-to-test, ADR conflict; 0–2 each). Writes:

  • .map/<branch>/architecture-report/report.md — Markdown with Mermaid before/after diagrams per candidate
  • .map/<branch>/architecture-report/report.json — machine-readable companion (candidate count, scores, top recommendation) for future evals

Phase 3 — Select: presents candidates, asks user to pick ONE, then recommends /map-plan (score ≥ 6 or multi-file) or /map-fast (score < 6, bounded). Optionally records deferral notes in .map/architecture-notes.md.

Design guardrails baked into the skill

  • Explicit "do not implement yet" boundary at every decision point
  • No code changes inside this skill — it is purely a decision aid
  • No external network required (self-contained report)
  • No broad rewrites proposed; candidates must be bounded deepening opportunities
  • ADR contradictions surfaced only with concrete file/line evidence

Test plan

  • tests/test_skills.py — all 289 skill structural/frontmatter/trigger tests pass (including new map-architecture entry in WORKFLOW_EFFORT_PROFILES)
  • tests/test_skills_consistency.py — skill count guard updated 19 → 20; all 43 tests pass
  • tests/test_template_render.py — byte-identity golden render tests pass (rendered trees match source)
  • make check-render — generated trees match templates_src
  • Full suite: 3947 passed, 4 skipped

Closes #363 (slice 1 — skill workflow instructions + registration; Python tooling for report generation is optional future work per issue guardrails)


Generated by Claude Code

claude added 2 commits July 18, 2026 07:10
All three slices (PRs #370/#371/#372) merged; update issue tracker section.

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

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>
@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: 25 seconds

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: 12bc1d21-7f49-4ba5-b51a-bd243ece8ddc

📥 Commits

Reviewing files that changed from the base of the PR and between 268f5a4 and 8cce423.

📒 Files selected for processing (9)
  • .claude/skills/map-architecture/SKILL.md
  • .claude/skills/skill-rules.json
  • docs/ARCHITECTURE.md
  • src/mapify_cli/templates/skills/map-architecture/SKILL.md
  • src/mapify_cli/templates/skills/skill-rules.json
  • src/mapify_cli/templates_src/skills/map-architecture/SKILL.md.jinja
  • src/mapify_cli/templates_src/skills/skill-rules.json.jinja
  • tests/test_skills.py
  • tests/test_skills_consistency.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
azalio merged commit 60f6c7b into main Jul 18, 2026
1 of 2 checks passed
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.

[mattpocock/skills] Add architecture-deepening report for hotspot modules

2 participants