@event4u/agent-config 1.15.0 → 1.17.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/.agent-src/commands/{agents-audit.md → agents/audit.md} +4 -3
- package/.agent-src/commands/{agents-cleanup.md → agents/cleanup.md} +12 -6
- package/.agent-src/commands/{agents-prepare.md → agents/prepare.md} +4 -3
- package/.agent-src/commands/agents.md +46 -0
- package/.agent-src/commands/bug-fix.md +1 -1
- package/.agent-src/commands/bug-investigate.md +2 -2
- package/.agent-src/commands/{chat-history-checkpoint.md → chat-history/checkpoint.md} +5 -5
- package/.agent-src/commands/{chat-history-clear.md → chat-history/clear.md} +5 -5
- package/.agent-src/commands/{chat-history-resume.md → chat-history/resume.md} +4 -4
- package/.agent-src/commands/chat-history/show.md +107 -0
- package/.agent-src/commands/chat-history.md +33 -89
- package/.agent-src/commands/check-current-md.md +1 -1
- package/.agent-src/commands/{commit-in-chunks.md → commit/in-chunks.md} +15 -13
- package/.agent-src/commands/commit.md +22 -2
- package/.agent-src/commands/{context-create.md → context/create.md} +4 -3
- package/.agent-src/commands/{context-refactor.md → context/refactor.md} +4 -3
- package/.agent-src/commands/context.md +44 -0
- package/.agent-src/commands/{copilot-agents-init.md → copilot-agents/init.md} +4 -3
- package/.agent-src/commands/{copilot-agents-optimize.md → copilot-agents/optimize.md} +4 -3
- package/.agent-src/commands/copilot-agents.md +44 -0
- package/.agent-src/commands/council/default.md +221 -0
- package/.agent-src/commands/council/design.md +97 -0
- package/.agent-src/commands/council/optimize.md +116 -0
- package/.agent-src/commands/council/pr.md +124 -0
- package/.agent-src/commands/council.md +54 -0
- package/.agent-src/commands/{create-pr-description.md → create-pr/description-only.md} +4 -2
- package/.agent-src/commands/create-pr.md +49 -5
- package/.agent-src/commands/e2e-heal.md +1 -1
- package/.agent-src/commands/e2e-plan.md +1 -1
- package/.agent-src/commands/{feature-dev.md → feature/dev.md} +6 -3
- package/.agent-src/commands/{feature-explore.md → feature/explore.md} +5 -4
- package/.agent-src/commands/{feature-plan.md → feature/plan.md} +32 -5
- package/.agent-src/commands/{feature-refactor.md → feature/refactor.md} +4 -3
- package/.agent-src/commands/{feature-roadmap.md → feature/roadmap.md} +7 -6
- package/.agent-src/commands/feature.md +52 -0
- package/.agent-src/commands/{fix-ci.md → fix/ci.md} +4 -3
- package/.agent-src/commands/{fix-portability.md → fix/portability.md} +4 -3
- package/.agent-src/commands/{fix-pr-bot-comments.md → fix/pr-bots.md} +4 -3
- package/.agent-src/commands/{fix-pr-developer-comments.md → fix/pr-developers.md} +4 -3
- package/.agent-src/commands/{fix-pr-comments.md → fix/pr.md} +7 -6
- package/.agent-src/commands/{fix-references.md → fix/refs.md} +4 -3
- package/.agent-src/commands/{fix-seeder.md → fix/seeder.md} +4 -3
- package/.agent-src/commands/fix.md +54 -0
- package/.agent-src/commands/jira-ticket.md +1 -1
- package/.agent-src/commands/{do-and-judge.md → judge/on-diff.md} +7 -6
- package/.agent-src/commands/judge/solo.md +90 -0
- package/.agent-src/commands/{do-in-steps.md → judge/steps.md} +8 -7
- package/.agent-src/commands/judge.md +35 -70
- package/.agent-src/commands/{memory-add.md → memory/add.md} +7 -6
- package/.agent-src/commands/{memory-full.md → memory/load.md} +6 -5
- package/.agent-src/commands/{memory-promote.md → memory/promote.md} +6 -5
- package/.agent-src/commands/{propose-memory.md → memory/propose.md} +6 -5
- package/.agent-src/commands/memory.md +48 -0
- package/.agent-src/commands/mode.md +5 -5
- package/.agent-src/commands/{module-create.md → module/create.md} +4 -3
- package/.agent-src/commands/{module-explore.md → module/explore.md} +4 -3
- package/.agent-src/commands/module.md +44 -0
- package/.agent-src/commands/onboard.md +3 -3
- package/.agent-src/commands/{optimize-agents.md → optimize/agents.md} +5 -4
- package/.agent-src/commands/{optimize-augmentignore.md → optimize/augmentignore.md} +4 -4
- package/.agent-src/commands/{optimize-rtk-filters.md → optimize/rtk.md} +4 -3
- package/.agent-src/commands/{optimize-skills.md → optimize/skills.md} +5 -4
- package/.agent-src/commands/optimize.md +48 -0
- package/.agent-src/commands/{override-create.md → override/create.md} +4 -3
- package/.agent-src/commands/{override-manage.md → override/manage.md} +4 -3
- package/.agent-src/commands/override.md +44 -0
- package/.agent-src/commands/review-changes.md +26 -1
- package/.agent-src/commands/review-routing.md +1 -1
- package/.agent-src/commands/{roadmap-create.md → roadmap/create.md} +33 -5
- package/.agent-src/commands/{roadmap-execute.md → roadmap/execute.md} +4 -3
- package/.agent-src/commands/roadmap.md +44 -0
- package/.agent-src/commands/set-cost-profile.md +3 -3
- package/.agent-src/commands/sync-agent-settings.md +2 -2
- package/.agent-src/commands/{tests-create.md → tests/create.md} +5 -4
- package/.agent-src/commands/{tests-execute.md → tests/execute.md} +4 -3
- package/.agent-src/commands/tests.md +44 -0
- package/.agent-src/commands/upstream-contribute.md +1 -1
- package/.agent-src/contexts/authority/commit-mechanics.md +57 -0
- package/.agent-src/contexts/authority/destructive-mechanics.md +66 -0
- package/.agent-src/contexts/authority/scope-mechanics.md +87 -0
- package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +72 -0
- package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +79 -0
- package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +98 -0
- package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +87 -0
- package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +85 -0
- package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +65 -0
- package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +55 -0
- package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +53 -0
- package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +77 -0
- package/.agent-src/contexts/execution/autonomy-detection.md +54 -0
- package/.agent-src/contexts/execution/autonomy-examples.md +90 -0
- package/.agent-src/contexts/execution/autonomy-mechanics.md +29 -0
- package/.agent-src/contexts/execution/verification-mechanics.md +80 -0
- package/.agent-src/contexts/judges/no-consolidate-rationale.md +102 -0
- package/.agent-src/contexts/judges/persona-voice-rubric.md +140 -0
- package/.agent-src/personas/README.md +1 -1
- package/.agent-src/rules/agent-authority.md +24 -0
- package/.agent-src/rules/architecture.md +1 -1
- package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
- package/.agent-src/rules/artifact-engagement-recording.md +14 -70
- package/.agent-src/rules/ask-when-uncertain.md +28 -43
- package/.agent-src/rules/augment-portability.md +15 -61
- package/.agent-src/rules/augment-source-of-truth.md +27 -93
- package/.agent-src/rules/autonomous-execution.md +78 -114
- package/.agent-src/rules/capture-learnings.md +1 -1
- package/.agent-src/rules/chat-history-cadence.md +3 -3
- package/.agent-src/rules/chat-history-ownership.md +3 -3
- package/.agent-src/rules/chat-history-visibility.md +3 -3
- package/.agent-src/rules/cli-output-handling.md +10 -76
- package/.agent-src/rules/command-suggestion-policy.md +93 -0
- package/.agent-src/rules/commit-conventions.md +17 -14
- package/.agent-src/rules/commit-policy.md +14 -42
- package/.agent-src/rules/context-hygiene.md +3 -3
- package/.agent-src/rules/direct-answers.md +34 -49
- package/.agent-src/rules/docker-commands.md +5 -5
- package/.agent-src/rules/docs-sync.md +16 -70
- package/.agent-src/rules/e2e-testing.md +1 -1
- package/.agent-src/rules/guidelines.md +4 -4
- package/.agent-src/rules/improve-before-implement.md +2 -2
- package/.agent-src/rules/language-and-tone.md +50 -133
- package/.agent-src/rules/minimal-safe-diff.md +3 -3
- package/.agent-src/rules/missing-tool-handling.md +28 -22
- package/.agent-src/rules/model-recommendation.md +4 -4
- package/.agent-src/rules/no-cheap-questions.md +82 -0
- package/.agent-src/rules/no-roadmap-references.md +73 -0
- package/.agent-src/rules/non-destructive-by-default.md +15 -49
- package/.agent-src/rules/onboarding-gate.md +5 -5
- package/.agent-src/rules/package-ci-checks.md +21 -61
- package/.agent-src/rules/preservation-guard.md +64 -29
- package/.agent-src/rules/review-routing-awareness.md +26 -45
- package/.agent-src/rules/roadmap-progress-sync.md +28 -96
- package/.agent-src/rules/role-mode-adherence.md +2 -2
- package/.agent-src/rules/scope-control.md +65 -46
- package/.agent-src/rules/security-sensitive-stop.md +9 -9
- package/.agent-src/rules/size-enforcement.md +1 -1
- package/.agent-src/rules/skill-quality.md +16 -48
- package/.agent-src/rules/{slash-commands.md → slash-command-routing-policy.md} +7 -4
- package/.agent-src/rules/think-before-action.md +55 -45
- package/.agent-src/rules/token-efficiency.md +4 -4
- package/.agent-src/rules/tool-safety.md +19 -16
- package/.agent-src/rules/{ui-audit-before-build.md → ui-audit-gate.md} +27 -41
- package/.agent-src/rules/user-interaction.md +16 -71
- package/.agent-src/rules/verify-before-complete.md +12 -67
- package/.agent-src/scripts/update_roadmap_progress.py +9 -4
- package/.agent-src/skills/ai-council/SKILL.md +335 -0
- package/.agent-src/skills/api-endpoint/SKILL.md +2 -2
- package/.agent-src/skills/api-testing/SKILL.md +1 -1
- package/.agent-src/skills/blade-ui/SKILL.md +1 -1
- package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
- package/.agent-src/skills/bug-analyzer/SKILL.md +1 -1
- package/.agent-src/skills/check-refs/SKILL.md +59 -40
- package/.agent-src/skills/command-routing/SKILL.md +1 -1
- package/.agent-src/skills/command-writing/SKILL.md +1 -1
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +86 -28
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +7 -7
- package/.agent-src/skills/developer-like-execution/SKILL.md +6 -6
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +101 -65
- package/.agent-src/skills/flux/SKILL.md +31 -11
- package/.agent-src/skills/git-workflow/SKILL.md +1 -1
- package/.agent-src/skills/github-ci/SKILL.md +2 -2
- package/.agent-src/skills/guideline-writing/SKILL.md +11 -11
- package/.agent-src/skills/judge-code-quality/SKILL.md +7 -8
- package/.agent-src/skills/judge-security-auditor/SKILL.md +4 -5
- package/.agent-src/skills/judge-test-coverage/SKILL.md +3 -4
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
- package/.agent-src/skills/lint-skills/SKILL.md +57 -39
- package/.agent-src/skills/livewire/SKILL.md +1 -1
- package/.agent-src/skills/md-language-check/SKILL.md +61 -39
- package/.agent-src/skills/override-management/SKILL.md +7 -7
- package/.agent-src/skills/php-coder/SKILL.md +1 -1
- package/.agent-src/skills/playwright-testing/SKILL.md +2 -2
- package/.agent-src/skills/quality-tools/SKILL.md +2 -2
- package/.agent-src/skills/react-shadcn-ui/SKILL.md +116 -43
- package/.agent-src/skills/readme-reviewer/SKILL.md +31 -30
- package/.agent-src/skills/readme-writing/SKILL.md +79 -54
- package/.agent-src/skills/readme-writing-package/SKILL.md +51 -48
- package/.agent-src/skills/receiving-code-review/SKILL.md +53 -48
- package/.agent-src/skills/refine-prompt/SKILL.md +0 -1
- package/.agent-src/skills/requesting-code-review/SKILL.md +35 -30
- package/.agent-src/skills/review-routing/SKILL.md +2 -2
- package/.agent-src/skills/rule-writing/SKILL.md +1 -1
- package/.agent-src/skills/security/SKILL.md +7 -2
- package/.agent-src/skills/security-audit/SKILL.md +7 -3
- package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
- package/.agent-src/skills/skill-writing/SKILL.md +3 -3
- package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
- package/.agent-src/skills/systematic-debugging/SKILL.md +69 -61
- package/.agent-src/skills/test-driven-development/SKILL.md +59 -57
- package/.agent-src/skills/test-performance/SKILL.md +0 -1
- package/.agent-src/skills/traefik/SKILL.md +4 -4
- package/.agent-src/skills/upstream-contribute/SKILL.md +1 -1
- package/.agent-src/skills/validate-feature-fit/SKILL.md +2 -2
- package/.agent-src/skills/{verify-before-complete → verify-completion-evidence}/SKILL.md +30 -28
- package/.agent-src/templates/agent-settings.md +8 -8
- package/.agent-src/templates/contexts/auth-model.md +1 -1
- package/.agent-src/templates/scripts/README.md +2 -2
- package/.agent-src/templates/scripts/telemetry/aggregator.py +16 -1
- package/.agent-src/templates/scripts/telemetry/engagement.py +59 -0
- package/.agent-src/templates/scripts/telemetry/report_renderer.py +28 -1
- package/.agent-src/templates/scripts/telemetry_record.py +14 -1
- package/.claude-plugin/marketplace.json +31 -12
- package/AGENTS.md +11 -9
- package/CHANGELOG.md +213 -2
- package/README.md +43 -44
- package/config/agent-settings.template.yml +58 -1
- package/config/gitignore-block.txt +3 -0
- package/docs/architecture.md +5 -7
- package/docs/catalog.md +359 -0
- package/docs/contracts/STABILITY.md +46 -1
- package/docs/contracts/adr-chat-history-split.md +1 -3
- package/docs/contracts/adr-command-suggestion.md +3 -5
- package/docs/contracts/adr-implement-ticket-runtime.md +1 -2
- package/docs/contracts/adr-product-ui-track.md +5 -8
- package/docs/contracts/adr-prompt-driven-execution.md +3 -4
- package/docs/contracts/agent-memory-contract.md +8 -13
- package/docs/contracts/artifact-engagement-flow.md +7 -10
- package/docs/contracts/command-clusters.md +56 -46
- package/docs/contracts/command-suggestion-flow.md +4 -6
- package/docs/contracts/context-paths.md +99 -0
- package/docs/contracts/file-ownership-matrix.json +6722 -0
- package/docs/contracts/file-ownership-matrix.md +134 -0
- package/docs/contracts/implement-ticket-flow.md +8 -11
- package/docs/contracts/linear-ai-rules-inclusion.md +1 -2
- package/docs/contracts/linear-ai-three-layers.md +0 -2
- package/docs/contracts/load-context-budget-model.md +178 -0
- package/docs/contracts/load-context-schema.md +184 -0
- package/docs/contracts/rule-interactions.md +0 -1
- package/docs/contracts/rule-interactions.yml +96 -0
- package/docs/contracts/rule-priority-hierarchy.md +87 -0
- package/docs/contracts/ui-track-flow.md +8 -18
- package/docs/customization.md +16 -0
- package/docs/end-to-end-walkthroughs.md +165 -0
- package/docs/getting-started.md +29 -10
- package/docs/github-topics.md +12 -3
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +100 -0
- package/docs/guidelines/agent-infra/language-and-tone-examples.md +79 -0
- package/{.agent-src → docs}/guidelines/docs/readme-size-and-splitting.md +26 -25
- package/docs/guidelines/php/git.md +164 -0
- package/docs/migrations/commands-1.15.0.md +1 -1
- package/docs/showcase.md +9 -4
- package/docs/skills-catalog.md +14 -8
- package/docs/ui-track-mental-model.md +2 -2
- package/llms.txt +13 -7
- package/package.json +1 -1
- package/scripts/_one_off_phase4_dispatch_latency.py +108 -0
- package/scripts/_one_off_phase6_trigger_jaccard.py +92 -0
- package/scripts/_phase2_shim_helper.py +109 -0
- package/scripts/agent-config +33 -0
- package/scripts/ai_council/__init__.py +39 -0
- package/scripts/ai_council/_default_prices.py +41 -0
- package/scripts/ai_council/_one_off_2a4_acceptance.py +208 -0
- package/scripts/ai_council/_one_off_context_layer_v1_estimate.py +67 -0
- package/scripts/ai_council/_one_off_context_layer_v1_review.py +292 -0
- package/scripts/ai_council/_one_off_followups_review.py +259 -0
- package/scripts/ai_council/_one_off_nondestructive_inline_audit.py +209 -0
- package/scripts/ai_council/_one_off_phase_2a_budget_rebalance.py +257 -0
- package/scripts/ai_council/_one_off_phase_2a_post_revert.py +197 -0
- package/scripts/ai_council/_one_off_rebalancing_audit.py +149 -0
- package/scripts/ai_council/_one_off_roundtrip.py +106 -0
- package/scripts/ai_council/_one_off_rule_hardening_v1.py +251 -0
- package/scripts/ai_council/_one_off_structural_open_questions.py +232 -0
- package/scripts/ai_council/_one_off_structural_optimization.py +144 -0
- package/scripts/ai_council/_one_off_structural_v3_gaps.py +252 -0
- package/scripts/ai_council/_one_off_structural_v3_review.py +240 -0
- package/scripts/ai_council/budget_guard.py +172 -0
- package/scripts/ai_council/bundler.py +261 -0
- package/scripts/ai_council/clients.py +381 -0
- package/scripts/ai_council/modes.py +127 -0
- package/scripts/ai_council/orchestrator.py +350 -0
- package/scripts/ai_council/pricing.py +213 -0
- package/scripts/ai_council/project_context.py +159 -0
- package/scripts/ai_council/prompts.py +232 -0
- package/scripts/ai_council/session.py +144 -0
- package/scripts/check_always_budget.py +444 -0
- package/scripts/check_augmentignore.py +69 -0
- package/scripts/check_cluster_patterns.py +159 -0
- package/scripts/check_command_count_messaging.py +127 -0
- package/scripts/check_context_paths.py +201 -0
- package/scripts/check_no_roadmap_refs.py +155 -0
- package/scripts/check_phase_coupling.py +148 -0
- package/scripts/check_portability.py +57 -0
- package/scripts/check_public_catalog_links.py +122 -0
- package/scripts/check_references.py +33 -3
- package/scripts/check_roadmap_trackable.py +111 -0
- package/scripts/check_safety_floor_untouched.py +125 -0
- package/scripts/command_suggester/cooldown.py +1 -1
- package/scripts/command_suggester/loader.py +4 -1
- package/scripts/compress.py +59 -13
- package/scripts/generate_index.py +270 -0
- package/scripts/generate_ownership_matrix.py +323 -0
- package/scripts/hooks/augment-roadmap-progress.sh +57 -0
- package/scripts/install.py +49 -28
- package/scripts/install_anthropic_key.sh +5 -0
- package/scripts/install_openai_key.sh +106 -0
- package/scripts/lint_load_context.py +163 -0
- package/scripts/lint_no_new_atomic_commands.py +12 -11
- package/scripts/requirements-evals.txt +1 -0
- package/scripts/roadmap_progress_hook.py +159 -0
- package/scripts/schemas/command.schema.json +22 -1
- package/scripts/schemas/rule.schema.json +10 -0
- package/scripts/skill_linter.py +13 -4
- package/scripts/sync_agent_settings.py +26 -3
- package/scripts/update_counts.py +16 -4
- package/scripts/update_prices.py +124 -0
- package/.agent-src/guidelines/php/git.md +0 -96
- package/.agent-src/rules/command-suggestion.md +0 -134
- /package/{.agent-src → docs}/guidelines/agent-infra/agent-interaction-and-decision-quality.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/break-glass-usage.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/developer-judgment.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/engineering-memory-data-format.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/layered-settings.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/memory-access.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/naming.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/output-patterns.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/review-routing-data-format.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/role-contracts.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/role-mode-router.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/runtime-layer.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/self-improvement-pipeline.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/size-and-scope.md +0 -0
- /package/{.agent-src → docs}/guidelines/agent-infra/tool-integration.md +0 -0
- /package/{.agent-src → docs}/guidelines/e2e/playwright.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/api-design.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/artisan-commands.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/blade-ui.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/controllers.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/database.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/eloquent.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/flux.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/general.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/jobs.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/livewire.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/logging.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/naming.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/dependency-injection.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/dtos.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/events.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/factory.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/pipelines.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/policies.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/repositories.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/service-layer.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns/strategy.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/patterns.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/performance.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/resources.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/security.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/sql.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/validations.md +0 -0
- /package/{.agent-src → docs}/guidelines/php/websocket.md +0 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"""Council review of road-to-1-16-followups.md (draft v1).
|
|
2
|
+
|
|
3
|
+
The followups roadmap distils 14 numbered findings (F1-F14) from two
|
|
4
|
+
external review rounds of release 1.16.0 into three phases:
|
|
5
|
+
- Phase 0: reviewer P0/P1/P2 stack (README sync, budget headroom,
|
|
6
|
+
council labelling, release-tag gate). Effort <= 1 hour.
|
|
7
|
+
- Phase 1: load_context: rollout to three medium-risk policy rules
|
|
8
|
+
+ non-destructive-by-default failure-mode-only split + 1.15-followups
|
|
9
|
+
archive verification. Effort ~2 days.
|
|
10
|
+
- Phase 2: README "Start here" anchor, host-agent wording precision,
|
|
11
|
+
golden-test failure-mode coverage. Effort ~0.5 days.
|
|
12
|
+
|
|
13
|
+
Single round. Both members produce a structured per-phase verdict and
|
|
14
|
+
together with the host agent define the binding step list before the
|
|
15
|
+
roadmap is locked.
|
|
16
|
+
|
|
17
|
+
Invocation:
|
|
18
|
+
.venv/bin/python -m scripts.ai_council._one_off_followups_review
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
from scripts.ai_council.bundler import bundle_roadmap
|
|
26
|
+
from scripts.ai_council.clients import (
|
|
27
|
+
AnthropicClient,
|
|
28
|
+
OpenAIClient,
|
|
29
|
+
load_anthropic_key,
|
|
30
|
+
load_openai_key,
|
|
31
|
+
)
|
|
32
|
+
from scripts.ai_council.orchestrator import (
|
|
33
|
+
CostBudget,
|
|
34
|
+
CouncilQuestion,
|
|
35
|
+
consult,
|
|
36
|
+
estimate,
|
|
37
|
+
)
|
|
38
|
+
from scripts.ai_council.pricing import estimate_cost, load_prices
|
|
39
|
+
from scripts.ai_council.project_context import detect_project_context
|
|
40
|
+
from scripts.ai_council.session import SessionManifest, save as save_session
|
|
41
|
+
|
|
42
|
+
REPO_ROOT = Path(__file__).resolve().parents[2]
|
|
43
|
+
ROADMAP_PATH = REPO_ROOT / "agents/roadmaps/road-to-1-16-followups.md"
|
|
44
|
+
|
|
45
|
+
ORIGINAL_ASK = (
|
|
46
|
+
"Two external review rounds on release 1.16.0 produced 14 numbered "
|
|
47
|
+
"findings (F1-F14) and a P0/P1/P2 fix stack. The host agent distilled "
|
|
48
|
+
"them into road-to-1-16-followups.md (draft v1, 3 phases, 7 risks). "
|
|
49
|
+
"Council task: evaluate the F1-F14 capture quality, the phase split, "
|
|
50
|
+
"the gating between this roadmap and road-to-structural-optimization "
|
|
51
|
+
"v3.1, and the per-step contracts. Together with the host agent, "
|
|
52
|
+
"define the binding step list before lock-in."
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
REVIEW_PROMPT = """\
|
|
56
|
+
# Council Review — road-to-1-16-followups.md draft v1
|
|
57
|
+
|
|
58
|
+
Context for both reviewers:
|
|
59
|
+
|
|
60
|
+
- A separate roadmap (`road-to-structural-optimization.md`) was \
|
|
61
|
+
finalised at v3.1 in a prior session. You both reviewed it across \
|
|
62
|
+
five rounds. v3.1 is locked. **Do not re-litigate it.** This review \
|
|
63
|
+
is about a *different*, *narrower* roadmap that addresses post-1.16.0 \
|
|
64
|
+
PR feedback.
|
|
65
|
+
- Reviewer 1 (consolidation-quality lens) scored 1.16.0 at 9.5/10. \
|
|
66
|
+
Concerns: surface still large, README dense, context-layer rollout \
|
|
67
|
+
pace, "agent runs / implements" overclaim risk, golden-test failure-\
|
|
68
|
+
mode bias. Strategy notes (F5-F8): roll out load_context: slowly, \
|
|
69
|
+
prepare a second command-collapse phase, ship outcome demos, do not \
|
|
70
|
+
inflate the README.
|
|
71
|
+
- Reviewer 2 (commit-level audit, raw.githubusercontent.com verified) \
|
|
72
|
+
scored 1.16.0 at A-. Concrete findings:
|
|
73
|
+
- **F9 (P0):** README on `main` shows pre-1.15.0 wording \
|
|
74
|
+
("Teach your AI agents Laravel...", "124 Skills · 46 Rules · \
|
|
75
|
+
73 Commands · 46 Guidelines"). The 1.16.0 release tag has the \
|
|
76
|
+
correct text but is not an ancestor of `main`. Reviewer-supplied \
|
|
77
|
+
cherry-pick SHAs: 1053d56, d26bf68, 2fa8022, c282ae3.
|
|
78
|
+
- **F10 (P1):** `tests/test_always_budget.py` top-5 cap headroom is \
|
|
79
|
+
~141 chars after `no-cheap-questions` was added. Target: >= 2,000 \
|
|
80
|
+
chars headroom. Q3=A from structural-optimization v3.1 excludes \
|
|
81
|
+
safety-floor rules from slim work.
|
|
82
|
+
- **F11 (P2):** AI Council Phase 3-4 (debate, persistence, special \
|
|
83
|
+
modes) grew without external-user signal. Reviewer fix: experimental \
|
|
84
|
+
banner, no code cut.
|
|
85
|
+
- **F14:** 1.16.0 tag points to commit 08daac9 which is not on `main`. \
|
|
86
|
+
Workflow gap.
|
|
87
|
+
- Three Reviewer-1 strategy items (F5/F6/F7) and one (F8) on golden \
|
|
88
|
+
tests are also captured. The host agent placed them as: F5/F6/F7 = \
|
|
89
|
+
out-of-scope strategy notes (next-roadmap-generation seed); F8 = \
|
|
90
|
+
Phase 2.3.
|
|
91
|
+
|
|
92
|
+
You both reviewed v3.1 already. **Stop re-reviewing v3.1.** Pick a \
|
|
93
|
+
binding verdict per phase of *this* followups roadmap, and together \
|
|
94
|
+
with the host agent define the final step list.
|
|
95
|
+
|
|
96
|
+
## Output Contract (STRICT)
|
|
97
|
+
|
|
98
|
+
For each phase, produce exactly this block:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
### Phase <0|1|2>: <theme>
|
|
102
|
+
|
|
103
|
+
**Verdict:** <ACCEPT | ACCEPT_WITH_REVISIONS | REJECT>
|
|
104
|
+
**Capture quality (F-items folded into this phase):** <COMPLETE | PARTIAL — list missing>
|
|
105
|
+
**Gate correctness:** <CORRECT | UNDER-GATED | OVER-GATED>
|
|
106
|
+
**Per-step contract clarity:** <SUFFICIENT | NEEDS_TIGHTENING — name steps>
|
|
107
|
+
**Required revisions (numbered, 1-3 max):**
|
|
108
|
+
1. <one sentence — smallest change>
|
|
109
|
+
2. <...>
|
|
110
|
+
3. <...>
|
|
111
|
+
**Risk register coverage:** <SUFFICIENT | MISSING — name risk>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Verdict definitions:
|
|
115
|
+
- **ACCEPT** — phase ships as written; no revisions required.
|
|
116
|
+
- **ACCEPT_WITH_REVISIONS** — phase ships after the listed revisions \
|
|
117
|
+
land. Each revision must be one specific, actionable change.
|
|
118
|
+
- **REJECT** — phase is structurally wrong; describe the structural \
|
|
119
|
+
fault in <= 2 sentences in the revisions block.
|
|
120
|
+
|
|
121
|
+
## The Three Phases
|
|
122
|
+
|
|
123
|
+
The roadmap text follows this prompt verbatim. Read it first, then \
|
|
124
|
+
render the three blocks above for Phase 0, Phase 1, Phase 2.
|
|
125
|
+
|
|
126
|
+
## Cross-cutting questions (answer after the three blocks)
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
### Cross-cutting
|
|
130
|
+
|
|
131
|
+
**Is the F1-F14 placement correct?** \
|
|
132
|
+
<YES | NO — list misplaced F-numbers and where they should go>
|
|
133
|
+
**Is the gating to road-to-structural-optimization v3.1 correct?** \
|
|
134
|
+
<YES | NO — Phase 1 currently gates on v3.1 Phase 0.4 worked example>
|
|
135
|
+
**Is anything missing entirely from the F1-F14 capture that the \
|
|
136
|
+
source feedback raised?** \
|
|
137
|
+
<NO | YES — list missing observation + which phase/risk it belongs to>
|
|
138
|
+
**Is anything over-scoped (should not be a roadmap item at all)?** \
|
|
139
|
+
<NO | YES — list and justify>
|
|
140
|
+
**Reviewer-1 strategy items F5/F6/F7 placement (out-of-scope, \
|
|
141
|
+
next-roadmap-generation seed) — correct?** \
|
|
142
|
+
<YES | NO — propose alternative placement>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Final Output
|
|
146
|
+
|
|
147
|
+
After the three phase blocks and the cross-cutting block, add:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
### Consensus verdict
|
|
151
|
+
|
|
152
|
+
**Overall recommendation:** <one of: LOCK_AS_IS | LOCK_AFTER_REVISIONS \
|
|
153
|
+
| RESCOPE_REQUIRED>
|
|
154
|
+
**Phase-0 launchable now?** <YES | NO — reasons>
|
|
155
|
+
**Phase-1 unblocked once structural v3.1 Phase 0.4 lands?** \
|
|
156
|
+
<YES | NO — reasons>
|
|
157
|
+
**Total residual revisions:** <count and sum of effort estimates>
|
|
158
|
+
**Single biggest risk in this followups roadmap that the host agent \
|
|
159
|
+
has under-weighted:** <one sentence>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Be decisive. The host agent will integrate your two verdicts; \
|
|
163
|
+
divergence triggers a tie-break round, but only if you actually \
|
|
164
|
+
disagree on a *blocking* item. Total response budget: <= 1500 words \
|
|
165
|
+
per reviewer.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def main() -> int:
|
|
170
|
+
anthropic = AnthropicClient(api_key=load_anthropic_key(), model="claude-sonnet-4-5")
|
|
171
|
+
openai = OpenAIClient(api_key=load_openai_key(), model="gpt-4o")
|
|
172
|
+
members = [anthropic, openai]
|
|
173
|
+
|
|
174
|
+
context = bundle_roadmap(ROADMAP_PATH)
|
|
175
|
+
project = detect_project_context(REPO_ROOT)
|
|
176
|
+
table = load_prices()
|
|
177
|
+
|
|
178
|
+
user_prompt = REVIEW_PROMPT + "\n\n---\n\n" + context.text
|
|
179
|
+
|
|
180
|
+
question = CouncilQuestion(
|
|
181
|
+
mode="roadmap",
|
|
182
|
+
user_prompt=user_prompt,
|
|
183
|
+
max_tokens=4096,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
estimates = estimate(
|
|
187
|
+
question, members, table, project=project, original_ask=ORIGINAL_ASK,
|
|
188
|
+
)
|
|
189
|
+
print("=== ESTIMATE (single round, max tokens) ===")
|
|
190
|
+
total_est = 0.0
|
|
191
|
+
for c, e in zip(members, estimates):
|
|
192
|
+
print(f" {c.name}/{c.model}: ~{e.input_tokens} in + {e.output_tokens} out = ${e.total_usd:.4f}")
|
|
193
|
+
total_est += e.total_usd
|
|
194
|
+
print(f" TOTAL per round (max): ${total_est:.4f}")
|
|
195
|
+
print()
|
|
196
|
+
|
|
197
|
+
budget = CostBudget(
|
|
198
|
+
max_input_tokens=200_000,
|
|
199
|
+
max_output_tokens=80_000,
|
|
200
|
+
max_calls=20,
|
|
201
|
+
max_total_usd=2.50,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
rounds_collected: list[list] = []
|
|
205
|
+
|
|
206
|
+
def _on_round_complete(round_idx: int, round_responses) -> None:
|
|
207
|
+
rounds_collected.append(list(round_responses))
|
|
208
|
+
print(f"=== ROUND {round_idx + 1} COMPLETE ===")
|
|
209
|
+
for r in round_responses:
|
|
210
|
+
if r.error:
|
|
211
|
+
print(f" [error] {r.provider}/{r.model}: {r.error}")
|
|
212
|
+
continue
|
|
213
|
+
actual = estimate_cost(r.provider, r.model, r.input_tokens, r.output_tokens, table)
|
|
214
|
+
print(f" [done] {r.provider}/{r.model}: {r.input_tokens} in / "
|
|
215
|
+
f"{r.output_tokens} out · {r.latency_ms} ms · ${actual.total_usd:.4f}")
|
|
216
|
+
print()
|
|
217
|
+
|
|
218
|
+
print("=== CONSULT (1 round, followups roadmap review) ===")
|
|
219
|
+
consult(
|
|
220
|
+
members, question, budget,
|
|
221
|
+
rounds=1,
|
|
222
|
+
on_round_complete=_on_round_complete,
|
|
223
|
+
table=table, project=project, original_ask=ORIGINAL_ASK,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
if not rounds_collected:
|
|
227
|
+
print("[error] no rounds completed", file=sys.stderr)
|
|
228
|
+
return 1
|
|
229
|
+
|
|
230
|
+
actual_total = 0.0
|
|
231
|
+
for round_responses in rounds_collected:
|
|
232
|
+
for r in round_responses:
|
|
233
|
+
if r.error:
|
|
234
|
+
continue
|
|
235
|
+
actual = estimate_cost(r.provider, r.model, r.input_tokens, r.output_tokens, table)
|
|
236
|
+
actual_total += actual.total_usd
|
|
237
|
+
print(f"=== TOTAL ACTUAL: ${actual_total:.4f} ===")
|
|
238
|
+
|
|
239
|
+
final_round = rounds_collected[-1]
|
|
240
|
+
if not [r for r in final_round if not r.error]:
|
|
241
|
+
return 1
|
|
242
|
+
|
|
243
|
+
manifest = SessionManifest(
|
|
244
|
+
mode="roadmap",
|
|
245
|
+
artefact=str(ROADMAP_PATH.relative_to(REPO_ROOT)),
|
|
246
|
+
original_ask=ORIGINAL_ASK,
|
|
247
|
+
members=[f"{r.provider}/{r.model}" for r in final_round],
|
|
248
|
+
rounds=len(rounds_collected),
|
|
249
|
+
cost_usd_estimated=total_est,
|
|
250
|
+
cost_usd_actual=actual_total,
|
|
251
|
+
extra={"purpose": "Council review of road-to-1-16-followups.md draft v1"},
|
|
252
|
+
)
|
|
253
|
+
session_dir = save_session(manifest=manifest, responses=rounds_collected)
|
|
254
|
+
print(f"[saved] {session_dir.relative_to(REPO_ROOT)}/")
|
|
255
|
+
return 1 if any(r.error for round_r in rounds_collected for r in round_r) else 0
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
if __name__ == "__main__":
|
|
259
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"""Council inline-content audit for `non-destructive-by-default` (Phase 1.1.3).
|
|
2
|
+
|
|
3
|
+
Roadmap `road-to-1-16-followups` Phase 1.1.3 requires a council audit
|
|
4
|
+
before merging the `load_context:` rollout for the safety-floor rule.
|
|
5
|
+
Both reviewers must return PASS confirming that:
|
|
6
|
+
|
|
7
|
+
- The Hard-Floor trigger table stays inline.
|
|
8
|
+
- The Iron Law caps block stays inline.
|
|
9
|
+
- The Cloud Behavior section stays inline.
|
|
10
|
+
- No obligation moved to `destructive-mechanics.md` that should
|
|
11
|
+
have stayed in the rule.
|
|
12
|
+
|
|
13
|
+
This audit is post-rollout (the rollout already shipped via Phase 7.4
|
|
14
|
+
of `road-to-structural-optimization`); it certifies the *current* state
|
|
15
|
+
of `main` against the Phase 1.1.3 contract.
|
|
16
|
+
|
|
17
|
+
Invocation:
|
|
18
|
+
.venv/bin/python -m scripts.ai_council._one_off_nondestructive_inline_audit
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
from scripts.ai_council.bundler import bundle_files
|
|
26
|
+
from scripts.ai_council.clients import (
|
|
27
|
+
AnthropicClient,
|
|
28
|
+
OpenAIClient,
|
|
29
|
+
load_anthropic_key,
|
|
30
|
+
load_openai_key,
|
|
31
|
+
)
|
|
32
|
+
from scripts.ai_council.orchestrator import (
|
|
33
|
+
CostBudget,
|
|
34
|
+
CouncilQuestion,
|
|
35
|
+
consult,
|
|
36
|
+
estimate,
|
|
37
|
+
)
|
|
38
|
+
from scripts.ai_council.pricing import estimate_cost, load_prices
|
|
39
|
+
from scripts.ai_council.project_context import detect_project_context
|
|
40
|
+
from scripts.ai_council.session import SessionManifest, save as save_session
|
|
41
|
+
|
|
42
|
+
REPO_ROOT = Path(__file__).resolve().parents[2]
|
|
43
|
+
ARTEFACTS = [
|
|
44
|
+
REPO_ROOT / ".agent-src.uncompressed/rules/non-destructive-by-default.md",
|
|
45
|
+
REPO_ROOT / ".agent-src.uncompressed/contexts/authority/destructive-mechanics.md",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
ORIGINAL_ASK = (
|
|
49
|
+
"Phase 1.1.3 of road-to-1-16-followups requires a council audit on "
|
|
50
|
+
"the `non-destructive-by-default` rule after `load_context:` rollout. "
|
|
51
|
+
"Verify that Hard-Floor table, Iron Law caps block, and Cloud Behavior "
|
|
52
|
+
"section are still inline; flag any obligation that moved to context "
|
|
53
|
+
"and should not have."
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
REVIEW_PROMPT = """\
|
|
57
|
+
# Council Inline-Content Audit — non-destructive-by-default
|
|
58
|
+
|
|
59
|
+
## Context
|
|
60
|
+
|
|
61
|
+
The host agent rolled out `load_context:` to the `non-destructive-by-default` \
|
|
62
|
+
rule (universal safety floor). Failure-mode catalog and Bulk-deletions-WIP \
|
|
63
|
+
allowed/forbidden lists moved to `destructive-mechanics.md`. The roadmap \
|
|
64
|
+
contract requires that the load-bearing inline obligations stay in the rule.
|
|
65
|
+
|
|
66
|
+
You are auditing the **current state** of two files (rule + mechanics) to \
|
|
67
|
+
certify the rollout. This is not a re-design review.
|
|
68
|
+
|
|
69
|
+
## Required-inline checklist
|
|
70
|
+
|
|
71
|
+
1. **Hard-Floor trigger table** — six rows: production-branch merge, \
|
|
72
|
+
deploy/release, push to remote, production data/infra, whimsical or \
|
|
73
|
+
unscoped bulk deletion, commit containing bulk deletions or infra changes.
|
|
74
|
+
2. **Iron Law caps block** — three lines starting with \
|
|
75
|
+
`HARD FLOOR OVERRIDES EVERYTHING.`
|
|
76
|
+
3. **Cloud Behavior section** — two-sentence statement that the floor applies \
|
|
77
|
+
on Claude.ai Web, Skills API, and any cloud agent, with no cloud override.
|
|
78
|
+
4. **"Triggers require explicit user confirmation on this turn" clause** — \
|
|
79
|
+
the not-from-previous-turn, not-from-roadmap, not-from-standing-autonomy \
|
|
80
|
+
anchor.
|
|
81
|
+
|
|
82
|
+
## Output Contract (STRICT)
|
|
83
|
+
|
|
84
|
+
Produce exactly these blocks in order. Total response budget <= 800 words.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
### Inline-content audit
|
|
88
|
+
|
|
89
|
+
**Hard-Floor trigger table inline:** <YES | NO — list missing rows>
|
|
90
|
+
**Iron Law caps block inline:** <YES | NO — quote what is there>
|
|
91
|
+
**Cloud Behavior section inline:** <YES | NO — quote what is there>
|
|
92
|
+
**On-this-turn confirmation clause inline:** <YES | NO — quote anchor>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
### Misplaced-content audit
|
|
97
|
+
|
|
98
|
+
**Any obligation moved to mechanics that should be inline:** <NONE | list>
|
|
99
|
+
**Any failure mode duplicated in both files (drift risk):** <NONE | list>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
### Final verdict
|
|
104
|
+
|
|
105
|
+
**Verdict:** <PASS | FAIL>
|
|
106
|
+
**If FAIL, single blocking issue:** <one sentence>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Verdict definitions:
|
|
110
|
+
- **PASS** — every required-inline item is present in the rule; no obligation \
|
|
111
|
+
is misplaced. The rollout meets the Phase 1.1.3 contract.
|
|
112
|
+
- **FAIL** — at least one required-inline item is missing, weakened, or \
|
|
113
|
+
duplicated in a way that creates a normative drift surface.
|
|
114
|
+
|
|
115
|
+
The two artefacts follow this prompt verbatim.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def main() -> int:
|
|
120
|
+
anthropic = AnthropicClient(api_key=load_anthropic_key(), model="claude-sonnet-4-5")
|
|
121
|
+
openai = OpenAIClient(api_key=load_openai_key(), model="gpt-4o")
|
|
122
|
+
members = [anthropic, openai]
|
|
123
|
+
|
|
124
|
+
context = bundle_files(ARTEFACTS)
|
|
125
|
+
project = detect_project_context(REPO_ROOT)
|
|
126
|
+
table = load_prices()
|
|
127
|
+
|
|
128
|
+
user_prompt = REVIEW_PROMPT + "\n\n---\n\n" + context.text
|
|
129
|
+
|
|
130
|
+
question = CouncilQuestion(
|
|
131
|
+
mode="files",
|
|
132
|
+
user_prompt=user_prompt,
|
|
133
|
+
max_tokens=2048,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
estimates = estimate(
|
|
137
|
+
question, members, table, project=project, original_ask=ORIGINAL_ASK,
|
|
138
|
+
)
|
|
139
|
+
print("=== ESTIMATE (single round, max tokens) ===")
|
|
140
|
+
total_est = 0.0
|
|
141
|
+
for c, e in zip(members, estimates):
|
|
142
|
+
print(f" {c.name}/{c.model}: ~{e.input_tokens} in + {e.output_tokens} out = ${e.total_usd:.4f}")
|
|
143
|
+
total_est += e.total_usd
|
|
144
|
+
print(f" TOTAL per round (max): ${total_est:.4f}")
|
|
145
|
+
print()
|
|
146
|
+
|
|
147
|
+
budget = CostBudget(
|
|
148
|
+
max_input_tokens=200_000,
|
|
149
|
+
max_output_tokens=80_000,
|
|
150
|
+
max_calls=20,
|
|
151
|
+
max_total_usd=2.50,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
rounds_collected: list[list] = []
|
|
155
|
+
|
|
156
|
+
def _on_round_complete(round_idx: int, round_responses) -> None:
|
|
157
|
+
rounds_collected.append(list(round_responses))
|
|
158
|
+
print(f"=== ROUND {round_idx + 1} COMPLETE ===")
|
|
159
|
+
for r in round_responses:
|
|
160
|
+
if r.error:
|
|
161
|
+
print(f" [error] {r.provider}/{r.model}: {r.error}")
|
|
162
|
+
continue
|
|
163
|
+
actual = estimate_cost(r.provider, r.model, r.input_tokens, r.output_tokens, table)
|
|
164
|
+
print(f" [done] {r.provider}/{r.model}: {r.input_tokens} in / "
|
|
165
|
+
f"{r.output_tokens} out · {r.latency_ms} ms · ${actual.total_usd:.4f}")
|
|
166
|
+
print()
|
|
167
|
+
|
|
168
|
+
print("=== CONSULT (1 round, Phase 1.1.3 inline-content audit) ===")
|
|
169
|
+
consult(
|
|
170
|
+
members, question, budget,
|
|
171
|
+
rounds=1,
|
|
172
|
+
on_round_complete=_on_round_complete,
|
|
173
|
+
table=table, project=project, original_ask=ORIGINAL_ASK,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
if not rounds_collected:
|
|
177
|
+
print("[error] no rounds completed", file=sys.stderr)
|
|
178
|
+
return 1
|
|
179
|
+
|
|
180
|
+
actual_total = 0.0
|
|
181
|
+
for round_responses in rounds_collected:
|
|
182
|
+
for r in round_responses:
|
|
183
|
+
if r.error:
|
|
184
|
+
continue
|
|
185
|
+
actual = estimate_cost(r.provider, r.model, r.input_tokens, r.output_tokens, table)
|
|
186
|
+
actual_total += actual.total_usd
|
|
187
|
+
print(f"=== TOTAL ACTUAL: ${actual_total:.4f} ===")
|
|
188
|
+
|
|
189
|
+
final_round = rounds_collected[-1]
|
|
190
|
+
if not [r for r in final_round if not r.error]:
|
|
191
|
+
return 1
|
|
192
|
+
|
|
193
|
+
manifest = SessionManifest(
|
|
194
|
+
mode="files",
|
|
195
|
+
artefact=".agent-src.uncompressed/rules/non-destructive-by-default.md",
|
|
196
|
+
original_ask=ORIGINAL_ASK,
|
|
197
|
+
members=[f"{r.provider}/{r.model}" for r in final_round],
|
|
198
|
+
rounds=len(rounds_collected),
|
|
199
|
+
cost_usd_estimated=total_est,
|
|
200
|
+
cost_usd_actual=actual_total,
|
|
201
|
+
extra={"purpose": "Phase 1.1.3 inline-content audit on non-destructive-by-default"},
|
|
202
|
+
)
|
|
203
|
+
session_dir = save_session(manifest=manifest, responses=rounds_collected)
|
|
204
|
+
print(f"[saved] {session_dir.relative_to(REPO_ROOT)}/")
|
|
205
|
+
return 1 if any(r.error for round_r in rounds_collected for r in round_r) else 0
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
if __name__ == "__main__":
|
|
209
|
+
raise SystemExit(main())
|