Skip to content

feat: Enterprise AI Adoption Audit Meta-Skill - #8

Merged
imagineux merged 2 commits into
mainfrom
feature/enterprise-ai-adoption-audit
Mar 14, 2026
Merged

feat: Enterprise AI Adoption Audit Meta-Skill#8
imagineux merged 2 commits into
mainfrom
feature/enterprise-ai-adoption-audit

Conversation

@imagineux

Copy link
Copy Markdown
Contributor

Add enterprise AI adoption audit skill with AI detection, Copilot analysis, maturity scoring, and ADR generation.

- Add comprehensive AI technology detection and Copilot integration analysis
- Build skill orchestration engine with maturity-based execution paths
- Create AI-focused ADR generation templates and rubrics
- Update plugin.json to focus on AI adoption as sole exposed skill
- Consolidate artifact/, repo-assessment/, recommend-workspace-pack/ functionality
- Add comprehensive assessment scripts: ai-detector, copilot-analyzer, maturity-scoring, adr-generator
- Implement result aggregation and skill routing orchestration
- Create AI readiness rubric and Copilot integration checklist
- Generate comprehensive AI adoption reports and strategic ADRs

This transforms the plugin from general repository assessment to a specialized
enterprise AI adoption audit toolkit with end-to-end workflow capabilities.
@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Enterprise AI Adoption Audit Meta-Skill with Detection, Copilot Analysis, Maturity Scoring, and ADR Generation

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Implements comprehensive enterprise AI adoption audit skill with multi-component analysis system
• Adds AI technology detection across multiple package managers (npm, pip, cargo, maven, gradle)
  with readiness scoring
• Introduces GitHub Copilot integration maturity assessment with governance and adoption analysis
• Develops AI maturity scoring framework across five dimensions (technology, Copilot, governance,
  organization, infrastructure) with six maturity levels (AI-Novice through AI-Native)
• Creates 6-phase result aggregation pipeline for comprehensive analysis synthesis with insights,
  action items, and benchmarking
• Generates Architecture Decision Records (ADRs) for AI adoption strategies with cost analysis,
  timeline planning, and ROI assessment
• Implements sophisticated orchestration engine with maturity-based execution paths and targeted
  recommendations
• Provides extensive documentation including AI readiness rubric, assessment checklists, ADR
  templates, and sample audit reports
• Updates plugin configuration to reflect enterprise AI audit focus with simplified skill structure
Diagram
flowchart LR
  A["Repository Codebase"] -->|"AI Detection"| B["AI Technology Scanner"]
  A -->|"Copilot Analysis"| C["Copilot Integration Analyzer"]
  B -->|"Technology Scores"| D["Maturity Scoring Engine"]
  C -->|"Copilot Scores"| D
  A -->|"Governance & Infrastructure"| D
  D -->|"Component Scores"| E["Result Aggregator"]
  E -->|"Synthesized Analysis"| F["ADR Generator"]
  E -->|"Executive Summary & Roadmap"| G["Audit Report"]
  F -->|"Strategic Decisions"| G
Loading

Grey Divider

File Changes

1. skills/enterprise-ai-adoption-audit/orchestration/result-aggregator.js ✨ Enhancement +1875/-0

Enterprise AI Adoption Results Aggregation and Synthesis Engine

• Implements comprehensive result aggregation system with 6-phase processing pipeline
 (normalization, pattern identification, insights generation, action items creation, benchmarking,
 synthesis)
• Provides detailed analysis across technology, Copilot, and maturity assessment components with
 correlation and trend identification
• Generates strategic, operational, tactical, and risk-based insights with prioritized action items
• Creates executive summaries, roadmaps, success metrics, and benchmarking comparisons against
 industry standards

skills/enterprise-ai-adoption-audit/orchestration/result-aggregator.js


2. skills/enterprise-ai-adoption-audit/scripts/adr-generator.js ✨ Enhancement +1206/-0

AI Strategy Architecture Decision Record Generator

• Generates Architecture Decision Records (ADRs) for AI adoption strategies based on maturity
 assessment findings
• Populates comprehensive ADR templates with context, options, decisions, tradeoffs, evidence, and
 follow-up actions
• Provides detailed cost analysis, timeline planning, resource requirements, and success metrics for
 AI implementation
• Supports multiple strategy options (primary, alternative, incremental) with risk mitigation and
 ROI assessment

skills/enterprise-ai-adoption-audit/scripts/adr-generator.js


3. skills/enterprise-ai-adoption-audit/scripts/ai-detector.js ✨ Enhancement +631/-0

AI Technology Detection and Readiness Assessment

• Detects AI/ML technologies, frameworks, libraries, and services across repository codebase
• Analyzes dependencies from multiple package managers (npm, pip, cargo, maven, gradle)
• Identifies AI configurations, AI-generated code patterns, and infrastructure components
• Calculates AI readiness scores for technology stack, library integration, service integration, and
 infrastructure

skills/enterprise-ai-adoption-audit/scripts/ai-detector.js


View more (8)
4. plugin.json ⚙️ Configuration changes +14/-17

Plugin Configuration Update for Enterprise AI Audit

• Updates plugin name from copilot-repo-assessment to enterprise-ai-adoption-audit
• Revises description to reflect comprehensive AI maturity assessment and Copilot integration focus
• Replaces keywords with AI adoption, governance, and strategy-focused terms
• Simplifies skills configuration to single enterprise-ai-adoption-audit skill directory

plugin.json


5. skills/enterprise-ai-adoption-audit/orchestration/skill-router.js ✨ Enhancement +1407/-0

Enterprise AI Adoption Audit Orchestration and Routing Engine

• Implements comprehensive orchestration logic for enterprise AI adoption audits with 6
 maturity-based execution paths (foundation, capability, scaling, optimization, innovation,
 excellence)
• Coordinates execution of AI detection, Copilot analysis, maturity scoring, and ADR generation
 components
• Generates detailed audit reports with executive summaries, recommendations, roadmaps, and
 benchmarking data
• Provides path-specific analysis methods for each maturity level with targeted assessments and
 recommendations

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js


6. skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js ✨ Enhancement +1223/-0

GitHub Copilot Integration Analysis and Maturity Assessment

• Analyzes GitHub Copilot integration maturity across configurations, custom prompts, skills, and
 workflows
• Scans for Copilot-specific settings, governance files, and team collaboration patterns
• Calculates composite scores for configuration, customization, integration, adoption, quality, and
 governance
• Generates recommendations for enhancing Copilot adoption and establishing AI governance frameworks

skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js


7. skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js ✨ Enhancement +1069/-0

AI Maturity Scoring and Assessment Framework

• Calculates comprehensive AI maturity scores across five components: technology, Copilot,
 governance, organization, and infrastructure
• Determines maturity levels (AI-Novice through AI-Native) based on weighted component scores
• Generates roadmaps, benchmarking comparisons, and gap/opportunity analysis
• Provides detailed assessment helpers for team capabilities, training programs, cloud
 infrastructure, and CI/CD integration

skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js


8. skills/enterprise-ai-adoption-audit/assets/ai-readiness-rubric.md 📝 Documentation +311/-0

AI Readiness Assessment Rubric and Evaluation Framework

• Defines comprehensive evaluation rubric for AI adoption maturity across 5 dimensions with 4-point
 scoring scales
• Establishes assessment criteria for technology stack, Copilot integration, governance, team
 capabilities, and infrastructure
• Provides overall readiness levels (AI-Native, AI-Ready, AI-Aware, AI-Novice) with score ranges
• Includes assessment process, scoring calculation methodology, and improvement recommendations for
 each maturity transition

skills/enterprise-ai-adoption-audit/assets/ai-readiness-rubric.md


9. docs/ai-adoption-audit/ai-adoption-audit-2026-03-14.json 📝 Documentation +3091/-0

Enterprise AI Adoption Audit Report with Maturity Scoring

• Comprehensive AI adoption audit report with metadata, executive summary, and maturity assessment
• Detailed analysis of technology stack, Copilot integration, governance, organization, and
 infrastructure components
• Benchmarking comparisons against industry and competitive standards with gap analysis
• Recommendations, roadmap, and appendices with technical details and scoring methodology

docs/ai-adoption-audit/ai-adoption-audit-2026-03-14.json


10. skills/enterprise-ai-adoption-audit/assets/ai-adoption-template.md 📝 Documentation +215/-0

AI Adoption Strategy ADR Template with Decision Framework

• Template for Architecture Decision Records (ADRs) focused on AI implementation strategies
• Structured sections for context, options analysis, decision rationale, and tradeoffs
• Evidence-based decision framework with AI readiness metrics and assessment data
• Follow-up actions, success metrics, resource requirements, and timeline planning

skills/enterprise-ai-adoption-audit/assets/ai-adoption-template.md


11. skills/enterprise-ai-adoption-audit/assets/copilot-integration-checklist.md 📝 Documentation +273/-0

Copilot Integration Assessment Checklist and Maturity Framework

• Comprehensive assessment checklist for GitHub Copilot integration maturity evaluation
• Five assessment categories covering configuration, code integration, workflow, governance, and
 infrastructure
• Scoring matrix with four integration levels (Minimal to AI-Native) and calculation methodology
• Improvement recommendations, KPIs, monitoring framework, and best practices

skills/enterprise-ai-adoption-audit/assets/copilot-integration-checklist.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Mar 14, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (7) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Unredacted report logged 📘 Rule violation ⛨ Security
Description
New CLI scripts print full JSON reports to stdout, which can include sensitive configuration values
from scanned repo files. This risks leaking secrets/PII into terminal output and CI/CD logs.
Code

skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[R1213-1215]

+      console.log('\n📊 Copilot Integration Analysis Report');
+      console.log('=======================================');
+      console.log(JSON.stringify(report, null, 2));
Evidence
Compliance requires avoiding secrets/sensitive data in logs. The Copilot analyzer stores full parsed
configuration objects (content: config) and then logs the entire report via JSON.stringify,
which would emit any secrets present in those configs to logs; other related scripts also log full
reports.

Rule 2: No secrets or credentials in code/logging
Rule 4: Sensitive data not written to logs
skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[233-238]
skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[1213-1215]
skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js[1059-1061]
skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[621-623]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The CLI scripts print full JSON reports (including parsed configuration `content`) to stdout. If scanned config files include secrets (tokens/keys/passwords) or PII, they will be emitted into terminal output and CI logs.

## Issue Context
`CopilotAnalyzer` stores full parsed config objects in `this.findings.configurations` and later prints `JSON.stringify(report, null, 2)`.

## Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[233-238]
- skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[1213-1215]
- skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js[1059-1064]
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[621-627]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. ADR input type mismatch 🐞 Bug ✓ Correctness
Description
SkillRouter.generateADR passes the comprehensive report object into ADRGenerator.generateADR, but
ADRGenerator expects a maturity report with a top-level maturity field and immediately dereferences
maturity.level, causing a runtime TypeError and failing the audit when ADR generation is enabled.
Code

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[R1352-1356]

+      const adrResult = await this.detectors.adr.generateADR(report, {
+        title: `AI Adoption Strategy - ${report.maturityAssessment.maturity.level}`,
+        owner: 'AI Strategy Team',
+        timeline: 'Q1 2024 - Q4 2024',
+      });
Evidence
SkillRouter passes the comprehensive report into the ADR generator, while the ADR generator
destructures a different shape (expects maturityReport.maturity) and uses maturity.level; the
comprehensive report stores maturity under maturityAssessment, so maturity is undefined in
ADRGenerator.

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1348-1356]
skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1091-1101]
skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`SkillRouter.generateADR()` calls `ADRGenerator.generateADR()` with the *comprehensive* audit report object, but `ADRGenerator` expects a maturity report with a top-level `maturity` field. This causes `maturity` to be `undefined` and the code throws when it accesses `maturity.level`.

### Issue Context
- Comprehensive report shape: `{ maturityAssessment: <maturityReport>, ... }`
- ADR generator expects: `{ maturity: { level, ... }, componentScores, roadmap, ... }`

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1348-1356]
- skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]

### Suggested fix
In `SkillRouter.generateADR(report)`:
- Call `this.detectors.adr.generateADR(report.maturityAssessment, ...)` (or `this.results.maturity`) instead of `report`.
- Keep the ADR title derived from `report.maturityAssessment.maturity.level` as-is (or derive from the passed maturity report consistently).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. ADR placeholders mismatch 🐞 Bug ✓ Correctness
Description
ADRGenerator.generateReplacements uses placeholder tokens that do not match the ADR template (e.g.,
uses underscore tokens and a non-existent ADR number placeholder), so populateTemplate leaves key
placeholders unreplaced and produces unusable ADR output.
Code

skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[R76-93]

+  generateReplacements(maturityReport, options) {
+    const { maturity, componentScores, recommendations, roadmap } =
+      maturityReport;
+    const timestamp = new Date().toISOString().split('T')[0];
+
+    return {
+      '\\[ADR-\\[NUMBER\\]\\]': options.adrNumber || '0001',
+      '\\[AI_IMPLEMENTATION_TITLE\\]':
+        options.title || this.generateTitle(maturity),
+      '\\[CURRENT_DATE\\]': timestamp,
+      '\\[HIGH\\/MEDIUM\\/LOW\\]': this.assessConfidence(maturityReport),
+
+      // Context section
+      '\\[AI_ADOPTION_ASSESSMENT_FINDINGS\\]':
+        this.generateAssessmentFindings(maturityReport),
+      '\\[MATURITY_LEVEL\\]': maturity.level,
+      '\\[GAP_ANALYSIS\\]': this.generateGapAnalysis(componentScores),
+      '\\[BUSINESS_IMPACT\\]': this.generateBusinessImpact(maturityReport),
Evidence
The template contains placeholders like [NUMBER] and [AI ADOPTION ASSESSMENT FINDINGS] (spaces),
but the generator tries to replace keys like \[ADR-\[NUMBER\]\] and
\[AI_ADOPTION_ASSESSMENT_FINDINGS\] (underscores) which do not exist in the template text, so
replacements won’t occur.

skills/enterprise-ai-adoption-audit/assets/ai-adoption-template.md[1-10]
skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`ADRGenerator.generateReplacements()` emits placeholder keys that don't exist in `ai-adoption-template.md`, so `populateTemplate()` fails to replace critical fields and the generated ADR retains raw placeholder text.

### Issue Context
Template uses placeholders like:
- `ADR-[NUMBER]`
- `[AI ADOPTION ASSESSMENT FINDINGS]` (with spaces)

Generator currently tries to replace:
- `\[ADR-\[NUMBER\]\]` (does not exist in template)
- `\[AI_ADOPTION_ASSESSMENT_FINDINGS\]` (underscores, does not exist in template)

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]
- skills/enterprise-ai-adoption-audit/assets/ai-adoption-template.md[1-10]

### Suggested fix
- Update replacement map keys to match the template literally (e.g. `\[NUMBER\]`, `\[AI ADOPTION ASSESSMENT FINDINGS\]`).
- Add a validation step after `populateTemplate()` to detect any remaining `\[[A-Z0-9 _/]+\]` placeholders and fail loudly or log which placeholders were not replaced.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
4. Manifest hides existing skills 🐞 Bug ✓ Correctness
Description
plugin.json now lists only skills/enterprise-ai-adoption-audit/ and renames the plugin, which makes
previously documented skills like repo-assessment, recommend-workspace-pack, and artifact
unavailable via the plugin manifest and inconsistent with the current repository documentation and
contents.
Code

plugin.json[R1-25]

{
-  "name": "copilot-repo-assessment",
-  "description": "Repository assessment and pack recommendation toolkit for development teams, with React and Java Spring support",
+  "name": "enterprise-ai-adoption-audit",
+  "description": "Enterprise AI adoption audit and strategy toolkit for comprehensive AI maturity assessment and Copilot integration analysis",
  "version": "2.0.0",
  "author": {
    "name": "Matthew Van Dusen",
    "email": "matt@ankhstudio.com"
  },
  "license": "MIT",
  "keywords": [
+    "ai-adoption",
+    "enterprise-ai",
+    "copilot-integration",
+    "ai-maturity",
+    "ai-strategy",
+    "ai-assessment",
+    "ai-governance",
+    "architecture-decision-records",
+    "ai-transformation",
    "copilot",
-    "repository-assessment",
-    "react",
-    "typescript",
-    "java",
-    "spring",
-    "spring-boot",
-    "pack-recommendations",
-    "frontend",
-    "backend",
-    "full-stack",
+    "github-copilot",
+    "ai-readiness",
    "plugin"
  ],
  "homepage": "https://github.com/Ankh-Studio/copilot-eval-plugin",
Evidence
The manifest exposes only the new skill directory, while the README documents other core skills and
those skill directories still exist in the repo; this will change what users can invoke after
installing the plugin.

plugin.json[1-32]
README.md[56-68]
skills/repo-assessment/SKILL.md[1-6]
skills/recommend-workspace-pack/SKILL.md[1-6]
skills/artifact/SKILL.md[1-4]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`plugin.json` exposes only `skills/enterprise-ai-adoption-audit/`, but the repository README documents other skills and those skills are present. This changes plugin behavior and breaks documented usage.

### Issue Context
- README documents `repo-assessment`, `recommend-workspace-pack`, `artifact` as core skills.
- Those skill directories exist in `skills/`.

### Fix Focus Areas
- plugin.json[1-31]
- README.md[56-68]

### Suggested fix
Option A (most consistent with PR title 'Add ... skill'):
- Restore the prior plugin name/description if needed.
- Update `plugin.json.skills` to include the existing skill directories *plus* `skills/enterprise-ai-adoption-audit/`.
- Optionally update README to document the new skill.

Option B (if intentionally converting repo into a single-skill plugin):
- Update README and package.json metadata to match the new plugin identity and remove references to other skills.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

5. Global regex misses matches 🐞 Bug ✓ Correctness
Description
ai-detector uses global (/.../gi) regex instances with RegExp.test across many files; because the
global flag mutates lastIndex after a match, subsequent tests can miss matches and under-report AI
patterns/frameworks in the audit output.
Code

skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[R107-124]

+    const aiPatterns = [
+      /Generated by Copilot/gi,
+      /AI-generated/gi,
+      /This code was generated by/gi,
+      /Created with assistance from/gi,
+      /AI-assisted development/gi,
+      /Automatically generated/gi,
+    ];
+
+    const files = this.getAllFiles(this.repoPath);
+
+    for (const file of files) {
+      const content = await this.readFile(file);
+
+      for (const pattern of aiPatterns) {
+        if (pattern.test(content)) {
+          this.findings.aiGeneratedPatterns.add(file);
+          break;
Evidence
The detector defines global regex literals and reuses them across loops with .test(content);
global regex state (lastIndex) persists across calls and can cause false negatives after a
previous match.

skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[107-127]
skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[173-190]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`ai-detector.js` reuses `/.../gi` regular expressions with `.test()` across multiple inputs. Global regexes mutate `lastIndex`, which can cause missed detections after earlier matches.

### Issue Context
Detection logic is intended to check existence, not iterate matches; `g` is unnecessary.

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[107-127]
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[173-190]

### Suggested fix
- Remove the `g` flag from these patterns (use `/.../i`), OR
- Before each `.test(content)`, set `pattern.lastIndex = 0`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Glob implementation unreliable 🐞 Bug ⛯ Reliability
Description
ai-detector's glob() builds a RegExp from the glob pattern without escaping regex metacharacters and
assumes '/' separators, so patterns like '**/.copilot/**' can match incorrectly or not match at all
on Windows paths, leading to missed configuration detection.
Code

skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[R310-315]

+  glob(pattern) {
+    // Simple glob implementation for common patterns
+    const files = this.getAllFiles(this.repoPath);
+    const regex = new RegExp(
+      pattern.replace(/\*\*/g, '.*').replace(/\*/g, '[^/]*')
+    );
Evidence
Config detection relies on glob patterns containing '/', but glob() converts patterns directly to a
RegExp and uses [^/]*, which does not match Windows path separators and does not escape '.' and
other regex metacharacters in patterns, producing incorrect matching behavior.

skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[86-101]
skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[310-318]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The custom `glob()` implementation is not robust (no escaping of regex metacharacters; assumes `/` path separators). This can lead to missed matches and incorrect detection results.

### Issue Context
The code uses glob patterns like `**/.copilot/**` and `**/ai-config.*` to find configuration files.

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[86-101]
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[310-318]

### Suggested fix
Preferred:
- Replace custom `glob()` with a standard library (e.g., `minimatch`/`glob`) and run it against repo-relative POSIX paths.

Alternative (no dependency):
- Convert `file` to POSIX via `file.split(path.sep).join('/')` before matching.
- Escape regex special characters in `pattern` first, then expand `**` and `*` semantics safely.
- Anchor the regex (`^...$`) to reduce accidental substring matches.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. Repository scanned repeatedly 🐞 Bug ➹ Performance
Description
SkillRouter.performInitialAssessment scans the repository via technology.detect() and
copilot.analyze(), then calls AIMaturityScorer.calculateMaturity() which runs both scans again,
significantly increasing runtime on large repositories.
Code

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[R76-87]

+    // Quick technology scan
+    console.log('  - Scanning technology stack...');
+    this.results.technology = await this.detectors.technology.detect();
+
+    // Quick Copilot analysis
+    console.log('  - Analyzing Copilot integration...');
+    this.results.copilot = await this.detectors.copilot.analyze();
+
+    // Calculate initial maturity score
+    console.log('  - Calculating maturity score...');
+    this.results.maturity = await this.detectors.maturity.calculateMaturity();
+
Evidence
SkillRouter performs technology and copilot scans explicitly, then maturity scoring repeats both
scans internally instead of reusing results, doubling expensive full-tree traversal and file reads.

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[73-87]
skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js[23-29]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The audit scans the same repository multiple times during a single run. This is slow and scales poorly with repository size.

### Issue Context
- SkillRouter explicitly runs technology + copilot scans.
- AIMaturityScorer then runs technology + copilot scans again internally.

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[73-87]
- skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js[23-29]

### Suggested fix
Option A:
- Update `AIMaturityScorer.calculateMaturity({ techReport, copilotReport }?)` to accept optional inputs.
- In `SkillRouter.performInitialAssessment()`, pass the already computed reports.

Option B:
- In `SkillRouter.performInitialAssessment()`, call `calculateMaturity()` first and set:
 - `this.results.technology = this.results.maturity.detailedAnalysis.technology`
 - `this.results.copilot = this.results.maturity.detailedAnalysis.copilot`
so the repo is scanned only once.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
8. Output path ignores repo 🐞 Bug ⛯ Reliability
Description
SkillRouter defaults outputPath to './docs/ai-adoption-audit' and writes using that path without
joining to repoPath, so running the audit against a different repoPath can write reports into the
caller’s current working directory instead of the target repository.
Code

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[R16-21]

+  constructor(repoPath = '.', options = {}) {
+    this.repoPath = repoPath;
+    this.options = {
+      generateADR: true,
+      outputPath: './docs/ai-adoption-audit',
+      includeRecommendations: true,
Evidence
The router stores repoPath separately but uses a CWD-relative outputPath when writing the report,
while other components (e.g., ADRGenerator) join output directories to repoPath; this inconsistency
causes misdirected output when repoPath is not '.'.

skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[16-30]
skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1326-1336]
skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[13-23]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Report writing uses `this.options.outputPath` as a CWD-relative path even when `repoPath` points at a different repository. This can place output files in unexpected locations.

### Issue Context
ADRGenerator writes into `path.join(repoPath, 'docs', 'adr')`, but SkillRouter writes into `./docs/ai-adoption-audit`.

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[16-24]
- skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1322-1338]

### Suggested fix
- Change default `outputPath` to `path.join(repoPath, 'docs', 'ai-adoption-audit')`.
- If `options.outputPath` is provided and is relative, resolve it against `repoPath` (not process.cwd()).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@imagineux
imagineux merged commit a062af3 into main Mar 14, 2026
1 check passed
@imagineux
imagineux deleted the feature/enterprise-ai-adoption-audit branch March 14, 2026 01:46

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebf26707d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +372 to +376
const enforcementLevel =
Object.values(governance).reduce(
(sum, g) => sum + g.enforcement.level,
0
) / Object.keys(governance).length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle empty governance sets in security compliance scoring

When no governance files are detected (a common case in new repos), Object.keys(governance).length is 0, so this division yields NaN; that NaN propagates into governance and overall maturity scores, and the final JSON serializes these as null, which breaks maturity classification and downstream routing/recommendations.

Useful? React with 👍 / 👎.

Comment on lines +314 to +316
strategy: this.assessStrategicAlignment(),
structure: this.assessStructuralAlignment(),
culture: this.assessCulturalAlignment(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Define scaling-path assessors before invoking them

These helper calls are not implemented on SkillRouter, so any run that reaches the scaling/advanced paths throws TypeError: ... is not a function and aborts the audit instead of producing a report; this makes non-foundation maturity paths non-executable.

Useful? React with 👍 / 👎.

Comment on lines +1014 to +1016
return Math.round(
(avgCompleteness * 0.7 + Math.min(bestPracticesCount * 10, 30)) * 0.3
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unintended 0.3 scaling from configuration score

Applying * 0.3 to the already weighted configuration subtotal caps this component at 30 points, so configuration can never reach the 60/70 thresholds used elsewhere; that systematically under-scores Copilot maturity and skews recommendations/execution path selection even for well-configured repositories.

Useful? React with 👍 / 👎.

const comparison = {};

for (const [component, benchmark] of Object.entries(benchmarks)) {
const currentScore = scores[component]?.score || 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Read overall benchmark from numeric overall score

The benchmark loop assumes every score is an object with .score, but scores.overall is a number; this makes the overall benchmark current value fall back to 0, producing incorrect overall benchmark gaps/percentiles and misleading benchmarking output.

Useful? React with 👍 / 👎.

Comment on lines +1213 to +1215
console.log('\n📊 Copilot Integration Analysis Report');
console.log('=======================================');
console.log(JSON.stringify(report, null, 2));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Unredacted report logged 📘 Rule violation ⛨ Security

New CLI scripts print full JSON reports to stdout, which can include sensitive configuration values
from scanned repo files. This risks leaking secrets/PII into terminal output and CI/CD logs.
Agent Prompt
## Issue description
The CLI scripts print full JSON reports (including parsed configuration `content`) to stdout. If scanned config files include secrets (tokens/keys/passwords) or PII, they will be emitted into terminal output and CI logs.

## Issue Context
`CopilotAnalyzer` stores full parsed config objects in `this.findings.configurations` and later prints `JSON.stringify(report, null, 2)`.

## Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[233-238]
- skills/enterprise-ai-adoption-audit/scripts/copilot-analyzer.js[1213-1215]
- skills/enterprise-ai-adoption-audit/scripts/maturity-scoring.js[1059-1064]
- skills/enterprise-ai-adoption-audit/scripts/ai-detector.js[621-627]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1352 to +1356
const adrResult = await this.detectors.adr.generateADR(report, {
title: `AI Adoption Strategy - ${report.maturityAssessment.maturity.level}`,
owner: 'AI Strategy Team',
timeline: 'Q1 2024 - Q4 2024',
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Adr input type mismatch 🐞 Bug ✓ Correctness

SkillRouter.generateADR passes the comprehensive report object into ADRGenerator.generateADR, but
ADRGenerator expects a maturity report with a top-level maturity field and immediately dereferences
maturity.level, causing a runtime TypeError and failing the audit when ADR generation is enabled.
Agent Prompt
### Issue description
`SkillRouter.generateADR()` calls `ADRGenerator.generateADR()` with the *comprehensive* audit report object, but `ADRGenerator` expects a maturity report with a top-level `maturity` field. This causes `maturity` to be `undefined` and the code throws when it accesses `maturity.level`.

### Issue Context
- Comprehensive report shape: `{ maturityAssessment: <maturityReport>, ... }`
- ADR generator expects: `{ maturity: { level, ... }, componentScores, roadmap, ... }`

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/orchestration/skill-router.js[1348-1356]
- skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]

### Suggested fix
In `SkillRouter.generateADR(report)`:
- Call `this.detectors.adr.generateADR(report.maturityAssessment, ...)` (or `this.results.maturity`) instead of `report`.
- Keep the ADR title derived from `report.maturityAssessment.maturity.level` as-is (or derive from the passed maturity report consistently).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +76 to +93
generateReplacements(maturityReport, options) {
const { maturity, componentScores, recommendations, roadmap } =
maturityReport;
const timestamp = new Date().toISOString().split('T')[0];

return {
'\\[ADR-\\[NUMBER\\]\\]': options.adrNumber || '0001',
'\\[AI_IMPLEMENTATION_TITLE\\]':
options.title || this.generateTitle(maturity),
'\\[CURRENT_DATE\\]': timestamp,
'\\[HIGH\\/MEDIUM\\/LOW\\]': this.assessConfidence(maturityReport),

// Context section
'\\[AI_ADOPTION_ASSESSMENT_FINDINGS\\]':
this.generateAssessmentFindings(maturityReport),
'\\[MATURITY_LEVEL\\]': maturity.level,
'\\[GAP_ANALYSIS\\]': this.generateGapAnalysis(componentScores),
'\\[BUSINESS_IMPACT\\]': this.generateBusinessImpact(maturityReport),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Adr placeholders mismatch 🐞 Bug ✓ Correctness

ADRGenerator.generateReplacements uses placeholder tokens that do not match the ADR template (e.g.,
uses underscore tokens and a non-existent ADR number placeholder), so populateTemplate leaves key
placeholders unreplaced and produces unusable ADR output.
Agent Prompt
### Issue description
`ADRGenerator.generateReplacements()` emits placeholder keys that don't exist in `ai-adoption-template.md`, so `populateTemplate()` fails to replace critical fields and the generated ADR retains raw placeholder text.

### Issue Context
Template uses placeholders like:
- `ADR-[NUMBER]`
- `[AI ADOPTION ASSESSMENT FINDINGS]` (with spaces)

Generator currently tries to replace:
- `\[ADR-\[NUMBER\]\]` (does not exist in template)
- `\[AI_ADOPTION_ASSESSMENT_FINDINGS\]` (underscores, does not exist in template)

### Fix Focus Areas
- skills/enterprise-ai-adoption-audit/scripts/adr-generator.js[76-93]
- skills/enterprise-ai-adoption-audit/assets/ai-adoption-template.md[1-10]

### Suggested fix
- Update replacement map keys to match the template literally (e.g. `\[NUMBER\]`, `\[AI ADOPTION ASSESSMENT FINDINGS\]`).
- Add a validation step after `populateTemplate()` to detect any remaining `\[[A-Z0-9 _/]+\]` placeholders and fail loudly or log which placeholders were not replaced.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread plugin.json
Comment on lines 1 to 25
{
"name": "copilot-repo-assessment",
"description": "Repository assessment and pack recommendation toolkit for development teams, with React and Java Spring support",
"version": "v2.0.1",
"name": "enterprise-ai-adoption-audit",
"description": "Enterprise AI adoption audit and strategy toolkit for comprehensive AI maturity assessment and Copilot integration analysis",
"version": "2.0.0",
"author": {
"name": "Matthew Van Dusen",
"email": "matt@ankhstudio.com"
},
"license": "MIT",
"keywords": [
"ai-adoption",
"enterprise-ai",
"copilot-integration",
"ai-maturity",
"ai-strategy",
"ai-assessment",
"ai-governance",
"architecture-decision-records",
"ai-transformation",
"copilot",
"repository-assessment",
"react",
"typescript",
"java",
"spring",
"spring-boot",
"pack-recommendations",
"frontend",
"backend",
"full-stack",
"github-copilot",
"ai-readiness",
"plugin"
],
"homepage": "https://github.com/Ankh-Studio/copilot-eval-plugin",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Manifest hides existing skills 🐞 Bug ✓ Correctness

plugin.json now lists only skills/enterprise-ai-adoption-audit/ and renames the plugin, which makes
previously documented skills like repo-assessment, recommend-workspace-pack, and artifact
unavailable via the plugin manifest and inconsistent with the current repository documentation and
contents.
Agent Prompt
### Issue description
`plugin.json` exposes only `skills/enterprise-ai-adoption-audit/`, but the repository README documents other skills and those skills are present. This changes plugin behavior and breaks documented usage.

### Issue Context
- README documents `repo-assessment`, `recommend-workspace-pack`, `artifact` as core skills.
- Those skill directories exist in `skills/`.

### Fix Focus Areas
- plugin.json[1-31]
- README.md[56-68]

### Suggested fix
Option A (most consistent with PR title 'Add ... skill'):
- Restore the prior plugin name/description if needed.
- Update `plugin.json.skills` to include the existing skill directories *plus* `skills/enterprise-ai-adoption-audit/`.
- Optionally update README to document the new skill.

Option B (if intentionally converting repo into a single-skill plugin):
- Update README and package.json metadata to match the new plugin identity and remove references to other skills.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@Ankh-Studio Ankh-Studio locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant