Skip to content

Feat: Architecture docs get topic scoping, navigable code links, and in-buffer prompts - #516

Merged
tninja merged 6 commits into
mainfrom
kang_feat_11
Sep 23, 2026
Merged

tninja merged 6 commits into
mainfrom
kang_feat_11

Conversation

@tninja

@tninja tninja commented Sep 23, 2026

Copy link
Copy Markdown
Owner

The C-c a A architecture document commands always regenerated the whole repository, and the documents they produced named files and functions as plain text, so there was no way to jump from a document back to the code it described. This branch narrows those commands and makes their output navigable.

  • Topic scoping and in-buffer prompts. All five commands (guardrails, DDD context, test context, C4 PlantUML, repo map) now ask for an optional topic that narrows the prompt and is folded into the output file name, so a topic document no longer overwrites the repo-wide one. When the current buffer is in ai-code-prompt-mode, the prompt is inserted there as a timestamped Org section at point instead of being sent to the AI session, so it can be reviewed and edited before it goes out.
  • Navigable code links. The prompt now requires the backend to link every file, module, function, variable and test case it mentions, and the command asks where those links should point. GitHub links use .../blob/HEAD/path#L42 and open in a browser; local links are relative for files inside the repository (the ../ depth is derived from the document's own output path) and absolute for files outside it, and both target ::symbol so they survive edits. The question is skipped when the repository has no GitHub remote, and an unreachable Git falls back to local links instead of failing.
  • macOS test fixes. The last commit clears 13 test failures that only show up locally: session keys are canonicalized with file-truename while the tests asserted literal /tmp and /var paths (both symlinks on macOS), case-fold-search defaults to t in batch mode so a "Error:" assertion matched lower-case AppKit noise on stderr, and window-layout-transpose (Emacs 31.1) refuses layouts holding a dedicated window, which side windows are. Test-only changes, no production code involved.

Verification: the full suite reports Ran 1571 tests, 1558 results as expected, 0 unexpected, 13 skipped, and byte-compile plus checkdoc are clean on the touched files.

@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: 54c726d335

ℹ️ 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.el Outdated
Comment thread ai-code-doc.el
Comment thread ai-code-doc.el
Comment thread ai-code-doc.el Outdated
Pin GitHub source links to published commits and use local links when tracked content differs. Add stable topic digests, recognize ssh:// remotes with ports, and use the package-private prompt helper name.

Add five regression tests. Strict byte compilation and checkdoc pass. The full suite has the same 28 failures and 13 skips as the unmodified PR baseline, with no new failures.
@tninja
tninja merged commit 90a0997 into main Sep 23, 2026
6 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.

1 participant