mcp-efficiency-engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +40 -0
- package/.github/GITHUB_MCP_INTEGRATION.md +366 -0
- package/.github/ISSUE_TEMPLATE/bug.md +51 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +45 -0
- package/.github/ISSUE_TEMPLATE/question.md +18 -0
- package/.github/agents/backend.agent.md +18 -0
- package/.github/agents/community-manager.agent.md +18 -0
- package/.github/agents/dba.agent.md +18 -0
- package/.github/agents/frontend-agent.agent.md +18 -0
- package/.github/agents/github-repository-manager.agent.md +338 -0
- package/.github/agents/iot.agent.md +20 -0
- package/.github/agents/legacy.agent.md +18 -0
- package/.github/agents/rag-azure.agent.md +18 -0
- package/.github/agents/rag-local.agent.md +18 -0
- package/.github/agents/snapshot.agent.md +18 -0
- package/.github/agents/ux-ui.agent.md +18 -0
- package/.github/agents/wiki-agent.agent.md +23 -0
- package/.github/copilot-instructions.md +44 -0
- package/.github/instructions/always-on-optimization.instructions.md +54 -0
- package/.github/prompts/auto-route.prompt.md +33 -0
- package/.github/prompts/azure-rag.query.prompt.md +19 -0
- package/.github/prompts/backend.fix-bug.prompt.md +13 -0
- package/.github/prompts/cavecrew.prompt.md +16 -0
- package/.github/prompts/caveman-commit.prompt.md +14 -0
- package/.github/prompts/caveman-compress.prompt.md +15 -0
- package/.github/prompts/caveman-debug.prompt.md +13 -0
- package/.github/prompts/caveman-help.prompt.md +11 -0
- package/.github/prompts/caveman-review.prompt.md +15 -0
- package/.github/prompts/caveman-stats.prompt.md +11 -0
- package/.github/prompts/caveman.prompt.md +11 -0
- package/.github/prompts/community.post.prompt.md +14 -0
- package/.github/prompts/dba.query-review.prompt.md +15 -0
- package/.github/prompts/dev.fix-bug.prompt.md +13 -0
- package/.github/prompts/frontend.code.prompt.md +13 -0
- package/.github/prompts/legacy.impact-analysis.prompt.md +14 -0
- package/.github/prompts/project.kickoff-analysis.prompt.md +51 -0
- package/.github/prompts/rag.knowledge-answer.prompt.md +13 -0
- package/.github/prompts/token-saver-review.prompt.md +14 -0
- package/.github/prompts/ux-ui.review.prompt.md +14 -0
- package/.github/pull_request_template.md +71 -0
- package/.github/skills/ahorro-tokens/SKILL.md +36 -0
- package/.github/skills/azure-rag-enterprise/SKILL.md +24 -0
- package/.github/skills/backend-coding/SKILL.md +24 -0
- package/.github/skills/cavecrew/SKILL.md +17 -0
- package/.github/skills/caveman/SKILL.md +25 -0
- package/.github/skills/caveman-commit/SKILL.md +15 -0
- package/.github/skills/caveman-compress/SKILL.md +14 -0
- package/.github/skills/caveman-help/SKILL.md +19 -0
- package/.github/skills/caveman-mode/SKILL.md +43 -0
- package/.github/skills/caveman-review/SKILL.md +16 -0
- package/.github/skills/caveman-stats/SKILL.md +13 -0
- package/.github/skills/community-content/SKILL.md +22 -0
- package/.github/skills/database-analysis/SKILL.md +23 -0
- package/.github/skills/dev-coding/SKILL.md +24 -0
- package/.github/skills/frontend-coding/SKILL.md +24 -0
- package/.github/skills/human-in-the-loop/SKILL.md +47 -0
- package/.github/skills/iot-architecture/SKILL.md +22 -0
- package/.github/skills/legacy-migration/SKILL.md +22 -0
- package/.github/skills/rag-knowledge/SKILL.md +21 -0
- package/.github/skills/token-saver/SKILL.md +36 -0
- package/.github/skills/ux-ui-governance/SKILL.md +24 -0
- package/.github/skills/wiki-tools.json +24 -0
- package/.github/workflows/auto-devlog.yml +56 -0
- package/.github/workflows/auto-manage-issues.yml +64 -0
- package/.github/workflows/auto-sync.yml +54 -0
- package/.github/workflows/autodocs-sync.yml +114 -0
- package/.github/workflows/ci.yml +68 -0
- package/.github/workflows/pages.yml +59 -0
- package/.github/workflows/routing-evals.yml +59 -0
- package/.github/workflows/techriders-coverage-effective.yml +91 -0
- package/.vscode/mcp.json +44 -0
- package/AGENTS.md +160 -0
- package/ARCHITECTURE.md +57 -0
- package/FINAL_USAGE_GUIDE.md +106 -0
- package/LICENSE +21 -0
- package/README.md +385 -0
- package/README_WIKI.md +130 -0
- package/autodocs/README.md +22 -0
- package/autodocs/schema/wiki-node.schema.json +56 -0
- package/autolearning/feedback-loop.md +90 -0
- package/bin/install-host.js +326 -0
- package/bin/mcpee.js +116 -0
- package/context/repomix/repomix.config.json +20 -0
- package/memory/cross-memory-reasoning.md +17 -0
- package/memory/mempry-registry.yml +16 -0
- package/observability/evals/chat-token-usage-report.json +64 -0
- package/observability/evals/chat-token-usage-report.md +33 -0
- package/observability/evals/iteration-value-report.json +76 -0
- package/observability/evals/iteration-value-report.md +39 -0
- package/observability/evals/learning-loop-report.json +268 -0
- package/observability/evals/learning-loop-report.md +37 -0
- package/observability/evals/repo-intake-eval-cases.md +23 -0
- package/observability/evals/routing-eval-cases.json +68 -0
- package/observability/evals/routing-eval-cases.md +25 -0
- package/observability/evals/routing-eval-report.json +72 -0
- package/observability/evaluation.md +34 -0
- package/observability/logs/copilot-usage-ingest-report.json +13 -0
- package/observability/logs/iteration-metrics.jsonl +75 -0
- package/observability/logs/learning-feedback.jsonl +152 -0
- package/observability/logs/routing-decisions.jsonl +333 -0
- package/observability/logs/session/agent-pipeline-preflight-20260701-004146.log +8 -0
- package/observability/logs/session/agent-pipeline-preflight-20260701-005554.log +8 -0
- package/observability/logs/session/agent-pipeline-preflight-20260701-010351.log +8 -0
- package/observability/logs/session/agent-pipeline-preflight-20260704-145829.log +8 -0
- package/observability/logs/session/agent-pipeline-preflight-20260704-150021.log +8 -0
- package/observability/logs/session/agent-pipeline-preflight-20260704-154328.log +8 -0
- package/observability/logs/session/bye-20260629-221513.json +39 -0
- package/observability/logs/session/bye-20260629-221545.json +59 -0
- package/observability/logs/session/bye-20260629-222007.json +52 -0
- package/observability/logs/session/bye-20260629-222133.json +59 -0
- package/observability/logs/session/bye-20260629-222412.json +45 -0
- package/observability/logs/session/bye-20260629-223224.json +52 -0
- package/observability/logs/session/bye-20260629-224050.json +59 -0
- package/observability/logs/session/bye-20260630-105732.json +24 -0
- package/observability/logs/session/bye-20260630-211536.json +87 -0
- package/observability/logs/session/bye-20260630-223423.json +87 -0
- package/observability/logs/session/bye-20260630-232534.json +87 -0
- package/observability/logs/session/bye-20260701-003638.json +126 -0
- package/observability/logs/session/bye-20260701-003849.json +126 -0
- package/observability/logs/session/bye-20260701-004315.json +138 -0
- package/observability/logs/session/bye-20260701-004559.json +76 -0
- package/observability/logs/session/bye-20260701-005913.json +138 -0
- package/observability/logs/session/bye-20260701-010753.json +138 -0
- package/observability/logs/session/bye-20260703-194106.json +24 -0
- package/observability/logs/session/bye-20260703-233443.json +76 -0
- package/observability/logs/session/bye-20260703-233653.json +76 -0
- package/observability/logs/session/bye-20260704-150317.json +152 -0
- package/observability/logs/session/bye-20260704-150929.json +75 -0
- package/observability/logs/session/bye-20260704-151050.json +75 -0
- package/observability/logs/session/bye-20260705-115458.json +165 -0
- package/observability/logs/session/codegraph-status-20260701-004228.log +39 -0
- package/observability/logs/session/codegraph-status-20260701-004310.log +39 -0
- package/observability/logs/session/codegraph-status-20260701-005637.log +39 -0
- package/observability/logs/session/codegraph-status-20260701-005908.log +39 -0
- package/observability/logs/session/codegraph-status-20260701-010444.log +39 -0
- package/observability/logs/session/codegraph-status-20260701-010747.log +39 -0
- package/observability/logs/session/codegraph-status-20260704-150137.log +26 -0
- package/observability/logs/session/codegraph-status-20260704-150313.log +28 -0
- package/observability/logs/session/codegraph-status-20260704-154445.log +26 -0
- package/observability/logs/session/codegraph-status-20260705-115454.log +27 -0
- package/observability/logs/session/codegraph-sync-20260701-004211.log +88 -0
- package/observability/logs/session/codegraph-sync-20260701-004241.log +82 -0
- package/observability/logs/session/codegraph-sync-20260701-005620.log +89 -0
- package/observability/logs/session/codegraph-sync-20260701-005840.log +88 -0
- package/observability/logs/session/codegraph-sync-20260701-010419.log +93 -0
- package/observability/logs/session/codegraph-sync-20260701-010609.log +90 -0
- package/observability/logs/session/codegraph-sync-20260704-145856.log +70 -0
- package/observability/logs/session/codegraph-sync-20260704-150047.log +53 -0
- package/observability/logs/session/codegraph-sync-20260704-150204.log +44 -0
- package/observability/logs/session/codegraph-sync-20260704-154353.log +26 -0
- package/observability/logs/session/codegraph-sync-20260705-115337.log +32 -0
- package/observability/logs/session/hi-20260629-221459.json +38 -0
- package/observability/logs/session/hi-20260629-221945.json +59 -0
- package/observability/logs/session/hi-20260629-222108.json +66 -0
- package/observability/logs/session/hi-20260629-222352.json +45 -0
- package/observability/logs/session/hi-20260629-225719.json +59 -0
- package/observability/logs/session/hi-20260629-233722.json +52 -0
- package/observability/logs/session/hi-20260629-233913.json +198 -0
- package/observability/logs/session/hi-20260630-110156.json +177 -0
- package/observability/logs/session/hi-20260630-191243.json +184 -0
- package/observability/logs/session/hi-20260630-230050.json +234 -0
- package/observability/logs/session/hi-20260630-230523.json +227 -0
- package/observability/logs/session/hi-20260630-230855.json +227 -0
- package/observability/logs/session/hi-20260630-231638.json +227 -0
- package/observability/logs/session/hi-20260630-231756.json +219 -0
- package/observability/logs/session/hi-20260701-002842.json +234 -0
- package/observability/logs/session/hi-20260701-003458.json +282 -0
- package/observability/logs/session/hi-20260701-004233.json +290 -0
- package/observability/logs/session/hi-20260701-004554.json +236 -0
- package/observability/logs/session/hi-20260701-005641.json +290 -0
- package/observability/logs/session/hi-20260701-010450.json +290 -0
- package/observability/logs/session/hi-20260703-233854.json +312 -0
- package/observability/logs/session/hi-20260703-234448.json +318 -0
- package/observability/logs/session/hi-20260704-145907.json +353 -0
- package/observability/logs/session/hi-20260704-150141.json +392 -0
- package/observability/logs/session/hi-20260704-154448.json +392 -0
- package/observability/logs/session/iteration-value-refresh-20260701-004309.log +3 -0
- package/observability/logs/session/iteration-value-refresh-20260701-005907.log +3 -0
- package/observability/logs/session/iteration-value-refresh-20260701-010747.log +3 -0
- package/observability/logs/session/iteration-value-refresh-20260704-150312.log +3 -0
- package/observability/logs/session/iteration-value-refresh-20260705-115453.log +3 -0
- package/observability/logs/session/learning-loop-refresh-20260701-004309.log +3 -0
- package/observability/logs/session/learning-loop-refresh-20260701-005906.log +3 -0
- package/observability/logs/session/learning-loop-refresh-20260701-010745.log +3 -0
- package/observability/logs/session/learning-loop-refresh-20260704-150309.log +3 -0
- package/observability/logs/session/learning-loop-refresh-20260705-115450.log +3 -0
- package/observability/logs/session/project-notes-refresh-20260701-004227.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260701-004308.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260701-005636.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260701-005906.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260701-010443.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260701-010744.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260704-150133.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260704-150309.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260704-154442.log +1 -0
- package/observability/logs/session/project-notes-refresh-20260705-115449.log +1 -0
- package/observability/logs/session/repo-intake-20260701-004218.log +6 -0
- package/observability/logs/session/repo-intake-20260701-005626.log +6 -0
- package/observability/logs/session/repo-intake-20260701-010433.log +6 -0
- package/observability/logs/session/repo-intake-20260704-150053.log +6 -0
- package/observability/logs/session/repo-intake-20260704-154404.log +6 -0
- package/observability/logs/session/repo-intake-refresh-20260701-004247.log +6 -0
- package/observability/logs/session/repo-intake-refresh-20260701-005847.log +6 -0
- package/observability/logs/session/repo-intake-refresh-20260701-010615.log +6 -0
- package/observability/logs/session/repo-intake-refresh-20260704-150209.log +6 -0
- package/observability/logs/session/repo-intake-refresh-20260705-115342.log +6 -0
- package/observability/logs/session/repo-registry-validation-20260701-004234.log +2 -0
- package/observability/logs/session/repo-registry-validation-20260701-004556.log +2 -0
- package/observability/logs/session/repo-registry-validation-20260701-005833.log +2 -0
- package/observability/logs/session/repo-registry-validation-20260701-010601.log +2 -0
- package/observability/logs/session/repo-registry-validation-20260704-150155.log +2 -0
- package/observability/logs/session/repo-registry-validation-20260705-115323.log +2 -0
- package/observability/logs/session/repomix-refresh-20260701-003823.log +4236 -0
- package/observability/logs/session/repomix-refresh-20260701-004251.log +4275 -0
- package/observability/logs/session/repomix-refresh-20260701-005850.log +4248 -0
- package/observability/logs/session/repomix-refresh-20260701-010619.log +6531 -0
- package/observability/logs/session/repomix-refresh-20260704-150239.log +652 -0
- package/observability/logs/session/repomix-refresh-20260705-115419.log +178 -0
- package/observability/logs/session/routing-evals-20260701-004221.log +2 -0
- package/observability/logs/session/routing-evals-20260701-004235.log +2 -0
- package/observability/logs/session/routing-evals-20260701-005629.log +2 -0
- package/observability/logs/session/routing-evals-20260701-005834.log +2 -0
- package/observability/logs/session/routing-evals-20260701-010437.log +2 -0
- package/observability/logs/session/routing-evals-20260701-010603.log +2 -0
- package/observability/logs/session/routing-evals-20260704-150125.log +2 -0
- package/observability/logs/session/routing-evals-20260704-150157.log +2 -0
- package/observability/logs/session/routing-evals-20260704-154434.log +2 -0
- package/observability/logs/session/routing-evals-20260705-115327.log +2 -0
- package/observability/logs/session/sibling-discovery-refresh-20260701-004250.log +3 -0
- package/observability/logs/session/sibling-discovery-refresh-20260701-005850.log +3 -0
- package/observability/logs/session/sibling-discovery-refresh-20260701-010618.log +3 -0
- package/observability/logs/session/sibling-discovery-refresh-20260704-150238.log +3 -0
- package/observability/logs/session/sibling-discovery-refresh-20260705-115418.log +3 -0
- package/observability/logs.schema.json +95 -0
- package/observability/logs.schema.md +26 -0
- package/observability/metrics.md +35 -0
- package/observability/routing-evaluator.md +37 -0
- package/observability/scoring-rubric.md +38 -0
- package/optimization/ALWAYS_ON_OPTIMIZATION.md +98 -0
- package/optimization/caveman-mode.md +62 -0
- package/optimization/examples/login-bug.md +25 -0
- package/optimization/examples/sla-query.md +25 -0
- package/optimization/optimization-routing.md +30 -0
- package/optimization/policies/response-style.policy.md +45 -0
- package/optimization/policies/token-budget.policy.md +28 -0
- package/optimization/profiles/always-on.profile.md +19 -0
- package/optimization/profiles/architecture.profile.md +20 -0
- package/optimization/profiles/debug.profile.md +20 -0
- package/optimization/profiles/enterprise-rag.profile.md +20 -0
- package/optimization/profiles/training.profile.md +20 -0
- package/optimization/token-saver.md +58 -0
- package/orchestrator/corporate-routing.md +51 -0
- package/orchestrator/decision-matrix.md +33 -0
- package/orchestrator/fallback.md +29 -0
- package/orchestrator/repo-routing.md +58 -0
- package/orchestrator/router.md +75 -0
- package/orchestrator/wiki/__init__.py +5 -0
- package/orchestrator/wiki/graph_consolidator.py +506 -0
- package/orchestrator/wiki/incremental_engine.py +57 -0
- package/orchestrator/wiki/plugin_manager.py +40 -0
- package/package.json +70 -0
- package/policies/context-policy.md +25 -0
- package/policies/cost-policy.md +25 -0
- package/policies/repo-intake-policy.md +36 -0
- package/policies/security-policy.md +25 -0
- package/repo-intake/README.md +81 -0
- package/repo-intake/templates/agent.template.md +4 -0
- package/repo-intake/templates/context-manifest.template.md +4 -0
- package/repo-intake/templates/skill.template.md +3 -0
- package/repo-registry/repos.schema.json +102 -0
- package/repo-registry/repos.template.json +26 -0
- package/requirements.txt +1 -0
- package/scripts/README.md +109 -0
- package/scripts/__init__.py +0 -0
- package/scripts/bootstrap-portable.cmd +4 -0
- package/scripts/bootstrap-portable.ps1 +90 -0
- package/scripts/context/azure-rag-mcp-adapter.py +1 -0
- package/scripts/context/build-graphify.ps1 +1 -0
- package/scripts/context/build-repomix.ps1 +1 -0
- package/scripts/discovery/discover-boost-repos.cmd +4 -0
- package/scripts/discovery/discover-boost-repos.py +186 -0
- package/scripts/discovery/refresh-project-notes.py +179 -0
- package/scripts/github/INSTALL.md +295 -0
- package/scripts/github/README.md +455 -0
- package/scripts/github/apply-boost-templates.ps1 +163 -0
- package/scripts/github/apply-single-repo.ps1 +85 -0
- package/scripts/github/create-devlog.ps1 +380 -0
- package/scripts/github/manage-issues.ps1 +332 -0
- package/scripts/github/sync-repo.ps1 +267 -0
- package/scripts/intake/agent-pipeline-preflight.py +151 -0
- package/scripts/intake/init-template-registry.cmd +4 -0
- package/scripts/intake/init-template-registry.ps1 +258 -0
- package/scripts/intake/repo-intake.py +354 -0
- package/scripts/intake/resolve-routing.py +620 -0
- package/scripts/intake/run-repo-intake.cmd +4 -0
- package/scripts/intake/run-repo-intake.ps1 +46 -0
- package/scripts/intake/run-routing-evals.py +147 -0
- package/scripts/intake/validate-database-routing.py +91 -0
- package/scripts/intake/validate-rag-routing.py +85 -0
- package/scripts/intake/validate-repo-registry.ps1 +20 -0
- package/scripts/intake/validate-repo-registry.py +286 -0
- package/scripts/intake/validate-security.py +170 -0
- package/scripts/learning/autolearning-gate.py +71 -0
- package/scripts/learning/chat-token-usage-report.py +326 -0
- package/scripts/learning/ingest-copilot-session-usage.py +421 -0
- package/scripts/learning/iteration-value-report.py +275 -0
- package/scripts/learning/learning-loop-report.py +272 -0
- package/scripts/learning/record-iteration-metrics.py +116 -0
- package/scripts/learning/record-learning-feedback.py +91 -0
- package/scripts/ops/bye.ps1 +620 -0
- package/scripts/ops/compare-demo-results.ps1 +826 -0
- package/scripts/ops/demo1.ps1 +11 -0
- package/scripts/ops/demo2.ps1 +11 -0
- package/scripts/ops/demo3.ps1 +11 -0
- package/scripts/ops/demo4.ps1 +11 -0
- package/scripts/ops/hi.ps1 +1045 -0
- package/scripts/ops/llm-token-probe.py +164 -0
- package/scripts/ops/run-all-demos.ps1 +39 -0
- package/scripts/ops/run-demo-block.ps1 +85 -0
- package/scripts/ops/run-demo-session.ps1 +532 -0
- package/scripts/setup/optimize-engines.ps1 +183 -0
- package/scripts/setup/setup-codegraph.ps1 +3 -0
- package/scripts/setup/setup-gitnexus.ps1 +3 -0
- package/scripts/setup/setup-graphify.ps1 +2 -0
- package/scripts/setup/setup-prerequisites.ps1 +205 -0
- package/scripts/setup/start-gitnexus.ps1 +71 -0
- package/scripts/setup/validate-context.ps1 +361 -0
- package/scripts/wiki/__init__.py +0 -0
- package/scripts/wiki/compiler_main.py +189 -0
- package/scripts/wiki/normalizer.py +206 -0
- package/scripts/wiki/providers/base_provider.py +25 -0
- package/scripts/wiki/providers/codegraph_provider.py +49 -0
- package/scripts/wiki/providers/graphify_provider.py +49 -0
- package/scripts/wiki/providers/repo_content_provider.py +408 -0
- package/scripts/wiki/query_autodocs.py +60 -0
- package/scripts/wiki/validator.py +183 -0
- package/scripts/wiki/wiki_compiler.py +5 -0
- package/specs/architecture.spec.md +32 -0
- package/specs/azure-rag.spec.md +28 -0
- package/specs/coding-standards.spec.md +24 -0
- package/specs/database.spec.md +29 -0
- package/specs/migration.spec.md +26 -0
- package/specs/observability.spec.md +24 -0
- package/specs/optimization.spec.md +31 -0
- package/specs/rag.spec.md +30 -0
- package/specs/repo-intake.spec.md +25 -0
- package/specs/routing.spec.md +24 -0
- package/specs/security.spec.md +30 -0
- package/specs/wiki/provider-contract.json +33 -0
- package/specs/wiki/unified-knowledge-graph.json +25 -0
- package/templates/BOOST_README_TEMPLATE.md +96 -0
- package/templates/CODEOWNERS_TEMPLATE.txt +29 -0
- package/templates/LICENSE_MIT_TEMPLATE.txt +21 -0
- package/templates/PERSONAL_README_TEMPLATE.md +90 -0
- package/templates/README_boost_RAG_Azure.md +46 -0
- package/templates/README_boost_azure_iot_edge.md +48 -0
- package/templates/README_boost_backend.md +47 -0
- package/templates/README_boost_dba.md +57 -0
- package/templates/ci.yml.template +73 -0
- package/tooling/tooling.manifest.json +72 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const { spawnSync } = require("node:child_process");
|
|
6
|
+
|
|
7
|
+
const packageRoot = path.resolve(__dirname, "..");
|
|
8
|
+
const scaffoldEntries = [
|
|
9
|
+
".github",
|
|
10
|
+
".vscode",
|
|
11
|
+
"autodocs/README.md",
|
|
12
|
+
"autodocs/schema",
|
|
13
|
+
"autolearning",
|
|
14
|
+
"context/repomix/repomix.config.json",
|
|
15
|
+
"memory",
|
|
16
|
+
"observability",
|
|
17
|
+
"optimization",
|
|
18
|
+
"orchestrator",
|
|
19
|
+
"policies",
|
|
20
|
+
"repo-intake",
|
|
21
|
+
"repo-registry/repos.schema.json",
|
|
22
|
+
"repo-registry/repos.template.json",
|
|
23
|
+
"scripts",
|
|
24
|
+
"specs",
|
|
25
|
+
"templates",
|
|
26
|
+
"tooling",
|
|
27
|
+
"AGENTS.md",
|
|
28
|
+
"ARCHITECTURE.md",
|
|
29
|
+
"FINAL_USAGE_GUIDE.md",
|
|
30
|
+
"README.md",
|
|
31
|
+
"README_WIKI.md",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"requirements.txt",
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const runtimeDirs = [
|
|
37
|
+
".cache/github-repos",
|
|
38
|
+
"autodocs/generated",
|
|
39
|
+
"autodocs/site",
|
|
40
|
+
"context/graphify-out",
|
|
41
|
+
"context/repomix",
|
|
42
|
+
"observability/logs/session",
|
|
43
|
+
"repo-registry",
|
|
44
|
+
"repo-intake/generated/reports",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
function parseArgs(argv) {
|
|
48
|
+
const options = {
|
|
49
|
+
postinstall: false,
|
|
50
|
+
force: false,
|
|
51
|
+
skipBootstrap: false,
|
|
52
|
+
nonInteractive: false,
|
|
53
|
+
targetDir: process.env.MCPEE_TARGET_DIR || process.env.INIT_CWD || process.cwd(),
|
|
54
|
+
owner: process.env.MCPEE_OWNER || "",
|
|
55
|
+
repoPrefix: process.env.MCPEE_REPO_PREFIX || "",
|
|
56
|
+
initialRepoName: process.env.MCPEE_INITIAL_REPO_NAME || "",
|
|
57
|
+
initialRepoDomain: process.env.MCPEE_INITIAL_REPO_DOMAIN || "",
|
|
58
|
+
initialRepoLocation: process.env.MCPEE_INITIAL_REPO_LOCATION || "",
|
|
59
|
+
skipInitialRepo: false,
|
|
60
|
+
help: false,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
64
|
+
const arg = argv[index];
|
|
65
|
+
switch (arg) {
|
|
66
|
+
case "-h":
|
|
67
|
+
case "--help":
|
|
68
|
+
case "help":
|
|
69
|
+
options.help = true;
|
|
70
|
+
break;
|
|
71
|
+
case "--postinstall":
|
|
72
|
+
options.postinstall = true;
|
|
73
|
+
break;
|
|
74
|
+
case "--force":
|
|
75
|
+
options.force = true;
|
|
76
|
+
break;
|
|
77
|
+
case "--skip-bootstrap":
|
|
78
|
+
options.skipBootstrap = true;
|
|
79
|
+
break;
|
|
80
|
+
case "--non-interactive":
|
|
81
|
+
options.nonInteractive = true;
|
|
82
|
+
break;
|
|
83
|
+
case "--skip-initial-repo":
|
|
84
|
+
options.skipInitialRepo = true;
|
|
85
|
+
break;
|
|
86
|
+
case "--target":
|
|
87
|
+
options.targetDir = argv[index + 1] || options.targetDir;
|
|
88
|
+
index += 1;
|
|
89
|
+
break;
|
|
90
|
+
case "--owner":
|
|
91
|
+
options.owner = argv[index + 1] || options.owner;
|
|
92
|
+
index += 1;
|
|
93
|
+
break;
|
|
94
|
+
case "--repo-prefix":
|
|
95
|
+
options.repoPrefix = argv[index + 1] || options.repoPrefix;
|
|
96
|
+
index += 1;
|
|
97
|
+
break;
|
|
98
|
+
case "--initial-repo-name":
|
|
99
|
+
options.initialRepoName = argv[index + 1] || options.initialRepoName;
|
|
100
|
+
index += 1;
|
|
101
|
+
break;
|
|
102
|
+
case "--initial-repo-domain":
|
|
103
|
+
options.initialRepoDomain = argv[index + 1] || options.initialRepoDomain;
|
|
104
|
+
index += 1;
|
|
105
|
+
break;
|
|
106
|
+
case "--initial-repo-location":
|
|
107
|
+
options.initialRepoLocation = argv[index + 1] || options.initialRepoLocation;
|
|
108
|
+
index += 1;
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (process.env.MCPEE_SKIP_POSTINSTALL === "1") {
|
|
116
|
+
options.skipBootstrap = true;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (process.env.CI === "true" || !process.stdin.isTTY) {
|
|
120
|
+
options.nonInteractive = true;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return options;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function printInstallHelp() {
|
|
127
|
+
process.stdout.write(
|
|
128
|
+
[
|
|
129
|
+
"mcpee install [opciones]",
|
|
130
|
+
"",
|
|
131
|
+
"Opciones:",
|
|
132
|
+
" --target <ruta> Proyecto host donde scaffoldar el engine.",
|
|
133
|
+
" --force Sobrescribe archivos scaffold cuando ya existan.",
|
|
134
|
+
" --skip-bootstrap Copia artefactos e inicializa registry plantilla sin bootstrap.",
|
|
135
|
+
" --non-interactive Evita prompts; deja registry plantilla listo para editar luego.",
|
|
136
|
+
" --owner <valor> Owner para repo-registry/repos.yml.",
|
|
137
|
+
" --repo-prefix <valor> Prefijo de nombres para repos del intake.",
|
|
138
|
+
" --skip-initial-repo Crea el registry sin alta inicial de repos.",
|
|
139
|
+
].join("\n") + "\n",
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function normalizePath(inputPath) {
|
|
144
|
+
return path.resolve(inputPath);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function ensureDir(dirPath) {
|
|
148
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function copyFile(sourcePath, targetPath, overwrite) {
|
|
152
|
+
ensureDir(path.dirname(targetPath));
|
|
153
|
+
if (!overwrite && fs.existsSync(targetPath)) {
|
|
154
|
+
const sourceContent = fs.readFileSync(sourcePath);
|
|
155
|
+
const targetContent = fs.readFileSync(targetPath);
|
|
156
|
+
if (Buffer.compare(sourceContent, targetContent) === 0) {
|
|
157
|
+
return { copied: false, skipped: true, reason: "same" };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return { copied: false, skipped: true, reason: "exists" };
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
164
|
+
return { copied: true, skipped: false, reason: "copied" };
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function copyEntry(sourceRelativePath, targetRoot, overwrite, stats) {
|
|
168
|
+
const sourcePath = path.join(packageRoot, sourceRelativePath);
|
|
169
|
+
const targetPath = path.join(targetRoot, sourceRelativePath);
|
|
170
|
+
|
|
171
|
+
if (!fs.existsSync(sourcePath)) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const entry = fs.statSync(sourcePath);
|
|
176
|
+
if (entry.isDirectory()) {
|
|
177
|
+
ensureDir(targetPath);
|
|
178
|
+
for (const childName of fs.readdirSync(sourcePath)) {
|
|
179
|
+
copyEntry(path.posix.join(sourceRelativePath.replaceAll(path.sep, "/"), childName), targetRoot, overwrite, stats);
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const result = copyFile(sourcePath, targetPath, overwrite);
|
|
185
|
+
if (result.copied) {
|
|
186
|
+
stats.copied += 1;
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (result.reason === "exists") {
|
|
191
|
+
stats.skippedExisting += 1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function ensureRuntimeLayout(targetRoot) {
|
|
196
|
+
for (const dirRelativePath of runtimeDirs) {
|
|
197
|
+
ensureDir(path.join(targetRoot, dirRelativePath));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function resolveShellCandidates() {
|
|
202
|
+
if (process.platform === "win32") {
|
|
203
|
+
return ["pwsh", "powershell"];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return ["pwsh"];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function runPowerShell(scriptPath, args, cwd) {
|
|
210
|
+
const shellCandidates = resolveShellCandidates();
|
|
211
|
+
for (const shellCommand of shellCandidates) {
|
|
212
|
+
const result = spawnSync(shellCommand, ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", scriptPath, ...args], {
|
|
213
|
+
cwd,
|
|
214
|
+
stdio: "inherit",
|
|
215
|
+
env: process.env,
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
if (result.error && result.error.code === "ENOENT") {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (result.error) {
|
|
223
|
+
throw result.error;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return result.status ?? 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
throw new Error("PowerShell no esta disponible. Instala pwsh para completar la instalacion.");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function deriveRepoPrefix(targetRoot, options) {
|
|
233
|
+
if (options.repoPrefix) {
|
|
234
|
+
return options.repoPrefix;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return `${path.basename(targetRoot).replace(/[^a-zA-Z0-9_-]/g, "-").toLowerCase()}_`;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function initializeTemplateRegistry(targetRoot, options) {
|
|
241
|
+
const registryPath = path.join(targetRoot, "repo-registry", "repos.yml");
|
|
242
|
+
if (fs.existsSync(registryPath)) {
|
|
243
|
+
return 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const initScript = path.join(targetRoot, "scripts", "intake", "init-template-registry.ps1");
|
|
247
|
+
const args = [
|
|
248
|
+
"-Owner",
|
|
249
|
+
options.owner || "your-team",
|
|
250
|
+
"-RepoNamePrefix",
|
|
251
|
+
deriveRepoPrefix(targetRoot, options),
|
|
252
|
+
"-SkipInitialRepo",
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
return runPowerShell(initScript, args, targetRoot);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function runBootstrap(targetRoot) {
|
|
259
|
+
const bootstrapScript = path.join(targetRoot, "scripts", "bootstrap-portable.ps1");
|
|
260
|
+
return runPowerShell(bootstrapScript, [], targetRoot);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function runHostInstall(rawOptions) {
|
|
264
|
+
const options = rawOptions;
|
|
265
|
+
const targetRoot = normalizePath(options.targetDir);
|
|
266
|
+
const stats = { copied: 0, skippedExisting: 0 };
|
|
267
|
+
|
|
268
|
+
if (normalizePath(packageRoot) === targetRoot) {
|
|
269
|
+
process.stdout.write("[mcpee] Instalacion en el propio repo detectada; se omite scaffold host.\n");
|
|
270
|
+
return 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
process.stdout.write(`[mcpee] Scaffold del engine en ${targetRoot}\n`);
|
|
274
|
+
for (const entry of scaffoldEntries) {
|
|
275
|
+
copyEntry(entry, targetRoot, options.force, stats);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
ensureRuntimeLayout(targetRoot);
|
|
279
|
+
process.stdout.write(`[mcpee] Archivos copiados: ${stats.copied}; existentes preservados: ${stats.skippedExisting}\n`);
|
|
280
|
+
|
|
281
|
+
if (options.skipBootstrap) {
|
|
282
|
+
const initStatus = initializeTemplateRegistry(targetRoot, options);
|
|
283
|
+
if (initStatus !== 0) {
|
|
284
|
+
return initStatus;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
process.stdout.write("[mcpee] Bootstrap omitido. Puedes ejecutar .\\scripts\\bootstrap-portable.cmd mas tarde.\n");
|
|
288
|
+
return 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (options.nonInteractive) {
|
|
292
|
+
const initStatus = initializeTemplateRegistry(targetRoot, options);
|
|
293
|
+
if (initStatus !== 0) {
|
|
294
|
+
return initStatus;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
process.stdout.write("[mcpee] Modo no interactivo detectado. Se inicializo el registry plantilla y se omitio bootstrap interactivo.\n");
|
|
298
|
+
return 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return runBootstrap(targetRoot);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function runHostInstallFromCli(argv = process.argv.slice(2)) {
|
|
305
|
+
try {
|
|
306
|
+
const options = parseArgs(argv);
|
|
307
|
+
if (options.help) {
|
|
308
|
+
printInstallHelp();
|
|
309
|
+
return 0;
|
|
310
|
+
}
|
|
311
|
+
return runHostInstall(options);
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
process.stderr.write(`[mcpee] ${error.message}\n`);
|
|
315
|
+
return 1;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
module.exports = {
|
|
320
|
+
runHostInstall,
|
|
321
|
+
runHostInstallFromCli,
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
if (require.main === module) {
|
|
325
|
+
process.exit(runHostInstallFromCli());
|
|
326
|
+
}
|
package/bin/mcpee.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const { runHostInstallFromCli } = require("./install-host");
|
|
7
|
+
|
|
8
|
+
const repoRoot = path.resolve(__dirname, "..");
|
|
9
|
+
const commandMap = {
|
|
10
|
+
bootstrap: "scripts/bootstrap-portable.ps1",
|
|
11
|
+
validate: "scripts/setup/validate-context.ps1",
|
|
12
|
+
hi: "scripts/ops/hi.ps1",
|
|
13
|
+
bye: "scripts/ops/bye.ps1",
|
|
14
|
+
intake: "scripts/intake/run-repo-intake.ps1",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function resolveExecutionRoot(scriptRelativePath) {
|
|
18
|
+
const configuredTarget = process.env.MCPEE_TARGET_DIR ? path.resolve(process.env.MCPEE_TARGET_DIR) : "";
|
|
19
|
+
const cwdRoot = process.cwd();
|
|
20
|
+
|
|
21
|
+
if (configuredTarget && fs.existsSync(path.join(configuredTarget, scriptRelativePath))) {
|
|
22
|
+
return configuredTarget;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (cwdRoot !== repoRoot && fs.existsSync(path.join(cwdRoot, scriptRelativePath))) {
|
|
26
|
+
return cwdRoot;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return repoRoot;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function printHelp() {
|
|
33
|
+
process.stdout.write(
|
|
34
|
+
[
|
|
35
|
+
"mcpee <comando> [args]",
|
|
36
|
+
"",
|
|
37
|
+
"Comandos:",
|
|
38
|
+
" install Scaffold del engine en el proyecto actual y ejecuta bootstrap.",
|
|
39
|
+
" bootstrap Ejecuta el bootstrap portable completo.",
|
|
40
|
+
" validate Ejecuta la validacion minima del contexto.",
|
|
41
|
+
" hi Ejecuta el preflight diario.",
|
|
42
|
+
" bye Ejecuta el cierre diario.",
|
|
43
|
+
" intake Ejecuta el repo intake.",
|
|
44
|
+
"",
|
|
45
|
+
"Ejemplos:",
|
|
46
|
+
" npx mcp-efficiency-engine bootstrap",
|
|
47
|
+
" mcpee validate -PortableMode",
|
|
48
|
+
].join("\n") + "\n",
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function resolveInvocationCandidates() {
|
|
53
|
+
if (process.platform === "win32") {
|
|
54
|
+
return ["pwsh", "powershell"];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return ["pwsh"];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function runPowerShellScript(scriptRelativePath, forwardedArgs) {
|
|
61
|
+
const executionRoot = resolveExecutionRoot(scriptRelativePath);
|
|
62
|
+
const scriptPath = path.join(executionRoot, scriptRelativePath);
|
|
63
|
+
if (!fs.existsSync(scriptPath)) {
|
|
64
|
+
process.stderr.write(`Script no encontrado: ${scriptRelativePath}\n`);
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const shellCandidates = resolveInvocationCandidates();
|
|
69
|
+
for (const shellCommand of shellCandidates) {
|
|
70
|
+
const result = spawnSync(
|
|
71
|
+
shellCommand,
|
|
72
|
+
["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", scriptPath, ...forwardedArgs],
|
|
73
|
+
{
|
|
74
|
+
cwd: executionRoot,
|
|
75
|
+
stdio: "inherit",
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
if (result.error && result.error.code === "ENOENT") {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (result.error) {
|
|
84
|
+
process.stderr.write(`${result.error.message}\n`);
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return result.status ?? 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
process.stderr.write("PowerShell no esta disponible. Instala pwsh para usar este CLI.\n");
|
|
92
|
+
return 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const argv = process.argv.slice(2);
|
|
96
|
+
const firstArg = argv[0] || "bootstrap";
|
|
97
|
+
|
|
98
|
+
if (["-h", "--help", "help"].includes(firstArg)) {
|
|
99
|
+
printHelp();
|
|
100
|
+
process.exit(0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (firstArg === "install") {
|
|
104
|
+
process.exit(runHostInstallFromCli(argv.slice(1)));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const command = commandMap[firstArg] ? firstArg : "bootstrap";
|
|
108
|
+
const forwardedArgs = command === firstArg ? argv.slice(1) : argv;
|
|
109
|
+
|
|
110
|
+
if (!commandMap[command]) {
|
|
111
|
+
process.stderr.write(`Comando no soportado: ${firstArg}\n`);
|
|
112
|
+
printHelp();
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
process.exit(runPowerShellScript(commandMap[command], forwardedArgs));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"output": {
|
|
3
|
+
"style": "xml",
|
|
4
|
+
"filePath": "context/repomix/repomix-output.xml",
|
|
5
|
+
"removeComments": false,
|
|
6
|
+
"removeEmptyLines": true,
|
|
7
|
+
"showLineNumbers": true
|
|
8
|
+
},
|
|
9
|
+
"ignore": {
|
|
10
|
+
"customPatterns": [
|
|
11
|
+
"node_modules/**",
|
|
12
|
+
"dist/**",
|
|
13
|
+
"build/**",
|
|
14
|
+
".git/**",
|
|
15
|
+
".env",
|
|
16
|
+
".env.*",
|
|
17
|
+
"**/*.log"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Cross Memory Reasoning
|
|
2
|
+
|
|
3
|
+
Used when a query touches multiple domains.
|
|
4
|
+
|
|
5
|
+
Example:
|
|
6
|
+
|
|
7
|
+
- code + SLA
|
|
8
|
+
- DBA + architecture
|
|
9
|
+
- docs + business
|
|
10
|
+
|
|
11
|
+
Process:
|
|
12
|
+
|
|
13
|
+
1. Query each memory
|
|
14
|
+
2. Extract relevant signals
|
|
15
|
+
3. Merge into unified response
|
|
16
|
+
4. If source is code, resolve symbols via CodeGraph before broad file reads
|
|
17
|
+
5. Register reusable pattern in code-memory feedback loop
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
memories:
|
|
2
|
+
- name: code-memory
|
|
3
|
+
engine: codebase-memory
|
|
4
|
+
retrieval_index: codegraph
|
|
5
|
+
requires:
|
|
6
|
+
- codegraph-command
|
|
7
|
+
- codegraph-index
|
|
8
|
+
|
|
9
|
+
- name: knowledge-memory
|
|
10
|
+
engine: graphify
|
|
11
|
+
|
|
12
|
+
- name: enterprise-memory
|
|
13
|
+
engine: azure-rag
|
|
14
|
+
|
|
15
|
+
- name: domain-memory
|
|
16
|
+
source: repo-registry
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timestamp": "2026-07-05T09:54:53.886533+00:00",
|
|
3
|
+
"source": "observability/logs/iteration-metrics.jsonl",
|
|
4
|
+
"filters": {
|
|
5
|
+
"source": "copilot-session",
|
|
6
|
+
"from": "",
|
|
7
|
+
"to": ""
|
|
8
|
+
},
|
|
9
|
+
"totals": {
|
|
10
|
+
"events": 36,
|
|
11
|
+
"input_tokens": 3893402,
|
|
12
|
+
"output_tokens": 126892,
|
|
13
|
+
"total_tokens": 4020294,
|
|
14
|
+
"copilot_credits": 816.9227
|
|
15
|
+
},
|
|
16
|
+
"breakdown": {
|
|
17
|
+
"model": {
|
|
18
|
+
"copilot/auto": {
|
|
19
|
+
"count": 36,
|
|
20
|
+
"input_tokens": 3893402,
|
|
21
|
+
"output_tokens": 126892,
|
|
22
|
+
"total_tokens": 4020294,
|
|
23
|
+
"copilot_credits": 816.9227
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"day": {
|
|
27
|
+
"2026-07-03": {
|
|
28
|
+
"count": 19,
|
|
29
|
+
"input_tokens": 2219137,
|
|
30
|
+
"output_tokens": 67846,
|
|
31
|
+
"total_tokens": 2286983,
|
|
32
|
+
"copilot_credits": 492.07088600000003
|
|
33
|
+
},
|
|
34
|
+
"2026-07-04": {
|
|
35
|
+
"count": 9,
|
|
36
|
+
"input_tokens": 876490,
|
|
37
|
+
"output_tokens": 21560,
|
|
38
|
+
"total_tokens": 898050,
|
|
39
|
+
"copilot_credits": 160.161499
|
|
40
|
+
},
|
|
41
|
+
"2026-07-05": {
|
|
42
|
+
"count": 8,
|
|
43
|
+
"input_tokens": 797775,
|
|
44
|
+
"output_tokens": 37486,
|
|
45
|
+
"total_tokens": 835261,
|
|
46
|
+
"copilot_credits": 164.690315
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"license": {
|
|
51
|
+
"plan": "business",
|
|
52
|
+
"seats": 1,
|
|
53
|
+
"included_credits_per_user_month": 19.0,
|
|
54
|
+
"included_credits_total_month": 19.0,
|
|
55
|
+
"official_plans_url": "https://github.com/features/copilot/plans?ref_cta=View+pricing+and+plans&ref_loc=hero&ref_page=%2Ffeatures_copilot_copilot_business&plans=business"
|
|
56
|
+
},
|
|
57
|
+
"budget": {
|
|
58
|
+
"used_copilot_credits": 816.9227,
|
|
59
|
+
"budget_utilization_rate": 42.995932,
|
|
60
|
+
"overage_credits": 797.9227,
|
|
61
|
+
"equivalent_seats_used": 42.995932,
|
|
62
|
+
"percent_of_one_seat": 4299.59
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Chat Token Usage Report
|
|
2
|
+
|
|
3
|
+
- timestamp: 2026-07-05T09:54:53.886533+00:00
|
|
4
|
+
- source: observability/logs/iteration-metrics.jsonl
|
|
5
|
+
- filter.source: copilot-session
|
|
6
|
+
- filter.from:
|
|
7
|
+
- filter.to:
|
|
8
|
+
- plan: business
|
|
9
|
+
- seats: 1
|
|
10
|
+
- official_plans_url: https://github.com/features/copilot/plans?ref_cta=View+pricing+and+plans&ref_loc=hero&ref_page=%2Ffeatures_copilot_copilot_business&plans=business
|
|
11
|
+
|
|
12
|
+
## Totals
|
|
13
|
+
|
|
14
|
+
- events: 36
|
|
15
|
+
- input_tokens: 3893402
|
|
16
|
+
- output_tokens: 126892
|
|
17
|
+
- total_tokens: 4020294
|
|
18
|
+
- copilot_credits: 816.9227
|
|
19
|
+
- included_credits_total_month: 19.0
|
|
20
|
+
- budget_utilization_rate: 42.995932
|
|
21
|
+
- overage_credits: 797.9227
|
|
22
|
+
- equivalent_seats_used: 42.995932
|
|
23
|
+
- percent_of_one_seat: 4299.59
|
|
24
|
+
|
|
25
|
+
## Breakdown by Model
|
|
26
|
+
|
|
27
|
+
- copilot/auto: count=36, input=3893402, output=126892, total=4020294, credits=816.9227
|
|
28
|
+
|
|
29
|
+
## Breakdown by Day
|
|
30
|
+
|
|
31
|
+
- 2026-07-03: count=19, input=2219137, output=67846, total=2286983, credits=492.070886
|
|
32
|
+
- 2026-07-04: count=9, input=876490, output=21560, total=898050, credits=160.161499
|
|
33
|
+
- 2026-07-05: count=8, input=797775, output=37486, total=835261, credits=164.690315
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timestamp": "2026-07-05T09:54:54.568327+00:00",
|
|
3
|
+
"sources": {
|
|
4
|
+
"routing": "observability/logs/routing-decisions.jsonl",
|
|
5
|
+
"feedback": "observability/logs/learning-feedback.jsonl",
|
|
6
|
+
"metrics": "observability/logs/iteration-metrics.jsonl"
|
|
7
|
+
},
|
|
8
|
+
"totals": {
|
|
9
|
+
"events": 305,
|
|
10
|
+
"events_with_event_id": 247,
|
|
11
|
+
"metrics_covered": 7,
|
|
12
|
+
"feedback_confirmed": 101,
|
|
13
|
+
"confirmed_success": 101
|
|
14
|
+
},
|
|
15
|
+
"kpis": {
|
|
16
|
+
"metrics_coverage_rate": 0.0283,
|
|
17
|
+
"confirmed_feedback_rate": 0.4089,
|
|
18
|
+
"confirmed_success_rate": 1.0,
|
|
19
|
+
"total_tokens": 6474,
|
|
20
|
+
"total_cost_usd": 0.0542,
|
|
21
|
+
"tokens_per_confirmed_success": 64.1,
|
|
22
|
+
"cost_per_confirmed_success_usd": 0.000537
|
|
23
|
+
},
|
|
24
|
+
"breakdown": {
|
|
25
|
+
"tool_mode": {
|
|
26
|
+
"hybrid": {
|
|
27
|
+
"count": 2,
|
|
28
|
+
"tokens": 2400,
|
|
29
|
+
"cost_usd": 0.02
|
|
30
|
+
},
|
|
31
|
+
"local-only": {
|
|
32
|
+
"count": 4,
|
|
33
|
+
"tokens": 4044,
|
|
34
|
+
"cost_usd": 0.0342
|
|
35
|
+
},
|
|
36
|
+
"model-only": {
|
|
37
|
+
"count": 1,
|
|
38
|
+
"tokens": 30,
|
|
39
|
+
"cost_usd": 0.0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"model": {
|
|
43
|
+
"GPT-5.3-Codex": {
|
|
44
|
+
"count": 7,
|
|
45
|
+
"tokens": 6474,
|
|
46
|
+
"cost_usd": 0.054200000000000005
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"engine": {
|
|
50
|
+
"Azure RAG Builder": {
|
|
51
|
+
"count": 1,
|
|
52
|
+
"tokens": 1200,
|
|
53
|
+
"cost_usd": 0.01
|
|
54
|
+
},
|
|
55
|
+
"CodeGraph": {
|
|
56
|
+
"count": 4,
|
|
57
|
+
"tokens": 2874,
|
|
58
|
+
"cost_usd": 0.0242
|
|
59
|
+
},
|
|
60
|
+
"GitNexus": {
|
|
61
|
+
"count": 1,
|
|
62
|
+
"tokens": 1200,
|
|
63
|
+
"cost_usd": 0.01
|
|
64
|
+
},
|
|
65
|
+
"Graphify": {
|
|
66
|
+
"count": 1,
|
|
67
|
+
"tokens": 1200,
|
|
68
|
+
"cost_usd": 0.01
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"assessment": {
|
|
73
|
+
"has_value_signal": true,
|
|
74
|
+
"notes": "Value signal available. Track trend, not one-point absolute values."
|
|
75
|
+
}
|
|
76
|
+
}
|