@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,122 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Workspace-boundary drift check — import-edge enforcement.
|
|
3
|
+
|
|
4
|
+
Governed by `docs/contracts/workspace-boundary.md` + ADR-095. Fails when a
|
|
5
|
+
workspace module (`src/cli/python/workspace_*.py`) imports an owner-module of
|
|
6
|
+
a domain the workspace does NOT own: skill design, profile/pack semantics,
|
|
7
|
+
video-provider logic, MCP-registry policy, analytics product strategy.
|
|
8
|
+
|
|
9
|
+
Scope (read this before trusting a green run): this enforces **import edges
|
|
10
|
+
only**. Semantic drift — a workspace module that encodes profile-semantics or
|
|
11
|
+
analytics-product-strategy judgement without importing anything forbidden — is
|
|
12
|
+
NOT catchable here and stays doc-governance, enforced in review against the
|
|
13
|
+
contract. A green run is a supplement to boundary thinking, not a substitute.
|
|
14
|
+
|
|
15
|
+
Allowed: stdlib, third-party deps, intra-workspace imports (`workspace_*`),
|
|
16
|
+
and any import line carrying a `# boundary-exception: <reason>` pragma.
|
|
17
|
+
|
|
18
|
+
Usage: python3 src/scripts/lint_workspace_boundary.py [--quiet]
|
|
19
|
+
Exit: 0 = boundary holds · 1 = a forbidden import was found · 2 = internal.
|
|
20
|
+
"""
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import ast
|
|
24
|
+
import re
|
|
25
|
+
import sys
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
|
|
28
|
+
WORKSPACE_GLOB = "src/cli/python/workspace_*.py"
|
|
29
|
+
PRAGMA = "boundary-exception:"
|
|
30
|
+
|
|
31
|
+
# Owner-modules of the NOT-owned domains. Matched against each dotted segment
|
|
32
|
+
# of an imported module name with segment boundaries, so `packaging` does not
|
|
33
|
+
# trip `pack` and `workspace_skills` is handled by the intra-workspace allow.
|
|
34
|
+
FORBIDDEN: list[tuple[re.Pattern, str]] = [
|
|
35
|
+
(re.compile(r"(?:^|[._-])condense(?:$|[._-])"), "skill design / condensation"),
|
|
36
|
+
(re.compile(r"(?:^|[._-])skill_linter(?:$|[._-])"), "skill design"),
|
|
37
|
+
(re.compile(r"(?:^|[._-])skill_management(?:$|[._-])"), "skill design"),
|
|
38
|
+
(re.compile(r"(?:^|[._-])skill_writing(?:$|[._-])"), "skill design"),
|
|
39
|
+
(re.compile(r"(?:^|[._-])discovery_manifest(?:$|[._-])"), "profile/pack semantics"),
|
|
40
|
+
(re.compile(r"(?:^|[._-])(?:profiles?|packs?)(?:$|[._-])"), "profile/pack semantics"),
|
|
41
|
+
(re.compile(r"ai[_-]?video"), "video-provider logic"),
|
|
42
|
+
(re.compile(r"(?:^|[._-])mcp(?:$|[._-])"), "MCP-registry policy"),
|
|
43
|
+
(re.compile(r"(?:^|[._-])router(?:$|[._-])"), "router / projection policy"),
|
|
44
|
+
(re.compile(r"(?:^|[._-])persona"), "persona / skill design"),
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _is_intra_workspace(module: str) -> bool:
|
|
49
|
+
head = module.split(".", 1)[0]
|
|
50
|
+
return head == "workspace" or head.startswith("workspace_")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _forbidden_reason(module: str) -> "str | None":
|
|
54
|
+
if _is_intra_workspace(module):
|
|
55
|
+
return None
|
|
56
|
+
for pat, reason in FORBIDDEN:
|
|
57
|
+
if pat.search(module):
|
|
58
|
+
return reason
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _imported_modules(tree: ast.AST):
|
|
63
|
+
"""Yield (module_name, lineno) for every import in the tree."""
|
|
64
|
+
for node in ast.walk(tree):
|
|
65
|
+
if isinstance(node, ast.ImportFrom) and node.module:
|
|
66
|
+
yield node.module, node.lineno
|
|
67
|
+
elif isinstance(node, ast.Import):
|
|
68
|
+
for alias in node.names:
|
|
69
|
+
yield alias.name, node.lineno
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def check_file(path: Path) -> list[str]:
|
|
73
|
+
"""Return human-readable violation strings for one workspace module."""
|
|
74
|
+
src = path.read_text(encoding="utf-8")
|
|
75
|
+
lines = src.splitlines()
|
|
76
|
+
try:
|
|
77
|
+
tree = ast.parse(src, filename=str(path))
|
|
78
|
+
except SyntaxError as exc: # pragma: no cover
|
|
79
|
+
return [f"{path}: unparseable ({exc})"]
|
|
80
|
+
out: list[str] = []
|
|
81
|
+
for module, lineno in _imported_modules(tree):
|
|
82
|
+
reason = _forbidden_reason(module)
|
|
83
|
+
if reason is None:
|
|
84
|
+
continue
|
|
85
|
+
line = lines[lineno - 1] if 0 < lineno <= len(lines) else ""
|
|
86
|
+
if PRAGMA in line:
|
|
87
|
+
continue # reviewed, deliberate exception
|
|
88
|
+
out.append(
|
|
89
|
+
f"{path.name}:{lineno}: imports `{module}` "
|
|
90
|
+
f"(not-owned domain: {reason})"
|
|
91
|
+
)
|
|
92
|
+
return out
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def main(argv: list[str]) -> int:
|
|
96
|
+
quiet = "--quiet" in argv
|
|
97
|
+
repo = Path(__file__).resolve().parent.parent.parent
|
|
98
|
+
files = sorted(repo.glob(WORKSPACE_GLOB))
|
|
99
|
+
if not files:
|
|
100
|
+
print(f"⚠️ lint-workspace-boundary: no files match {WORKSPACE_GLOB}")
|
|
101
|
+
return 0
|
|
102
|
+
violations: list[str] = []
|
|
103
|
+
for f in files:
|
|
104
|
+
violations.extend(check_file(f))
|
|
105
|
+
if violations:
|
|
106
|
+
print("❌ Workspace-boundary violation(s) — a workspace module imports "
|
|
107
|
+
"an owner-module of a domain the workspace does NOT own "
|
|
108
|
+
"(docs/contracts/workspace-boundary.md):")
|
|
109
|
+
for v in violations:
|
|
110
|
+
print(f" 🔴 {v}")
|
|
111
|
+
print("\nFix: move the logic to the owning surface and consume its "
|
|
112
|
+
"output, or add `# boundary-exception: <reason>` if the import is "
|
|
113
|
+
"genuinely justified (reviewed like any boundary change).")
|
|
114
|
+
return 1
|
|
115
|
+
if not quiet:
|
|
116
|
+
print(f"✅ Workspace boundary holds — {len(files)} module(s), "
|
|
117
|
+
"no forbidden imports.")
|
|
118
|
+
return 0
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
if __name__ == "__main__":
|
|
122
|
+
sys.exit(main(sys.argv[1:]))
|
|
@@ -65,8 +65,7 @@
|
|
|
65
65
|
"properties": {
|
|
66
66
|
"types": {"type": "array", "items": {"type": "string"}, "minItems": 1, "description": "Memory types to scan, e.g. `historical-patterns`, `incident-learnings`, `ownership`. At least one required."},
|
|
67
67
|
"keys": {"type": "array", "items": {"type": "string"}, "description": "Optional anchor paths or globs to match entries against (e.g. a file you are about to edit)."},
|
|
68
|
-
"limit": {"type": "integer", "minimum": 1, "default": 5, "description": "Maximum entries to return per type. Defaults to 5."}
|
|
69
|
-
"with_package": {"type": "boolean", "default": false, "description": "When true, also include memory shipped with the agent-config package, not just the consumer project's own."}
|
|
68
|
+
"limit": {"type": "integer", "minimum": 1, "default": 5, "description": "Maximum entries to return per type. Defaults to 5."}
|
|
70
69
|
},
|
|
71
70
|
"required": ["types"],
|
|
72
71
|
"additionalProperties": false
|
|
@@ -90,7 +89,7 @@
|
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
91
|
"name": "memory_status",
|
|
93
|
-
"description": "Report
|
|
92
|
+
"description": "Report the memory backend status. Memory is entirely file-backed (`agents/memory/`); there is no external backend. Read-only, takes no arguments. Returns a `status` (`file`), the active `backend` (`file`), and a short `reason`.",
|
|
94
93
|
"side_effect": "ro",
|
|
95
94
|
"implemented_on": ["stdio"],
|
|
96
95
|
"input_schema": {"type": "object", "properties": {}, "additionalProperties": false}
|
|
@@ -326,19 +326,14 @@ async def _memory_lookup_handler(
|
|
|
326
326
|
arguments: dict[str, Any],
|
|
327
327
|
consumer_root: Path,
|
|
328
328
|
) -> dict[str, Any]:
|
|
329
|
-
"""Phase 3 L2 —
|
|
329
|
+
"""Phase 3 L2 — file-backed memory retrieval over ``agents/memory/``.
|
|
330
330
|
|
|
331
331
|
Wraps ``scripts/memory_lookup.retrieve_v1`` to keep the v1 envelope
|
|
332
|
-
on the wire.
|
|
333
|
-
enables the optional ``@event4u/agent-memory`` provider when
|
|
334
|
-
reachable.
|
|
332
|
+
on the wire. Retrieval is entirely file-backed (no external backend).
|
|
335
333
|
"""
|
|
336
334
|
import os # noqa: PLC0415
|
|
337
335
|
|
|
338
|
-
from scripts.memory_lookup import
|
|
339
|
-
package_operational_provider,
|
|
340
|
-
retrieve_v1,
|
|
341
|
-
)
|
|
336
|
+
from scripts.memory_lookup import retrieve_v1 # noqa: PLC0415
|
|
342
337
|
|
|
343
338
|
types = arguments.get("types")
|
|
344
339
|
if not isinstance(types, list) or not types or not all(
|
|
@@ -352,10 +347,6 @@ async def _memory_lookup_handler(
|
|
|
352
347
|
if not isinstance(limit_raw, int) or limit_raw < 1:
|
|
353
348
|
raise ValueError("'limit' must be a positive integer")
|
|
354
349
|
|
|
355
|
-
provider = None
|
|
356
|
-
if arguments.get("with_package"):
|
|
357
|
-
provider = package_operational_provider()
|
|
358
|
-
|
|
359
350
|
prev_cwd = Path.cwd()
|
|
360
351
|
try:
|
|
361
352
|
os.chdir(consumer_root)
|
|
@@ -363,7 +354,6 @@ async def _memory_lookup_handler(
|
|
|
363
354
|
types=list(types),
|
|
364
355
|
keys=list(keys),
|
|
365
356
|
limit=limit_raw,
|
|
366
|
-
operational_provider=provider,
|
|
367
357
|
)
|
|
368
358
|
finally:
|
|
369
359
|
os.chdir(prev_cwd)
|
|
@@ -387,9 +377,7 @@ async def _memory_status_handler(
|
|
|
387
377
|
result = status()
|
|
388
378
|
finally:
|
|
389
379
|
os.chdir(prev_cwd)
|
|
390
|
-
|
|
391
|
-
payload["features"] = list(result.features)
|
|
392
|
-
return payload
|
|
380
|
+
return asdict(result)
|
|
393
381
|
|
|
394
382
|
|
|
395
383
|
# Module-level prompt / resource caches reused across handler calls so
|
|
@@ -704,15 +692,6 @@ ALLOWLIST: dict[str, BuiltinTool] = {
|
|
|
704
692
|
"Maximum entries to return per type. Defaults to 5."
|
|
705
693
|
),
|
|
706
694
|
},
|
|
707
|
-
"with_package": {
|
|
708
|
-
"type": "boolean",
|
|
709
|
-
"default": False,
|
|
710
|
-
"description": (
|
|
711
|
-
"When true, also include memory shipped with the "
|
|
712
|
-
"agent-config package, not just the consumer "
|
|
713
|
-
"project's own."
|
|
714
|
-
),
|
|
715
|
-
},
|
|
716
695
|
},
|
|
717
696
|
"required": ["types"],
|
|
718
697
|
"additionalProperties": False,
|
|
@@ -722,13 +701,10 @@ ALLOWLIST: dict[str, BuiltinTool] = {
|
|
|
722
701
|
"memory_status": BuiltinTool(
|
|
723
702
|
name="memory_status",
|
|
724
703
|
description=(
|
|
725
|
-
"Report
|
|
726
|
-
"
|
|
727
|
-
"
|
|
728
|
-
"
|
|
729
|
-
"before relying on them. Read-only, takes no arguments. "
|
|
730
|
-
"Returns a `status` (`ok` / `absent`), the active `backend`, "
|
|
731
|
-
"and — when absent — the reason and the path probed."
|
|
704
|
+
"Report the memory backend status. Memory is entirely "
|
|
705
|
+
"file-backed (`agents/memory/`); there is no external backend. "
|
|
706
|
+
"Read-only, takes no arguments. Returns a `status` (`file`), "
|
|
707
|
+
"the active `backend` (`file`), and a short `reason`."
|
|
732
708
|
),
|
|
733
709
|
input_schema={
|
|
734
710
|
"type": "object",
|