Skip to content

feat(review): generate CLAUDE.md/AGENT.md from the repo profile, delivered as a PR #3000

Description

@JSONbored

Context

Part of the repo-specific CLAUDE.md/AGENT.md generation roadmap. Once a repo profile exists, this issue covers turning it into an actual CLAUDE.md and AGENT.md pair. The two files must be equivalent in content -- gittensory's own CLAUDE.md is a symlink to AGENT.md, and generated repos should follow the same pattern rather than maintaining two independently drifting documents. The result is never committed directly; it must always be opened as a pull request against the target repo, reusing the GitHub-write primitives the review engine already uses to comment, label, and update PRs.

Goal

Build the generation engine that turns a repo profile into a well-structured CLAUDE.md/AGENT.md pair and opens a pull request with the result.

Requirements

  • Consume the repo-profile-extraction primitive from the shared-primitive issue; do not re-derive facts about the repo independently.
  • Emit AGENT.md as the canonical file and CLAUDE.md as a symlink (or byte-identical copy where the target repo's platform/tooling cannot represent a symlink), matching this repo's own convention.
  • Open the result as a pull request via the existing GitHub-write path used elsewhere in the review engine (branch creation, commit, PR open) -- never a direct commit to the target repo's default branch.
  • Include a clear PR description identifying the content as generated, what profile facts it was derived from, and how to request changes or opt back out.
  • Handle the first-run case (no existing CLAUDE.md/AGENT.md in the repo) and the already-has-one case identically at the delivery layer -- both produce a PR, never a silent overwrite.

Deliverables

  • Generation module that renders CLAUDE.md/AGENT.md content from a repo profile
  • PR-open integration reusing existing GitHub-write primitives, with branch/commit naming consistent with other automated PRs this engine opens
  • Symlink-or-equivalent handling verified for at least one non-symlink-friendly target scenario
  • Test coverage for first-run (no existing file) and existing-file scenarios

Expected outcomes

  • Enabling this feature on a repo produces exactly one open pull request containing a generated CLAUDE.md/AGENT.md pair, with zero direct commits to the target repo
  • Generated AGENT.md and CLAUDE.md are content-identical in every generated PR

Part of the repo-doc generation roadmap: #2993

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions