Skip to content

chore(AGENTS.md): add RHDH domain context to AGENTS.md - #221

Merged
gashcrumb merged 2 commits into
mainfrom
agent/199-populate-agents-md-sections
Sep 28, 2026
Merged

gashcrumb merged 2 commits into
mainfrom
agent/199-populate-agents-md-sections

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Populates three AGENTS.md sections with RHDH domain context that was missing, causing the review agent to miss design-level findings on feature PRs (observed on PR #176):

  • Key Conventions: Added RHDH-to-Backstage version mapping semantics (3-tier resolution, backstage: prefix escape hatch, static matrix maintenance), offline vs air-gapped distinction (RHDH_OFFLINE skips GitHub metadata only; --manifest-file required for true air-gap), and the ExitCodeError testability pattern for plugin commands.
  • Architecture: Added documentation for the version resolution engine (src/lib/rhdhVersion.ts) covering the 3-tier resolution strategy, caching semantics, and key files. Added check-versions command documentation covering dependency audit logic and status categories.
  • Pattern References: Added references to check-versions/command.ts, rhdhVersion.ts, rhdhVersion.test.ts, and backstageVersion.ts.

All referenced file paths verified to exist. Content derived from reading the actual source code, not from issue claims alone.

Testing

  • Verified all file paths referenced in AGENTS.md exist in the repository
  • Prettier check passes on AGENTS.md
  • No code changes — documentation only

Closes #199

Post-script verification

  • Branch is not main/master (agent/199-populate-agents-md-sections)
  • Secret scan passed (gitleaks — c5be892f392caf7a7f8e2314022b667136b6e349..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 25, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:12 AM UTC · Completed 11:25 AM UTC

Commit: c5af5d5 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $2.32

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 25, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Docs-only bot PR with clear acceptance criteria and small blast radius; score elevated slightly by active churn on a protected root-level agent-instruction file.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

  • [convention-violation] AGENTS.md — The PR title docs(#199): add RHDH domain context to AGENTS.md places an issue reference (#199) in the scope position. The pr-semantic.yaml CI workflow's headerPattern scope group is [\w$.\-* ]*, which excludes #. This PR will fail CI. Notably, the newly added AGENTS.md content itself explicitly prohibits this ("no #, @, or other special characters" in scopes, with #187 cited as a forbidden example).
    Remediation: Retitle to docs: add RHDH domain context to AGENTS.md. Keep Closes #199 in the PR body.

Medium

  • [algorithm-logic-consistency] AGENTS.md:45 — The Key Conventions bullet describes the 3-tier RHDH→Backstage resolution strategy as ending with (3) error if neither resolves. The Architecture section added in the same PR correctly defines tier 3 as the Backstage release manifest fetch (once a Backstage version is determined by tier 1 or 2). These two descriptions contradict each other: the Key Conventions conflates the error fallback (what happens when tiers 1 and 2 both fail) with an actual resolution tier.
    Remediation: Update the Key Conventions bullet to describe tier 3 as the Backstage release manifest fetch, consistent with the Architecture section. Add a separate sentence: "If neither tier 1 nor tier 2 resolves a Backstage version, an error is raised."

  • [api-contract] AGENTS.md:50 — The Offline vs air-gapped bullet states `RHDH_OFFLINE=true` (or `--offline`) but no --offline CLI flag is registered anywhere in src/. Offline mode is only activatable via the RHDH_OFFLINE environment variable or the programmatic options.offline parameter. A developer following this documentation to add offline support would search for a flag that does not exist.
    Remediation: Remove (or --offline) from the bullet. Correct text: "RHDH_OFFLINE=true skips the GitHub metadata lookup (tier 1)..."

  • [technical-accuracy] AGENTS.md:233 — The check-versions Architecture section describes command.test.ts as using `setupFetchMock` to mock both the RHDH metadata endpoint and the Backstage manifest endpoint. This is factually wrong. src/commands/check-versions/command.test.ts uses jest.mock('../../lib/rhdhVersion', ...) to stub resolveRhdhVersion at the module boundary — setupFetchMock does not appear in that file. The setupFetchMock helper is defined and used only in src/lib/rhdhVersion.test.ts.
    Remediation: Replace the command.test.ts description with: "command.test.ts — test patterns using jest.mock to stub resolveRhdhVersion at the module boundary, allowing unit tests of audit logic and CLI output without triggering any network calls."

  • [protected-path] AGENTS.md — AGENTS.md is listed in the repository's protected paths. The PR links to issue Populate empty AGENTS.md sections with RHDH domain context and CLI patterns #199 and the description explains the rationale. Sufficient context is provided; however, human approval is required for protected-path changes regardless of context.

Low

  • [code-organization] AGENTS.md:184 — The heading ### Version resolution engine does not follow the established Architecture subsection format. All sibling subsections use ### `<identifier>` — <noun phrase> (e.g., ### `plugin new` — scaffold command, ### `check-versions` — dependency alignment command). The sibling heading added in this same PR follows the pattern correctly; this one does not.
    Remediation: Rename to ### `rhdhVersion.ts` — version resolution engine or ### `resolveRhdhVersion` — version resolution engine.

Labels: PR adds documentation content to AGENTS.md (agent instruction file)


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review 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.

See the review comment for full details.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
@fullsend-ai-review fullsend-ai-review Bot added the documentation Improvements or additions to documentation label Sep 25, 2026
@kadel kadel changed the title docs(#199): add RHDH domain context to AGENTS.md chore(AGENTS.md): add RHDH domain context to AGENTS.md Sep 25, 2026
@gashcrumb

Copy link
Copy Markdown
Member

/fs-fix can you address the review comments and rebase the PR branch?

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 12:40 PM UTC · Completed 12:47 PM UTC

Commit: c5af5d5 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.08

Add version resolution, offline/air-gap, and error handling
documentation to Key Conventions. Document the 3-tier version
resolution engine and check-versions command in Architecture.
Add version-related file references to Pattern References.

These additions give the review agent domain context about RHDH
release semantics, the RHDH-to-Backstage version mapping model,
and the offline vs air-gapped distinction — knowledge gaps that
caused the review agent to miss design-level findings on PR #176.

Closes #199

Assisted-by: claude-opus-4-6
- Fix 3-tier strategy description: tier 3 is Backstage release manifest
  fetch, not an error condition (algorithm-logic-consistency)
- Remove non-existent `--offline` CLI flag reference (api-contract)
- Rename heading to follow `identifier — noun phrase` pattern (code-organization)
- Fix command.test.ts description: uses jest.mock, not setupFetchMock
  (technical-accuracy)

Addresses #221

Assisted-by: claude-sonnet-4-6
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Addressed all 4 actionable review findings on AGENTS.md: fixed 3-tier strategy description consistency, removed non-existent --offline flag reference, standardized heading format, and corrected test mocking description. Rebased branch onto main as requested. Two findings noted as non-actionable (PR title already fixed, protected-path is informational).

Fixed (4):

  1. 3-tier strategy description inconsistency (algorithm-logic-consistency) (AGENTS.md): Updated Key Conventions bullet to describe tier 3 as Backstage release manifest fetch from versions.backstage.io, consistent with the Architecture section. Added separate sentence noting error when tiers 1 and 2 both fail.
  2. Non-existent --offline CLI flag reference (api-contract) (AGENTS.md): Removed '(or --offline)' from the Offline vs air-gapped bullet since no --offline flag is registered in src/. Offline mode is only activatable via RHDH_OFFLINE env var.
  3. Heading format inconsistency (code-organization) (AGENTS.md): Renamed '### Version resolution engine' to '### rhdhVersion.ts — version resolution engine' to match the established Architecture subsection format.
  4. Incorrect test mocking description (technical-accuracy) (AGENTS.md): Replaced incorrect setupFetchMock reference in command.test.ts description with accurate jest.mock description. setupFetchMock only exists in rhdhVersion.test.ts.

Disagreed (2):

  1. PR title convention violation (convention-violation): The PR title has already been updated to 'chore(AGENTS.md): add RHDH domain context to AGENTS.md' which uses a valid scope. The fix agent cannot modify PR titles — this is outside its scope.
  2. Protected path requires human approval (protected-path): This is an informational finding, not an actionable code change. Human approval is required regardless of agent action — the human triggered this fix run.

Tests: passed

Decision points
  • Rebased branch onto origin/main as requested by human instruction (alternatives: Skip rebase and only fix review comments, Rebase and fix as instructed; rationale: Human explicitly asked to rebase the PR branch; branch was 1 commit behind main.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-coder
fullsend-ai-coder Bot force-pushed the agent/199-populate-agents-md-sections branch from c5af5d5 to 6a6e6f2 Compare September 28, 2026 12:47
@sonarqubecloud

Copy link
Copy Markdown

@gashcrumb
gashcrumb merged commit 012fecf into main Sep 28, 2026
16 checks passed
@gashcrumb
gashcrumb deleted the agent/199-populate-agents-md-sections branch September 28, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Populate empty AGENTS.md sections with RHDH domain context and CLI patterns

2 participants