refactor: de-brand terminology, add --dry-run and batch instructions#55
refactor: de-brand terminology, add --dry-run and batch instructions#55digitarald merged 3 commits intomainfrom
Conversation
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
|
There was a problem hiding this comment.
Pull request overview
Refactors user-facing terminology across the CLI, VS Code extension, docs, and tests (de-branding “AI readiness”/“Copilot instructions”), and adds new functionality around instruction generation (CLI --dry-run, VS Code multi-root batch generation, and multi-root workspace selection).
Changes:
- De-brands “AI readiness” → “readiness” and “Copilot instructions” → “instructions” across UI strings, docs, and tests.
- Adds CLI
agentrc instructions --dry-runfor previewing generated outputs (including JSON mode). - Adds VS Code multi-root support via
pickWorkspacePath()and a new “Generate Instructions (All Roots)” batch command.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-extension/src/extension.ts | Registers the new batch instructions command. |
| vscode-extension/src/commands/readiness.ts | Uses multi-root picker; loads policies from config; updates readiness UI text. |
| vscode-extension/src/commands/pr.ts | Uses multi-root picker for PR creation. |
| vscode-extension/src/commands/instructions.ts | Uses multi-root picker; adds config write-back; improves area QuickPick details. |
| vscode-extension/src/commands/init.ts | Uses multi-root picker; updates terminology in progress messaging. |
| vscode-extension/src/commands/generate.ts | Uses multi-root picker. |
| vscode-extension/src/commands/eval.ts | Uses multi-root picker. |
| vscode-extension/src/commands/batch.ts | Adds VS Code command to generate instructions across all workspace roots. |
| vscode-extension/src/commands/analyze.ts | Replaces single-root selection with multi-root QuickPick. |
| vscode-extension/resources/walkthrough/readiness.md | Updates walkthrough terminology (“AI-ready” → “Ready”). |
| vscode-extension/package.json | Renames command titles; contributes new batch instructions command + menus. |
| vscode-extension/README.md | Updates terminology; documents batch command; updates version/model defaults. |
| src/ui/tui.tsx | Adds “R” hotkey to run readiness report; renames key bindings; terminology updates. |
| src/ui/BatchReadinessTui.tsx | Renames “Batch AI Readiness Report” → “Batch Readiness Report”. |
| src/services/tests/visualReport.test.ts | Updates criterion title terminology. |
| src/services/tests/readiness.test.ts | Updates expectations/messages for “area instructions” terminology. |
| src/services/tests/readiness-output.test.ts | Updates markdown heading expectations. |
| src/services/tests/readiness-markdown.test.ts | Updates markdown formatting expectations and terminology. |
| src/commands/readiness.ts | Updates report title/headers terminology. |
| src/commands/instructions.ts | Adds --dry-run behavior and JSON output for previews; uses areaInstructionPath(). |
| src/commands/init.ts | Updates “next steps” text to “readiness report”. |
| src/commands/generate.ts | Adds deprecation warnings for generate instructions/agents. |
| src/cli.ts | Updates command descriptions/flags; adds --dry-run to instructions. |
| packages/core/src/utils/pr.ts | De-brands PR body content (“Copilot” → “AI coding assistants” / “instructions”). |
| packages/core/src/services/visualReport.ts | Default report title + footer terminology updated. |
| packages/core/src/services/readiness/scoring.ts | Updates Level 2 description terminology. |
| packages/core/src/services/readiness/criteria.ts | Updates “custom instructions” criterion text and “area instructions” wording. |
| packages/core/src/services/readiness.ts | Mirrors readiness copy updates in the service implementation. |
| packages/core/src/services/instructions.ts | Updates area-instructions prompt wording (“file-based” → “area”). |
| packages/core/src/services/batch.ts | Updates commit/PR titles and readiness docstrings terminology. |
| examples/README.md | Updates example wording (“AI readiness” → “readiness”). |
| docs/product.md | Updates product copy terminology. |
| agentrc.eval.json | Updates eval prompts/expectations for de-branded terminology. |
| README.md | Updates CLI docs/terminology; documents --dry-run; updates examples/models. |
| .github/prompts/generate-improvements.prompt.md | Updates prompt wording to match new terminology. |
Comments suppressed due to low confidence (3)
vscode-extension/src/commands/instructions.ts:133
- This command reads
analysisfrom a global cache without checking that it corresponds to the currently pickedworkspacePath. In multi-root workspaces this can cause area selection + generation to run with the wrong analysis. Consider storing{ repoPath, analysis }in the cache (or a per-workspace map) and re-analyzing when the cache doesn't match the selected root.
src/commands/instructions.ts:117 - In
--dry-run --jsonmode this recordspathasf.path(repo-relative) for nested outputs, but other dry-run branches record paths relative toprocess.cwd(). This makes the JSON payload inconsistent and hard to consume. Normalize all dry-run file paths to a single convention (e.g., repo-relative paths, or absolute paths) across all code paths.
dryRunFiles.push(
...dryFiles.map((f) => ({
path: f.path,
bytes: Buffer.byteLength(f.content, "utf8")
}))
src/commands/instructions.ts:176
- For flat root dry-run JSON, this pushes
path: relPathwhererelPathis relative toprocess.cwd(). If--repopoints elsewhere, consumers will get paths like../some/repo/..., while nested dry-run returns repo-relative paths. Use a consistent base (prefer repo-relative paths like.github/...or absolute paths) for dry-run JSON entries.
if (options.dryRun) {
const relPath = path.relative(process.cwd(), outputPath);
const byteCount = Buffer.byteLength(content, "utf8");
if (shouldLog(options)) {
progress.update(`[dry-run] Would write ${relPath} (${byteCount} bytes)`);
| let existing: Record<string, unknown> = {}; | ||
| try { | ||
| const raw = await fs.promises.readFile(configPath, "utf-8"); | ||
| existing = JSON.parse(raw); | ||
| } catch (err: unknown) { |
There was a problem hiding this comment.
Fixed in 4f56662. Added a guard: if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) — non-object JSON (arrays, primitives) is now treated as {} rather than erroneously mutated.
| for (const warning of nestedResult.warnings) { | ||
| if (shouldLog(options)) progress.update(`Warning: ${warning}`); | ||
| } |
There was a problem hiding this comment.
Fixed in 4f56662. Warnings from nestedResult.warnings are now emitted in both dry-run and write modes.
When the eval step crashes (e.g., missing COPILOT_TOKEN), the results file isn't created. Previously the report step would post a confusing ENOENT error comment to the PR. Now it checks if the results file exists first and silently skips the PR comment, only logging a warning to the Actions run.
- Always emit dry-run JSON even when files array is empty - Normalize all dry-run paths to repo-relative (consistent across --repo) - Surface nested generation warnings in dry-run mode - Guard config write-back against non-object JSON (arrays, primitives) - Add single-root runtime guard to batch instructions command
There was a problem hiding this comment.
Pull request overview
This PR de-brands user-facing terminology (“AI readiness” → “readiness”, “Copilot instructions” → “instructions”), adds a --dry-run mode to the CLI instructions command, and introduces VS Code improvements for multi-root workspaces (QuickPick root selection + batch instructions generation).
Changes:
- Standardize “readiness” / “instructions” terminology across CLI, VS Code extension, docs, and tests.
- Add
--dry-runtoagentrc instructionswith aggregated JSON output for previewing generated files. - Improve VS Code multi-root UX via
pickWorkspacePath()and a new “Generate Instructions (All Roots)” command.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-extension/src/extension.ts | Registers the new batch instructions command. |
| vscode-extension/src/commands/readiness.ts | Uses workspace picker; loads config policies and updates readiness report labeling. |
| vscode-extension/src/commands/pr.ts | Uses workspace picker for correct repo selection in multi-root. |
| vscode-extension/src/commands/instructions.ts | Uses workspace picker; writes back strategy selection; improves area QuickPick details. |
| vscode-extension/src/commands/init.ts | Uses workspace picker; updates progress text to “instructions”. |
| vscode-extension/src/commands/generate.ts | Uses workspace picker for multi-root correctness. |
| vscode-extension/src/commands/eval.ts | Uses workspace picker for multi-root correctness. |
| vscode-extension/src/commands/batch.ts | Adds “Generate Instructions (All Roots)” command implementation. |
| vscode-extension/src/commands/analyze.ts | Replaces getWorkspacePath() with multi-root pickWorkspacePath(). |
| vscode-extension/resources/walkthrough/readiness.md | Updates walkthrough terminology. |
| vscode-extension/package.json | Renames command titles/strings and adds batch instructions command contribution/menu gating. |
| vscode-extension/README.md | Updates docs for new command titles, multi-root batch instructions, and settings defaults. |
| src/ui/tui.tsx | Adds readiness hotkey + de-branded strings; renames area instructions messaging to “nested”. |
| src/ui/BatchReadinessTui.tsx | Updates report title terminology. |
| src/services/tests/visualReport.test.ts | Updates expected readiness/instructions strings. |
| src/services/tests/readiness.test.ts | Updates tests to use “area instructions” terminology. |
| src/services/tests/readiness-output.test.ts | Updates markdown output expectations to “Readiness Report”. |
| src/services/tests/readiness-markdown.test.ts | Updates markdown formatting expectations and strings. |
| src/commands/readiness.ts | Updates CLI readiness output strings/headings. |
| src/commands/instructions.ts | Implements --dry-run behavior and aggregates preview output. |
| src/commands/init.ts | Updates “next steps” wording for readiness. |
| src/commands/generate.ts | Adds deprecation warnings for generate instructions/agents and --per-app. |
| src/cli.ts | Updates command descriptions/flags and adds --dry-run to instructions. |
| packages/core/src/utils/pr.ts | De-brands PR body text to “AI coding assistants” and updates headings. |
| packages/core/src/services/visualReport.ts | Updates default visual report title/footer terminology. |
| packages/core/src/services/readiness/scoring.ts | Updates maturity model description strings to “custom instructions”. |
| packages/core/src/services/readiness/criteria.ts | Updates criterion title/reasons and “area instructions” wording. |
| packages/core/src/services/readiness.ts | Mirrors readiness criteria/scoring terminology updates. |
| packages/core/src/services/instructions.ts | Updates area-instruction prompt wording (“area instruction” vs “file-based”). |
| packages/core/src/services/batch.ts | Updates commit/PR titles and readiness comment wording. |
| examples/README.md | Updates examples to “readiness”. |
| docs/product.md | Updates product doc maturity model terminology. |
| agentrc.eval.json | Updates eval prompt strings to “readiness” / “instructions”. |
| README.md | Updates top-level docs, adds --dry-run example, and refines concepts/terminology. |
| .github/workflows/eval.yml | Avoids posting PR comment when eval results file is missing; clarifies parse error text. |
| .github/prompts/generate-improvements.prompt.md | Updates prompt wording to match new terminology. |
Comments suppressed due to low confidence (1)
src/commands/instructions.ts:357
- In the flat per-area
--dry-runpath, the reported byte count is based onbody, butwriteAreaInstruction()actually writesbuildAreaInstructionContent(area, body)(YAML frontmatter + newlines). This makes the dry-run byte counts (and message) inaccurate; compute bytes from the full file content that would be written.
if (options.dryRun) {
if (shouldLog(options)) {
progress.update(
`[dry-run] Would write area "${area.name}" (${Buffer.byteLength(body, "utf8")} bytes)`
);
}
if (options.json) {
dryRunFiles.push({
path: path.relative(repoPath, areaInstructionPath(repoPath, area)),
bytes: Buffer.byteLength(body, "utf8")
});
| let outputPath = path.join(workspacePath, ".github", "copilot-instructions.md"); | ||
| try { | ||
| const config = await loadAgentrcConfig(workspacePath); | ||
| if (config?.strategy === "nested") { | ||
| outputPath = path.join(workspacePath, "AGENTS.md"); | ||
| } | ||
| } catch { | ||
| // Non-fatal | ||
| } | ||
|
|
||
| reporter.update(`[${name}] Generating…`); | ||
| const content = await generateCopilotInstructions({ | ||
| repoPath: workspacePath, | ||
| model | ||
| }); | ||
|
|
| } else { | ||
| skipped++; | ||
| reporter.update( | ||
| `[${name}] Skipped: ${reason === "exists" ? "file already exists" : (reason ?? "unknown")}` |
- Add [Unreleased] section documenting features from PRs #55, #60, #53, #52: - instructions --dry-run flag - VS Code batch instructions and multi-root workspace support - Enhanced .NET/F# detection with framework parsing - Windows .bat/.cmd spawn EINVAL fix - ESM/CJS createRequire banner fix - Model default updated to claude-sonnet-4.6 - TUI key binding changes (R for readiness, N for nested area) - Terminology de-branding - Fix stale claude-sonnet-4.5 reference in [2.0.0] section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the interactive keyboard shortcuts for `agentrc tui`, including the main menu (G/R/E/B/M/J/Q), generate submenu (C/A/N), eval submenu (R/I), batch submenu (G/A), and preview controls (S/D/Y/Q). The R key for readiness and N key for nested area instructions were updated in #55 but were not reflected in the docs rewrite (#62). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
De-brand user-facing terminology, add
--dry-runto theinstructionscommand, and introduce a batch instructions command for multi-root VS Code workspaces.Terminology (35 files)
New Features
--dry-runflag oninstructionscommandPreview what files would be generated without writing anything to disk. Works across all 4 code paths (nested root, flat root, nested area, flat area). With
--json, emits a unifieddryRunFilesarray.VS Code: Batch Instructions (
Generate Instructions (All Roots))New command for multi-root workspaces — generates instructions for every workspace root in one pass. Respects per-root
agentrc.config.jsonstrategy. Only visible whenworkspaceFolderCount > 1.VS Code:
pickWorkspacePath()migrationAll extension commands now use
pickWorkspacePath()which shows a QuickPick for multi-root workspaces (single-root returns immediately). ReplacesgetWorkspacePath()which always used the first folder.TUI enhancements
agentrc.config.jsonreadinessReportstateExtension improvements
applyTopatterns in detail fieldgenerate instructions/agentsand--per-appFixes
claude-sonnet-4.6judgeModelsetting, fixed engine version to 1.109.0+areaInstructionPath()for real file paths instead of syntheticarea:nameVerification
npm run typecheck— passnpm run lint— passnpm run test— 568/568 passnpm run build— passnode esbuild.mjs+npx tsc --noEmit— pass