Skip to content

Add repository map document derivation#413

Open
tninja wants to merge 1 commit into
mainfrom
repo-map-standalone-doc-11
Open

Add repository map document derivation#413
tninja wants to merge 1 commit into
mainfrom
repo-map-standalone-doc-11

Conversation

@tninja

@tninja tninja commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

Add a new repository map document generator focused on codebase onboarding.

Unlike the C4 architecture overview, the repository map is intended to answer a more basic first-reader question:

Where should I start reading this codebase, and which files matter most?

What this adds

  • New file: ai-code-doc-repo-map.el
  • New command: ai-code-derive-repo-map
  • Creates .ai.code.files/architecture/repo-map.org
  • Generates a practical Org-mode onboarding guide for an unfamiliar repository

Generated document structure

The prompt asks the AI backend to generate:

  • Purpose
  • What this repository does
  • Top-level directory and file map
  • Suggested reading order
  • Important entry points
  • Core concepts
  • Module / file relationship sketch
  • Files usually changed together
  • High-risk or high-churn areas
  • Low-signal areas to ignore initially
  • Common change scenarios
  • Open questions
  • Source evidence

Design choices

  • Keep Repo Map separate from C4.
    • Repo Map explains how to read the codebase.
    • C4 explains how the system is architecturally organized.
  • Use text and tables as the main format.
  • Allow at most two small PlantUML diagrams only when they improve navigation.
  • Require Org file: links back to source evidence.
  • Require uncertainty to be marked explicitly instead of hallucinating module intent.

Why

For unfamiliar repositories, contributors often need a fast, practical reading guide before they need a full architecture model. This command helps users and AI coding agents quickly identify:

  1. which files to read first,
  2. what each major directory does,
  3. where the entry points are,
  4. what can be skipped initially,
  5. and where future changes are likely to land.

This complements the existing architecture, DDD, test context, and C4 document generation commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d48d0380ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ai-code-doc-repo-map.el
"Provide a table mapping important claims to Org links pointing at source evidence."))

;;;###autoload
(defun ai-code-derive-repo-map ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register the repo-map command in the UI

This new interactive command is defined in a separate feature, but the main package still only requires ai-code-doc and ai-code-derive-architecture-document still dispatches over the old choices, so users who load ai-code and use C-c a A never see or load the repo-map generator. In that normal entry path, the feature advertised by this commit is effectively unreachable unless the user manually loads ai-code-doc-repo-map.el or calls an autoload generated outside this change; add the require and menu/dispatch entry alongside the other architecture document generators.

Useful? React with 👍 / 👎.

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.

1 participant