You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: consolidate into single RHDH-aware agent-ready skill
- Remove init-agents-md as a standalone skill; AGENTS.md generation
is now inline within agent-ready, using assessment context (detected
languages, CI commands, tech stack) rather than re-scanning from scratch
- Add RHDH detection: reads rhdh-repos.md from the rhdh skill to match
repo remote URLs; pre-fills AGENTS.md and skips inapplicable findings
when a match is found; degrades gracefully if rhdh skill is not installed
- Add batch mode: when invoked with no path, offers to assess all RHDH
repos in a local directory, producing a summary table with scores and
offering to drill into any individual repo
- Update README to reflect consolidated skill
Assisted-by: Claude Sonnet 4.6
Copy file name to clipboardExpand all lines: README.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,10 +73,7 @@ Track work across the four RHDH Jira projects.
73
73
74
74
### Repository Readiness
75
75
76
-
Prepare any git repository for effective AI agent use.
77
-
78
-
-**[agent-ready](./skills/agent-ready/SKILL.md)** — Assess a repository against agentready criteria, then walk through and address each gap interactively. Runs the [agentready](https://github.com/ambient-code/agentready) CLI, presents failing findings by tier, and delegates AGENTS.md creation to `init-agents-md`.
79
-
-**[init-agents-md](./skills/init-agents-md/SKILL.md)** — Bootstrap `AGENTS.md` and `CLAUDE.md` for any repository. Detects build/test commands from config files and CI, asks 3 targeted questions, and writes a minimal draft for human review.
76
+
-**[agent-ready](./skills/agent-ready/SKILL.md)** — Assess RHDH repositories against agentready criteria and address each gap. RHDH-aware: detects the repo from its remote URL, uses `rhdh-repos.md` context to pre-fill `AGENTS.md` and skip inapplicable findings. Supports single-repo and batch modes (assess all RHDH repos in one pass).
Assesses a git repository's readiness for use by AI coding agents using the agentready CLI, then walks through and addresses each gap. Use when asked to "assess agent readiness", "run agentready", "check how agent-ready this repo is", "make this repo agent-ready", "improve our agent readiness score", "run the agent ready CLI", "assess this repo for AI agents", or "what's our agentready score".
4
+
Assesses a git repository's readiness for use by AI coding agents using the agentready CLI, then walks through and addresses each gap. RHDH-aware: detects RHDH repositories and uses rhdh-repos.md context to pre-fill AGENTS.md and skip inapplicable findings. Use when asked to "assess agent readiness", "run agentready", "check how agent-ready this repo is", "make this repo agent-ready", "improve agent readiness score", "assess all RHDH repos", "batch agent readiness", or "onboard this repo for agents".
5
5
---
6
6
7
7
## Prerequisites
@@ -14,123 +14,171 @@ uvx --version
14
14
15
15
If missing, stop: "`uvx` is required. Install via `pip install uv` or see [uv installation](https://docs.astral.sh/uv/getting-started/installation/)."
16
16
17
-
## Step 1: Setup
17
+
## Step 1: Mode selection
18
18
19
-
**Path:** Default to the current working directory. If the user provided a path, use that instead. Validate it is a git repository:
19
+
If no path was provided, present a structured choice:
20
+
21
+
-**Single repo** — assess the current working directory (default)
22
+
-**Batch** — assess all RHDH repositories (see Batch mode below)
23
+
24
+
If a path was provided, skip this and proceed to Step 2.
25
+
26
+
## Step 2: Setup
27
+
28
+
**Path:** Use the provided path, or `.` for the current directory. Validate it is a git repository:
20
29
21
30
```bash
22
-
git -C . rev-parse --is-inside-work-tree # replace . with the user-provided path if one was given
31
+
git -C . rev-parse --is-inside-work-tree # replace . with path if provided
23
32
```
24
33
25
34
If not a git repository, stop and tell the user.
26
35
27
-
**Config file:** Only use a config file if the user explicitly provided one. Do not ask. If a path was given, verify it exists before proceeding.
36
+
**RHDH detection:** Check the repo's git remote URL:
37
+
38
+
```bash
39
+
git -C <path> remote get-url origin 2>/dev/null
40
+
```
41
+
42
+
Attempt to read `~/.claude/skills/rhdh/references/rhdh-repos.md`. If the file does not exist, skip RHDH detection and proceed with generic assessment — do not stop or warn the user. If found, check whether the remote URL matches any repo's upstream URL. If matched, note the repo name, tech stack, key paths, and conventions — these inform AGENTS.md generation and finding triage. Store as `rhdh_context`.
28
43
29
-
## Step 2: Run the assessment
44
+
**Config file:** Only use a config file if the user explicitly provided one. Do not ask.
30
45
31
-
Create a temp directory and run the assessment:
46
+
## Step 3: Run the assessment
32
47
33
48
```bash
34
49
REPORT_DIR=$(mktemp -d)# on Windows: use %TEMP% or Python tempfile
If there are no failing findings, congratulate the user and stop — do not ask to work through anything.
70
+
If no failing findings, congratulate the user and stop.
58
71
59
72
Otherwise ask:
60
73
61
74
> "Fix applicable findings automatically, or review each one individually?
62
75
> **auto** (default) — apply self-contained fixes immediately; prompt only when input is needed
63
76
> **review** — prompt yes/skip/defer/quit for every finding"
64
77
65
-
Default to **auto** if the user just says yes, presses Enter, or says "fix everything".
78
+
Default to **auto** if the user says yes, presses Enter, or says "fix everything".
79
+
80
+
## Step 5: Work through findings
66
81
67
-
## Step 4: Work through findings
82
+
Work only through `status == "fail"`findings. Skip `not_applicable` and `pass` silently.
68
83
69
-
Work only through findings where `status == "fail"`. Skip `not_applicable` and `pass` findings silently.
84
+
**Sort order:** ascending tier, then descending `attribute.default_weight` within each tier.
70
85
71
-
**Sort order:** ascending tier (Tier 1 first), then descending `attribute.default_weight` within each tier.
86
+
If `rhdh_context` is set, skip findings that clearly don't apply to the detected tech stack (e.g., lock file checks for a Bash-only repo, `src/` layout for a GitOps YAML repo) — note them in the summary.
72
87
73
88
### Auto mode
74
89
75
-
Apply each fix without prompting **unless** any of the following are true — in which case, pause and prompt:
- The finding might not apply to this repo type (e.g., `src/` layout for a GitOps YAML repo, lock files for a repo with no package dependencies) — present it and ask whether to apply or skip
79
-
- It is the `agent_instructions` finding — always delegate to `init-agents-md` interactively
92
+
- The fix requires project-specific input (CI platform, package ecosystem)
93
+
- The finding might not apply to this repo type — present it and ask whether to apply or skip
80
94
81
-
**Skip without prompting**findings that require human rationale to be meaningful — ADRs, design intent, and architecture decisions. These cannot be generated without fabricating context the agent doesn't have.
95
+
**Skip without prompting:** ADRs, design intent, architecture decisions — these require human rationale. Note them in the final summary.
82
96
83
-
After processing all findings, list what was applied, what was prompted, and what was skipped, then proceed to Step 5.
97
+
For the `agent_instructions` finding, follow the inline AGENTS.md generation in the `agent_instructions` section below — this applies in both auto and review modes.
98
+
99
+
After processing, list what was applied, prompted, and skipped, then proceed to Step 6.
84
100
85
101
### Review mode
86
102
87
-
For each finding, present:
103
+
For each finding:
88
104
89
105
```
90
106
[Tier <N>] <attribute.name> — <score>/100
91
-
Evidence: <evidence items, one per line>
107
+
Evidence: <evidence items>
92
108
93
109
Remediation: <remediation.summary>
94
110
95
111
Apply this fix? [yes / skip / defer / quit]
96
112
```
97
113
98
-
**yes** — apply the fix (see special cases below), then move to the next finding.
99
-
**skip** — move on; do not revisit. Use this if the finding doesn't apply to this repo.
100
-
**defer** — note it; present again after the re-run.
114
+
**yes** — apply the fix, then move to the next finding.
115
+
**skip** — move on; do not revisit. Use this if the finding doesn't apply to this repo.
116
+
**defer** — note it; surface again after re-run.
101
117
**quit** — stop immediately.
102
118
103
-
**ADR and design intent findings in review mode:** Do not present the JSON remediation. Instead ask:
119
+
**ADR and design intent findings:** Do not use JSON remediation. Ask instead:
120
+
121
+
> "Do you have any architectural decisions worth capturing? Describe the decision and rationale — I'll write the ADR. Skip to add manually later."
122
+
123
+
Write only if the user provides input. Never invent rationale.
124
+
125
+
### `agent_instructions` finding (both modes)
126
+
127
+
Generate `AGENTS.md` and `CLAUDE.md` inline — do not delegate to another skill.
104
128
105
-
> "Do you have any architectural decisions worth capturing here? If so, describe the decision and why it was made — I'll write the ADR. Skip if you'd prefer to add these manually later."
If the user provides input, write the ADR or design doc using their rationale. If they skip, move on.
135
+
**If `rhdh_context` is set:** pull key paths, tech stack, conventions, and branching model directly from the matched `rhdh-repos.md` entry — use these to pre-fill AGENTS.md sections and skip generic questions where RHDH context already answers them.
108
136
109
-
### Special case: `agent_instructions` finding (both modes)
137
+
**If not RHDH (or RHDH context doesn't cover it):** ask these three questions one at a time:
138
+
1. "What are 2-3 conventions an agent couldn't discover by reading the code? Skip if none."
139
+
2. "Any non-obvious architectural decisions or places where things live unexpectedly? Skip if obvious."
140
+
3. "Any commit format, CI checks, or PR conventions agents should know? Skip if standard."
110
141
111
-
Do not apply the JSON remediation. Instead, invoke the `init-agents-md` skill:
142
+
Write `AGENTS.md`:
112
143
113
-
> "Invoking the `init-agents-md` skill to create AGENTS.md for this repository."
144
+
```markdown
145
+
# <repo-name>
114
146
115
-
Use the Skill tool: `init-agents-md`. After it completes, return to this skill and continue with the next finding.
147
+
## Build & Test Commands
148
+
- Build: `<command>`
149
+
- Test all: `<command>`
150
+
- Test single file: `<command>`
151
+
- Lint: `<command>`
152
+
- Type check: `<command>`
116
153
117
-
### Applying fixes (auto and review modes)
154
+
## Key Conventions
155
+
<from scan + questions/rhdh_context>
118
156
119
-
Use the `remediation.steps`, `remediation.commands`, and `remediation.examples` from the JSON as the implementation guide. Do not invent steps beyond what the JSON provides.
157
+
## Architecture
158
+
<from questions/rhdh_context — omit if nothing to say>
120
159
121
-
## Step 5: Re-run and present results
160
+
## PR Conventions
161
+
- Agent-assisted commits should include an `Assisted-by: <model>` footer
162
+
<fromquestions>
163
+
```
164
+
165
+
Write `CLAUDE.md` with exactly: `@AGENTS.md`
166
+
167
+
Omit any section — including its header — where there is nothing to say. Do not invent content.
168
+
169
+
### Applying other fixes (both modes)
122
170
123
-
Re-run the assessment (shell variables from Step 2 do not persist — create a new temp dir):
171
+
Use `remediation.steps`, `remediation.commands`, and `remediation.examples` from the JSON. Do not invent steps beyond what the JSON provides.
172
+
173
+
## Step 6: Re-run and present results
124
174
125
175
```bash
126
176
REPORT_DIR=$(mktemp -d)# on Windows: use %TEMP% or Python tempfile
If there are remaining failures (including deferred ones), ask:
191
+
If remaining failures (including deferred), ask: "Would you like to continue addressing the remaining findings?" If yes, repeat Step 5.
192
+
193
+
## Batch mode
194
+
195
+
When the user selects batch assessment:
144
196
145
-
> "Would you like to continue addressing the remaining findings?"
197
+
1. Ask: "What directory are your RHDH repos cloned into? (e.g. `~/git`)"
198
+
2. Find subdirectories that are git repos:
199
+
200
+
```bash
201
+
find <dir> -maxdepth 2 -name ".git" -type d | sed 's|/.git||'
202
+
```
203
+
204
+
3. For each, check if the remote URL matches a repo in `rhdh-repos.md`. Assess only matching repos.
205
+
4. Run the assessment on each matched repo (Step 3) and collect results.
206
+
5. Present a summary table:
207
+
208
+
```
209
+
Repo Score Level Failing
210
+
rhdh 72/100 Bronze 4
211
+
rhdh-operator 45/100 Needs Improvement 11
212
+
rhdh-plugins 88/100 Silver 1
213
+
```
146
214
147
-
If yes, repeat Step 4 with the remaining failures. If no, stop.
215
+
6. Ask: "Would you like to address findings for any of these repos?" If yes, the user picks one — run Step 3 (assessment) on that repo to get fresh findings, then run Steps 4–6 for it.
148
216
149
217
## Gotchas
150
218
151
-
- The first `uvx` run fetches and builds agentready from GitHub — this can take 30–60 seconds. Subsequent runs use the cache and are much faster. If the fetch fails (network error, build error), tell the user and stop — do not attempt to proceed without a valid report.
219
+
- The first `uvx` run fetches and builds agentready from GitHub — this can take 30–60 seconds. Subsequent runs use the cache. If the fetch fails, stop — do not proceed without a valid report.
152
220
- Do not output the report to the repository directory — use the temp dir to avoid polluting the working tree.
153
221
-`not_applicable` findings reflect the detected language stack; do not mention them unless the user asks.
154
-
- Deferred findings are not lost — they surface again after the re-run.
155
-
- Never invent rationale for ADRs, design docs, or architecture decisions — these require human context the agent doesn't have. In auto mode, skip them. In review mode, ask the user for the rationale before writing anything.
222
+
- Deferred findings surface again after the re-run.
223
+
- Never invent rationale for ADRs or design docs. In auto mode, skip them. In review mode, ask for rationale before writing anything.
224
+
- In batch mode, only assess repos whose remote URL matches `rhdh-repos.md` — do not assess unrelated repos in the same directory.
0 commit comments