npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

copilot-framework

v1.6.2

Published

Contract-first Copilot scaffolding and workspace bootstrap scripts for Edenred repositories.

Readme

Copilot Framework

Contract-first Copilot scaffolding, multi-language code indexing, cross-language impact analysis, and agentic RAG for Edenred repositories.

Current status: v1.6.2 stable (knowledge-pack migration, agentic local RAG, hybrid search, incremental indexing, safe update flow).

It does five things:

  1. Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
  2. Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
  3. Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
  4. Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
  5. Ingests PDF knowledge as migrated markdown chunks into queryable knowledge packs (training, security, or custom).

Knowledge workflow principle:

  • PDF knowledge intake is session-driven. When the user asks Copilot to work on a PDF, the framework runs the ingestion pipeline behind the session flow.
  • No dedicated end-user CLI step is required for this PDF-driven knowledge intake path.
  • Local RAG engine: hybrid search retrieval via .ai-context/lancedb/, no cloud calls, no daemon processes.
  • Continuous learning happens during sessions as context/artifacts are refreshed from user prompts and workspace state.

For the architecture baseline, read docs/shared-ai-context-platform-v2.md.


Installation

Run from the root of your target repository:

npx --yes copilot-framework@latest setup --workspace

This will:

  • Detect your project type automatically (Java, Angular, .NET, React, etc.)
  • Scaffold .github/, context/, and .vscode/ directories
  • Add framework artifacts to .gitignore (local only, no Git pollution)

Optional knowledge-pack onboarding is off by default. Enable it with EDENRED_FEATURE_KNOWLEDGE_PACKS=1 and pass --with-training-pack, --with-security-pack, or --with-all-packs to setup.

For Product Owner-focused repos, scaffold PO agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --product-owner

For QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --qa

Tip: For a one-off run without adding a dependency, use npx copilot-framework — npm fetches the package and exposes both copilot-framework and the legacy edenred-copilot-framework binary.

Important: index generates local LanceDB artifacts under .ai-context/lancedb/ (tables java_index_v2, angular_index_v2, dotnet_index_v1). Use index-db when you want LanceDB indexing + optional external codegraph reindex bridge.


Quick Start

Run these from the root of your target repository.

Step 0 — Install and scaffold framework files (one-time)

Either run one-off with npx:

npx --yes copilot-framework@latest setup --workspace

Or install as a dev dependency (auto-runs setup):

npm install --save-dev copilot-framework

This scaffolds:

  • .github/AGENTS.md — your project configuration
  • .github/agents/, .github/prompts/, .github/skills/ — AI context files
  • context/ — session templates
  • .vscode/mcp.json — MCP server config

When knowledge packs are enabled, setup also writes local pack state under .ai-context/knowledge-pack-state/ and supports setup --show-packs for diagnostics.

Step 1 — Customize AGENTS.md for your project

Edit .github/AGENTS.md with your stack and module boundaries:

# Fill in:
# - Repository identity (name, domain, maintainers)
# - Stack versions (Java, Spring Boot, database, etc.)
# - Module boundaries and build commands

Step 2 — Index your code (REQUIRED before Copilot sessions)

⚠️ This step is mandatory. Copilot needs the code index to provide context and enable cross-language impact analysis.

# Recommended: LanceDB index + MCP/codegraph bridge
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto

# Or standard indexing (auto-detect Java, Angular, and .NET)
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language auto

# Or target one language only
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language java
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language angular
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language dotnet

This produces structured artifacts: method callgraphs, fields, and annotations (Java); import/module graphs and template resolutions (Angular); namespaces, controller endpoints, auth/status metadata, DI registrations, minimal API routes, OpenAPI contract comparisons, and AST-based frontend call references (.NET).

For .NET repositories, analyze-impact also supports repository-local API inspection:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-controller UsersController --json
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-endpoint "GET /api/Users/{id}" --json

Indexing .NET repositories also emits local telemetry under .ai-context/index-telemetry.ndjson, and metrics-report aggregates .NET index runs plus OpenAPI coverage signals. When both Java+Angular and .NET artifacts exist, cross-language analyze-impact also exposes a .NET OpenAPI catalog summary (documents and operations) for contract visibility.

Artifacts are stored in .ai-context/lancedb/ and do not need to be committed to Git (auto-added to .gitignore).

Step 3 — Verify indexing succeeded

npx --yes copilot-framework@latest edenred-copilot-framework status --repo .

Step 4 — Start a Copilot session

Only after indexing is complete, start your Copilot session:

  • In VS Code, run /start-session in Copilot Chat
  • Load context from context/index.md if needed
  • MCP server auto-connects and exposes indexed code to Copilot
  • Sessions default to auto as the model/tier posture (terminal, chat, and M365) unless you explicitly override it

Search policy after setup:

  • Query MCP/codegraph first for symbols, usages, imports, and dependency traversal.
  • Use grep or other text search only if the equivalent MCP query returns an empty result set.
  • If MCP is empty because the index is stale, rerun npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto before widening the search.

Step 5 — Analyze cross-language impact

Trace which Angular components are affected by a Java method change:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser

Find which Java services a component depends on:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponent

Emit JSON for tooling / CI:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --json

Step 6 — Work with PDF knowledge in session (no CLI step)

Use natural language in Copilot Chat, for example:

Use this PDF as knowledge source for this session.
Extract key findings and apply them to impact analysis.

Expected behavior:

  • Copilot triggers the PDF knowledge pipeline when requested in-session.
  • Extracted knowledge is normalized and linked to the current repository context.
  • Session outputs are persisted as local artifacts for traceability and reuse.

Step 7 — Plan or simulate a runtime v1 multi-agent run

Preview the deterministic execution envelope:

npx --yes copilot-framework@latest edenred-copilot-framework agent-plan --goal "assess workspace readiness" --repo .

Run the current Wave A skeleton in dry-run mode and persist a local audit trail:

npx --yes copilot-framework@latest edenred-copilot-framework agent-run --goal "assess workspace readiness" --repo .

Runtime policy profiles:

  • Safe profile (default): no unsafe execution.
  • Strict profile: unsafe execution allowed only for explicit allowlist + policy exception reason + rollback plan.

Strict profile example (allow only IndexSteward):

npx --yes copilot-framework@latest edenred-copilot-framework agent-run \
  --goal "canary runtime validation" \
  --repo . \
  --unsafe-execute \
  --policy-mode strict \
  --agent IndexSteward \
  --allow-unsafe-agent IndexSteward \
  --policy-exception-reason "Controlled canary validation in local workspace" \
  --policy-rollback-plan "Fallback to dry-run and rerun diagnostics"

Knowledge-pack setup example:

EDENRED_FEATURE_KNOWLEDGE_PACKS=1 \
  edenred-copilot-framework setup --workspace --with-training-pack --show-packs

Step 8 - Generate KPI report for leadership

Create a baseline file from your pre-framework window (example in docs/metrics/baseline.example.json) and generate a board-ready report:

npx --yes copilot-framework@latest edenred-copilot-framework metrics-report \
  --repo . \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

This report consolidates:

  • Speed acceleration from setup/update/reindex audit durations
  • Credit reduction from baseline vs framework windows
  • Operational reliability (hook failures, pack import failures/skips)
  • Runtime governance signal (policy.exception count)

If you need the monthly report already attributed to the current git user, run:

npx --yes copilot-framework@latest monthly-gains \
  --repo . \
  --month 2026-07 \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

Local telemetry workflow

Telemetry stays in the local .ai-context/ directory. On Windows, run the monthly report without WSL:

npm run monthly-gains -- --json

After version 1.6.2 is published, the same command is available without a local checkout through npx --yes copilot-framework@latest monthly-gains --repo . --json. Configure git user.name and git user.email to attribute events to the current developer. Add --baseline, --credits-baseline, and --credits-framework when acceleration and credit-reduction percentages are required.


CLI Reference

Core operational commands:

| Command | Description | |---------|-------------| | index [--repo <path>] [--language <java\|angular\|dotnet\|auto>] | Index code into structured artifacts | | agent-plan --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--json] | Preview the runtime v1 execution envelope | | agent-run --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--unsafe-execute] [--policy-mode safe\|strict] [--allow-unsafe-agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--policy-exception-reason <text>] [--policy-rollback-plan <text>] [--json] | Execute runtime with policy controls; strict mode requires rollback plan for unsafe allowlist | | agent-status [--repo <path>] [--json] | Show latest runtime summary, including policy exception counters | | agent-audit [--repo <path>] [--run-id <id>] [--json] | Read persisted runtime events for a run | | metrics-report [--repo <path>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate KPI report for speed, credits, reliability, and policy governance | | monthly-gains [--repo <path>] [--month <YYYY-MM>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate monthly gains report attributed to current git user | | analyze-impact [--java-method <Class.method>] [--angular-component <Name>] [--dotnet-controller <Name>] [--dotnet-endpoint <"METHOD /route">] [--repo <path>] [--json] | Cross-language or .NET API impact analysis | | status [--repo <path>] | List generated artifacts | | setup [--stack <stack>] [--workspace] [--update] [--product-owner] [--qa] [--dry-run] [--force] [--show-packs] [--with-training-pack] [--with-security-pack] [--with-all-packs] | Manual setup (runs automatically on install); --product-owner adds PO templates and ADO MCP profile; --qa adds QA templates and ADO MCP profile | | update [--dry-run] [--force] [--skip-reindex] | Update framework files with summary + optional reindex skip | | help | Show usage |

Knowledge-pack importer note:

  • import-knowledge-pack remains available for maintainers and migration/backfill workflows.
  • It is not the primary end-user flow for PDF knowledge intake during live Copilot sessions.

Stacks: angular, react, java-spring, java-spring-adapter, dotnet, dotnet-webapi


Programmatic API

The indexing and impact-analysis layer is also usable as a library:

import {
  loadJavaIndexFromRepo,
  loadAngularIndexFromRepo,
  buildServiceBindings,
  findAffectedComponents,
  traceImpactChain,
} from 'copilot-framework/dist/indexer/cross-language';

const javaIdx = loadJavaIndexFromRepo('.');
const angularIdx = loadAngularIndexFromRepo('.');

const bindings = buildServiceBindings(javaIdx, angularIdx);
const affected = findAffectedComponents('createUser', bindings);
const chain = traceImpactChain('createUser', javaIdx, angularIdx, bindings);

What npm install creates

Automatic postinstall scaffolds:

  • .github/AGENTS.md — Stack constraints template
  • .github/copilot-instructions.md — Copilot execution rules
  • .github/skills/ — Reusable Copilot tools
  • context/ — Session context templates (top-of-mind, projects, features)
  • .vscode/mcp.json — MCP server configuration for codegraph tools
  • .gitignore block (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts

Next steps after install

  1. Customize .github/AGENTS.md with your repository identity, stack versions, and module boundaries.
  2. Run npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto to populate MCP/LanceDB artifacts.
  3. Start a Copilot session and load context from context/index.md.
  4. Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
  5. Use MCP/codegraph tools as the first lookup path; fall back to grep only when the equivalent MCP query returns no results.

Knowledge and Continuous Learning

The framework follows a session-native learning model:

  • Trigger: the user asks Copilot to use a PDF or external knowledge source.
  • Ingestion: the PDF pipeline runs with provenance, confidence scoring, and quality gates.
  • Application: normalized findings are applied to current analysis tasks (impact, readiness, remediation).
  • Learning loop: session artifacts and decisions feed local context so later prompts in the same session become more precise.

This keeps the UX simple for users (ask in chat), while preserving deterministic local artifacts and auditability.


Updating

To bump to the latest published version and auto-scaffold new MCP config:

# Upgrade the package
npm install --save-dev copilot-framework@latest

# The postinstall hook scaffolds .vscode/mcp.json if it doesn't exist

Upgrading from v1.1.0 or earlier?

# Upgrade the package
npm install --save-dev copilot-framework@latest

# Run update to scaffold MCP config and AGENTS files for existing repos
npx --yes copilot-framework@latest edenred-copilot-framework update

For existing repos, refresh shared framework files manually:

npx --yes copilot-framework@latest edenred-copilot-framework update

By default, update preserves existing scaffold files and repairs only missing shared artifacts. Use --force only when you intentionally want to replace existing scaffold content.

update also runs a post-update reindex (index-db --repo . --language auto) so MCP/LanceDB artifacts are refreshed immediately. Use --skip-reindex when you intentionally want to defer this step.

The package install no longer requires Python for update itself; only index, index-db, and other LanceDB-backed commands need the optional LanceDB dependency to be present.

For teams that installed older versions, update repairs missing v1.2+ scaffolds (.vscode/mcp.json, .github/AGENTS.md, .github/copilot-instructions.md, .github/skills, context/) and writes .github/.edenred-copilot-framework-version.

As of v1.2.1, update also repairs the target repo .gitignore by adding the framework local-artifact ignore block when missing.

See CHANGELOG.md for migration details.

Releases

GitHub Releases are now automated on main pushes when VERSION changes.

  • Trigger: push to main
  • Condition: VERSION value changed in that push
  • Output: creates a new release/tag v<version> using RELEASE-NOTES.md as the release body

Recommended release flow:

# 1) Update version + notes
vim VERSION RELEASE-NOTES.md package.json

# 2) Commit and push to main
git add VERSION RELEASE-NOTES.md package.json
git commit -m "release: vX.Y.Z"
git push origin main

If tag v<version> already exists, the workflow skips release creation.


Requirements

  • Node.js >= 16
  • TypeScript ships as a runtime dependency (used by the Angular indexer)

See CHANGELOG.md for release notes and INSTALL.md for advanced install options.

Copilot Framework

Contract-first Copilot scaffolding, multi-language code indexing, cross-language impact analysis, and agentic RAG for Edenred repositories.

Current status: v1.6.2 stable (knowledge-pack migration, agentic local RAG, hybrid search, incremental indexing, safe update flow).

It does five things:

  1. Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
  2. Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
  3. Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
  4. Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
  5. Ingests PDF knowledge as migrated markdown chunks into queryable knowledge packs (training, security, or custom).

Knowledge workflow principle:

  • PDF knowledge intake is session-driven. When the user asks Copilot to work on a PDF, the framework runs the ingestion pipeline behind the session flow.
  • No dedicated end-user CLI step is required for this PDF-driven knowledge intake path.
  • Local RAG engine: hybrid search retrieval via .ai-context/lancedb/, no cloud calls, no daemon processes.
  • Continuous learning happens during sessions as context/artifacts are refreshed from user prompts and workspace state.

For the architecture baseline, read docs/shared-ai-context-platform-v2.md.


Installation

Run from the root of your target repository:

npx --yes copilot-framework@latest setup --workspace

This will:

  • Detect your project type automatically (Java, Angular, .NET, React, etc.)
  • Scaffold .github/, context/, and .vscode/ directories
  • Add framework artifacts to .gitignore (local only, no Git pollution)

Optional knowledge-pack onboarding is off by default. Enable it with EDENRED_FEATURE_KNOWLEDGE_PACKS=1 and pass --with-training-pack, --with-security-pack, or --with-all-packs to setup.

For Product Owner-focused repos, scaffold PO agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --product-owner

For QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --qa

Tip: For a one-off run without adding a dependency, use npx copilot-framework — npm fetches the package and exposes the edenred-copilot-framework binary.

Important: index generates local LanceDB artifacts under .ai-context/lancedb/ (tables java_index_v2, angular_index_v2, dotnet_index_v1). Use index-db when you want LanceDB indexing + optional external codegraph reindex bridge.


Quick Start

Run these from the root of your target repository.

Step 0 — Install and scaffold framework files (one-time)

Either run one-off with npx:

npx --yes copilot-framework@latest setup --workspace

Or install as a dev dependency (auto-runs setup):

npm install --save-dev copilot-framework

This scaffolds:

  • .github/AGENTS.md — your project configuration
  • .github/agents/, .github/prompts/, .github/skills/ — AI context files
  • context/ — session templates
  • .vscode/mcp.json — MCP server config

When knowledge packs are enabled, setup also writes local pack state under .ai-context/knowledge-pack-state/ and supports setup --show-packs for diagnostics.

Step 1 — Customize AGENTS.md for your project

Edit .github/AGENTS.md with your stack and module boundaries:

# Fill in:
# - Repository identity (name, domain, maintainers)
# - Stack versions (Java, Spring Boot, database, etc.)
# - Module boundaries and build commands

Step 2 — Index your code (REQUIRED before Copilot sessions)

⚠️ This step is mandatory. Copilot needs the code index to provide context and enable cross-language impact analysis.

# Recommended: LanceDB index + MCP/codegraph bridge
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto

# Or standard indexing (auto-detect Java, Angular, and .NET)
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language auto

# Or target one language only
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language java
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language angular
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language dotnet

This produces structured artifacts: method callgraphs, fields, and annotations (Java); import/module graphs and template resolutions (Angular); namespaces, controller endpoints, auth/status metadata, DI registrations, minimal API routes, OpenAPI contract comparisons, and AST-based frontend call references (.NET).

For .NET repositories, analyze-impact also supports repository-local API inspection:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-controller UsersController --json
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-endpoint "GET /api/Users/{id}" --json

Indexing .NET repositories also emits local telemetry under .ai-context/index-telemetry.ndjson, and metrics-report aggregates .NET index runs plus OpenAPI coverage signals. When both Java+Angular and .NET artifacts exist, cross-language analyze-impact also exposes a .NET OpenAPI catalog summary (documents and operations) for contract visibility.

Artifacts are stored in .ai-context/lancedb/ and do not need to be committed to Git (auto-added to .gitignore).

Step 3 — Verify indexing succeeded

npx --yes copilot-framework@latest edenred-copilot-framework status --repo .

Step 4 — Start a Copilot session

Only after indexing is complete, start your Copilot session:

  • In VS Code, run /start-session in Copilot Chat
  • Load context from context/index.md if needed
  • MCP server auto-connects and exposes indexed code to Copilot
  • Sessions default to auto as the model/tier posture (terminal, chat, and M365) unless you explicitly override it

Search policy after setup:

  • Query MCP/codegraph first for symbols, usages, imports, and dependency traversal.
  • Use grep or other text search only if the equivalent MCP query returns an empty result set.
  • If MCP is empty because the index is stale, rerun npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto before widening the search.

Step 5 — Analyze cross-language impact

Trace which Angular components are affected by a Java method change:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser

Find which Java services a component depends on:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponent

Emit JSON for tooling / CI:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --json

Step 6 — Work with PDF knowledge in session (no CLI step)

Use natural language in Copilot Chat, for example:

Use this PDF as knowledge source for this session.
Extract key findings and apply them to impact analysis.

Expected behavior:

  • Copilot triggers the PDF knowledge pipeline when requested in-session.
  • Extracted knowledge is normalized and linked to the current repository context.
  • Session outputs are persisted as local artifacts for traceability and reuse.

Step 7 — Plan or simulate a runtime v1 multi-agent run

Preview the deterministic execution envelope:

npx --yes copilot-framework@latest edenred-copilot-framework agent-plan --goal "assess workspace readiness" --repo .

Run the current Wave A skeleton in dry-run mode and persist a local audit trail:

npx --yes copilot-framework@latest edenred-copilot-framework agent-run --goal "assess workspace readiness" --repo .

Runtime policy profiles:

  • Safe profile (default): no unsafe execution.
  • Strict profile: unsafe execution allowed only for explicit allowlist + policy exception reason + rollback plan.

Strict profile example (allow only IndexSteward):

npx --yes copilot-framework@latest edenred-copilot-framework agent-run \
  --goal "canary runtime validation" \
  --repo . \
  --unsafe-execute \
  --policy-mode strict \
  --agent IndexSteward \
  --allow-unsafe-agent IndexSteward \
  --policy-exception-reason "Controlled canary validation in local workspace" \
  --policy-rollback-plan "Fallback to dry-run and rerun diagnostics"

Knowledge-pack setup example:

EDENRED_FEATURE_KNOWLEDGE_PACKS=1 \
  edenred-copilot-framework setup --workspace --with-training-pack --show-packs

Step 8 - Generate KPI report for leadership

Create a baseline file from your pre-framework window (example in docs/metrics/baseline.example.json) and generate a board-ready report:

npx --yes copilot-framework@latest edenred-copilot-framework metrics-report \
  --repo . \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

This report consolidates:

  • Speed acceleration from setup/update/reindex audit durations
  • Credit reduction from baseline vs framework windows
  • Operational reliability (hook failures, pack import failures/skips)
  • Runtime governance signal (policy.exception count)

If you need the monthly report already attributed to the current git user, run:

npx --yes copilot-framework@latest edenred-copilot-framework monthly-gains \
  --repo . \
  --month 2026-07 \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

CLI Reference

Core operational commands:

| Command | Description | |---------|-------------| | index [--repo <path>] [--language <java\|angular\|dotnet\|auto>] | Index code into structured artifacts | | agent-plan --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--json] | Preview the runtime v1 execution envelope | | agent-run --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--unsafe-execute] [--policy-mode safe\|strict] [--allow-unsafe-agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--policy-exception-reason <text>] [--policy-rollback-plan <text>] [--json] | Execute runtime with policy controls; strict mode requires rollback plan for unsafe allowlist | | agent-status [--repo <path>] [--json] | Show latest runtime summary, including policy exception counters | | agent-audit [--repo <path>] [--run-id <id>] [--json] | Read persisted runtime events for a run | | metrics-report [--repo <path>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate KPI report for speed, credits, reliability, and policy governance | | monthly-gains [--repo <path>] [--month <YYYY-MM>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate monthly gains report attributed to current git user | | analyze-impact [--java-method <Class.method>] [--angular-component <Name>] [--dotnet-controller <Name>] [--dotnet-endpoint <"METHOD /route">] [--repo <path>] [--json] | Cross-language or .NET API impact analysis | | status [--repo <path>] | List generated artifacts | | setup [--stack <stack>] [--workspace] [--update] [--product-owner] [--qa] [--dry-run] [--force] [--show-packs] [--with-training-pack] [--with-security-pack] [--with-all-packs] | Manual setup (runs automatically on install); --product-owner adds PO templates and ADO MCP profile; --qa adds QA templates and ADO MCP profile | | update [--dry-run] [--force] [--skip-reindex] | Update framework files with summary + optional reindex skip | | help | Show usage |

Knowledge-pack importer note:

  • import-knowledge-pack remains available for maintainers and migration/backfill workflows.
  • It is not the primary end-user flow for PDF knowledge intake during live Copilot sessions.

Stacks: angular, react, java-spring, java-spring-adapter, dotnet, dotnet-webapi


Programmatic API

The indexing and impact-analysis layer is also usable as a library:

import {
  loadJavaIndexFromRepo,
  loadAngularIndexFromRepo,
  buildServiceBindings,
  findAffectedComponents,
  traceImpactChain,
} from 'copilot-framework/dist/indexer/cross-language';

const javaIdx = loadJavaIndexFromRepo('.');
const angularIdx = loadAngularIndexFromRepo('.');

const bindings = buildServiceBindings(javaIdx, angularIdx);
const affected = findAffectedComponents('createUser', bindings);
const chain = traceImpactChain('createUser', javaIdx, angularIdx, bindings);

What npm install creates

Automatic postinstall scaffolds:

  • .github/AGENTS.md — Stack constraints template
  • .github/copilot-instructions.md — Copilot execution rules
  • .github/skills/ — Reusable Copilot tools
  • context/ — Session context templates (top-of-mind, projects, features)
  • .vscode/mcp.json — MCP server configuration for codegraph tools
  • .gitignore block (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts

Next steps after install

  1. Customize .github/AGENTS.md with your repository identity, stack versions, and module boundaries.
  2. Run npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto to populate MCP/LanceDB artifacts.
  3. Start a Copilot session and load context from context/index.md.
  4. Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
  5. Use MCP/codegraph tools as the first lookup path; fall back to grep only when the equivalent MCP query returns no results.

Knowledge and Continuous Learning

The framework follows a session-native learning model:

  • Trigger: the user asks Copilot to use a PDF or external knowledge source.
  • Ingestion: the PDF pipeline runs with provenance, confidence scoring, and quality gates.
  • Application: normalized findings are applied to current analysis tasks (impact, readiness, remediation).
  • Learning loop: session artifacts and decisions feed local context so later prompts in the same session become more precise.

This keeps the UX simple for users (ask in chat), while preserving deterministic local artifacts and auditability.


Updating

To bump to the latest published version and auto-scaffold new MCP config:

# Upgrade the package
npm install --save-dev copilot-framework@latest

# The postinstall hook scaffolds .vscode/mcp.json if it doesn't exist

Upgrading from v1.1.0 or earlier?

# Upgrade the package
npm install --save-dev copilot-framework@latest

# Run update to scaffold MCP config and AGENTS files for existing repos
npx --yes copilot-framework@latest edenred-copilot-framework update

For existing repos, refresh shared framework files manually:

npx --yes copilot-framework@latest edenred-copilot-framework update

By default, update preserves existing scaffold files and repairs only missing shared artifacts. Use --force only when you intentionally want to replace existing scaffold content.

update also runs a post-update reindex (index-db --repo . --language auto) so MCP/LanceDB artifacts are refreshed immediately. Use --skip-reindex when you intentionally want to defer this step.

For teams that installed older versions, update repairs missing v1.2+ scaffolds (.vscode/mcp.json, .github/AGENTS.md, .github/copilot-instructions.md, .github/skills, context/) and writes .github/.edenred-copilot-framework-version.

As of v1.2.1, update also repairs the target repo .gitignore by adding the framework local-artifact ignore block when missing.

See CHANGELOG.md for migration details.

Releases

GitHub Releases are now automated on main pushes when VERSION changes.

  • Trigger: push to main
  • Condition: VERSION value changed in that push
  • Output: creates a new release/tag v<version> using RELEASE-NOTES.md as the release body

Recommended release flow:

# 1) Update version + notes
vim VERSION RELEASE-NOTES.md package.json

# 2) Commit and push to main
git add VERSION RELEASE-NOTES.md package.json
git commit -m "release: vX.Y.Z"
git push origin main

If tag v<version> already exists, the workflow skips release creation.


Requirements

  • Node.js >= 16
  • TypeScript ships as a runtime dependency (used by the Angular indexer)

See CHANGELOG.md for release notes and INSTALL.md for advanced install options.

Copilot Framework

Contract-first Copilot scaffolding, multi-language code indexing, cross-language impact analysis, and agentic RAG for Edenred repositories.

Current status: v1.6.2 stable (knowledge-pack migration, agentic local RAG, hybrid search, incremental indexing, safe update flow).

It does five things:

  1. Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
  2. Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
  3. Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
  4. Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
  5. Ingests PDF knowledge as migrated markdown chunks into queryable knowledge packs (training, security, or custom).

Knowledge workflow principle:

  • PDF knowledge intake is session-driven. When the user asks Copilot to work on a PDF, the framework runs the ingestion pipeline behind the session flow.
  • No dedicated end-user CLI step is required for this PDF-driven knowledge intake path.
  • Local RAG engine: hybrid search retrieval via .ai-context/lancedb/, no cloud calls, no daemon processes.
  • Continuous learning happens during sessions as context/artifacts are refreshed from user prompts and workspace state.

For the architecture baseline, read docs/shared-ai-context-platform-v2.md.


Installation

Run from the root of your target repository:

npx --yes copilot-framework@latest setup --workspace

This will:

  • Detect your project type automatically (Java, Angular, .NET, React, etc.)
  • Scaffold .github/, context/, and .vscode/ directories
  • Add framework artifacts to .gitignore (local only, no Git pollution)

Optional knowledge-pack onboarding is off by default. Enable it with EDENRED_FEATURE_KNOWLEDGE_PACKS=1 and pass --with-training-pack, --with-security-pack, or --with-all-packs to setup.

For Product Owner-focused repos, scaffold PO agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --product-owner

For QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --qa

Tip: For a one-off run without adding a dependency, use npx copilot-framework — npm fetches the package and exposes the edenred-copilot-framework binary.

Important: index generates local LanceDB artifacts under .ai-context/lancedb/ (tables java_index_v2, angular_index_v2, dotnet_index_v1). Use index-db when you want LanceDB indexing + optional external codegraph reindex bridge.


Quick Start

Run these from the root of your target repository.

Step 0 — Install and scaffold framework files (one-time)

Either run one-off with npx:

npx --yes copilot-framework@latest setup --workspace

Or install as a dev dependency (auto-runs setup):

npm install --save-dev copilot-framework

This scaffolds:

  • .github/AGENTS.md — your project configuration
  • .github/agents/, .github/prompts/, .github/skills/ — AI context files
  • context/ — session templates
  • .vscode/mcp.json — MCP server config

When knowledge packs are enabled, setup also writes local pack state under .ai-context/knowledge-pack-state/ and supports setup --show-packs for diagnostics.

Step 1 — Customize AGENTS.md for your project

Edit .github/AGENTS.md with your stack and module boundaries:

# Fill in:
# - Repository identity (name, domain, maintainers)
# - Stack versions (Java, Spring Boot, database, etc.)
# - Module boundaries and build commands

Step 2 — Index your code (REQUIRED before Copilot sessions)

⚠️ This step is mandatory. Copilot needs the code index to provide context and enable cross-language impact analysis.

# Recommended: LanceDB index + MCP/codegraph bridge
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto

# Or standard indexing (auto-detect Java, Angular, and .NET)
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language auto

# Or target one language only
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language java
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language angular
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language dotnet

This produces structured artifacts: method callgraphs, fields, and annotations (Java); import/module graphs and template resolutions (Angular); namespaces, controller endpoints, auth/status metadata, DI registrations, minimal API routes, OpenAPI contract comparisons, and AST-based frontend call references (.NET).

For .NET repositories, analyze-impact also supports repository-local API inspection:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-controller UsersController --json
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-endpoint "GET /api/Users/{id}" --json

Indexing .NET repositories also emits local telemetry under .ai-context/index-telemetry.ndjson, and metrics-report aggregates .NET index runs plus OpenAPI coverage signals. When both Java+Angular and .NET artifacts exist, cross-language analyze-impact also exposes a .NET OpenAPI catalog summary (documents and operations) for contract visibility.

Artifacts are stored in .ai-context/lancedb/ and do not need to be committed to Git (auto-added to .gitignore).

Step 3 — Verify indexing succeeded

npx --yes copilot-framework@latest edenred-copilot-framework status --repo .

Step 4 — Start a Copilot session

Only after indexing is complete, start your Copilot session:

  • In VS Code, run /start-session in Copilot Chat
  • Load context from context/index.md if needed
  • MCP server auto-connects and exposes indexed code to Copilot
  • Sessions default to auto as the model/tier posture (terminal, chat, and M365) unless you explicitly override it

Search policy after setup:

  • Query MCP/codegraph first for symbols, usages, imports, and dependency traversal.
  • Use grep or other text search only if the equivalent MCP query returns an empty result set.
  • If MCP is empty because the index is stale, rerun npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto before widening the search.

Step 5 — Analyze cross-language impact

Trace which Angular components are affected by a Java method change:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser

Find which Java services a component depends on:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponent

Emit JSON for tooling / CI:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --json

Step 6 — Work with PDF knowledge in session (no CLI step)

Use natural language in Copilot Chat, for example:

Use this PDF as knowledge source for this session.
Extract key findings and apply them to impact analysis.

Expected behavior:

  • Copilot triggers the PDF knowledge pipeline when requested in-session.
  • Extracted knowledge is normalized and linked to the current repository context.
  • Session outputs are persisted as local artifacts for traceability and reuse.

Step 7 — Plan or simulate a runtime v1 multi-agent run

Preview the deterministic execution envelope:

npx --yes copilot-framework@latest edenred-copilot-framework agent-plan --goal "assess workspace readiness" --repo .

Run the current Wave A skeleton in dry-run mode and persist a local audit trail:

npx --yes copilot-framework@latest edenred-copilot-framework agent-run --goal "assess workspace readiness" --repo .

Runtime policy profiles:

  • Safe profile (default): no unsafe execution.
  • Strict profile: unsafe execution allowed only for explicit allowlist + policy exception reason + rollback plan.

Strict profile example (allow only IndexSteward):

npx --yes copilot-framework@latest edenred-copilot-framework agent-run \
  --goal "canary runtime validation" \
  --repo . \
  --unsafe-execute \
  --policy-mode strict \
  --agent IndexSteward \
  --allow-unsafe-agent IndexSteward \
  --policy-exception-reason "Controlled canary validation in local workspace" \
  --policy-rollback-plan "Fallback to dry-run and rerun diagnostics"

Knowledge-pack setup example:

EDENRED_FEATURE_KNOWLEDGE_PACKS=1 \
  edenred-copilot-framework setup --workspace --with-training-pack --show-packs

Step 8 - Generate KPI report for leadership

Create a baseline file from your pre-framework window (example in docs/metrics/baseline.example.json) and generate a board-ready report:

npx --yes copilot-framework@latest edenred-copilot-framework metrics-report \
  --repo . \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

This report consolidates:

  • Speed acceleration from setup/update/reindex audit durations
  • Credit reduction from baseline vs framework windows
  • Operational reliability (hook failures, pack import failures/skips)
  • Runtime governance signal (policy.exception count)

If you need the monthly report already attributed to the current git user, run:

npx --yes copilot-framework@latest edenred-copilot-framework monthly-gains \
  --repo . \
  --month 2026-07 \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

CLI Reference

Core operational commands:

| Command | Description | |---------|-------------| | index [--repo <path>] [--language <java\|angular\|dotnet\|auto>] | Index code into structured artifacts | | agent-plan --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--json] | Preview the runtime v1 execution envelope | | agent-run --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--unsafe-execute] [--policy-mode safe\|strict] [--allow-unsafe-agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--policy-exception-reason <text>] [--policy-rollback-plan <text>] [--json] | Execute runtime with policy controls; strict mode requires rollback plan for unsafe allowlist | | agent-status [--repo <path>] [--json] | Show latest runtime summary, including policy exception counters | | agent-audit [--repo <path>] [--run-id <id>] [--json] | Read persisted runtime events for a run | | metrics-report [--repo <path>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate KPI report for speed, credits, reliability, and policy governance | | monthly-gains [--repo <path>] [--month <YYYY-MM>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate monthly gains report attributed to current git user | | analyze-impact [--java-method <Class.method>] [--angular-component <Name>] [--dotnet-controller <Name>] [--dotnet-endpoint <"METHOD /route">] [--repo <path>] [--json] | Cross-language or .NET API impact analysis | | status [--repo <path>] | List generated artifacts | | setup [--stack <stack>] [--workspace] [--update] [--product-owner] [--qa] [--dry-run] [--force] [--show-packs] [--with-training-pack] [--with-security-pack] [--with-all-packs] | Manual setup (runs automatically on install); --product-owner adds PO templates and ADO MCP profile; --qa adds QA templates and ADO MCP profile | | update [--dry-run] [--force] [--skip-reindex] | Update framework files with summary + optional reindex skip | | help | Show usage |

Knowledge-pack importer note:

  • import-knowledge-pack remains available for maintainers and migration/backfill workflows.
  • It is not the primary end-user flow for PDF knowledge intake during live Copilot sessions.

Stacks: angular, react, java-spring, java-spring-adapter, dotnet, dotnet-webapi


Programmatic API

The indexing and impact-analysis layer is also usable as a library:

import {
  loadJavaIndexFromRepo,
  loadAngularIndexFromRepo,
  buildServiceBindings,
  findAffectedComponents,
  traceImpactChain,
} from 'copilot-framework/dist/indexer/cross-language';

const javaIdx = loadJavaIndexFromRepo('.');
const angularIdx = loadAngularIndexFromRepo('.');

const bindings = buildServiceBindings(javaIdx, angularIdx);
const affected = findAffectedComponents('createUser', bindings);
const chain = traceImpactChain('createUser', javaIdx, angularIdx, bindings);

What npm install creates

Automatic postinstall scaffolds:

  • .github/AGENTS.md — Stack constraints template
  • .github/copilot-instructions.md — Copilot execution rules
  • .github/skills/ — Reusable Copilot tools
  • context/ — Session context templates (top-of-mind, projects, features)
  • .vscode/mcp.json — MCP server configuration for codegraph tools
  • .gitignore block (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts

Next steps after install

  1. Customize .github/AGENTS.md with your repository identity, stack versions, and module boundaries.
  2. Run npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto to populate MCP/LanceDB artifacts.
  3. Start a Copilot session and load context from context/index.md.
  4. Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
  5. Use MCP/codegraph tools as the first lookup path; fall back to grep only when the equivalent MCP query returns no results.

Knowledge and Continuous Learning

The framework follows a session-native learning model:

  • Trigger: the user asks Copilot to use a PDF or external knowledge source.
  • Ingestion: the PDF pipeline runs with provenance, confidence scoring, and quality gates.
  • Application: normalized findings are applied to current analysis tasks (impact, readiness, remediation).
  • Learning loop: session artifacts and decisions feed local context so later prompts in the same session become more precise.

This keeps the UX simple for users (ask in chat), while preserving deterministic local artifacts and auditability.


Updating

To bump to the latest published version and auto-scaffold new MCP config:

# Upgrade the package
npm install --save-dev copilot-framework@latest

# The postinstall hook scaffolds .vscode/mcp.json if it doesn't exist

Upgrading from v1.1.0 or earlier?

# Upgrade the package
npm install --save-dev copilot-framework@latest

# Run update to scaffold MCP config and AGENTS files for existing repos
npx --yes copilot-framework@latest edenred-copilot-framework update

For existing repos, refresh shared framework files manually:

npx --yes copilot-framework@latest edenred-copilot-framework update

By default, update preserves existing scaffold files and repairs only missing shared artifacts. Use --force only when you intentionally want to replace existing scaffold content.

update also runs a post-update reindex (index-db --repo . --language auto) so MCP/LanceDB artifacts are refreshed immediately. Use --skip-reindex when you intentionally want to defer this step.

The package install no longer requires Python for update itself; only index, index-db, and other LanceDB-backed commands need the optional LanceDB dependency to be present.

For teams that installed older versions, update repairs missing v1.2+ scaffolds (.vscode/mcp.json, .github/AGENTS.md, .github/copilot-instructions.md, .github/skills, context/) and writes .github/.edenred-copilot-framework-version.

As of v1.2.1, update also repairs the target repo .gitignore by adding the framework local-artifact ignore block when missing.

See CHANGELOG.md for migration details.

Releases

GitHub Releases are now automated on main pushes when VERSION changes.

  • Trigger: push to main
  • Condition: VERSION value changed in that push
  • Output: creates a new release/tag v<version> using RELEASE-NOTES.md as the release body

Recommended release flow:

# 1) Update version + notes
vim VERSION RELEASE-NOTES.md package.json

# 2) Commit and push to main
git add VERSION RELEASE-NOTES.md package.json
git commit -m "release: vX.Y.Z"
git push origin main

If tag v<version> already exists, the workflow skips release creation.


Requirements

  • Node.js >= 16
  • TypeScript ships as a runtime dependency (used by the Angular indexer)

See CHANGELOG.md for release notes and INSTALL.md for advanced install options.

Copilot Framework

Contract-first Copilot scaffolding, multi-language code indexing, cross-language impact analysis, and agentic RAG for Edenred repositories.

Current status: v1.6.2 stable (knowledge-pack migration, agentic local RAG, hybrid search, incremental indexing, safe update flow).

It does five things:

  1. Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
  2. Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
  3. Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
  4. Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
  5. Ingests PDF knowledge as migrated markdown chunks into queryable knowledge packs (training, security, or custom).

Knowledge workflow principle:

  • PDF knowledge intake is session-driven. When the user asks Copilot to work on a PDF, the framework runs the ingestion pipeline behind the session flow.
  • No dedicated end-user CLI step is required for this PDF-driven knowledge intake path.
  • Local RAG engine: hybrid search retrieval via .ai-context/lancedb/, no cloud calls, no daemon processes.
  • Continuous learning happens during sessions as context/artifacts are refreshed from user prompts and workspace state.

For the architecture baseline, read docs/shared-ai-context-platform-v2.md.


Installation

Run from the root of your target repository:

npx --yes copilot-framework@latest setup --workspace

This will:

  • Detect your project type automatically (Java, Angular, .NET, React, etc.)
  • Scaffold .github/, context/, and .vscode/ directories
  • Add framework artifacts to .gitignore (local only, no Git pollution)

Optional knowledge-pack onboarding is off by default. Enable it with EDENRED_FEATURE_KNOWLEDGE_PACKS=1 and pass --with-training-pack, --with-security-pack, or --with-all-packs to setup.

For Product Owner-focused repos, scaffold PO agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --product-owner

For QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:

npx --yes copilot-framework@latest setup --workspace --qa

Tip: For a one-off run without adding a dependency, use npx copilot-framework — npm fetches the package and exposes the edenred-copilot-framework binary.

Important: index generates local LanceDB artifacts under .ai-context/lancedb/ (tables java_index_v2, angular_index_v2, dotnet_index_v1). Use index-db when you want LanceDB indexing + optional external codegraph reindex bridge.


Quick Start

Run these from the root of your target repository.

Step 0 — Install and scaffold framework files (one-time)

Either run one-off with npx:

npx --yes copilot-framework@latest setup --workspace

Or install as a dev dependency (auto-runs setup):

npm install --save-dev copilot-framework

This scaffolds:

  • .github/AGENTS.md — your project configuration
  • .github/agents/, .github/prompts/, .github/skills/ — AI context files
  • context/ — session templates
  • .vscode/mcp.json — MCP server config

When knowledge packs are enabled, setup also writes local pack state under .ai-context/knowledge-pack-state/ and supports setup --show-packs for diagnostics.

Step 1 — Customize AGENTS.md for your project

Edit .github/AGENTS.md with your stack and module boundaries:

# Fill in:
# - Repository identity (name, domain, maintainers)
# - Stack versions (Java, Spring Boot, database, etc.)
# - Module boundaries and build commands

Step 2 — Index your code (REQUIRED before Copilot sessions)

⚠️ This step is mandatory. Copilot needs the code index to provide context and enable cross-language impact analysis.

# Recommended: LanceDB index + MCP/codegraph bridge
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto

# Or standard indexing (auto-detect Java, Angular, and .NET)
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language auto

# Or target one language only
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language java
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language angular
npx --yes copilot-framework@latest edenred-copilot-framework index --repo . --language dotnet

This produces structured artifacts: method callgraphs, fields, and annotations (Java); import/module graphs and template resolutions (Angular); namespaces, controller endpoints, auth/status metadata, DI registrations, minimal API routes, OpenAPI contract comparisons, and AST-based frontend call references (.NET).

For .NET repositories, analyze-impact also supports repository-local API inspection:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-controller UsersController --json
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --repo . --dotnet-endpoint "GET /api/Users/{id}" --json

Indexing .NET repositories also emits local telemetry under .ai-context/index-telemetry.ndjson, and metrics-report aggregates .NET index runs plus OpenAPI coverage signals. When both Java+Angular and .NET artifacts exist, cross-language analyze-impact also exposes a .NET OpenAPI catalog summary (documents and operations) for contract visibility.

Artifacts are stored in .ai-context/lancedb/ and do not need to be committed to Git (auto-added to .gitignore).

Step 3 — Verify indexing succeeded

npx --yes copilot-framework@latest edenred-copilot-framework status --repo .

Step 4 — Start a Copilot session

Only after indexing is complete, start your Copilot session:

  • In VS Code, run /start-session in Copilot Chat
  • Load context from context/index.md if needed
  • MCP server auto-connects and exposes indexed code to Copilot
  • Sessions default to auto as the model/tier posture (terminal, chat, and M365) unless you explicitly override it

Search policy after setup:

  • Query MCP/codegraph first for symbols, usages, imports, and dependency traversal.
  • Use grep or other text search only if the equivalent MCP query returns an empty result set.
  • If MCP is empty because the index is stale, rerun npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language auto before widening the search.

Step 5 — Analyze cross-language impact

Trace which Angular components are affected by a Java method change:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser

Find which Java services a component depends on:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponent

Emit JSON for tooling / CI:

npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --json

Step 6 — Work with PDF knowledge in session (no CLI step)

Use natural language in Copilot Chat, for example:

Use this PDF as knowledge source for this session.
Extract key findings and apply them to impact analysis.

Expected behavior:

  • Copilot triggers the PDF knowledge pipeline when requested in-session.
  • Extracted knowledge is normalized and linked to the current repository context.
  • Session outputs are persisted as local artifacts for traceability and reuse.

Step 7 — Plan or simulate a runtime v1 multi-agent run

Preview the deterministic execution envelope:

npx --yes copilot-framework@latest edenred-copilot-framework agent-plan --goal "assess workspace readiness" --repo .

Run the current Wave A skeleton in dry-run mode and persist a local audit trail:

npx --yes copilot-framework@latest edenred-copilot-framework agent-run --goal "assess workspace readiness" --repo .

Runtime policy profiles:

  • Safe profile (default): no unsafe execution.
  • Strict profile: unsafe execution allowed only for explicit allowlist + policy exception reason + rollback plan.

Strict profile example (allow only IndexSteward):

npx --yes copilot-framework@latest edenred-copilot-framework agent-run \
  --goal "canary runtime validation" \
  --repo . \
  --unsafe-execute \
  --policy-mode strict \
  --agent IndexSteward \
  --allow-unsafe-agent IndexSteward \
  --policy-exception-reason "Controlled canary validation in local workspace" \
  --policy-rollback-plan "Fallback to dry-run and rerun diagnostics"

Knowledge-pack setup example:

EDENRED_FEATURE_KNOWLEDGE_PACKS=1 \
  edenred-copilot-framework setup --workspace --with-training-pack --show-packs

Step 8 - Generate KPI report for leadership

Create a baseline file from your pre-framework window (example in docs/metrics/baseline.example.json) and generate a board-ready report:

npx --yes copilot-framework@latest edenred-copilot-framework metrics-report \
  --repo . \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

This report consolidates:

  • Speed acceleration from setup/update/reindex audit durations
  • Credit reduction from baseline vs framework windows
  • Operational reliability (hook failures, pack import failures/skips)
  • Runtime governance signal (policy.exception count)

If you need the monthly report already attributed to the current git user, run:

npx --yes copilot-framework@latest edenred-copilot-framework monthly-gains \
  --repo . \
  --month 2026-07 \
  --baseline docs/metrics/baseline.example.json \
  --credits-baseline 1000 \
  --credits-framework 700 \
  --json

CLI Reference

Core operational commands:

| Command | Description | |---------|-------------| | index [--repo <path>] [--language <java\|angular\|dotnet\|auto>] | Index code into structured artifacts | | agent-plan --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--json] | Preview the runtime v1 execution envelope | | agent-run --goal <text> [--repo <path>] [--agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--unsafe-execute] [--policy-mode safe\|strict] [--allow-unsafe-agent ScaffoldGuardian\|IndexSteward\|ImpactAnalyst] [--policy-exception-reason <text>] [--policy-rollback-plan <text>] [--json] | Execute runtime with policy controls; strict mode requires rollback plan for unsafe allowlist | | agent-status [--repo <path>] [--json] | Show latest runtime summary, including policy exception counters | | agent-audit [--repo <path>] [--run-id <id>] [--json] | Read persisted runtime events for a run | | metrics-report [--repo <path>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate KPI report for speed, credits, reliability, and policy governance | | monthly-gains [--repo <path>] [--month <YYYY-MM>] [--baseline <path>] [--credits-baseline <n>] [--credits-framework <n>] [--json] | Generate monthly gains report attributed to current git user | | analyze-impact [--java-method <Class.method>] [--angular-component <Name>] [--dotnet-controller <Name>] [--dotnet-endpoint <"METHOD /route">] [--repo <path>] [--json] | Cross-language or .NET API impact analysis | | status [--repo <path>] | List generated artifacts | | setup [--stack <stack>] [--workspace] [--update] [--product-owner] [--qa] [--dry-run] [--force] [--show-packs] [--with-training-pack] [--with-security-pack] [--with-all-packs] | Manual setup (runs automatically on install); --product-owner adds PO templates and ADO MCP profile; --qa adds QA templates and ADO MCP profile | | update [--dry-run] [--force] [--skip-reindex] | Update framework files with summary + optional reindex skip | | help | Show usage |

Knowledge-pack importer note:

  • import-knowledge-pack remains available for maintainers and migration/backfill workflows.
  • It is not the primary end-user flow for PDF knowledge intake during live Copilot sessions.

Stacks: angular, react, java-spring, java-spring-adapter, dotnet, dotnet-webapi


Programmatic API

The indexing and impact-analysis layer is also usable as a library:

import {
  loadJavaIndexFromRepo,
  loadAngularIndexFromRepo,
  buildServiceBindings,
  findAffectedComponents,
  traceImpactChain,
} from 'copilot-framework/dist/indexer/cross-language';

const javaIdx = loadJavaIndexFromRepo('.');
const angularIdx = loadAngularIndexFromRepo('.');

const bindings = buildServiceBindings(javaIdx, angularIdx);
const affected = findAffectedComponents('createUser', bindings);
const chain = traceImpactChain('createUser', javaIdx, angularIdx, bindings);

What npm install creates

Automatic postinstall scaffolds:

  • .github/AGENTS.md — Stack constraints template
  • .github/copilot-instructions.md — Copilot execution rules
  • .github/skills/