@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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Archive completed roadmaps — the PR-gate (council 2026-06-14).
|
|
3
|
+
|
|
4
|
+
A roadmap that has reached ``count_open == 0`` and ``count_deferred == 0`` is
|
|
5
|
+
**complete**. This sweep moves it to ``agents/roadmaps/archive/``, rewrites
|
|
6
|
+
inbound references (``agents/roadmaps/<x>.md`` → ``agents/roadmaps/archive/<x>.md``)
|
|
7
|
+
across tracked files so links never break, and regenerates the dashboard.
|
|
8
|
+
|
|
9
|
+
It replaces the old **merge-gate** (keep one item open + a manual post-merge
|
|
10
|
+
archival step that got forgotten — leaving finished roadmaps to rot in ``main``)
|
|
11
|
+
with a deterministic **PR-gate**: ``/create-pr`` runs this before the PR is
|
|
12
|
+
created, so the roadmap lands already-archived in the PR and merges clean.
|
|
13
|
+
|
|
14
|
+
Default ``--changed-only``: only archive roadmaps that appear in this branch's
|
|
15
|
+
history since it diverged from ``origin/main`` (``git log origin/main..HEAD``),
|
|
16
|
+
so a PR archives exactly the roadmaps it completed — never an unrelated complete
|
|
17
|
+
roadmap. ``--all`` archives every complete active roadmap. No agent-set
|
|
18
|
+
annotation is required — completion is detected from the checkbox counts.
|
|
19
|
+
|
|
20
|
+
Usage:
|
|
21
|
+
python3 scripts/archive_completed_roadmaps.py # --changed-only (default)
|
|
22
|
+
python3 scripts/archive_completed_roadmaps.py --all
|
|
23
|
+
python3 scripts/archive_completed_roadmaps.py --base origin/main --dry-run
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
import argparse
|
|
29
|
+
import subprocess
|
|
30
|
+
import sys
|
|
31
|
+
from pathlib import Path
|
|
32
|
+
|
|
33
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
34
|
+
import update_roadmap_progress as urp # noqa: E402
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _run(cmd: list[str], cwd: Path) -> subprocess.CompletedProcess:
|
|
38
|
+
return subprocess.run(cmd, cwd=cwd, capture_output=True, text=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _repo_root() -> Path:
|
|
42
|
+
cp = _run(["git", "rev-parse", "--show-toplevel"], Path.cwd())
|
|
43
|
+
return Path(cp.stdout.strip()) if cp.returncode == 0 else Path.cwd()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _branch_touched_paths(root: Path, base: str) -> set[str] | None:
|
|
47
|
+
"""Repo-relative paths touched in any commit since divergence from base.
|
|
48
|
+
|
|
49
|
+
Returns None when the base ref is unavailable (e.g. a shallow clone or a
|
|
50
|
+
detached state) — callers treat None as "cannot scope, fall back to --all".
|
|
51
|
+
"""
|
|
52
|
+
cp = _run(["git", "log", f"{base}..HEAD", "--name-only",
|
|
53
|
+
"--pretty=format:"], root)
|
|
54
|
+
if cp.returncode != 0:
|
|
55
|
+
return None
|
|
56
|
+
return {line.strip() for line in cp.stdout.splitlines() if line.strip()}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _inbound_ref_rewrite(root: Path, old_rel: str, new_rel: str,
|
|
60
|
+
dry_run: bool) -> list[str]:
|
|
61
|
+
"""Rewrite full-path references ``old_rel`` → ``new_rel`` in tracked files.
|
|
62
|
+
|
|
63
|
+
Only the exact repo-relative path is rewritten (bare-filename mentions like
|
|
64
|
+
``road-to-x.md`` are left alone — they do not resolve as links and do not
|
|
65
|
+
break). The archived file's own path never matches because the search string
|
|
66
|
+
is the un-archived path.
|
|
67
|
+
"""
|
|
68
|
+
grep = _run(["git", "grep", "-l", "--", old_rel], root)
|
|
69
|
+
changed: list[str] = []
|
|
70
|
+
if grep.returncode != 0: # 1 = no matches, fine
|
|
71
|
+
return changed
|
|
72
|
+
for rel in grep.stdout.splitlines():
|
|
73
|
+
rel = rel.strip()
|
|
74
|
+
if not rel or rel == old_rel: # skip the roadmap file itself
|
|
75
|
+
continue
|
|
76
|
+
fp = root / rel
|
|
77
|
+
try:
|
|
78
|
+
text = fp.read_text(encoding="utf-8")
|
|
79
|
+
except OSError:
|
|
80
|
+
continue
|
|
81
|
+
if old_rel not in text:
|
|
82
|
+
continue
|
|
83
|
+
if not dry_run:
|
|
84
|
+
fp.write_text(text.replace(old_rel, new_rel), encoding="utf-8")
|
|
85
|
+
changed.append(rel)
|
|
86
|
+
return changed
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _git_mv(root: Path, src_rel: str, dst_rel: str, dry_run: bool) -> bool:
|
|
90
|
+
dst = root / dst_rel
|
|
91
|
+
if not dry_run:
|
|
92
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
93
|
+
cp = _run(["git", "mv", src_rel, dst_rel], root)
|
|
94
|
+
return cp.returncode == 0
|
|
95
|
+
return True
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def archive_completed(root: Path, *, changed_only: bool, base: str,
|
|
99
|
+
dry_run: bool) -> list[dict]:
|
|
100
|
+
"""Archive every complete active roadmap (count_open==0, count_deferred==0).
|
|
101
|
+
|
|
102
|
+
Returns a list of ``{roadmap, archived_to, refs_migrated}`` records.
|
|
103
|
+
"""
|
|
104
|
+
roadmap_root = root / "agents" / "roadmaps"
|
|
105
|
+
if not roadmap_root.is_dir():
|
|
106
|
+
return []
|
|
107
|
+
touched = _branch_touched_paths(root, base) if changed_only else None
|
|
108
|
+
# changed_only requested but base unavailable → conservative: archive nothing
|
|
109
|
+
# rather than sweep unrelated roadmaps.
|
|
110
|
+
if changed_only and touched is None:
|
|
111
|
+
print(f" ⚠️ cannot resolve `{base}` — skipping the changed-only "
|
|
112
|
+
"archival sweep (run with --all to force).", file=sys.stderr)
|
|
113
|
+
return []
|
|
114
|
+
|
|
115
|
+
archived: list[dict] = []
|
|
116
|
+
for stats in urp.collect(roadmap_root):
|
|
117
|
+
if stats.open_ != 0 or stats.deferred != 0:
|
|
118
|
+
continue # not complete
|
|
119
|
+
old_rel = f"agents/roadmaps/{stats.rel}"
|
|
120
|
+
if changed_only and old_rel not in touched:
|
|
121
|
+
continue # complete, but not this branch's work
|
|
122
|
+
new_rel = f"agents/roadmaps/archive/{stats.rel}"
|
|
123
|
+
if not _git_mv(root, old_rel, new_rel, dry_run):
|
|
124
|
+
print(f" ⚠️ git mv failed for {old_rel}", file=sys.stderr)
|
|
125
|
+
continue
|
|
126
|
+
refs = _inbound_ref_rewrite(root, old_rel, new_rel, dry_run)
|
|
127
|
+
if not dry_run and refs:
|
|
128
|
+
_run(["git", "add", "--", *refs], root)
|
|
129
|
+
archived.append({"roadmap": old_rel, "archived_to": new_rel,
|
|
130
|
+
"refs_migrated": refs})
|
|
131
|
+
return archived
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _regen_dashboard(root: Path, dry_run: bool) -> None:
|
|
135
|
+
if dry_run:
|
|
136
|
+
return
|
|
137
|
+
script = Path(__file__).resolve().parent / "update_roadmap_progress.py"
|
|
138
|
+
_run([sys.executable, str(script)], root)
|
|
139
|
+
dash = root / "agents" / "roadmaps-progress.md"
|
|
140
|
+
if dash.is_file():
|
|
141
|
+
_run(["git", "add", "--", "agents/roadmaps-progress.md"], root)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def main(argv: list[str] | None = None) -> int:
|
|
145
|
+
ap = argparse.ArgumentParser(description=__doc__)
|
|
146
|
+
ap.add_argument("--all", action="store_true",
|
|
147
|
+
help="Archive every complete active roadmap (not only "
|
|
148
|
+
"those touched in this branch).")
|
|
149
|
+
ap.add_argument("--base", default="origin/main",
|
|
150
|
+
help="Base ref for the changed-only scope (default origin/main).")
|
|
151
|
+
ap.add_argument("--dry-run", action="store_true",
|
|
152
|
+
help="Report what would be archived; touch nothing.")
|
|
153
|
+
ns = ap.parse_args(argv)
|
|
154
|
+
|
|
155
|
+
root = _repo_root()
|
|
156
|
+
archived = archive_completed(root, changed_only=not ns.all,
|
|
157
|
+
base=ns.base, dry_run=ns.dry_run)
|
|
158
|
+
if not archived:
|
|
159
|
+
print(" ℹ️ No completed roadmaps to archive.")
|
|
160
|
+
return 0
|
|
161
|
+
_regen_dashboard(root, ns.dry_run)
|
|
162
|
+
verb = "Would archive" if ns.dry_run else "Archived"
|
|
163
|
+
for rec in archived:
|
|
164
|
+
print(f" ✅ {verb}: {rec['roadmap']} → {rec['archived_to']}"
|
|
165
|
+
+ (f" ({len(rec['refs_migrated'])} ref(s) migrated)"
|
|
166
|
+
if rec["refs_migrated"] else ""))
|
|
167
|
+
return 0
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
if __name__ == "__main__":
|
|
171
|
+
sys.exit(main())
|
|
@@ -29,6 +29,11 @@ Do NOT use when:
|
|
|
29
29
|
|
|
30
30
|
## Procedure: Adversarial review
|
|
31
31
|
|
|
32
|
+
1. **Inspect the artifact** — Read the plan, diff, or draft you are about to critique; note its scope, assumptions, and the explicit asks before attacking.
|
|
33
|
+
2. **Attack** — Run Step 1 below as the grumpy senior engineer.
|
|
34
|
+
3. **Defend** — Run Step 2 as the balanced engineer; classify each criticism as must-fix / defer / reject.
|
|
35
|
+
4. **Revise** — Run Step 3 to fold valid fixes back in and surface only the trade-offs the user needs to decide.
|
|
36
|
+
|
|
32
37
|
### Step 1: Attack (Grumpy Senior Engineer)
|
|
33
38
|
|
|
34
39
|
Assume your plan/fix is flawed. Ask yourself:
|
|
@@ -112,6 +117,15 @@ Only surface trade-offs or concerns that need the user's input.
|
|
|
112
117
|
- **api-design** — review API design for consistency and breaking changes.
|
|
113
118
|
- **security** — review security-sensitive changes for attack surface.
|
|
114
119
|
|
|
120
|
+
## RDP: fresh-context verifier as the default gate (structural)
|
|
121
|
+
|
|
122
|
+
Within the Reasoning Discipline Protocol the fresh-context verifier subagent is
|
|
123
|
+
the **default** final gate — but, because it is a full extra inference pass, it
|
|
124
|
+
fires only on the **structural-complexity** signal: ≥ 2 of {branching/conditional
|
|
125
|
+
logic, ≥ 3 explicit must/must-not constraints, stateful operations,
|
|
126
|
+
irreversibility} **and** estimated work ≥ ~1k tokens. Token length alone never
|
|
127
|
+
triggers it. See [`rdp-gate`](../../contexts/execution/rdp-gate.md) (L12).
|
|
128
|
+
|
|
115
129
|
## Auto-trigger keywords
|
|
116
130
|
|
|
117
131
|
- adversarial review
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: high
|
|
3
|
+
name: agent-security-review
|
|
4
|
+
description: "Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit."
|
|
5
|
+
personas:
|
|
6
|
+
- security-engineer
|
|
7
|
+
domain: quality
|
|
8
|
+
council_depth: deep
|
|
9
|
+
workspaces:
|
|
10
|
+
- engineering
|
|
11
|
+
packs:
|
|
12
|
+
- engineering-base
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# agent-security-review
|
|
16
|
+
|
|
17
|
+
Adversarial review of an **agent's configuration + behaviour** — the trust
|
|
18
|
+
anchor, not the app code. Where [`threat-modeling`](../threat-modeling/SKILL.md)
|
|
19
|
+
models a code change and [`security-audit`](../security-audit/SKILL.md) hunts
|
|
20
|
+
code vulns, this asks: given this assembled config (rules, skills, MCP, hooks,
|
|
21
|
+
permissions, memory), how would an attacker turn it against its owner, and what
|
|
22
|
+
gap lets them?
|
|
23
|
+
|
|
24
|
+
Pairs the static signal from `/security-audit-config` with a three-lens
|
|
25
|
+
adversarial pass. Output is **decision support** — surface the trade-off, name
|
|
26
|
+
the gap; the human decides.
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- "Is my agent setup safe / could this be weaponised".
|
|
31
|
+
- Before trusting a third-party skill pack, MCP server, or rules file.
|
|
32
|
+
- Periodic posture review of a fleet's agent config.
|
|
33
|
+
- Any `D`/`F` category from `/security-audit-config` needing depth.
|
|
34
|
+
|
|
35
|
+
## Procedure
|
|
36
|
+
|
|
37
|
+
### 1. Inventory + inspect the attack surface
|
|
38
|
+
|
|
39
|
+
Inspect the config the agent loads and check each surface: instruction files
|
|
40
|
+
(CLAUDE.md / AGENTS.md / .cursor/rules / copilot-instructions), installed skills
|
|
41
|
+
+ their `allowed-tools`, MCP servers + tool descriptions, hooks + lifecycle
|
|
42
|
+
scripts, permission/auto-approve settings, persistent memory. Static pass first:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python3 src/scripts/security_audit_config.py --root <repo> --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Red team (attacker lens)
|
|
49
|
+
|
|
50
|
+
Per surface, construct concrete **attack chains** grounded in known classes:
|
|
51
|
+
|
|
52
|
+
- Rules-file backdoor — hidden-Unicode / suppression instruction in a loaded file.
|
|
53
|
+
- MCP tool-poisoning / rug-pull — malicious or mutated tool description.
|
|
54
|
+
- Lethal trifecta — a path reading private data, ingesting untrusted content,
|
|
55
|
+
AND able to communicate externally.
|
|
56
|
+
- Consent bypass — `bypassPermissions`, `Bash(*)`, auto-approve, `npx -y`.
|
|
57
|
+
- Memory / context poisoning — a planted instruction firing later.
|
|
58
|
+
|
|
59
|
+
Name the chain: *entry → mechanism → impact*. Be specific (which file, tool).
|
|
60
|
+
|
|
61
|
+
### 3. Blue team (defender lens)
|
|
62
|
+
|
|
63
|
+
Per chain, evaluate existing defences: are the always-on rules
|
|
64
|
+
([`untrusted-input-defense`](../../rules/untrusted-input-defense.md),
|
|
65
|
+
[`lethal-trifecta-guard`](../../rules/lethal-trifecta-guard.md),
|
|
66
|
+
[`non-destructive-by-default`](../../rules/non-destructive-by-default.md)) in
|
|
67
|
+
force? Egress gated? Untrusted leg quarantined? Note present vs **absent**.
|
|
68
|
+
|
|
69
|
+
### 4. Auditor (synthesis)
|
|
70
|
+
|
|
71
|
+
Pair each chain with its gap, prioritise (likelihood × impact). For the hardest
|
|
72
|
+
calls run [`ai-council`](../ai-council/SKILL.md) (`council_depth: deep`) +
|
|
73
|
+
[`judge-security-auditor`](../judge-security-auditor/SKILL.md) over flagged
|
|
74
|
+
files. Produce a ranked **attack-chain → gap → recommended control** table.
|
|
75
|
+
|
|
76
|
+
## Output
|
|
77
|
+
|
|
78
|
+
A prioritised table — `attack chain | defensive gap | OWASP ASI | recommended control | confidence` —
|
|
79
|
+
prefixed with the trust-and-safety banner (advisory security output):
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
> HUMAN REVIEW REQUIRED — adversarial agent-config review. Findings are
|
|
83
|
+
> decision support, not a guarantee; detection is probabilistic. Validate
|
|
84
|
+
> each chain before acting.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Recommend controls; never auto-apply config changes (per
|
|
88
|
+
[`scope-control`](../../rules/scope-control.md)).
|
|
89
|
+
|
|
90
|
+
## Gotcha
|
|
91
|
+
|
|
92
|
+
- **Clean static score ≠ safe.** The worst chains (rug-pull MCP tool whose
|
|
93
|
+
description mutates post-approval, a lethal-trifecta path across three
|
|
94
|
+
individually-fine skills) leave no single linter hit — only the red-team lens
|
|
95
|
+
(step 2) **inspects** how surfaces compose. Always run the adversarial pass.
|
|
96
|
+
- **Tool descriptions are part of the surface.** Reading only config files and
|
|
97
|
+
skipping each MCP server's live tool descriptions misses tool-poisoning.
|
|
98
|
+
- **The reviewer is not the fixer.** Emitting a config patch turns advisory
|
|
99
|
+
review into an unreviewed change — recommend, hand back.
|
|
100
|
+
|
|
101
|
+
## Do NOT
|
|
102
|
+
|
|
103
|
+
- Do NOT treat a clean static score as proof of safety — the red-team lens finds
|
|
104
|
+
chains the linters cannot see.
|
|
105
|
+
- Do NOT block or "fix" the consumer's config autonomously — surface + recommend.
|
|
106
|
+
- Do NOT re-audit application code here — that is `security-audit` / `threat-modeling`.
|
|
107
|
+
- Do NOT omit the HUMAN REVIEW REQUIRED banner.
|
|
108
|
+
|
|
109
|
+
## See also
|
|
110
|
+
|
|
111
|
+
- `/security-audit-config` — the static A–F counterpart.
|
|
112
|
+
- [`untrusted-input-defense`](../../rules/untrusted-input-defense.md), [`lethal-trifecta-guard`](../../rules/lethal-trifecta-guard.md) — the prevention rules.
|
|
113
|
+
- [`threat-modeling`](../threat-modeling/SKILL.md), [`judge-security-auditor`](../judge-security-auditor/SKILL.md), [`ai-council`](../ai-council/SKILL.md).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "agent-security-review",
|
|
3
|
+
"description": "5 should-trigger + 5 should-not-trigger queries. Should-trigger covers DE + EN phrasings for adversarial review of an agent's CONFIG/behaviour (rules, skills, MCP, hooks, permissions). Should-not-trigger covers the near-miss neighbours (code threat-model, code security-audit, the static config-audit command, privacy review, dependency CVE scan) whose vocabulary overlaps.",
|
|
4
|
+
"queries": [
|
|
5
|
+
{
|
|
6
|
+
"q": "red-team my agent setup — could someone weaponise my CLAUDE.md or MCP servers?",
|
|
7
|
+
"trigger": true
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"q": "do an adversarial security review of this agent config and its skills",
|
|
11
|
+
"trigger": true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"q": "is this third-party skill pack safe to install, attacker's view?",
|
|
15
|
+
"trigger": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"q": "prüfe meine Agent-Konfiguration adversarial auf Angriffsketten",
|
|
19
|
+
"trigger": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"q": "what could an attacker do with my rules files, hooks and tool permissions?",
|
|
23
|
+
"trigger": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"q": "threat-model this new payments endpoint before I build it",
|
|
27
|
+
"trigger": false,
|
|
28
|
+
"note": "code change threat model → threat-modeling"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"q": "find vulnerabilities in my application code",
|
|
32
|
+
"trigger": false,
|
|
33
|
+
"note": "code vulnerability hunt → security-audit"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"q": "give me an A-F score for my agent config",
|
|
37
|
+
"trigger": false,
|
|
38
|
+
"note": "static scored audit → /security-audit-config command, not the adversarial skill"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"q": "are we GDPR compliant with this data flow?",
|
|
42
|
+
"trigger": false,
|
|
43
|
+
"note": "regulatory-regime read → privacy-review"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"q": "scan my dependencies for known CVEs",
|
|
47
|
+
"trigger": false,
|
|
48
|
+
"note": "dependency CVE audit → security-audit dependency pass"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -616,7 +616,7 @@ member can refine, agree, or push back on the previous critique
|
|
|
616
616
|
without seeing which provider produced which point.
|
|
617
617
|
|
|
618
618
|
The default round count comes from `defaults.min_rounds` in
|
|
619
|
-
|
|
619
|
+
`~/.event4u/agent-config/settings/.ai-council.yml` (default `2` so members critique each other
|
|
620
620
|
at least once before convergence). The host agent does **not** ask
|
|
621
621
|
"how many rounds?" when the requested count is `<= min_rounds` —
|
|
622
622
|
the settings owner already made that decision. Ask only when a
|
|
@@ -738,7 +738,7 @@ Activation — two equivalent paths:
|
|
|
738
738
|
|
|
739
739
|
* CLI: `--peer-review` on `council:estimate` or `council:run`.
|
|
740
740
|
* Config: `ai_council.peer_review.enabled: true` in
|
|
741
|
-
|
|
741
|
+
`~/.event4u/agent-config/settings/.ai-council.yml`. Default is `false`.
|
|
742
742
|
|
|
743
743
|
Mechanics:
|
|
744
744
|
|
|
@@ -782,7 +782,7 @@ swaps.
|
|
|
782
782
|
| **Outsider** | `openai` | naive-but-sharp questions, beginner's-mind probes |
|
|
783
783
|
| **Executor** | `anthropic` | what ships this quarter, what blocks delivery |
|
|
784
784
|
|
|
785
|
-
Activation — edit
|
|
785
|
+
Activation — edit `~/.event4u/agent-config/settings/.ai-council.yml` and flip the advisor's
|
|
786
786
|
`enabled: true`. Optional `model: <name>` overrides the bound
|
|
787
787
|
member's default model. An advisor referencing a disabled member
|
|
788
788
|
fails closed at config load — never silently skipped.
|
|
@@ -146,7 +146,7 @@ A single blocking call (sync I/O, time.sleep, CPU-heavy parse, large JSON load)
|
|
|
146
146
|
|
|
147
147
|
## Provenance
|
|
148
148
|
|
|
149
|
-
- Adopted from:
|
|
149
|
+
- Adopted from: an external reference (MIT, © 2025 an external reference) — **Sunset Policy applied**: 694-line cookbook source reduced to a ~140-line decision framework; pattern catalogues externalized to upstream docs below.
|
|
150
150
|
- Externalized cookbook:
|
|
151
151
|
- asyncio core: https://docs.python.org/3/library/asyncio.html · https://docs.python.org/3/library/asyncio-task.html
|
|
152
152
|
- TaskGroup (3.11+): https://docs.python.org/3/library/asyncio-task.html#task-groups
|
|
@@ -63,7 +63,7 @@ Run grep/search for the exact symbol, column, or event name. Enumerate:
|
|
|
63
63
|
| DB references | Foreign keys, indexes, views, triggers on the column |
|
|
64
64
|
| Config / docs | YAML, JSON, Markdown that name the symbol |
|
|
65
65
|
|
|
66
|
-
### 3. Inspect indirect
|
|
66
|
+
### 3. Inspect indirect dependencies
|
|
67
67
|
|
|
68
68
|
For each direct dependency, identify second-order fan-out:
|
|
69
69
|
|
|
@@ -89,16 +89,17 @@ For every dependency, mark:
|
|
|
89
89
|
### 5. Consult engineering memory
|
|
90
90
|
|
|
91
91
|
Via [`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md) call
|
|
92
|
-
`retrieve(types=["
|
|
92
|
+
`retrieve(types=["ownership"],
|
|
93
93
|
keys=<changed paths + changed symbol>, limit=5)`. Surface:
|
|
94
94
|
|
|
95
|
-
- **Architecture decisions** that constrain the planned change —
|
|
96
|
-
`
|
|
95
|
+
- **Architecture decisions** that constrain the planned change — check the
|
|
96
|
+
ADR index [`docs/decisions/INDEX.md`](../../../docs/decisions/INDEX.md) and
|
|
97
|
+
cite the ADR number + the decision verbatim so the report is self-auditing.
|
|
97
98
|
- **Ownership** matches — add these as `owner hint` candidates when
|
|
98
99
|
the direct grep had no result.
|
|
99
100
|
|
|
100
101
|
Memory entries are supplementary, never authoritative: a grep miss is
|
|
101
|
-
still a grep miss. Do not infer
|
|
102
|
+
still a grep miss. Do not infer dependencies from memory alone.
|
|
102
103
|
|
|
103
104
|
## Validation
|
|
104
105
|
|
|
@@ -109,8 +110,8 @@ Before finalizing the report, confirm:
|
|
|
109
110
|
3. Second-order fan-out is bounded — any runaway chain is flagged, not expanded
|
|
110
111
|
4. Every `external` reach has at least one named owner hint or an explicit
|
|
111
112
|
"owner unknown — ask"
|
|
112
|
-
5. You have NOT invented
|
|
113
|
-
6. You have NOT merged direct and indirect
|
|
113
|
+
5. You have NOT invented dependencies that grep did not find
|
|
114
|
+
6. You have NOT merged direct and indirect dependencies — they are listed separately
|
|
114
115
|
|
|
115
116
|
## Output format
|
|
116
117
|
|
|
@@ -150,10 +151,10 @@ Open questions:
|
|
|
150
151
|
Required fields (ordered):
|
|
151
152
|
|
|
152
153
|
1. **Skill** and **Change** — one-line edit summary
|
|
153
|
-
2. **Direct
|
|
154
|
-
3. **Indirect
|
|
154
|
+
2. **Direct dependencies** — grouped by class, each with file:line citations and exact counts
|
|
155
|
+
3. **Indirect dependencies** — 2nd-order only, bounded
|
|
155
156
|
4. **Reach summary** — counts per reach level
|
|
156
|
-
5. **Risk surfaces** —
|
|
157
|
+
5. **Risk surfaces** — dependencies grouped by risk type
|
|
157
158
|
6. **Open questions** — unresolved items with grep evidence
|
|
158
159
|
|
|
159
160
|
Runtime confirmation (e.g. *"actually run the test suite to see what breaks"*,
|
|
@@ -179,7 +180,7 @@ does not execute code, run tests, or touch the network**.
|
|
|
179
180
|
* NEVER return `safe` out of politeness when external reach exists — mark it clearly
|
|
180
181
|
* NEVER silently fall back to "module-level impact" when grep shows cross-module callers
|
|
181
182
|
* NEVER claim a dependency without a file:line citation from grep output
|
|
182
|
-
* NEVER chase
|
|
183
|
+
* NEVER chase dependencies past 2nd order without explicit scope approval — flag and stop
|
|
183
184
|
|
|
184
185
|
## References
|
|
185
186
|
|
|
@@ -80,7 +80,7 @@ agents should not bypass the dispatcher.
|
|
|
80
80
|
|
|
81
81
|
## GitHub API: Replying to PR review comments
|
|
82
82
|
|
|
83
|
-
When commands reply to PR review comments (e.g. `/fix-pr-
|
|
83
|
+
When commands reply to PR review comments (e.g. `/fix-pr-comments`):
|
|
84
84
|
|
|
85
85
|
### 1. Read the setting
|
|
86
86
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: complexity-first-planning
|
|
3
|
+
description: "Use when staging multi-component or uncertain work — tackle the load-bearing unknown first (risk-first decomposition), not the easy parts first."
|
|
4
|
+
source: package
|
|
5
|
+
domain: engineering
|
|
6
|
+
status: active
|
|
7
|
+
model_tier: medium
|
|
8
|
+
tier: senior
|
|
9
|
+
context_spine: [repo]
|
|
10
|
+
workspaces:
|
|
11
|
+
- agent-config-maintainer
|
|
12
|
+
packs:
|
|
13
|
+
- meta
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# complexity-first-planning
|
|
17
|
+
|
|
18
|
+
Part of the Reasoning Discipline Protocol. Engage per
|
|
19
|
+
[`rdp-gate`](../../contexts/execution/rdp-gate.md) (skip on trivial / linear
|
|
20
|
+
tasks; light touch on a strong-reasoning host).
|
|
21
|
+
|
|
22
|
+
> **Provenance.** This is an **RDP derivation from general engineering discipline
|
|
23
|
+
> (risk-first / critical-path / pre-mortem)** — it is **not** an Anthropic-
|
|
24
|
+
> documented Fable behavior. Fable's "start at the top of your difficulty range"
|
|
25
|
+
> is about *task selection* (give the model harder tasks), not intra-task order.
|
|
26
|
+
> The skill stands on its own merit; it is not sold as a frontier-model transplant.
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- Staging multi-component work where the hardest/most-uncertain part is not yet proven.
|
|
31
|
+
- A plan whose later steps depend on an assumption that could collapse.
|
|
32
|
+
|
|
33
|
+
Do NOT use for single-step, linear, or fully-specified tasks (no load-bearing
|
|
34
|
+
unknown to resolve), or when the user has already fixed the sequence.
|
|
35
|
+
|
|
36
|
+
## When the agent should load this
|
|
37
|
+
|
|
38
|
+
- The user asks to "plan", "break down", or "stage" work that spans ≥2 components
|
|
39
|
+
and at least one part is unproven.
|
|
40
|
+
- A multi-step plan is forming whose later steps assume something untested.
|
|
41
|
+
- Mid-task: a step just failed because an earlier, easier step baked in a wrong
|
|
42
|
+
assumption — reload this and re-sequence risk-first.
|
|
43
|
+
|
|
44
|
+
## Procedure
|
|
45
|
+
|
|
46
|
+
1. **Inspect and name the unknowns.** Read the affected components first, then
|
|
47
|
+
list which carry real uncertainty (technical feasibility, an unverified
|
|
48
|
+
integration, an ambiguous requirement) — analyze the existing system before
|
|
49
|
+
planning any change.
|
|
50
|
+
2. **Assess and rank by load-bearing risk.** The load-bearing unknown is the one
|
|
51
|
+
whose failure invalidates the most dependent work — not the one that is merely hard.
|
|
52
|
+
3. **Resolve it first.** Spike / probe / prototype the load-bearing unknown
|
|
53
|
+
before building anything that depends on it. Record the result in the notes
|
|
54
|
+
file (see [`notes-first-reasoning`](../../rules/notes-first-reasoning.md)):
|
|
55
|
+
prediction → result → lesson.
|
|
56
|
+
4. **Cascade.** Once the riskiest assumption holds (or is corrected), sequence
|
|
57
|
+
the dependent work. If it fails, the cheap early failure saved the rework.
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
A short ordered plan that leads with the load-bearing unknown + how it will be
|
|
62
|
+
proven, then the dependent steps. One recommendation, not a survey.
|
|
63
|
+
|
|
64
|
+
## Do NOT
|
|
65
|
+
|
|
66
|
+
- Build the easy parts first to show progress, then discover the hard part breaks them.
|
|
67
|
+
- Treat "hardest" as "most code" — rank by *dependency blast radius*, not effort.
|
|
68
|
+
- Over-plan a strong-reasoning host (it sequences risk natively — keep it light).
|
|
69
|
+
|
|
70
|
+
## Gotchas
|
|
71
|
+
|
|
72
|
+
- **Mistaking effort for risk.** A 400-line but well-understood refactor is *low*
|
|
73
|
+
load-bearing risk; a 5-line call into an unverified third-party API is *high*.
|
|
74
|
+
Ranking by size instead of dependency blast radius is the classic failure.
|
|
75
|
+
- **"Resolved on paper".** Reasoning that the unknown "should work" is not
|
|
76
|
+
resolving it — the spike must actually run / compile / return before dependent
|
|
77
|
+
work starts. Record prediction → result, not prediction → assumption.
|
|
78
|
+
- **Spike sprawl.** The probe answers exactly one question (does the load-bearing
|
|
79
|
+
assumption hold?), then stops. Turning it into the real implementation defeats
|
|
80
|
+
the cheap-early-failure purpose.
|
|
81
|
+
|
|
82
|
+
## Related Skills
|
|
83
|
+
|
|
84
|
+
**WHEN to use this**
|
|
85
|
+
|
|
86
|
+
- Staging multi-component work where the hardest / most-uncertain part is unproven.
|
|
87
|
+
- A plan whose later steps rest on an assumption that could collapse.
|
|
88
|
+
|
|
89
|
+
**WHEN NOT to use this**
|
|
90
|
+
|
|
91
|
+
- Single-step, linear, or fully-specified work — no load-bearing unknown to
|
|
92
|
+
resolve; the [`rdp-gate`](../../contexts/execution/rdp-gate.md) filters these.
|
|
93
|
+
- Breaking a feature into tasks in general — route to
|
|
94
|
+
[`feature-planning`](../feature-planning/SKILL.md), which composes this skill.
|
|
95
|
+
- Recording the spike's prediction / result / lesson — that belongs in
|
|
96
|
+
[`notes-first-reasoning`](../../rules/notes-first-reasoning.md).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "complexity-first-planning",
|
|
3
|
+
"description": "5 should-trigger + 5 should-not-trigger. Should-trigger covers multi-component / uncertain work where a load-bearing unknown must be resolved first; should-not covers trivial / linear / fully-sequenced work and neighbors (feature breakdown, simple tests).",
|
|
4
|
+
"queries": [
|
|
5
|
+
{"q": "build a multi-tenant reporting pipeline with caching and access control — where do I start?", "trigger": true},
|
|
6
|
+
{"q": "we need to migrate auth to OAuth and we're not sure the legacy token format maps cleanly", "trigger": true},
|
|
7
|
+
{"q": "stage this feature so we fail fast on the riskiest part", "trigger": true},
|
|
8
|
+
{"q": "the plan depends on the new vector DB actually handling our query latency — sequence the work", "trigger": true},
|
|
9
|
+
{"q": "which part of this 6-step build should we tackle first?", "trigger": true},
|
|
10
|
+
{"q": "add a unit test for the existing slugify() helper", "trigger": false, "note": "single linear step — no load-bearing unknown"},
|
|
11
|
+
{"q": "rename this method across the codebase", "trigger": false, "note": "mechanical, fully specified"},
|
|
12
|
+
{"q": "break this epic into tickets", "trigger": false, "note": "feature-planning breakdown, not risk-first ordering"},
|
|
13
|
+
{"q": "fix the typo in the README", "trigger": false, "note": "trivial"},
|
|
14
|
+
{"q": "implement steps 1 through 4 in the order I listed", "trigger": false, "note": "user already fixed the sequence"}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -15,7 +15,7 @@ packs:
|
|
|
15
15
|
|
|
16
16
|
Use this skill when:
|
|
17
17
|
- Editing `.github/copilot-instructions.md` to improve Copilot behavior
|
|
18
|
-
- Dealing with Copilot PR review comments (via `/fix-pr-
|
|
18
|
+
- Dealing with Copilot PR review comments (via `/fix-pr-comments`)
|
|
19
19
|
- Analyzing Copilot's review patterns to identify recurring false positives
|
|
20
20
|
- Tuning Copilot's code suggestions for the project
|
|
21
21
|
|
|
@@ -96,7 +96,7 @@ Before creating a comment, Copilot must:
|
|
|
96
96
|
|
|
97
97
|
## Handling Copilot Bot Comments (as Augment Agent)
|
|
98
98
|
|
|
99
|
-
When the user asks to fix Copilot's PR review comments (via `/fix-pr-
|
|
99
|
+
When the user asks to fix Copilot's PR review comments (via `/fix-pr-comments`):
|
|
100
100
|
|
|
101
101
|
### 1. Evaluate Each Comment
|
|
102
102
|
|
|
@@ -179,8 +179,7 @@ Copilot and Augment complement each other:
|
|
|
179
179
|
## Related
|
|
180
180
|
|
|
181
181
|
- **File:** `.github/copilot-instructions.md` — Copilot configuration
|
|
182
|
-
- **Command:** `/fix-pr-
|
|
183
|
-
- **Command:** `/fix-pr-comments` — fix all review comments
|
|
182
|
+
- **Command:** `/fix-pr-comments` — fix all review comments (bot + human)
|
|
184
183
|
- **Skill:** `code-review` — PR review process and conventions
|
|
185
184
|
|
|
186
185
|
|
|
@@ -152,6 +152,6 @@ BEFORE adding the 5th guard:
|
|
|
152
152
|
|
|
153
153
|
## Provenance
|
|
154
154
|
|
|
155
|
-
- Adopted from:
|
|
155
|
+
- Adopted from: an external reference (MIT, © 2025 an external reference).
|
|
156
156
|
- Provenance registry: `agents/settings/contexts/skills-provenance.yml` (entry: `defense-in-depth`).
|
|
157
157
|
- Iron-Law floor: `non-destructive-by-default`, `verify-before-complete`, `skill-quality`.
|
|
@@ -133,11 +133,12 @@ If important information is missing:
|
|
|
133
133
|
- Identify likely cause and smallest correct change
|
|
134
134
|
- **Consult memory — invariants and prior decisions.** Via
|
|
135
135
|
[`memory-access`](../../../docs/guidelines/agent-infra/memory-access.md), call
|
|
136
|
-
`retrieve(types=["domain-invariants"
|
|
136
|
+
`retrieve(types=["domain-invariants"], keys=<touched paths>, limit=3)`.
|
|
137
137
|
A matching `domain-invariant` is a hard constraint — violating it = regression,
|
|
138
|
-
surface the conflict to the user before proceeding.
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
surface the conflict to the user before proceeding. For architectural rationale
|
|
139
|
+
(*why* the current shape exists), check the ADR index
|
|
140
|
+
[`docs/decisions/INDEX.md`](../../../docs/decisions/INDEX.md); plan around it, do
|
|
141
|
+
not silently overturn it. Cite matching `id`s / ADR numbers in the plan.
|
|
141
142
|
See [`engineering-memory-data-format`](../../../docs/guidelines/agent-infra/engineering-memory-data-format.md)
|
|
142
143
|
for the schema.
|
|
143
144
|
|
|
@@ -126,7 +126,7 @@ Exactly **one** layer translates internal errors to the egress format (HTTP stat
|
|
|
126
126
|
|
|
127
127
|
## Provenance
|
|
128
128
|
|
|
129
|
-
- Adopted from:
|
|
129
|
+
- Adopted from: an external reference (MIT, © 2025 an external reference) — **Sunset Policy applied**: 636-line source reduced to a ~150-line decision framework; language catalogues externalized to the upstream resources below.
|
|
130
130
|
- Externalized catalogues:
|
|
131
131
|
- Python: https://docs.python.org/3/tutorial/errors.html · https://docs.python.org/3/library/exceptions.html
|
|
132
132
|
- PHP / Laravel: https://laravel.com/docs/errors · https://www.php.net/manual/en/language.exceptions.php
|