@event4u/agent-config 6.0.0 → 6.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/.claude-plugin/marketplace.json +5 -5
- package/CHANGELOG.md +167 -440
- package/README.md +3 -3
- package/dist/agent-src/commands/agent-handoff.md +5 -4
- package/dist/agent-src/commands/agent-status.md +1 -0
- package/dist/agent-src/commands/agents/audit.md +1 -0
- package/dist/agent-src/commands/agents/init.md +3 -0
- package/dist/agent-src/commands/agents/optimize.md +1 -0
- package/dist/agent-src/commands/agents/user/accept.md +1 -0
- package/dist/agent-src/commands/agents/user/init.md +1 -0
- package/dist/agent-src/commands/agents/user/review.md +1 -0
- package/dist/agent-src/commands/agents/user/show.md +1 -0
- package/dist/agent-src/commands/agents/user/update.md +1 -0
- package/dist/agent-src/commands/agents/user.md +1 -0
- package/dist/agent-src/commands/agents.md +1 -0
- package/dist/agent-src/commands/analytics/prune.md +3 -2
- package/dist/agent-src/commands/analytics/show.md +3 -2
- package/dist/agent-src/commands/analytics.md +3 -2
- package/dist/agent-src/commands/analyze-reference-repo.md +1 -0
- package/dist/agent-src/commands/bug-fix.md +1 -0
- package/dist/agent-src/commands/bug-investigate.md +1 -0
- package/dist/agent-src/commands/challenge-me/vision.md +3 -2
- package/dist/agent-src/commands/challenge-me/with-docs.md +3 -2
- package/dist/agent-src/commands/challenge-me.md +3 -2
- package/dist/agent-src/commands/chat-history/import.md +9 -9
- package/dist/agent-src/commands/chat-history.md +32 -30
- package/dist/agent-src/commands/check-current-md.md +1 -0
- package/dist/agent-src/commands/commit/in-chunks.md +1 -0
- package/dist/agent-src/commands/commit.md +1 -0
- package/dist/agent-src/commands/condense.md +1 -0
- package/dist/agent-src/commands/context/create.md +1 -0
- package/dist/agent-src/commands/context/refactor.md +1 -0
- package/dist/agent-src/commands/context.md +1 -0
- package/dist/agent-src/commands/cost-report.md +5 -4
- package/dist/agent-src/commands/council/analysis.md +3 -2
- package/dist/agent-src/commands/council/debate.md +5 -4
- package/dist/agent-src/commands/council/default.md +3 -2
- package/dist/agent-src/commands/council/design.md +3 -2
- package/dist/agent-src/commands/council/optimize.md +3 -2
- package/dist/agent-src/commands/council/pr.md +3 -2
- package/dist/agent-src/commands/council.md +4 -3
- package/dist/agent-src/commands/e2e-heal.md +1 -0
- package/dist/agent-src/commands/e2e-plan.md +1 -0
- package/dist/agent-src/commands/estimate-ticket.md +1 -0
- package/dist/agent-src/commands/feature/dev.md +1 -0
- package/dist/agent-src/commands/feature/explore.md +1 -0
- package/dist/agent-src/commands/feature/plan.md +6 -6
- package/dist/agent-src/commands/feature/refactor.md +1 -0
- package/dist/agent-src/commands/feature/roadmap.md +1 -0
- package/dist/agent-src/commands/feature.md +1 -0
- package/dist/agent-src/commands/fix/ci.md +1 -0
- package/dist/agent-src/commands/fix/portability.md +1 -0
- package/dist/agent-src/commands/fix/pr-comments.md +147 -15
- package/dist/agent-src/commands/fix/refs.md +1 -0
- package/dist/agent-src/commands/fix/seeder.md +1 -0
- package/dist/agent-src/commands/fix.md +8 -8
- package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
- package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
- package/dist/agent-src/commands/ghostwriter/list.md +1 -0
- package/dist/agent-src/commands/ghostwriter/show.md +1 -0
- package/dist/agent-src/commands/ghostwriter/write.md +1 -0
- package/dist/agent-src/commands/ghostwriter.md +1 -0
- package/dist/agent-src/commands/grill-me.md +3 -2
- package/dist/agent-src/commands/image/analyse.md +1 -0
- package/dist/agent-src/commands/image/create.md +1 -0
- package/dist/agent-src/commands/image/verify.md +1 -0
- package/dist/agent-src/commands/image.md +1 -0
- package/dist/agent-src/commands/implement-ticket.md +1 -0
- package/dist/agent-src/commands/jira-ticket.md +1 -0
- package/dist/agent-src/commands/judge/on-diff.md +1 -0
- package/dist/agent-src/commands/judge/solo.md +1 -0
- package/dist/agent-src/commands/judge/steps.md +1 -0
- package/dist/agent-src/commands/judge.md +1 -0
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
- package/dist/agent-src/commands/knowledge/forget.md +1 -0
- package/dist/agent-src/commands/knowledge/ingest.md +1 -0
- package/dist/agent-src/commands/knowledge/list.md +1 -0
- package/dist/agent-src/commands/knowledge.md +1 -0
- package/dist/agent-src/commands/memory/add.md +8 -6
- package/dist/agent-src/commands/memory/learn-low-impact.md +3 -2
- package/dist/agent-src/commands/memory/load.md +7 -7
- package/dist/agent-src/commands/memory/mine-session.md +39 -12
- package/dist/agent-src/commands/memory/promote.md +3 -2
- package/dist/agent-src/commands/memory/propose.md +7 -6
- package/dist/agent-src/commands/memory.md +3 -2
- package/dist/agent-src/commands/mode.md +1 -0
- package/dist/agent-src/commands/module/create.md +1 -0
- package/dist/agent-src/commands/module/explore.md +1 -0
- package/dist/agent-src/commands/module.md +1 -0
- package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
- package/dist/agent-src/commands/optimize/augmentignore.md +1 -0
- package/dist/agent-src/commands/optimize/rtk.md +1 -0
- package/dist/agent-src/commands/optimize/skills.md +1 -0
- package/dist/agent-src/commands/optimize-prompt.md +1 -0
- package/dist/agent-src/commands/optimize.md +1 -0
- package/dist/agent-src/commands/orchestrate.md +1 -0
- package/dist/agent-src/commands/override/create.md +1 -0
- package/dist/agent-src/commands/override/manage.md +1 -0
- package/dist/agent-src/commands/override.md +1 -0
- package/dist/agent-src/commands/package-reset.md +1 -0
- package/dist/agent-src/commands/package-test.md +1 -0
- package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
- package/dist/agent-src/commands/post-as/me.md +1 -0
- package/dist/agent-src/commands/post-as.md +1 -0
- package/dist/agent-src/commands/pr/create/description-only.md +1 -0
- package/dist/agent-src/commands/pr/create.md +25 -0
- package/dist/agent-src/commands/prediction-pool.md +1 -0
- package/dist/agent-src/commands/prepare-for-review.md +1 -0
- package/dist/agent-src/commands/profile/activate.md +1 -0
- package/dist/agent-src/commands/profile/deactivate.md +1 -0
- package/dist/agent-src/commands/profile/show.md +1 -0
- package/dist/agent-src/commands/profile.md +1 -0
- package/dist/agent-src/commands/project-analyze.md +1 -0
- package/dist/agent-src/commands/project-health.md +1 -0
- package/dist/agent-src/commands/quality-fix.md +1 -0
- package/dist/agent-src/commands/refine-ticket.md +1 -0
- package/dist/agent-src/commands/research/deep.md +1 -0
- package/dist/agent-src/commands/research/report.md +1 -0
- package/dist/agent-src/commands/research.md +1 -0
- package/dist/agent-src/commands/review-changes.md +1 -0
- package/dist/agent-src/commands/review-routing.md +1 -0
- package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
- package/dist/agent-src/commands/roadmap/create.md +1 -0
- package/dist/agent-src/commands/roadmap/process-full.md +1 -0
- package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
- package/dist/agent-src/commands/roadmap/process-step.md +1 -0
- package/dist/agent-src/commands/roadmap.md +1 -0
- package/dist/agent-src/commands/rule-compliance-audit.md +1 -0
- package/dist/agent-src/commands/security-audit-config.md +84 -0
- package/dist/agent-src/commands/set-cost-profile.md +1 -0
- package/dist/agent-src/commands/skill/preview.md +1 -0
- package/dist/agent-src/commands/skill.md +1 -0
- package/dist/agent-src/commands/skills/discover.md +1 -0
- package/dist/agent-src/commands/skills.md +1 -0
- package/dist/agent-src/commands/sync-agent-settings.md +1 -0
- package/dist/agent-src/commands/sync-gitignore/fix.md +1 -0
- package/dist/agent-src/commands/sync-gitignore.md +1 -0
- package/dist/agent-src/commands/tests/create.md +1 -0
- package/dist/agent-src/commands/tests/execute.md +1 -0
- package/dist/agent-src/commands/tests.md +1 -0
- package/dist/agent-src/commands/threat-model.md +1 -0
- package/dist/agent-src/commands/update-form-request-messages.md +1 -0
- package/dist/agent-src/commands/upstream-contribute.md +1 -0
- package/dist/agent-src/commands/video/from-script.md +1 -0
- package/dist/agent-src/commands/video/from-song.md +1 -0
- package/dist/agent-src/commands/video/scene.md +1 -0
- package/dist/agent-src/commands/video/stitch.md +1 -0
- package/dist/agent-src/commands/video/storyboard.md +1 -0
- package/dist/agent-src/commands/video.md +1 -0
- package/dist/agent-src/commands/work.md +1 -0
- package/dist/agent-src/contexts/augment-infrastructure.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
- package/dist/agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +2 -2
- package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -6
- package/dist/agent-src/contexts/contracts/consumer-agents-md-guide.md +2 -2
- package/dist/agent-src/contexts/execution/rdp-gate.md +75 -0
- package/dist/agent-src/contexts/subagent-configuration.md +1 -0
- package/dist/agent-src/personas/advisors/contrarian.md +1 -1
- package/dist/agent-src/personas/advisors/executor.md +1 -1
- package/dist/agent-src/personas/advisors/expansionist.md +1 -1
- package/dist/agent-src/personas/advisors/first-principles.md +1 -1
- package/dist/agent-src/personas/advisors/outsider.md +1 -1
- package/dist/agent-src/rules/autonomous-execution.md +12 -0
- package/dist/agent-src/rules/external-reference-deep-dive.md +1 -1
- package/dist/agent-src/rules/git-history-discipline.md +47 -1
- package/dist/agent-src/rules/improve-before-implement.md +12 -0
- package/dist/agent-src/rules/lethal-trifecta-guard.md +80 -0
- package/dist/agent-src/rules/no-pr-progress-comments.md +3 -4
- package/dist/agent-src/rules/notes-first-reasoning.md +71 -0
- package/dist/agent-src/rules/roadmap-progress-sync.md +48 -31
- package/dist/agent-src/rules/security-sensitive-stop.md +14 -1
- package/dist/agent-src/rules/source-confidentiality.md +97 -0
- package/dist/agent-src/rules/think-before-action.md +9 -1
- package/dist/agent-src/rules/untrusted-input-defense.md +76 -0
- package/dist/agent-src/scripts/archive_completed_roadmaps.py +171 -0
- package/dist/agent-src/skills/adversarial-review/SKILL.md +14 -0
- package/dist/agent-src/skills/agent-security-review/SKILL.md +113 -0
- package/dist/agent-src/skills/agent-security-review/evals/triggers.json +51 -0
- package/dist/agent-src/skills/ai-council/SKILL.md +3 -3
- package/dist/agent-src/skills/async-python-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +12 -11
- package/dist/agent-src/skills/command-routing/SKILL.md +1 -1
- package/dist/agent-src/skills/complexity-first-planning/SKILL.md +96 -0
- package/dist/agent-src/skills/complexity-first-planning/evals/triggers.json +16 -0
- package/dist/agent-src/skills/copilot-config/SKILL.md +3 -4
- package/dist/agent-src/skills/defense-in-depth/SKILL.md +1 -1
- package/dist/agent-src/skills/developer-like-execution/SKILL.md +5 -4
- package/dist/agent-src/skills/error-handling-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/feature-planning/SKILL.md +2 -2
- package/dist/agent-src/skills/mcp-builder/SKILL.md +1 -1
- package/dist/agent-src/skills/memory-consolidation/SKILL.md +63 -17
- package/dist/agent-src/skills/prompt-engineering-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/readme-writing-package/SKILL.md +1 -1
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +119 -0
- package/dist/agent-src/skills/reasoning-orchestrator/evals/triggers.json +16 -0
- package/dist/agent-src/skills/receiving-code-review/SKILL.md +6 -6
- package/dist/agent-src/skills/refine-prompt/SKILL.md +1 -1
- package/dist/agent-src/skills/refine-ticket/SKILL.md +1 -1
- package/dist/agent-src/skills/repomix-packer/SKILL.md +1 -1
- package/dist/agent-src/skills/secrets-management/SKILL.md +1 -1
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +10 -3
- package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +1 -1
- package/dist/agent-src/skills/testing-anti-patterns/process-anti-patterns.md +1 -1
- package/dist/agent-src/skills/token-optimizer/SKILL.md +1 -1
- package/dist/agent-src/templates/agents/.gitattributes.fragment +0 -1
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +4 -4
- package/dist/agent-src/templates/scripts/check_memory.py +1 -2
- package/dist/agent-src/templates/scripts/check_memory_proposal.py +1 -1
- package/dist/agent-src/templates/scripts/memory_lookup.py +148 -289
- package/dist/agent-src/templates/scripts/memory_report.py +132 -2
- package/dist/agent-src/templates/scripts/memory_signal.py +7 -9
- package/dist/agent-src/templates/scripts/memory_status.py +25 -206
- package/dist/agent-src/templates/scripts/work_engine/directives/backend/memory.py +6 -6
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/_passthrough.py +3 -3
- package/dist/agent-src/templates/scripts/work_engine/scoring/memory_visibility.py +0 -1
- package/dist/cli/agent-config.js +31 -300
- package/dist/cli/agent-config.js.map +1 -1
- package/dist/cli/commands/commands.js +10 -5
- package/dist/cli/commands/commands.js.map +1 -1
- package/dist/cli/discovery/loadManifest.js.map +1 -1
- package/dist/cli/main.js +309 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +645 -342
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +8 -5
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +149 -37
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +61 -36
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/router.json +1 -1
- package/dist/server/routes/wizard.js +4 -3
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/server/schemas/settings.js +18 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/MIGRATION.md +1 -1
- package/docs/adrs/cost/0001-hard-stop-hook.md +5 -5
- package/docs/adrs/memory/0001-consumer-side-snapshot.md +15 -7
- package/docs/adrs/memory/README.md +6 -5
- package/docs/adrs/router/0001-three-tier-routing.md +2 -2
- package/docs/adrs/schema/0001-json-schema-frontmatter.md +2 -2
- package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +5 -5
- package/docs/adrs/telegraph/0001-default-off-until-bench.md +3 -3
- package/docs/architecture.md +9 -9
- package/docs/archive/CHANGELOG-pre-2.2.0.md +30 -30
- package/docs/archive/CHANGELOG-pre-2.25.0.md +1 -1
- package/docs/archive/CHANGELOG-pre-4.5.0.md +1 -1
- package/docs/archive/CHANGELOG-pre-6.0.0.md +473 -0
- package/docs/benchmark.md +54 -53
- package/docs/benchmarks.md +2 -2
- package/docs/case-studies/{frontend-design-vs-ui-ux-pro-max.md → frontend-design-positioning.md} +4 -4
- package/docs/catalog.md +20 -13
- package/docs/command-flows.md +90 -92
- package/docs/contracts/adr-layout.md +2 -3
- package/docs/contracts/adr-level-6-productization.md +1 -1
- package/docs/contracts/ai-council-config.md +42 -7
- package/docs/contracts/command-clusters.md +1 -1
- package/docs/contracts/cost-enforcement.md +1 -1
- package/docs/contracts/cost-summary-schema.md +1 -1
- package/docs/contracts/daily-workspace.md +1 -0
- package/docs/contracts/discovery-manifest.schema.json +4 -2
- package/docs/contracts/explain-modes.md +1 -1
- package/docs/contracts/implement-ticket-flow.md +6 -7
- package/docs/contracts/mcp-tool-inventory.md +10 -10
- package/docs/contracts/measurement-baseline.md +1 -1
- package/docs/contracts/memory-visibility-v1.md +1 -5
- package/docs/contracts/namespace.md +1 -1
- package/docs/contracts/persona-schema.md +1 -1
- package/docs/contracts/rule-interactions.md +1 -1
- package/docs/contracts/smoke-contracts.md +1 -1
- package/docs/contracts/universal-skills.md +0 -1
- package/docs/contracts/workspace-boundary.md +84 -0
- package/docs/customization.md +3 -3
- package/docs/decisions/ADR-009-event4u-namespace.md +1 -1
- package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +1 -1
- package/docs/decisions/ADR-026-explain-mode-translation.md +1 -1
- package/docs/decisions/ADR-088-no-external-runtime-federation.md +26 -27
- package/docs/decisions/ADR-090-visibility-command-frontmatter-field.md +95 -0
- package/docs/decisions/ADR-091-split-meta-capability-packs.md +113 -0
- package/docs/decisions/ADR-092-defer-command-tier-alias-removal.md +93 -0
- package/docs/decisions/ADR-093-ai-council-config-user-global.md +111 -0
- package/docs/decisions/ADR-094-agent-memory-layer-removal.md +94 -0
- package/docs/decisions/ADR-095-workspace-boundary-contract.md +108 -0
- package/docs/decisions/INDEX.md +6 -0
- package/docs/development.md +5 -7
- package/docs/getting-started.md +4 -4
- package/docs/guidelines/agent-infra/5w2h-analysis.md +1 -1
- package/docs/guidelines/agent-infra/comparison-matrix.md +1 -1
- package/docs/guidelines/agent-infra/corpus-grounding-authoring.md +1 -1
- package/docs/guidelines/agent-infra/critical-thinking.md +1 -1
- package/docs/guidelines/agent-infra/engineering-memory-data-format.md +1 -5
- package/docs/guidelines/agent-infra/first-principles.md +1 -1
- package/docs/guidelines/agent-infra/frontier-reasoning-operating-profile.md +164 -0
- package/docs/guidelines/agent-infra/inversion-thinking.md +1 -1
- package/docs/guidelines/agent-infra/ios-simulator-guide.md +9 -14
- package/docs/guidelines/agent-infra/mcp-request-signing.md +19 -22
- package/docs/guidelines/agent-infra/memory-access.md +25 -31
- package/docs/guidelines/agent-infra/mental-models.md +1 -1
- package/docs/guidelines/agent-infra/model-recommendation.md +29 -0
- package/docs/guidelines/agent-infra/scqa-framework.md +3 -3
- package/docs/guidelines/agent-infra/security-lint-containment.md +81 -0
- package/docs/guidelines/agent-infra/six-hats.md +1 -1
- package/docs/guidelines/agent-infra/systems-thinking.md +1 -1
- package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +72 -0
- package/docs/installation.md +1 -1
- package/docs/mcp.md +2 -2
- package/docs/parity/{bench-ruflo.json → bench-external.json} +10 -10
- package/docs/parity/{ruflo.md → external-runtime.md} +9 -9
- package/docs/quality.md +3 -3
- package/docs/safety.md +3 -3
- package/docs/skills-catalog.md +4 -1
- package/llms.txt +3 -0
- package/package.json +1 -1
- package/src/config/agent-settings.template.yml +65 -3
- package/src/config/discovery/packs.yml +29 -0
- package/src/config/discovery/workspaces.yml +3 -1
- package/src/config/gitignore-block.txt +6 -0
- package/src/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/src/scripts/_cli/cmd_doctor.py +99 -13
- package/src/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/src/scripts/_lib/bench_ab_scoring_v2.py +227 -0
- package/src/scripts/_lib/global_deploy_inventory.py +39 -9
- package/src/scripts/_lib/link_crypto.py +206 -0
- package/src/scripts/_lib/security_lint.py +228 -0
- package/src/scripts/ai_council/clients.py +2 -2
- package/src/scripts/ai_council/config.py +55 -0
- package/src/scripts/audit_adr_coverage.py +0 -2
- package/src/scripts/audit_command_surface.py +18 -5
- package/src/scripts/audit_mcp_tools.py +2 -2
- package/src/scripts/audit_skill_descriptions.py +2 -2
- package/src/scripts/bench_ab_clone.py +62 -12
- package/src/scripts/bench_ab_task_runner.py +475 -30
- package/src/scripts/bench_ab_v2_run.py +247 -0
- package/src/scripts/bench_ab_v2_stats.py +347 -0
- package/src/scripts/bench_run.py +1 -1
- package/src/scripts/build_discovery_manifest.py +10 -0
- package/src/scripts/check_bite_sized_granularity.py +1 -2
- package/src/scripts/check_memory.py +49 -63
- package/src/scripts/check_memory_proposal.py +1 -1
- package/src/scripts/check_no_external_sources.py +101 -0
- package/src/scripts/check_references.py +2 -0
- package/src/scripts/cost_by_conversation.py +1 -1
- package/src/scripts/council_cli.py +28 -14
- package/src/scripts/external_sources_denylist.json +91 -0
- package/src/scripts/hook_manifest.yaml +14 -6
- package/src/scripts/injection_scan_hook.py +145 -0
- package/src/scripts/install-hooks.sh +11 -0
- package/src/scripts/install.py +88 -13
- package/src/scripts/lint_agent_security.py +112 -0
- package/src/scripts/lint_bench_ab.py +5 -4
- package/src/scripts/lint_command_tiers.py +63 -22
- package/src/scripts/lint_discovery_vocabulary.py +2 -0
- package/src/scripts/lint_empty_roadmaps.py +80 -0
- package/src/scripts/lint_hidden_unicode.py +132 -0
- package/src/scripts/lint_instruction_smuggling.py +107 -0
- package/src/scripts/lint_marketplace.py +1 -1
- package/src/scripts/lint_mcp_config_security.py +124 -0
- package/src/scripts/lint_skill_frontmatter_safety.py +144 -0
- package/src/scripts/lint_workspace_boundary.py +122 -0
- package/src/scripts/mcp_server/consumer_tool_catalog.json +2 -3
- package/src/scripts/mcp_server/tools.py +8 -32
- package/src/scripts/memory_lookup.py +27 -296
- package/src/scripts/memory_report.py +1 -23
- package/src/scripts/memory_signal.py +6 -53
- package/src/scripts/memory_status.py +25 -206
- package/src/scripts/mine_session.py +118 -41
- package/src/scripts/pack_dependency_allowlist.json +2 -2
- package/src/scripts/render_benchmark_md.py +141 -52
- package/src/scripts/schemas/command.schema.json +6 -1
- package/src/scripts/security_audit_config.py +153 -0
- package/dist/agent-src/commands/chat-history/learn.md +0 -184
- package/dist/agent-src/commands/chat-history/show.md +0 -113
- package/dist/agent-src/commands/fix/pr-bot-comments.md +0 -157
- package/dist/agent-src/commands/fix/pr-developer-comments.md +0 -163
- package/dist/agent-src/templates/agents/memory/architecture-decisions.example.yml +0 -95
- package/docs/contracts/agent-memory-contract.md +0 -159
|
@@ -50,8 +50,8 @@ REQUIRED_KEYS = {
|
|
|
50
50
|
VALID_STATUS = {"active", "deprecated", "archived"}
|
|
51
51
|
VALID_CONFIDENCE = {"low", "medium", "high"}
|
|
52
52
|
# `priority` is optional (default `normal`); enum is the smallest set that
|
|
53
|
-
# solves the tier-0 surfacing use case. See
|
|
54
|
-
#
|
|
53
|
+
# solves the tier-0 surfacing use case. See the Phase 2 council brief for why
|
|
54
|
+
# the `high` tier was rejected.
|
|
55
55
|
VALID_PRIORITY = {"critical", "normal", "low"}
|
|
56
56
|
# Soft-cap on `priority: critical` entries per memory type. Tier-0 inflation
|
|
57
57
|
# is the failure mode: when too many entries claim "always surface", the
|
|
@@ -63,10 +63,29 @@ CRITICAL_WARN_THRESHOLD = 10
|
|
|
63
63
|
# from the generic `stale:` info so reviewers see it before merge.
|
|
64
64
|
CRITICAL_STALE_DAYS = 90
|
|
65
65
|
KNOWN_TYPES = {
|
|
66
|
-
"domain-invariants", "
|
|
67
|
-
"incident-learnings", "product-rules",
|
|
66
|
+
"domain-invariants", "incident-learnings", "product-rules",
|
|
68
67
|
}
|
|
69
68
|
|
|
69
|
+
# Per-type soft entry cap (size-bounding without a decay engine). Over-cap →
|
|
70
|
+
# warning, never a hard fail: the right answer to bloat is a consolidation pass
|
|
71
|
+
# (prune archived, merge duplicates), not CI failure. See
|
|
72
|
+
# road-to-memory-pipeline-consolidation.md Phase 7.
|
|
73
|
+
PER_TYPE_CAPS = {
|
|
74
|
+
"ownership": 50,
|
|
75
|
+
"domain-invariants": 150,
|
|
76
|
+
"product-rules": 100,
|
|
77
|
+
"incident-learnings": 150,
|
|
78
|
+
"historical-patterns": 150,
|
|
79
|
+
}
|
|
80
|
+
DEFAULT_TYPE_CAP = 150
|
|
81
|
+
# One-durable-fact-per-entry: a content field longer than this reads as a
|
|
82
|
+
# transcript / narrative blob, not a single durable fact → warning.
|
|
83
|
+
ONE_FACT_MAX_CHARS = 600
|
|
84
|
+
ONE_FACT_FIELDS = ("rule", "pattern", "statement", "observation",
|
|
85
|
+
"body", "decision", "note")
|
|
86
|
+
# Per-type entry tally, populated during validation, consumed by main().
|
|
87
|
+
_TYPE_COUNTS: dict = {}
|
|
88
|
+
|
|
70
89
|
# Redaction heuristics — plain-regex, deliberately conservative.
|
|
71
90
|
# False positives are fixed by quoting the line differently; false
|
|
72
91
|
# negatives are a curator responsibility.
|
|
@@ -85,7 +104,7 @@ REDACTION_PATTERNS = [
|
|
|
85
104
|
# Date-discipline — relative-date phrases without an ISO YYYY-MM-DD anchor
|
|
86
105
|
# within ±20 chars are rejected. Memory entries that say "yesterday" or
|
|
87
106
|
# "last week" rot the moment the file is re-read on another day; the
|
|
88
|
-
# anchor pins meaning.
|
|
107
|
+
# anchor pins meaning.
|
|
89
108
|
RELATIVE_DATE_PATTERN = re.compile(
|
|
90
109
|
r"(?i)\b(yesterday|today|tomorrow|"
|
|
91
110
|
r"last\s+(?:week|month|year)|"
|
|
@@ -186,11 +205,26 @@ def _validate_entry(
|
|
|
186
205
|
str(path), 0, "warning",
|
|
187
206
|
f"critical-stale: last_validated {crit_age} days ago "
|
|
188
207
|
f"(critical SLA is {CRITICAL_STALE_DAYS} days)", eid))
|
|
208
|
+
# One-durable-fact-per-entry: reject transcript/narrative blobs. A single
|
|
209
|
+
# content field over ONE_FACT_MAX_CHARS is the bloat signal.
|
|
210
|
+
for fld in ONE_FACT_FIELDS:
|
|
211
|
+
val = entry.get(fld)
|
|
212
|
+
if isinstance(val, str) and len(val) > ONE_FACT_MAX_CHARS:
|
|
213
|
+
findings.append(Finding(
|
|
214
|
+
str(path), 0, "warning",
|
|
215
|
+
f"one-fact: `{fld}` is {len(val)} chars (limit "
|
|
216
|
+
f"{ONE_FACT_MAX_CHARS}) — split into separate durable facts, "
|
|
217
|
+
f"not a narrative blob", eid))
|
|
218
|
+
break
|
|
189
219
|
# Tier-0 inflation tracking — increment per memory type. The aggregate
|
|
190
220
|
# warning is emitted in main() after all files are validated.
|
|
191
221
|
if critical_counts is not None and priority == "critical" and entry.get("status") == "active":
|
|
192
222
|
mtype = _memory_type(path)
|
|
193
223
|
critical_counts[mtype] = critical_counts.get(mtype, 0) + 1
|
|
224
|
+
# Per-type entry-count tracking — aggregate cap warning in main().
|
|
225
|
+
if critical_counts is not None:
|
|
226
|
+
mt = _memory_type(path)
|
|
227
|
+
_TYPE_COUNTS[mt] = _TYPE_COUNTS.get(mt, 0) + 1
|
|
194
228
|
|
|
195
229
|
|
|
196
230
|
def _check_redaction(path: Path, findings: List[Finding]):
|
|
@@ -326,59 +360,6 @@ def _check_append_only(base: Optional[str], findings: List[Finding]) -> None:
|
|
|
326
360
|
f"line(s) removed or modified (ref={ref})"))
|
|
327
361
|
|
|
328
362
|
|
|
329
|
-
def _shadow_report(fmt: str) -> int:
|
|
330
|
-
"""Report per-type shadow counts from the conflict rule.
|
|
331
|
-
|
|
332
|
-
Ships today as scaffolding: without a wired operational backend the
|
|
333
|
-
counts are all zero (there is nothing on the operational side to
|
|
334
|
-
suppress). Once agent-memory is present locally, re-running this
|
|
335
|
-
command will surface real shadows under the same shape — so the
|
|
336
|
-
downstream consumer (dashboards, weekly cron) never changes.
|
|
337
|
-
"""
|
|
338
|
-
# Inline import so `check_memory.py` stays importable when someone
|
|
339
|
-
# runs it on a tree without scripts/ on sys.path (e.g., packaging).
|
|
340
|
-
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
341
|
-
from scripts.memory_lookup import CURATED_TYPES, RetrievalResult, retrieve
|
|
342
|
-
|
|
343
|
-
per_type: dict = {}
|
|
344
|
-
total_shadows = 0
|
|
345
|
-
for mtype in sorted(CURATED_TYPES):
|
|
346
|
-
result = retrieve(types=[mtype], keys=[], limit=1000, with_shadows=True)
|
|
347
|
-
assert isinstance(result, RetrievalResult)
|
|
348
|
-
per_type[mtype] = {
|
|
349
|
-
"hits": len(result.hits),
|
|
350
|
-
"shadows": len(result.shadows),
|
|
351
|
-
}
|
|
352
|
-
total_shadows += len(result.shadows)
|
|
353
|
-
|
|
354
|
-
# Best-effort backend-status probe — avoid a hard dependency on
|
|
355
|
-
# memory_status.py in case it is absent.
|
|
356
|
-
backend = "unknown"
|
|
357
|
-
try:
|
|
358
|
-
from scripts.memory_status import status as _memory_status # type: ignore
|
|
359
|
-
backend = _memory_status().status
|
|
360
|
-
except Exception: # noqa: BLE001
|
|
361
|
-
pass
|
|
362
|
-
|
|
363
|
-
if fmt == "json":
|
|
364
|
-
print(json.dumps({
|
|
365
|
-
"backend": backend,
|
|
366
|
-
"total_shadows": total_shadows,
|
|
367
|
-
"per_type": per_type,
|
|
368
|
-
}, indent=2))
|
|
369
|
-
return 0
|
|
370
|
-
|
|
371
|
-
print(f"Shadow report — backend: {backend}")
|
|
372
|
-
print(f" Total operational entries shadowed: {total_shadows}")
|
|
373
|
-
for mtype, stats in per_type.items():
|
|
374
|
-
print(f" {mtype:25s} hits={stats['hits']:>4} "
|
|
375
|
-
f"shadows={stats['shadows']}")
|
|
376
|
-
if backend == "absent":
|
|
377
|
-
print("\n ℹ️ operational backend absent — shadow counts will "
|
|
378
|
-
"stay zero until @event4u/agent-memory is installed.")
|
|
379
|
-
return 0
|
|
380
|
-
|
|
381
|
-
|
|
382
363
|
def main() -> int:
|
|
383
364
|
ap = argparse.ArgumentParser(description=__doc__)
|
|
384
365
|
ap.add_argument("--path", default="agents/memory", help="Root path to scan")
|
|
@@ -388,12 +369,7 @@ def main() -> int:
|
|
|
388
369
|
"via git diff against the base ref")
|
|
389
370
|
ap.add_argument("--base", default=None,
|
|
390
371
|
help="Base ref for --append-only (default: GITHUB_BASE_REF or origin/main)")
|
|
391
|
-
ap.add_argument("--shadow-report", action="store_true",
|
|
392
|
-
help="Report per-type shadow counts from the repo-vs-operational "
|
|
393
|
-
"conflict rule (observability scaffolding for weekly cron)")
|
|
394
372
|
args = ap.parse_args()
|
|
395
|
-
if args.shadow_report:
|
|
396
|
-
return _shadow_report(args.format)
|
|
397
373
|
root = Path(args.path)
|
|
398
374
|
findings: List[Finding] = []
|
|
399
375
|
if args.append_only:
|
|
@@ -408,6 +384,7 @@ def main() -> int:
|
|
|
408
384
|
print(f"ℹ️ {root} not found — nothing to validate")
|
|
409
385
|
return 0
|
|
410
386
|
critical_counts: dict = {}
|
|
387
|
+
_TYPE_COUNTS.clear()
|
|
411
388
|
for yml in sorted(root.rglob("*.yml")):
|
|
412
389
|
_validate_file(yml, findings, critical_counts)
|
|
413
390
|
# Tier-0 inflation warning — soft cap on `priority: critical` per type.
|
|
@@ -420,6 +397,15 @@ def main() -> int:
|
|
|
420
397
|
f"tier-0 inflation: {count} active 'priority: critical' "
|
|
421
398
|
f"entries (threshold {CRITICAL_WARN_THRESHOLD}) — review "
|
|
422
399
|
f"whether all still warrant always-surface treatment"))
|
|
400
|
+
# Per-type entry-count cap (size-bounding, Phase 7). Warn, never block —
|
|
401
|
+
# over-cap signals a consolidation pass is due (prune archived, merge dups).
|
|
402
|
+
for mtype, count in sorted(_TYPE_COUNTS.items()):
|
|
403
|
+
cap = PER_TYPE_CAPS.get(mtype, DEFAULT_TYPE_CAP)
|
|
404
|
+
if count > cap:
|
|
405
|
+
findings.append(Finding(
|
|
406
|
+
f"agents/memory/{mtype}", 0, "warning",
|
|
407
|
+
f"entry-cap: {count} entries (soft cap {cap}) — run a "
|
|
408
|
+
f"consolidation pass (prune archived, merge duplicates)"))
|
|
423
409
|
return _emit(findings, args.format)
|
|
424
410
|
|
|
425
411
|
|
|
@@ -36,7 +36,7 @@ from typing import Any
|
|
|
36
36
|
INTAKE_ROOT = Path("agents/memory/intake")
|
|
37
37
|
VALID_TYPES = {
|
|
38
38
|
"historical-patterns", "incident-learnings", "ownership",
|
|
39
|
-
"domain-invariants", "
|
|
39
|
+
"domain-invariants", "product-rules",
|
|
40
40
|
}
|
|
41
41
|
REQUIRED_INTAKE = ("id", "entry_type", "path", "body")
|
|
42
42
|
PATTERN_MIN_PATHS = 2
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""check_no_external_sources — block readable inspiration/harvest source names.
|
|
3
|
+
|
|
4
|
+
Backstop for the source-confidentiality policy (rule: source-confidentiality;
|
|
5
|
+
the 2026-06-13 sweep). Scans the **tracked** tree for a denylist of external
|
|
6
|
+
inspiration / harvest / comparison source slugs so they cannot re-enter the
|
|
7
|
+
repo by accident. Recommending an integrated tool is allowed; recording that
|
|
8
|
+
we copied / derived / were-inspired-by a named external source is not.
|
|
9
|
+
|
|
10
|
+
Carve-outs (see external_sources_denylist.json):
|
|
11
|
+
- Vendored Apache/MIT code keeps its license-required attribution.
|
|
12
|
+
- Recommendation/registry docs may name registries (Smithery/Glama).
|
|
13
|
+
- A retained source link must be stored encrypted via
|
|
14
|
+
src/scripts/_lib/link_crypto.py, never in plaintext.
|
|
15
|
+
|
|
16
|
+
Exit codes: 0 = clean, 1 = at least one denied token in a non-skipped tracked
|
|
17
|
+
file, 2 = usage / config error.
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
python3 src/scripts/check_no_external_sources.py [--json]
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
import fnmatch
|
|
26
|
+
import json
|
|
27
|
+
import re
|
|
28
|
+
import subprocess
|
|
29
|
+
import sys
|
|
30
|
+
from pathlib import Path
|
|
31
|
+
|
|
32
|
+
ROOT = Path(__file__).resolve().parents[2]
|
|
33
|
+
CONFIG = Path(__file__).with_name("external_sources_denylist.json")
|
|
34
|
+
# Scan only text-ish files; skip binaries / lockfiles / images.
|
|
35
|
+
_SKIP_EXT = {
|
|
36
|
+
".png", ".jpg", ".jpeg", ".gif", ".webp", ".ico", ".pdf", ".zip", ".gz",
|
|
37
|
+
".woff", ".woff2", ".ttf", ".mp3", ".mp4", ".wav", ".lock",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _tracked_files() -> list[str]:
|
|
42
|
+
out = subprocess.run(
|
|
43
|
+
["git", "ls-files"], cwd=ROOT, capture_output=True, text=True, check=True
|
|
44
|
+
).stdout
|
|
45
|
+
return [line for line in out.splitlines() if line]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _load_config() -> dict:
|
|
49
|
+
data = json.loads(CONFIG.read_text(encoding="utf-8"))
|
|
50
|
+
if not data.get("deny"):
|
|
51
|
+
raise SystemExit("config error: empty deny list")
|
|
52
|
+
return data
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _skipped(path: str, skip_globs: list[str]) -> bool:
|
|
56
|
+
return any(fnmatch.fnmatch(path, g) for g in skip_globs)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def main(argv: list[str]) -> int:
|
|
60
|
+
as_json = "--json" in argv
|
|
61
|
+
cfg = _load_config()
|
|
62
|
+
patterns = [(p, re.compile(p, re.IGNORECASE)) for p in cfg["deny"]]
|
|
63
|
+
skip_globs = cfg.get("skip_paths", [])
|
|
64
|
+
|
|
65
|
+
hits: list[dict] = []
|
|
66
|
+
for rel in _tracked_files():
|
|
67
|
+
if Path(rel).suffix.lower() in _SKIP_EXT:
|
|
68
|
+
continue
|
|
69
|
+
if _skipped(rel, skip_globs):
|
|
70
|
+
continue
|
|
71
|
+
try:
|
|
72
|
+
text = (ROOT / rel).read_text(encoding="utf-8", errors="replace")
|
|
73
|
+
except (OSError, IsADirectoryError):
|
|
74
|
+
continue
|
|
75
|
+
for lineno, line in enumerate(text.splitlines(), start=1):
|
|
76
|
+
for raw, rx in patterns:
|
|
77
|
+
if rx.search(line):
|
|
78
|
+
hits.append({"file": rel, "line": lineno, "token": raw,
|
|
79
|
+
"text": line.strip()[:160]})
|
|
80
|
+
|
|
81
|
+
if as_json:
|
|
82
|
+
print(json.dumps({"ok": not hits, "hits": hits}, indent=2))
|
|
83
|
+
else:
|
|
84
|
+
if hits:
|
|
85
|
+
print(f"❌ {len(hits)} external-source reference(s) in the tracked tree:\n")
|
|
86
|
+
for h in hits:
|
|
87
|
+
print(f" {h['file']}:{h['line']} [{h['token']}] {h['text']}")
|
|
88
|
+
print(
|
|
89
|
+
"\nThese name an external inspiration/harvest source. Remove the name,\n"
|
|
90
|
+
"or — if a real source link must be retained — encrypt it via\n"
|
|
91
|
+
"src/scripts/_lib/link_crypto.py. Legitimate carve-outs (vendored code,\n"
|
|
92
|
+
"registry recommendations) belong in external_sources_denylist.json\n"
|
|
93
|
+
"skip_paths. See rule: source-confidentiality."
|
|
94
|
+
)
|
|
95
|
+
else:
|
|
96
|
+
print("✅ No external inspiration-source references in the tracked tree.")
|
|
97
|
+
return 1 if hits else 0
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
if __name__ == "__main__":
|
|
101
|
+
raise SystemExit(main(sys.argv[1:]))
|
|
@@ -43,6 +43,7 @@ SKIP_DIRS = [
|
|
|
43
43
|
"agents/roadmaps/skipped", # skipped roadmaps — abandoned plans w/ forward-refs that never shipped
|
|
44
44
|
"agents/runtime", # volatile / machine-generated artefacts (gitignored)
|
|
45
45
|
"agents/tmp", # transient working docs (gitignored) — pr-bodies, council questions, manual-step scratchpads
|
|
46
|
+
"agents/.harvest-local", # deliberate gitignored evidence store (source-confidentiality) — refs to it can never resolve in CI
|
|
46
47
|
]
|
|
47
48
|
|
|
48
49
|
# Per-file opt-out marker. When present in the first 10 lines of a .md
|
|
@@ -117,6 +118,7 @@ EXAMPLE_PATH_PATTERNS = [
|
|
|
117
118
|
re.compile(r"agents/proposals/"), # consumer-project self-improvement proposals
|
|
118
119
|
re.compile(r"agents/drafts/"), # consumer-project artefact drafts
|
|
119
120
|
re.compile(r"agents/\.event4u-bridge\.yml"), # consumer-project bridge marker (ADR-020)
|
|
121
|
+
re.compile(r"agents/\.harvest-local/"), # gitignored harvest-evidence store (source-confidentiality)
|
|
120
122
|
re.compile(r"guidelines/php-"), # flattened override naming convention
|
|
121
123
|
re.compile(r"rules/no-commit"), # example rule in commands
|
|
122
124
|
re.compile(r"skills/[\w-]+\.md"), # short skill refs in examples (not SKILL.md path)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Group cost-tracking sessions by conversation_id (
|
|
2
|
+
"""Group cost-tracking sessions by conversation_id (the external runtime `conversation.mjs` `5b71c7a` ref)."""
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
import argparse, json, sys
|
|
5
5
|
from collections import defaultdict
|
|
@@ -35,13 +35,21 @@ import yaml
|
|
|
35
35
|
# the council operates on: when invoked via the global `agent-config`
|
|
36
36
|
# wrapper from a consumer project it is that project (anchor-walked from
|
|
37
37
|
# CWD, or pinned via AGENT_CONFIG_PROJECT_ROOT / --root), NOT the package
|
|
38
|
-
# install dir.
|
|
39
|
-
#
|
|
40
|
-
# `council
|
|
38
|
+
# install dir.
|
|
39
|
+
#
|
|
40
|
+
# `AI_COUNCIL_FILE` is the council config the CLI reads. Resolution is
|
|
41
|
+
# user-global-first (see `resolve_config_path`): an explicit
|
|
42
|
+
# `$AI_COUNCIL_CONFIG` wins, else a project-local
|
|
43
|
+
# `agents/settings/.ai-council.yml` if checked in, else the canonical
|
|
44
|
+
# per-user `~/.event4u/agent-config/settings/.ai-council.yml`. A single developer
|
|
45
|
+
# configures the council once globally and it applies in every project —
|
|
46
|
+
# the project no longer needs (or should keep) its own copy.
|
|
41
47
|
PACKAGE_ROOT = Path(__file__).resolve().parents[1]
|
|
42
48
|
REPO_ROOT, _ = resolve_project_root(None)
|
|
43
49
|
SETTINGS_FILE = project_settings_path(REPO_ROOT)
|
|
44
|
-
AI_COUNCIL_FILE
|
|
50
|
+
# `AI_COUNCIL_FILE` is resolved below, after `sys.path` is set up and
|
|
51
|
+
# `resolve_config_path` is importable (it lives in `scripts.ai_council.config`,
|
|
52
|
+
# which itself imports `scripts._lib`).
|
|
45
53
|
|
|
46
54
|
# Canonical output dirs per ai-council § "Output path convention".
|
|
47
55
|
# Enforced at write-time by `_validate_council_output_path` so shell-side
|
|
@@ -97,8 +105,14 @@ from scripts.ai_council.advisors import ( # noqa: E402
|
|
|
97
105
|
from scripts.ai_council.cli_hints import format_install_hints # noqa: E402
|
|
98
106
|
from scripts.ai_council.config import ( # noqa: E402
|
|
99
107
|
AdvisorConfig, CouncilConfig, CouncilConfigError,
|
|
100
|
-
load_council_config, resolve_api_key,
|
|
108
|
+
load_council_config, resolve_api_key, resolve_config_path,
|
|
101
109
|
)
|
|
110
|
+
|
|
111
|
+
# User-global-first resolution: explicit `$AI_COUNCIL_CONFIG`, else a
|
|
112
|
+
# project-local `agents/settings/.ai-council.yml`, else the canonical
|
|
113
|
+
# `~/.event4u/agent-config/settings/.ai-council.yml`. Computed here (not at the
|
|
114
|
+
# REPO_ROOT block above) so `resolve_config_path` is importable.
|
|
115
|
+
AI_COUNCIL_FILE = resolve_config_path(REPO_ROOT) # noqa: E402
|
|
102
116
|
from scripts.ai_council.solo_dispatch import ( # noqa: E402
|
|
103
117
|
AuthCache, select_solo_member,
|
|
104
118
|
)
|
|
@@ -517,7 +531,7 @@ def _construct_api_member(
|
|
|
517
531
|
if name == "gemini":
|
|
518
532
|
if not api_key_ref:
|
|
519
533
|
raise CouncilDisabledError(
|
|
520
|
-
"member 'gemini' requires api_key_ref in
|
|
534
|
+
"member 'gemini' requires api_key_ref in ~/.event4u/agent-config/settings/.ai-council.yml "
|
|
521
535
|
"(e.g. `env:GEMINI_API_KEY`) — no legacy fallback."
|
|
522
536
|
)
|
|
523
537
|
api_key = resolve_api_key(api_key_ref, scope="ai_council.members.gemini")
|
|
@@ -525,7 +539,7 @@ def _construct_api_member(
|
|
|
525
539
|
if name == "xai":
|
|
526
540
|
if not api_key_ref:
|
|
527
541
|
raise CouncilDisabledError(
|
|
528
|
-
"member 'xai' requires api_key_ref in
|
|
542
|
+
"member 'xai' requires api_key_ref in ~/.event4u/agent-config/settings/.ai-council.yml "
|
|
529
543
|
"(e.g. `env:XAI_API_KEY`) — no legacy fallback."
|
|
530
544
|
)
|
|
531
545
|
api_key = resolve_api_key(api_key_ref, scope="ai_council.members.xai")
|
|
@@ -533,7 +547,7 @@ def _construct_api_member(
|
|
|
533
547
|
if name == "perplexity":
|
|
534
548
|
if not api_key_ref:
|
|
535
549
|
raise CouncilDisabledError(
|
|
536
|
-
"member 'perplexity' requires api_key_ref in
|
|
550
|
+
"member 'perplexity' requires api_key_ref in ~/.event4u/agent-config/settings/.ai-council.yml "
|
|
537
551
|
"(e.g. `env:PERPLEXITY_API_KEY`) — no legacy fallback."
|
|
538
552
|
)
|
|
539
553
|
api_key = resolve_api_key(api_key_ref, scope="ai_council.members.perplexity")
|
|
@@ -1054,7 +1068,7 @@ def _emit_debate_estimate(
|
|
|
1054
1068
|
if requested > max_rounds_cap:
|
|
1055
1069
|
raise argparse.ArgumentTypeError(
|
|
1056
1070
|
f"--rounds={requested} exceeds debate_max_rounds={max_rounds_cap}; "
|
|
1057
|
-
f"raise the cap in
|
|
1071
|
+
f"raise the cap in ~/.event4u/agent-config/settings/.ai-council.yml or lower --rounds."
|
|
1058
1072
|
)
|
|
1059
1073
|
rounds = requested
|
|
1060
1074
|
per_round_usd = sum(e.total_usd for e in estimates)
|
|
@@ -1613,7 +1627,7 @@ def cmd_run(
|
|
|
1613
1627
|
# Phase 8 step 5 — opt-in cost disclosure for non-debate lenses.
|
|
1614
1628
|
# Default mode is "off" for analysis / default (cheap enough that
|
|
1615
1629
|
# the disclosure is friction); users opt in by setting
|
|
1616
|
-
# `lenses.<name>.cost_disclosure.mode` in
|
|
1630
|
+
# `lenses.<name>.cost_disclosure.mode` in ~/.event4u/agent-config/settings/.ai-council.yml.
|
|
1617
1631
|
disc_mode, disc_threshold, disc_show = _resolve_cost_disclosure(
|
|
1618
1632
|
ai_cfg, question.mode,
|
|
1619
1633
|
)
|
|
@@ -1902,7 +1916,7 @@ def cmd_debate(
|
|
|
1902
1916
|
if requested > max_rounds_cap:
|
|
1903
1917
|
raise argparse.ArgumentTypeError(
|
|
1904
1918
|
f"--rounds={requested} exceeds debate_max_rounds={max_rounds_cap}; "
|
|
1905
|
-
f"raise the cap in
|
|
1919
|
+
f"raise the cap in ~/.event4u/agent-config/settings/.ai-council.yml or lower --rounds."
|
|
1906
1920
|
)
|
|
1907
1921
|
rounds = requested
|
|
1908
1922
|
|
|
@@ -1959,7 +1973,7 @@ def cmd_debate(
|
|
|
1959
1973
|
f"❌ council:debate refused · high-end estimate "
|
|
1960
1974
|
f"${debate_estimate.high_usd:.4f} exceeds "
|
|
1961
1975
|
f"debate.max_cost_usd=${cap:.2f}. Lower --rounds, drop "
|
|
1962
|
-
f"members, or raise the cap in
|
|
1976
|
+
f"members, or raise the cap in ~/.event4u/agent-config/settings/.ai-council.yml.\n"
|
|
1963
1977
|
)
|
|
1964
1978
|
return 4
|
|
1965
1979
|
|
|
@@ -2275,7 +2289,7 @@ def _add_common_input_args(p: argparse.ArgumentParser) -> None:
|
|
|
2275
2289
|
"(anonymised) responses for blind spots before "
|
|
2276
2290
|
"synthesis. Adds N extra API calls. Opt-in per the "
|
|
2277
2291
|
"R2 verdict; also accepts ai_council.peer_review."
|
|
2278
|
-
"enabled: true in
|
|
2292
|
+
"enabled: true in ~/.event4u/agent-config/settings/.ai-council.yml.")
|
|
2279
2293
|
|
|
2280
2294
|
|
|
2281
2295
|
def cmd_shadow_report(args: argparse.Namespace) -> int:
|
|
@@ -2422,7 +2436,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
2422
2436
|
help="Required to actually start the debate.")
|
|
2423
2437
|
p_deb.add_argument("--rounds", type=int, default=None,
|
|
2424
2438
|
help="Number of debate rounds (default 2). Capped by "
|
|
2425
|
-
"ai_council.debate_max_rounds in
|
|
2439
|
+
"ai_council.debate_max_rounds in ~/.event4u/agent-config/settings/.ai-council.yml.")
|
|
2426
2440
|
p_deb.add_argument("--auto-continue", action="store_true",
|
|
2427
2441
|
default=False, dest="auto_continue",
|
|
2428
2442
|
help="Skip the between-round y/N prompt. The hard cap "
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_README": "Denylist for check_no_external_sources.py — blocks readable inspiration/harvest/comparison source names from re-entering the tracked tree. See rule source-confidentiality + the 2026-06-13 source-confidentiality sweep. Recommending an integrated tool is allowed; recording that we copied/derived/were-inspired-by an external source is not. To intentionally retain a source link, encrypt it via src/scripts/_lib/link_crypto.py.",
|
|
3
|
+
"deny": [
|
|
4
|
+
"kdcllc",
|
|
5
|
+
"\\bmicrock\\b",
|
|
6
|
+
"obra/superpowers",
|
|
7
|
+
"composiohq",
|
|
8
|
+
"ordinary-claude-skills",
|
|
9
|
+
"ruvnet",
|
|
10
|
+
"\\bruflo\\b",
|
|
11
|
+
"nextlevelbuilder",
|
|
12
|
+
"juliusbrussee",
|
|
13
|
+
"\\bcaveman\\b",
|
|
14
|
+
"tenfoldmarc",
|
|
15
|
+
"grandamenium",
|
|
16
|
+
"ginobefun",
|
|
17
|
+
"deep-reading-analyst-skill",
|
|
18
|
+
"dustdustpy",
|
|
19
|
+
"aaddrick",
|
|
20
|
+
"gammalabtechnologies",
|
|
21
|
+
"\\bharmonist\\b",
|
|
22
|
+
"mhattingpete",
|
|
23
|
+
"claude-skills-marketplace",
|
|
24
|
+
"dongitran",
|
|
25
|
+
"coreyhaines",
|
|
26
|
+
"marketingskills",
|
|
27
|
+
"neolabhq",
|
|
28
|
+
"context-engineering-kit",
|
|
29
|
+
"anthropics/skills",
|
|
30
|
+
"anthropics/knowledge-work-plugins",
|
|
31
|
+
"bmad-method",
|
|
32
|
+
"spec-kit",
|
|
33
|
+
"awesome-copilot",
|
|
34
|
+
"alirezarezvani",
|
|
35
|
+
"conorluddy",
|
|
36
|
+
"ios-simulator-skill",
|
|
37
|
+
"anton-abyzov",
|
|
38
|
+
"\\bspecweave\\b",
|
|
39
|
+
"aj-geddes",
|
|
40
|
+
"jezweb",
|
|
41
|
+
"ui-ux-pro-max",
|
|
42
|
+
"\\bdeepscan\\b",
|
|
43
|
+
"\\bhoodini\\b",
|
|
44
|
+
"dream-skill",
|
|
45
|
+
"\\bsmithery\\b",
|
|
46
|
+
"claudekit",
|
|
47
|
+
"affaan-m",
|
|
48
|
+
"agency-agents",
|
|
49
|
+
"msitarzewski",
|
|
50
|
+
"610ClaudeSubagents",
|
|
51
|
+
"ChrisRoyse"
|
|
52
|
+
],
|
|
53
|
+
"skip_paths": [
|
|
54
|
+
"src/scripts/check_no_external_sources.py",
|
|
55
|
+
"src/scripts/external_sources_denylist.json",
|
|
56
|
+
"src/skills/design-intelligence/*",
|
|
57
|
+
"src/skills/corpus-grounding/*",
|
|
58
|
+
"src/skills/design-tokens/*",
|
|
59
|
+
"src/skills/react-shadcn-ui/*",
|
|
60
|
+
"src/skills/tailwind-engineer/*",
|
|
61
|
+
"src/scripts/cost/*",
|
|
62
|
+
"src/scripts/validate_safe_paths.py",
|
|
63
|
+
"dist/agent-src/skills/design-intelligence/*",
|
|
64
|
+
"dist/agent-src/skills/corpus-grounding/*",
|
|
65
|
+
"dist/agent-src/skills/design-tokens/*",
|
|
66
|
+
"dist/agent-src/skills/react-shadcn-ui/*",
|
|
67
|
+
"dist/agent-src/skills/tailwind-engineer/*",
|
|
68
|
+
"docs/decisions/ADR-061-corpus-grounding-layer.md",
|
|
69
|
+
"docs/decisions/ADR-086-read-only-cross-agent-mcp-discovery-helper.md",
|
|
70
|
+
"docs/mcp.md",
|
|
71
|
+
"docs/mcp-registries.md",
|
|
72
|
+
"docs/DISTRIBUTION_CHECKLIST.md",
|
|
73
|
+
"src/templates/marketing-copy.yml",
|
|
74
|
+
"internal/workers/mcp/content.json",
|
|
75
|
+
"internal/workers/mcp/content.json.gz",
|
|
76
|
+
"internal/workers/mcp/manifest.json",
|
|
77
|
+
"src/rules/source-confidentiality.md",
|
|
78
|
+
"dist/agent-src/rules/source-confidentiality.md"
|
|
79
|
+
],
|
|
80
|
+
"skip_reason": {
|
|
81
|
+
"vendored_cluster": "design-intelligence/corpus-grounding/design-tokens/react-shadcn-ui/tailwind-engineer + cost/*.mjs ship vendored Apache/MIT code; their upstream attribution is license-required and must NOT be stripped (ADR-061).",
|
|
82
|
+
"recommendation_docs": "mcp.md, mcp-registries.md, DISTRIBUTION_CHECKLIST.md, ADR-086, marketing-copy.yml reference registries (Smithery/Glama) as recommendations/distribution targets — allowed.",
|
|
83
|
+
"generated_bundles": "content.json* bundle the vendored-cluster skill bodies above.",
|
|
84
|
+
"self": "the linter + its denylist + the source-confidentiality rule necessarily contain the deny tokens as data.",
|
|
85
|
+
"validate_safe_paths": "telegraph-derived (MIT) ported code; upstream attribution is license-required."
|
|
86
|
+
},
|
|
87
|
+
"_excluded_tokens": {
|
|
88
|
+
"agent-os": "collides with our own coined 'Agent-OS primitive' term (universal-skills) — too FP-prone to auto-deny; scrub external 'agent-os' mentions by review.",
|
|
89
|
+
"telegraph-shrink / telegraph-condense": "collide with our own 'telegraph'/'telegraph-condensed' feature vocabulary; the telegraph upstream is guarded via 'caveman' + 'juliusbrussee' instead."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -45,6 +45,14 @@ concerns:
|
|
|
45
45
|
script: src/scripts/minimal_safe_diff_hook.py
|
|
46
46
|
args: []
|
|
47
47
|
fail_closed: false
|
|
48
|
+
# road-to-security-pillar.md P3.2 — PostToolUse prompt-injection scanner.
|
|
49
|
+
# Warn-in-context (exit 2), never blocks. Default-OFF: no-ops unless
|
|
50
|
+
# hooks.injection_scan.enabled is true in .agent-settings.yml. The runtime
|
|
51
|
+
# backstop layered on the always-on untrusted-input-defense rule.
|
|
52
|
+
injection-scan:
|
|
53
|
+
script: src/scripts/injection_scan_hook.py
|
|
54
|
+
args: []
|
|
55
|
+
fail_closed: false
|
|
48
56
|
# Phase 2 of road-to-hooks-actually-fire-in-consumers — session_start
|
|
49
57
|
# gate that surfaces the marketplace-install-but-unscaffolded shape.
|
|
50
58
|
# Writes .augment/.first-run-action-needed.md + one stderr line so
|
|
@@ -77,14 +85,14 @@ platforms:
|
|
|
77
85
|
session_start: [chat-history, first-run-gate, onboarding-gate, verify-before-complete, minimal-safe-diff, profile-staleness, wrapper-freshness]
|
|
78
86
|
session_end: [chat-history]
|
|
79
87
|
stop: [chat-history, verify-before-complete]
|
|
80
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
88
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
81
89
|
|
|
82
90
|
claude:
|
|
83
91
|
session_start: [chat-history, first-run-gate, onboarding-gate, verify-before-complete, minimal-safe-diff, profile-staleness, wrapper-freshness]
|
|
84
92
|
session_end: [chat-history]
|
|
85
93
|
stop: [chat-history, verify-before-complete]
|
|
86
94
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff]
|
|
87
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
95
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
88
96
|
|
|
89
97
|
# Cowork — the Claude desktop app's local-agent-mode runtime, built
|
|
90
98
|
# on top of the Claude Code CLI. Same lifecycle vocabulary, same
|
|
@@ -105,7 +113,7 @@ platforms:
|
|
|
105
113
|
session_end: [chat-history]
|
|
106
114
|
stop: [chat-history, verify-before-complete]
|
|
107
115
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff]
|
|
108
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
116
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
109
117
|
|
|
110
118
|
# Phase 7.5 — Cursor. `.cursor/hooks.json` (project) is read by the
|
|
111
119
|
# IDE and CLI; `~/.cursor/hooks.json` (user) is opt-in via
|
|
@@ -119,7 +127,7 @@ platforms:
|
|
|
119
127
|
session_end: [chat-history]
|
|
120
128
|
stop: [chat-history, verify-before-complete]
|
|
121
129
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff]
|
|
122
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
130
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
123
131
|
|
|
124
132
|
# Phase 7.6 — Cline. Hooks live under `.clinerules/hooks/<HookName>`
|
|
125
133
|
# (project, no file extension, must be executable per Cline docs) or
|
|
@@ -134,7 +142,7 @@ platforms:
|
|
|
134
142
|
session_end: [chat-history]
|
|
135
143
|
stop: [chat-history, verify-before-complete]
|
|
136
144
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff]
|
|
137
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
145
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
138
146
|
|
|
139
147
|
# Phase 7.7 — Windsurf (Cascade). Hooks live at `.windsurf/hooks.json`
|
|
140
148
|
# (project) or `~/.codeium/windsurf/hooks.json` (user). Cascade has
|
|
@@ -168,7 +176,7 @@ platforms:
|
|
|
168
176
|
session_end: [chat-history]
|
|
169
177
|
stop: [chat-history, verify-before-complete]
|
|
170
178
|
user_prompt_submit: [chat-history, verify-before-complete, minimal-safe-diff]
|
|
171
|
-
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff]
|
|
179
|
+
post_tool_use: [chat-history, roadmap-progress, context-hygiene, verify-before-complete, minimal-safe-diff, injection-scan]
|
|
172
180
|
|
|
173
181
|
# Phase 7.9 — Copilot has no hook surface. Concerns route through
|
|
174
182
|
# rule-only fallback; the dispatcher silently no-ops on --platform copilot.
|