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:
- Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
- Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
- Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
- Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
- 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 --workspaceThis 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-ownerFor QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:
npx --yes copilot-framework@latest setup --workspace --qaTip: For a one-off run without adding a dependency, use
npx copilot-framework— npm fetches the package and exposes bothcopilot-frameworkand the legacyedenred-copilot-frameworkbinary.
Important:
indexgenerates local LanceDB artifacts under.ai-context/lancedb/(tablesjava_index_v2,angular_index_v2,dotnet_index_v1). Useindex-dbwhen 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 --workspaceOr install as a dev dependency (auto-runs setup):
npm install --save-dev copilot-frameworkThis scaffolds:
.github/AGENTS.md— your project configuration.github/agents/,.github/prompts/,.github/skills/— AI context filescontext/— 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 commandsStep 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 dotnetThis 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}" --jsonIndexing .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-sessionin Copilot Chat - Load context from
context/index.mdif needed - MCP server auto-connects and exposes indexed code to Copilot
- Sessions default to
autoas 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
grepor 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 autobefore 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.createUserFind which Java services a component depends on:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponentEmit JSON for tooling / CI:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --jsonStep 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-packsStep 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 \
--jsonThis 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.exceptioncount)
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 \
--jsonLocal telemetry workflow
Telemetry stays in the local .ai-context/ directory. On Windows, run the monthly report without WSL:
npm run monthly-gains -- --jsonAfter 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-packremains 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 toolscontext/— Session context templates (top-of-mind, projects, features).vscode/mcp.json— MCP server configuration for codegraph tools.gitignoreblock (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts
Next steps after install
- Customize
.github/AGENTS.mdwith your repository identity, stack versions, and module boundaries. - Run
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language autoto populate MCP/LanceDB artifacts. - Start a Copilot session and load context from
context/index.md. - Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
- Use MCP/codegraph tools as the first lookup path; fall back to
greponly 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 existUpgrading 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 updateFor existing repos, refresh shared framework files manually:
npx --yes copilot-framework@latest edenred-copilot-framework updateBy 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:
VERSIONvalue changed in that push - Output: creates a new release/tag
v<version>usingRELEASE-NOTES.mdas 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 mainIf 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:
- Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
- Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
- Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
- Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
- 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 --workspaceThis 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-ownerFor QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:
npx --yes copilot-framework@latest setup --workspace --qaTip: For a one-off run without adding a dependency, use
npx copilot-framework— npm fetches the package and exposes theedenred-copilot-frameworkbinary.
Important:
indexgenerates local LanceDB artifacts under.ai-context/lancedb/(tablesjava_index_v2,angular_index_v2,dotnet_index_v1). Useindex-dbwhen 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 --workspaceOr install as a dev dependency (auto-runs setup):
npm install --save-dev copilot-frameworkThis scaffolds:
.github/AGENTS.md— your project configuration.github/agents/,.github/prompts/,.github/skills/— AI context filescontext/— 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 commandsStep 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 dotnetThis 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}" --jsonIndexing .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-sessionin Copilot Chat - Load context from
context/index.mdif needed - MCP server auto-connects and exposes indexed code to Copilot
- Sessions default to
autoas 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
grepor 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 autobefore 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.createUserFind which Java services a component depends on:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponentEmit JSON for tooling / CI:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --jsonStep 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-packsStep 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 \
--jsonThis 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.exceptioncount)
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 \
--jsonCLI 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-packremains 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 toolscontext/— Session context templates (top-of-mind, projects, features).vscode/mcp.json— MCP server configuration for codegraph tools.gitignoreblock (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts
Next steps after install
- Customize
.github/AGENTS.mdwith your repository identity, stack versions, and module boundaries. - Run
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language autoto populate MCP/LanceDB artifacts. - Start a Copilot session and load context from
context/index.md. - Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
- Use MCP/codegraph tools as the first lookup path; fall back to
greponly 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 existUpgrading 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 updateFor existing repos, refresh shared framework files manually:
npx --yes copilot-framework@latest edenred-copilot-framework updateBy 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:
VERSIONvalue changed in that push - Output: creates a new release/tag
v<version>usingRELEASE-NOTES.mdas 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 mainIf 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:
- Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
- Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
- Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
- Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
- 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 --workspaceThis 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-ownerFor QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:
npx --yes copilot-framework@latest setup --workspace --qaTip: For a one-off run without adding a dependency, use
npx copilot-framework— npm fetches the package and exposes theedenred-copilot-frameworkbinary.
Important:
indexgenerates local LanceDB artifacts under.ai-context/lancedb/(tablesjava_index_v2,angular_index_v2,dotnet_index_v1). Useindex-dbwhen 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 --workspaceOr install as a dev dependency (auto-runs setup):
npm install --save-dev copilot-frameworkThis scaffolds:
.github/AGENTS.md— your project configuration.github/agents/,.github/prompts/,.github/skills/— AI context filescontext/— 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 commandsStep 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 dotnetThis 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}" --jsonIndexing .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-sessionin Copilot Chat - Load context from
context/index.mdif needed - MCP server auto-connects and exposes indexed code to Copilot
- Sessions default to
autoas 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
grepor 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 autobefore 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.createUserFind which Java services a component depends on:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponentEmit JSON for tooling / CI:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --jsonStep 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-packsStep 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 \
--jsonThis 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.exceptioncount)
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 \
--jsonCLI 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-packremains 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 toolscontext/— Session context templates (top-of-mind, projects, features).vscode/mcp.json— MCP server configuration for codegraph tools.gitignoreblock (# edenred-copilot-framework local artifacts) to ignore scaffolded local artifacts
Next steps after install
- Customize
.github/AGENTS.mdwith your repository identity, stack versions, and module boundaries. - Run
npx --yes copilot-framework@latest edenred-copilot-framework index-db --repo . --language autoto populate MCP/LanceDB artifacts. - Start a Copilot session and load context from
context/index.md. - Ask Copilot to ingest and use a PDF when needed (session-driven knowledge flow; no separate CLI command required for users).
- Use MCP/codegraph tools as the first lookup path; fall back to
greponly 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 existUpgrading 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 updateFor existing repos, refresh shared framework files manually:
npx --yes copilot-framework@latest edenred-copilot-framework updateBy 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:
VERSIONvalue changed in that push - Output: creates a new release/tag
v<version>usingRELEASE-NOTES.mdas 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 mainIf 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:
- Scaffolds Copilot context files (.github/, agents, prompts, skills) and role-specific workspaces (Product Owner, QA) into any repo.
- Indexes Java, Angular, and .NET code into structured artifacts (callgraphs, module graphs, structural API metadata).
- Analyzes cross-language impact — trace how a Java change ripples to Angular UI components or .NET API surfaces.
- Retrieves knowledge in-session via agentic local RAG (no cloud dependency) — hybrid BM25+TF-IDF search, zero-daemon architecture.
- 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 --workspaceThis 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-ownerFor QA-focused repos, scaffold QA agents/prompts/docs and Azure DevOps MCP-ready profile in one run:
npx --yes copilot-framework@latest setup --workspace --qaTip: For a one-off run without adding a dependency, use
npx copilot-framework— npm fetches the package and exposes theedenred-copilot-frameworkbinary.
Important:
indexgenerates local LanceDB artifacts under.ai-context/lancedb/(tablesjava_index_v2,angular_index_v2,dotnet_index_v1). Useindex-dbwhen 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 --workspaceOr install as a dev dependency (auto-runs setup):
npm install --save-dev copilot-frameworkThis scaffolds:
.github/AGENTS.md— your project configuration.github/agents/,.github/prompts/,.github/skills/— AI context filescontext/— 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 commandsStep 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 dotnetThis 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}" --jsonIndexing .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-sessionin Copilot Chat - Load context from
context/index.mdif needed - MCP server auto-connects and exposes indexed code to Copilot
- Sessions default to
autoas 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
grepor 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 autobefore 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.createUserFind which Java services a component depends on:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --angular-component UserFormComponentEmit JSON for tooling / CI:
npx --yes copilot-framework@latest edenred-copilot-framework analyze-impact --java-method UserService.createUser --jsonStep 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-packsStep 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 \
--jsonThis 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.exceptioncount)
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 \
--jsonCLI 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-packremains 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/—
