Skip to content

Commit 2905341

Browse files
author
Harald Kirschner
committed
refactor: de-brand terminology, add --dry-run and batch instructions
Terminology: - 'AI readiness' → 'readiness', 'Copilot instructions' → 'instructions' - 'file-based instructions' → 'area instructions' - De-brand PR body text (Copilot → AI coding assistants) New features: - instructions --dry-run: preview generated files without writing - VS Code: batchInstructions command for multi-root workspaces - VS Code: pickWorkspacePath() with QuickPick for multi-root - TUI: 'R' key for readiness report, 'N' for nested areas - Extension: config write-back with ENOENT-safe catch - Extension: policy loading in readiness command Improvements: - Fix broken README maturity table (was split into two) - Update model defaults to claude-sonnet-4.6 - Add judgeModel setting to extension README - Fix extension engine version to 1.109.0+ - Add skip reason feedback in batch command - Remove dead readinessReport state in TUI - Deprecation warnings for generate instructions/agents and --per-app
1 parent 69210da commit 2905341

35 files changed

Lines changed: 519 additions & 222 deletions

.github/prompts/generate-improvements.prompt.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Suggest improvements to the AgentRC CLI project across features, bug fixes, security, performance, and engineering quality.
33
---
44

5-
You are a senior software engineer reviewing the **AgentRC** project — a TypeScript CLI tool that primes repositories for AI-assisted development by analyzing codebases, generating Copilot instructions and VS Code configs, running evaluations, and producing AI readiness reports.
5+
You are a senior software engineer reviewing the **AgentRC** project — a TypeScript CLI tool that primes repositories for AI-assisted development by analyzing codebases, generating instructions and VS Code configs, running evaluations, and producing readiness reports.
66

77
## Architecture Context
88

@@ -18,7 +18,7 @@ You are a senior software engineer reviewing the **AgentRC** project — a TypeS
1818
- `instructions.ts` — Generates `.github/copilot-instructions.md` using Copilot SDK agent sessions
1919
- `generator.ts` — Writes `.vscode/settings.json` and `.vscode/mcp.json` configs
2020
- `evaluator.ts` — Runs eval cases comparing agent responses with/without instructions, builds trajectory viewer HTML
21-
- `readiness.ts` — Multi-pillar AI readiness assessment (style, build, testing, docs, dev-env, code-quality, observability, security, ai-tooling)
21+
- `readiness.ts` — Multi-pillar readiness assessment (style, build, testing, docs, dev-env, code-quality, observability, security, ai-tooling)
2222
- `visualReport.ts` — Generates beautiful HTML readiness reports with summary cards, pillar charts, level distribution
2323
- `git.ts` — Clone/branch operations via `simple-git`
2424
- `github.ts` / `azureDevops.ts` — GitHub (Octokit) and Azure DevOps API integrations
@@ -35,7 +35,7 @@ You are a senior software engineer reviewing the **AgentRC** project — a TypeS
3535
| `agentrc generate <type>` | Generate `instructions`, `agents`, `mcp`, or `vscode` configs |
3636
| `agentrc instructions` | Generate copilot-instructions.md via Copilot SDK |
3737
| `agentrc eval` | Run evaluation cases comparing with/without instructions |
38-
| `agentrc readiness` | AI readiness assessment with optional visual HTML report |
38+
| `agentrc readiness` | Readiness assessment with optional visual HTML report |
3939
| `agentrc batch` | Batch process multiple repos across GitHub/Azure orgs |
4040
| `agentrc batch-readiness` | Batch readiness reports across multiple repos |
4141
| `agentrc pr` | Automate branch/PR creation for generated configs |

README.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
AI coding agents are only as effective as the context they receive. AgentRC is a CLI and VS Code extension that closes the gap — from a single repo to hundreds across your org.
1212

13-
**Measure** — Analyze repo structure and score AI readiness across a 5-level maturity model.
13+
**Measure** — Analyze repo structure and score readiness across a 5-level maturity model.
1414
**Generate** — Produce tailored instructions, evals, and dev configs using the Copilot SDK.
1515
**Maintain** — Run evaluations in CI to catch instruction drift as code evolves.
1616

@@ -37,7 +37,7 @@ agentrc analyze
3737
# 2. Check how AI-ready your repo is
3838
agentrc readiness
3939

40-
# 3. Generate AI instructions
40+
# 3. Generate instructions
4141
agentrc instructions
4242

4343
# 4. Generate MCP and VS Code configs
@@ -72,7 +72,7 @@ agentrc analyze --output analysis.md # save Markdown report
7272
agentrc analyze --output analysis.json --force # overwrite existing report
7373
```
7474

75-
### `agentrc readiness`Assess AI Readiness
75+
### `agentrc readiness`Run Readiness Report
7676

7777
Score a repo across 9 pillars grouped into **Repo Health** and **AI Setup**:
7878

@@ -90,43 +90,52 @@ agentrc readiness --fail-level 3 # CI gate: exit 1 if below level 3
9090

9191
**Maturity levels:**
9292

93-
| Level | Name | What it means |
94-
| ----- | ---------- | -------------------------------------------------- |
95-
| 1 | Functional | Builds, tests, basic tooling in place |
96-
| 2 | Documented | README, CONTRIBUTING, custom AI instructions exist |
93+
| Level | Name | What it means |
94+
| ----- | ------------ | --------------------------------------------------- |
95+
| 1 | Functional | Builds, tests, basic tooling in place |
96+
| 2 | Documented | README, CONTRIBUTING, custom instructions exist |
97+
| 3 | Standardized | CI/CD, security policies, CODEOWNERS, observability |
98+
| 4 | Optimized | MCP servers, custom agents, AI skills configured |
99+
| 5 | Autonomous | Full AI-native development with minimal oversight |
97100

98101
At Level 2, AgentRC also checks **instruction consistency** — when a repo has multiple AI instruction files (e.g. `copilot-instructions.md`, `CLAUDE.md`, `AGENTS.md`), it detects whether they diverge. Symlinked or identical files pass; diverging files fail with a similarity score and a suggestion to consolidate.
99102

100-
| 3 | Standardized | CI/CD, security policies, CODEOWNERS, observability |
101-
| 4 | Optimized | MCP servers, custom agents, AI skills configured |
102-
| 5 | Autonomous | Full AI-native development with minimal oversight |
103-
104103
### `agentrc instructions` — Generate Instructions
105104

106-
Generate `copilot-instructions.md` or `AGENTS.md` using the Copilot SDK:
105+
Generate instructions using the Copilot SDK:
107106

108107
```bash
109108
agentrc instructions # copilot-instructions.md (default)
110-
agentrc instructions --format agents-md # AGENTS.md
111-
agentrc instructions --per-app # per-app in monorepos
109+
agentrc instructions --output AGENTS.md # custom output path
110+
agentrc instructions --strategy nested # nested hub + detail files in .agents/
112111
agentrc instructions --areas # root + all detected areas
113112
agentrc instructions --area frontend # single area
114-
agentrc instructions --model claude-sonnet-4.5
113+
agentrc instructions --areas-only # areas only (skip root)
114+
agentrc instructions --dry-run # preview without writing
115+
agentrc instructions --model claude-sonnet-4.6
115116
```
116117

118+
**Concepts:**
119+
120+
- **Format**: Output file — `copilot-instructions.md` (default) or `AGENTS.md` (via `--output`)
121+
- **Strategy**: `flat` (single file, default) or `nested` (hub + per-topic detail files)
122+
- **Scope**: `root only` (default), `--areas` (root + areas), `--area <name>` (single area)
123+
117124
### `agentrc eval` — Evaluate Instructions
118125

119126
Measure how instructions improve AI responses with a judge model:
120127

121128
```bash
122129
agentrc eval --init # scaffold eval config from codebase
123130
agentrc eval agentrc.eval.json # run evaluation
124-
agentrc eval --model gpt-4.1 --judge-model claude-sonnet-4.5
131+
agentrc eval --model gpt-4.1 --judge-model claude-sonnet-4.6
125132
agentrc eval --fail-level 80 # CI gate: exit 1 if pass rate < 80%
126133
```
127134

128135
### `agentrc generate` — Generate Configs
129136

137+
> **Note:** `generate instructions` and `generate agents` are deprecated — use `agentrc instructions` directly.
138+
130139
```bash
131140
agentrc generate mcp # .vscode/mcp.json
132141
agentrc generate vscode --force # .vscode/settings.json (overwrite)
@@ -148,9 +157,9 @@ agentrc pr owner/repo-name # clone → generate → open PR
148157
agentrc tui
149158
```
150159

151-
### `agentrc init`Guided Setup
160+
### `agentrc init`Init Repository
152161

153-
Interactive or headless repo onboarding — detects your stack and walks through readiness, instructions, and config generation. For monorepos, auto-detects workspaces and bootstraps `agentrc.config.json` with workspace and area definitions.
162+
Interactive or headless repo onboarding — analyzes your stack and generates instructions. For monorepos, auto-detects workspaces and bootstraps `agentrc.config.json` with workspace and area definitions.
154163

155164
### Global Options
156165

agentrc.eval.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
},
2020
{
2121
"id": "case-4",
22-
"prompt": "How does the AI readiness assessment work, and how can it be customized with policies?",
23-
"expectation": "The readiness service in src/services/readiness.ts evaluates repositories across 9 pillars (style-validation, build-system, testing, documentation, dev-environment, code-quality, observability, security, ai-tooling) and assigns a maturity level from 1 (Functional) to 5 (Autonomous). Each criterion has a scope — repo, app, or area — determining whether it runs once, per monorepo app, or per detected area. buildCriteria() returns 20+ built-in checks and buildExtras() adds optional ones. Policies loaded via src/services/policy.ts can customize the assessment: loadPolicy() reads JSON/TS/JS configs, and resolveChain() merges a chain of policies that can disable, override, or add criteria and set pass-rate thresholds. Results can be rendered as an interactive HTML report by src/services/visualReport.ts with dark/light theme toggle and expandable per-pillar details."
22+
"prompt": "How does the readiness assessment work, and how can it be customized with policies?",
23+
"expectation": "The readiness service evaluates repositories across 9 pillars (style-validation, build-system, testing, documentation, dev-environment, code-quality, observability, security, ai-tooling) and assigns a maturity level from 1 (Functional) to 5 (Autonomous). Each criterion has a scope — repo, app, or area — determining whether it runs once, per monorepo app, or per detected area. buildCriteria() returns 20+ built-in checks and buildExtras() adds optional ones. Policies loaded via src/services/policy.ts can customize the assessment: loadPolicy() reads JSON/TS/JS configs, and resolveChain() merges a chain of policies that can disable, override, or add criteria and set pass-rate thresholds. Results can be rendered as an interactive HTML report by src/services/visualReport.ts with dark/light theme toggle and expandable per-pillar details."
2424
},
2525
{
2626
"id": "case-5",
27-
"prompt": "How does AgentRC generate Copilot instructions, including for monorepos with multiple areas?",
27+
"prompt": "How does AgentRC generate instructions, including for monorepos with multiple areas?",
2828
"expectation": "The instruction generation pipeline starts with the analyzer (src/services/analyzer.ts) which scans the repo to detect languages, frameworks, monorepo apps, and logical areas (frontend, backend, etc.) with glob patterns. For root-level instructions, generateCopilotInstructions() in src/services/instructions.ts creates a Copilot SDK session that explores the codebase using tools (glob, view, grep) and produces .github/copilot-instructions.md. For area-specific instructions, generateAreaInstructions() generates focused content per area, and buildAreaFrontmatter() creates YAML frontmatter with applyTo glob patterns so VS Code scopes them to the right files. These are written to .github/instructions/{sanitized-name}.instructions.md via writeAreaInstruction(). The instructions command supports --areas to generate all area instructions, --areas-only to skip the root file, and --area <name> for a single area."
2929
},
3030
{

docs/product.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This gap widens at scale. An organization with hundreds of repos can't manually
1010

1111
- **Platform engineering teams** rolling out AI coding tools across an org — need to assess readiness, set baselines, and track adoption at scale.
1212
- **Individual developers** who want their AI agent to understand their repo's stack, conventions, and architecture from day one.
13-
- **Engineering leadership** evaluating AI readiness across portfolios, with quantifiable maturity levels and policy-driven compliance.
13+
- **Engineering leadership** evaluating readiness across portfolios, with quantifiable maturity levels and policy-driven compliance.
1414

1515
## What AgentRC Does
1616

@@ -33,7 +33,7 @@ AgentRC's readiness assessment maps repos to a 5-level maturity model:
3333
| Level | Name | What it means |
3434
| ----- | ------------ | --------------------------------------------------- |
3535
| 1 | Functional | Builds, tests, basic tooling in place |
36-
| 2 | Documented | README, CONTRIBUTING, custom AI instructions exist |
36+
| 2 | Documented | README, CONTRIBUTING, custom instructions exist |
3737
| 3 | Standardized | CI/CD, security policies, CODEOWNERS, observability |
3838
| 4 | Optimized | MCP servers, custom agents, AI skills configured |
3939
| 5 | Autonomous | Full AI-native development with minimal oversight |

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ agentrc init /path/to/repo
1717
# Inspect a repository before generating config or instructions
1818
agentrc analyze /path/to/repo
1919

20-
# Check AI readiness in the terminal
20+
# Check readiness in the terminal
2121
agentrc readiness /path/to/repo
2222

2323
# Generate a visual readiness report

packages/core/src/services/batch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async function processRepo(params: ProcessRepoParams): Promise<ProcessResult> {
129129
}
130130

131131
progress?.update(`${label}: Committing...`);
132-
await commitAll(repoPath, "chore: add copilot instructions via AgentRC");
132+
await commitAll(repoPath, "chore: add instructions via AgentRC");
133133

134134
progress?.update(`${label}: Pushing...`);
135135
await pushBranch(repoPath, branch, token, provider);
@@ -173,7 +173,7 @@ export async function processGitHubRepo(options: ProcessGitHubRepoOptions): Prom
173173
token,
174174
owner: repo.owner,
175175
repo: repo.name,
176-
title: "🤖 Add Copilot instructions via AgentRC",
176+
title: "🤖 Add instructions via AgentRC",
177177
body: buildInstructionsPrBody(),
178178
head: branchName,
179179
base: repo.defaultBranch
@@ -210,7 +210,7 @@ export async function processAzureRepo(options: ProcessAzureRepoOptions): Promis
210210
project: repo.project,
211211
repoId: repo.id,
212212
repoName: repo.name,
213-
title: "🤖 Add Copilot instructions via AgentRC",
213+
title: "🤖 Add instructions via AgentRC",
214214
body: buildInstructionsPrBody(),
215215
sourceBranch: branchName,
216216
targetBranch: repo.defaultBranch
@@ -299,7 +299,7 @@ export type ProcessBatchReadinessRepoOptions = {
299299
};
300300

301301
/**
302-
* Clone a single GitHub repo and run the AI-readiness report.
302+
* Clone a single GitHub repo and run the readiness report.
303303
* Credential-stripped clone URL is restored on the remote after cloning.
304304
* Extracted from BatchReadinessTui so the TUI remains a thin presenter.
305305
*/

packages/core/src/services/instructions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ export async function generateAreaInstructions(
430430
const preferredModel = options.model ?? DEFAULT_MODEL;
431431

432432
const areaSystemContent = hasExistingInstructions
433-
? `You are an expert codebase analyst. Your task is to generate a concise .instructions.md file for a specific area of a codebase. This file will be used as a file-based custom instruction in VS Code Copilot, automatically applied when working on files matching certain patterns. This file should complement, not duplicate, existing instruction files. Use the Explore subagents and read-only tools to explore the codebase. When done, call the emit_file_content tool with the final markdown.`
434-
: `You are an expert codebase analyst. Your task is to generate a concise .instructions.md file for a specific area of a codebase. This file will be used as a file-based custom instruction in VS Code Copilot, automatically applied when working on files matching certain patterns. Use the Explore subagents and read-only tools to explore the codebase. When done, call the emit_file_content tool with the final markdown.`;
433+
? `You are an expert codebase analyst. Your task is to generate a concise .instructions.md file for a specific area of a codebase. This file will be used as an area instruction in VS Code, automatically applied when working on files matching certain patterns. This file should complement, not duplicate, existing instruction files. Use the Explore subagents and read-only tools to explore the codebase. When done, call the emit_file_content tool with the final markdown.`
434+
: `You are an expert codebase analyst. Your task is to generate a concise .instructions.md file for a specific area of a codebase. This file will be used as an area instruction in VS Code, automatically applied when working on files matching certain patterns. Use the Explore subagents and read-only tools to explore the codebase. When done, call the emit_file_content tool with the final markdown.`;
435435

436436
const { tool: emitTool, getContent } = await createEmitTool();
437437

@@ -470,7 +470,7 @@ export async function generateAreaInstructions(
470470
}
471471
});
472472

473-
const prompt = `Analyze the "${area.name}" area of this codebase and generate a file-based instruction file.
473+
const prompt = `Analyze the "${area.name}" area of this codebase and generate an area instruction file.
474474
475475
This area covers files matching: ${applyToStr}
476476
${area.description ? `Description: ${area.description}` : ""}

packages/core/src/services/readiness.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function getLevelName(level: number): string {
6666
export function getLevelDescription(level: number): string {
6767
const descriptions: Record<number, string> = {
6868
1: "Repo builds, tests run, and basic tooling (linter, lockfile) is in place. AI agents can clone and get started.",
69-
2: "README, CONTRIBUTING guide, and custom AI instructions exist. Agents understand project context and conventions.",
69+
2: "README, CONTRIBUTING guide, and custom instructions exist. Agents understand project context and conventions.",
7070
3: "CI/CD, security policies, CODEOWNERS, and observability are configured. Agents operate within well-defined guardrails.",
7171
4: "MCP servers, custom agents, and AI skills are set up. Agents have deep integration with project-specific tools and workflows.",
7272
5: "Full AI-native development: agents can independently plan, implement, test, and ship changes with minimal human oversight."
@@ -683,7 +683,7 @@ export function buildCriteria(): ReadinessCriterion[] {
683683
},
684684
{
685685
id: "custom-instructions",
686-
title: "Custom AI instructions or agent guidance",
686+
title: "Custom instructions or agent guidance",
687687
pillar: "ai-tooling",
688688
level: 1,
689689
scope: "repo",
@@ -695,7 +695,7 @@ export function buildCriteria(): ReadinessCriterion[] {
695695
return {
696696
status: "fail",
697697
reason:
698-
"Missing custom AI instructions (e.g. copilot-instructions.md, CLAUDE.md, AGENTS.md, .cursorrules).",
698+
"Missing custom instructions (e.g. copilot-instructions.md, CLAUDE.md, AGENTS.md, .cursorrules).",
699699
evidence: [
700700
"copilot-instructions.md",
701701
"CLAUDE.md",
@@ -706,7 +706,7 @@ export function buildCriteria(): ReadinessCriterion[] {
706706
};
707707
}
708708

709-
// Check for file-based instructions (.github/instructions/*.instructions.md)
709+
// Check for area instructions (.github/instructions/*.instructions.md)
710710
const fileBasedInstructions = await hasFileBasedInstructions(context.repoPath);
711711
const areas = context.analysis.areas ?? [];
712712

@@ -715,13 +715,13 @@ export function buildCriteria(): ReadinessCriterion[] {
715715
if (fileBasedInstructions.length === 0) {
716716
return {
717717
status: "pass",
718-
reason: `Root instructions found, but no file-based instructions for ${areas.length} detected areas. Run \`agentrc instructions --areas\` to generate.`,
718+
reason: `Root instructions found, but no area instructions for ${areas.length} detected areas. Run \`agentrc instructions --areas\` to generate.`,
719719
evidence: [...rootFound, ...areas.map((a) => `${a.name}: missing .instructions.md`)]
720720
};
721721
}
722722
return {
723723
status: "pass",
724-
reason: `Root + ${fileBasedInstructions.length} file-based instruction(s) found.`,
724+
reason: `Root + ${fileBasedInstructions.length} area instruction(s) found.`,
725725
evidence: [...rootFound, ...fileBasedInstructions]
726726
};
727727
}

0 commit comments

Comments
 (0)