@event4u/agent-config 1.19.0 → 1.21.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/agent-handoff.md +14 -10
- package/.agent-src/commands/agents.md +1 -1
- package/.agent-src/commands/bug-fix.md +1 -1
- package/.agent-src/commands/bug-investigate.md +2 -2
- package/.agent-src/commands/chat-history/import.md +166 -0
- package/.agent-src/commands/chat-history/learn.md +178 -0
- package/.agent-src/commands/chat-history/show.md +17 -18
- package/.agent-src/commands/chat-history.md +26 -25
- package/.agent-src/commands/compress.md +12 -0
- package/.agent-src/commands/context/create.md +2 -2
- package/.agent-src/commands/context.md +1 -1
- package/.agent-src/commands/copilot-agents.md +1 -1
- package/.agent-src/commands/council/default.md +21 -12
- package/.agent-src/commands/council.md +1 -1
- package/.agent-src/commands/create-pr.md +28 -8
- 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 +3 -3
- package/.agent-src/commands/feature.md +1 -1
- package/.agent-src/commands/fix/seeder.md +2 -2
- package/.agent-src/commands/fix.md +1 -1
- package/.agent-src/commands/jira-ticket.md +1 -1
- package/.agent-src/commands/judge.md +2 -2
- package/.agent-src/commands/memory.md +1 -1
- package/.agent-src/commands/mode.md +5 -5
- package/.agent-src/commands/module.md +1 -1
- package/.agent-src/commands/onboard.md +4 -4
- package/.agent-src/commands/optimize/augmentignore.md +1 -1
- package/.agent-src/commands/optimize-prompt.md +61 -0
- package/.agent-src/commands/optimize.md +1 -1
- package/.agent-src/commands/override.md +1 -1
- package/.agent-src/commands/review-changes.md +1 -1
- package/.agent-src/commands/review-routing.md +1 -1
- package/.agent-src/commands/roadmap.md +1 -1
- package/.agent-src/commands/set-cost-profile.md +3 -3
- package/.agent-src/commands/sync-agent-settings.md +2 -2
- package/.agent-src/commands/sync-gitignore.md +1 -1
- package/.agent-src/commands/tests/create.md +2 -2
- package/.agent-src/commands/tests.md +1 -1
- package/.agent-src/commands/threat-model.md +4 -4
- package/.agent-src/contexts/authority/commit-mechanics.md +14 -1
- package/.agent-src/contexts/authority/destructive-mechanics.md +14 -1
- package/.agent-src/contexts/authority/scope-mechanics.md +5 -0
- package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +76 -0
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
- package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +4 -4
- package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +98 -0
- package/.agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +93 -0
- package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +125 -9
- package/.agent-src/contexts/execution/autonomy-mechanics.md +44 -0
- package/.agent-src/contexts/model-recommendations.md +2 -2
- package/.agent-src/contexts/override-system.md +1 -1
- package/.agent-src/personas/product-owner.md +2 -2
- package/.agent-src/personas/qa.md +1 -1
- package/.agent-src/rules/agent-authority.md +5 -6
- package/.agent-src/rules/agent-docs.md +11 -53
- package/.agent-src/rules/analysis-skill-routing.md +10 -40
- package/.agent-src/rules/architecture.md +6 -1
- package/.agent-src/rules/artifact-drafting-protocol.md +5 -0
- package/.agent-src/rules/artifact-engagement-recording.md +23 -59
- package/.agent-src/rules/ask-when-uncertain.md +24 -47
- package/.agent-src/rules/augment-portability.md +14 -62
- package/.agent-src/rules/augment-source-of-truth.md +10 -1
- package/.agent-src/rules/autonomous-execution.md +17 -98
- package/.agent-src/rules/capture-learnings.md +9 -80
- package/.agent-src/rules/cli-output-handling.md +12 -42
- package/.agent-src/rules/command-suggestion-policy.md +25 -73
- package/.agent-src/rules/commit-conventions.md +9 -58
- package/.agent-src/rules/commit-policy.md +16 -47
- package/.agent-src/rules/context-hygiene.md +5 -0
- package/.agent-src/rules/direct-answers.md +21 -42
- package/.agent-src/rules/docker-commands.md +11 -45
- package/.agent-src/rules/docs-sync.md +10 -56
- package/.agent-src/rules/downstream-changes.md +5 -0
- package/.agent-src/rules/e2e-testing.md +9 -44
- package/.agent-src/rules/guidelines.md +13 -75
- package/.agent-src/rules/improve-before-implement.md +10 -2
- package/.agent-src/rules/language-and-tone.md +35 -69
- package/.agent-src/rules/laravel-translations.md +11 -40
- package/.agent-src/rules/markdown-safe-codeblocks.md +4 -0
- package/.agent-src/rules/minimal-safe-diff.md +4 -0
- package/.agent-src/rules/missing-tool-handling.md +4 -0
- package/.agent-src/rules/model-recommendation.md +9 -61
- package/.agent-src/rules/no-attribution-footers.md +53 -0
- package/.agent-src/rules/no-cheap-questions.md +11 -27
- package/.agent-src/rules/no-council-references.md +76 -0
- package/.agent-src/rules/no-roadmap-references.md +8 -1
- package/.agent-src/rules/non-destructive-by-default.md +13 -43
- package/.agent-src/rules/onboarding-gate.md +9 -117
- package/.agent-src/rules/package-ci-checks.md +10 -37
- package/.agent-src/rules/php-coding.md +10 -55
- package/.agent-src/rules/preservation-guard.md +9 -0
- package/.agent-src/rules/review-routing-awareness.md +9 -97
- package/.agent-src/rules/reviewer-awareness.md +8 -83
- package/.agent-src/rules/roadmap-progress-sync.md +7 -170
- package/.agent-src/rules/role-mode-adherence.md +6 -2
- package/.agent-src/rules/rule-type-governance.md +8 -66
- package/.agent-src/rules/runtime-safety.md +5 -0
- package/.agent-src/rules/scope-control.md +17 -62
- package/.agent-src/rules/security-sensitive-stop.md +7 -1
- package/.agent-src/rules/size-enforcement.md +6 -1
- package/.agent-src/rules/skill-improvement-trigger.md +9 -49
- package/.agent-src/rules/skill-quality.md +7 -64
- package/.agent-src/rules/slash-command-routing-policy.md +11 -63
- package/.agent-src/rules/think-before-action.md +22 -87
- package/.agent-src/rules/token-efficiency.md +10 -74
- package/.agent-src/rules/token-optimizer-maintenance.md +68 -0
- package/.agent-src/rules/tool-safety.md +4 -0
- package/.agent-src/rules/ui-audit-gate.md +25 -61
- package/.agent-src/rules/upstream-proposal.md +9 -67
- package/.agent-src/rules/user-interaction.md +25 -95
- package/.agent-src/rules/verify-before-complete.md +1 -1
- package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -1
- package/.agent-src/skills/ai-council/SKILL.md +69 -5
- package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
- package/.agent-src/skills/analysis-skill-router/SKILL.md +3 -3
- package/.agent-src/skills/artisan-commands/SKILL.md +2 -2
- package/.agent-src/skills/authz-review/SKILL.md +1 -1
- package/.agent-src/skills/aws-infrastructure/SKILL.md +5 -5
- package/.agent-src/skills/blast-radius-analyzer/SKILL.md +8 -8
- package/.agent-src/skills/bug-analyzer/SKILL.md +5 -5
- package/.agent-src/skills/code-refactoring/SKILL.md +4 -4
- package/.agent-src/skills/code-review/SKILL.md +2 -2
- package/.agent-src/skills/command-writing/SKILL.md +11 -0
- package/.agent-src/skills/composer-packages/SKILL.md +2 -2
- package/.agent-src/skills/context-authoring/SKILL.md +11 -0
- package/.agent-src/skills/context-document/SKILL.md +1 -1
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +23 -0
- package/.agent-src/skills/copilot-config/SKILL.md +1 -1
- package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
- package/.agent-src/skills/dependency-upgrade/SKILL.md +2 -2
- package/.agent-src/skills/devcontainer/SKILL.md +2 -2
- package/.agent-src/skills/developer-like-execution/SKILL.md +1 -1
- package/.agent-src/skills/docker/SKILL.md +1 -1
- package/.agent-src/skills/dto-creator/SKILL.md +1 -1
- package/.agent-src/skills/estimate-ticket/SKILL.md +2 -2
- package/.agent-src/skills/fe-design/SKILL.md +4 -4
- package/.agent-src/skills/feature-planning/SKILL.md +5 -5
- package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
- package/.agent-src/skills/laravel/SKILL.md +1 -1
- package/.agent-src/skills/laravel-notifications/SKILL.md +5 -5
- package/.agent-src/skills/laravel-pennant/SKILL.md +1 -1
- package/.agent-src/skills/laravel-pulse/SKILL.md +4 -4
- package/.agent-src/skills/laravel-reverb/SKILL.md +2 -2
- package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -1
- package/.agent-src/skills/md-language-check/SKILL.md +1 -1
- package/.agent-src/skills/migration-creator/SKILL.md +7 -7
- package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
- package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
- package/.agent-src/skills/performance-analysis/SKILL.md +3 -3
- package/.agent-src/skills/pest-testing/SKILL.md +6 -6
- package/.agent-src/skills/php-service/SKILL.md +2 -2
- package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
- package/.agent-src/skills/project-analysis-react/SKILL.md +1 -1
- package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
- package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
- package/.agent-src/skills/project-analyzer/SKILL.md +4 -4
- package/.agent-src/skills/prompt-optimizer/SKILL.md +108 -0
- package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
- package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
- package/.agent-src/skills/rule-writing/SKILL.md +33 -0
- package/.agent-src/skills/sentry-integration/SKILL.md +1 -1
- package/.agent-src/skills/skill-writing/SKILL.md +14 -0
- package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
- package/.agent-src/skills/terraform/SKILL.md +2 -2
- package/.agent-src/skills/terragrunt/SKILL.md +8 -8
- package/.agent-src/skills/test-performance/SKILL.md +5 -5
- package/.agent-src/skills/threat-modeling/SKILL.md +2 -2
- package/.agent-src/skills/token-optimizer/SKILL.md +110 -0
- package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
- package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
- package/.agent-src/templates/AGENTS.md +1 -1
- package/.agent-src/templates/agent-settings.md +25 -41
- package/.agent-src/templates/contexts/tenant-boundaries.md +2 -2
- package/.agent-src/templates/contexts.md +1 -1
- package/.agent-src/templates/copilot-instructions.md +21 -0
- package/.agent-src/templates/copilot-review-instructions.md +76 -0
- package/.agent-src/templates/features.md +1 -1
- package/.agent-src/templates/rule.md +127 -0
- package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +7 -5
- package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -4
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -4
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +2 -3
- package/.agent-src/templates/skill.md +30 -1
- package/.claude-plugin/marketplace.json +11 -4
- package/AGENTS.md +71 -3
- package/CHANGELOG.md +180 -3
- package/README.md +24 -23
- package/config/agent-settings.template.yml +63 -23
- package/config/gitignore-block.txt +11 -4
- package/docs/architecture.md +84 -3
- package/docs/catalog.md +23 -11
- package/docs/contracts/adr-chat-history-split.md +10 -1
- package/docs/contracts/agent-memory-contract.md +1 -1
- package/docs/contracts/command-clusters.md +1 -1
- package/docs/contracts/context-paths.md +2 -1
- package/docs/contracts/cross-wing-handoff.md +133 -0
- package/docs/contracts/file-ownership-matrix.json +678 -609
- package/docs/contracts/hook-architecture-v1.md +8 -1
- package/docs/contracts/iron-law-overrides.txt +25 -0
- package/docs/contracts/kernel-membership.md +273 -0
- package/docs/contracts/load-context-schema.md +26 -11
- package/docs/contracts/memory-visibility-v1.md +8 -24
- package/docs/contracts/pilot/agent-authority.md +24 -0
- package/docs/contracts/pilot/direct-answers.md +70 -0
- package/docs/contracts/pilot/language-and-tone.md +63 -0
- package/docs/contracts/rule-classification.md +170 -0
- package/docs/contracts/rule-router.md +153 -0
- package/docs/customization.md +18 -7
- package/docs/decisions/ADR-001-kernel-swap-deferred.md +109 -0
- package/docs/decisions/ADR-002-kernel-bucket-overrides.md +124 -0
- package/docs/decisions/ADR-rule-kernel-and-router.md +122 -0
- package/docs/getting-started.md +19 -27
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +176 -0
- package/docs/guidelines/agent-infra/rule-type-governance.md +73 -0
- package/docs/guidelines/agent-infra/size-and-scope.md +13 -2
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +119 -0
- package/docs/guidelines/augment-portability-patterns.md +68 -0
- package/docs/guidelines/php/php-coding-patterns.md +62 -0
- package/docs/hook-payload-capture.md +221 -0
- package/docs/migrations/commands-1.15.0.md +17 -12
- package/docs/skills-catalog.md +5 -4
- package/llms.txt +4 -3
- package/package.json +1 -1
- package/scripts/_p43_bodies.py +235 -0
- package/scripts/_p43_compress.py +118 -0
- package/scripts/_p4_migrate.py +199 -0
- package/scripts/_pilot_council_question.py +57 -0
- package/scripts/_pilot_measure.py +53 -0
- package/scripts/agent-config +1 -1
- package/scripts/ai_council/_default_prices.py +4 -4
- package/scripts/ai_council/clients.py +1 -1
- package/scripts/ai_council/modes.py +3 -4
- package/scripts/ai_council/pricing.py +10 -9
- package/scripts/ai_council/session.py +107 -5
- package/scripts/build_linear_digest.py +3 -5
- package/scripts/build_rule_trigger_matrix.py +1 -9
- package/scripts/chat_history.py +952 -596
- package/scripts/check_always_budget.py +39 -6
- package/scripts/check_compressed_paths.py +213 -0
- package/scripts/check_compression.py +15 -0
- package/scripts/check_context_paths.py +1 -0
- package/scripts/check_council_layout.py +105 -0
- package/scripts/check_council_references.py +145 -0
- package/scripts/check_portability.py +2 -0
- package/scripts/check_references.py +14 -2
- package/scripts/check_token_optimizer_freshness.py +131 -0
- package/scripts/compile_router.py +148 -0
- package/scripts/compress.py +219 -11
- package/scripts/council_cli.py +63 -9
- package/scripts/council_prune.py +81 -0
- package/scripts/count_token_optimizer_usage.sh +54 -0
- package/scripts/hook_manifest.yaml +33 -0
- package/scripts/hooks/augment-chat-history.sh +10 -0
- package/scripts/hooks/cowork-dispatcher.sh +98 -0
- package/scripts/hooks/dispatch_hook.py +35 -0
- package/scripts/hooks_status.py +12 -1
- package/scripts/install-hooks.sh +2 -2
- package/scripts/install.sh +81 -2
- package/scripts/iron_law_sha.py +98 -0
- package/scripts/lint_handoffs.py +214 -0
- package/scripts/lint_hook_manifest.py +2 -1
- package/scripts/lint_load_context.py +35 -5
- package/scripts/measure_rule_budget.py +314 -0
- package/scripts/prototype_lint_contradictions.py +150 -0
- package/scripts/redact_hook_capture.py +148 -0
- package/scripts/schemas/rule.schema.json +55 -6
- package/scripts/schemas/skill.schema.json +5 -0
- package/scripts/skill_linter.py +359 -7
- package/scripts/smoke_path_resolution.py +93 -0
- package/scripts/update_prices.py +3 -3
- package/scripts/validate_frontmatter.py +41 -1
- package/.agent-src/commands/chat-history/checkpoint.md +0 -126
- package/.agent-src/commands/chat-history/clear.md +0 -103
- package/.agent-src/commands/chat-history/resume.md +0 -183
- package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +0 -72
- package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +0 -79
- package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +0 -87
- package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +0 -62
- package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +0 -78
- package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +0 -85
- package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +0 -65
- package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +0 -78
- package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +0 -53
- package/.agent-src/rules/chat-history-cadence.md +0 -143
- package/.agent-src/rules/chat-history-ownership.md +0 -124
- package/.agent-src/rules/chat-history-visibility.md +0 -97
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
- package/scripts/check_phase_coupling.py +0 -148
- /package/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
- /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Guidelines — index
|
|
2
|
+
|
|
3
|
+
Full table of available coding guidelines for the
|
|
4
|
+
[`guidelines`](../../../rules/guidelines.md) rule. The rule body
|
|
5
|
+
holds the obligation surface (always check the relevant guideline
|
|
6
|
+
before writing or reviewing code); this file is the catalog.
|
|
7
|
+
|
|
8
|
+
## PHP (`docs/guidelines/php/`)
|
|
9
|
+
|
|
10
|
+
| File | Topic |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `php.md` | General PHP style — strict types, naming, comparisons, early returns, JSON handling |
|
|
13
|
+
| `controllers.md` | Thin controllers, single responsibility, delegation to services |
|
|
14
|
+
| `eloquent.md` | Model conventions, relationships, scopes, accessors/mutators |
|
|
15
|
+
| `validations.md` | FormRequest patterns, custom rules, validation structure |
|
|
16
|
+
| `resources.md` | API Resource conventions, response structure |
|
|
17
|
+
| `jobs.md` | Queue job patterns, serialization, retry strategies |
|
|
18
|
+
| `git.md` | Branch naming, commit messages, PR conventions |
|
|
19
|
+
| `api-design.md` | API conventions — response format, status codes, pagination, error handling |
|
|
20
|
+
| `artisan-commands.md` | Console command conventions — naming, structure, safety, scheduling |
|
|
21
|
+
| `blade-ui.md` | Blade template conventions — views, components, forms, escaping |
|
|
22
|
+
| `database.md` | Database conventions — indexing, query optimization, migrations, transactions |
|
|
23
|
+
| `flux.md` | Flux UI component conventions — usage, variants, forms, Livewire integration |
|
|
24
|
+
| `livewire.md` | Livewire component conventions — state, actions, forms, performance, Alpine.js |
|
|
25
|
+
| `logging.md` | Logging conventions — levels, structured context, Sentry patterns |
|
|
26
|
+
| `naming.md` | Naming conventions — classes, database, routes, variables, modules, agent infra |
|
|
27
|
+
| `performance.md` | Performance conventions — caching, Redis, eager loading, response time targets |
|
|
28
|
+
| `security.md` | Security conventions — auth, authorization, SQL injection, XSS, CSRF, headers |
|
|
29
|
+
| `sql.md` | Raw SQL conventions — parameterization, MariaDB syntax, common mistakes |
|
|
30
|
+
| `websocket.md` | WebSocket conventions — Broadcasting, channel types, connection management |
|
|
31
|
+
| `patterns.md` | Design patterns index (links to `patterns/` subdirectory) |
|
|
32
|
+
|
|
33
|
+
## PHP Patterns (`docs/guidelines/php/patterns/`)
|
|
34
|
+
|
|
35
|
+
| File | Pattern |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `service-layer.md` | Service classes, business logic encapsulation |
|
|
38
|
+
| `repositories.md` | Repository pattern, query encapsulation |
|
|
39
|
+
| `dtos.md` | Data Transfer Objects, SimpleDto conventions |
|
|
40
|
+
| `dependency-injection.md` | Constructor injection, service container |
|
|
41
|
+
| `events.md` | Event/Listener patterns, dispatching |
|
|
42
|
+
| `policies.md` | Authorization policies, gate definitions |
|
|
43
|
+
| `factory.md` | Factory pattern usage |
|
|
44
|
+
| `pipelines.md` | Laravel Pipeline pattern |
|
|
45
|
+
| `strategy.md` | Strategy pattern implementation |
|
|
46
|
+
|
|
47
|
+
## E2E (`docs/guidelines/e2e/`)
|
|
48
|
+
|
|
49
|
+
Playwright best practices, Page Objects, fixtures, CI.
|
|
50
|
+
|
|
51
|
+
## Agent Infrastructure (`docs/guidelines/agent-infra/`)
|
|
52
|
+
|
|
53
|
+
| File | Topic |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `size-and-scope.md` | Size limits and scope boundaries for rules, skills, commands, guidelines, AGENTS.md, copilot-instructions.md |
|
|
56
|
+
| `output-patterns.md` | Redirect / Summarize / Target pattern, targeted operations, tool-first policy, general CLI rules |
|
|
57
|
+
|
|
58
|
+
## Boundary: Guidelines vs Skills
|
|
59
|
+
|
|
60
|
+
- Guidelines contain **conventions and reference knowledge**. Skills
|
|
61
|
+
contain **executable workflows**.
|
|
62
|
+
- A skill MAY reference a guideline for conventions, but MUST NOT
|
|
63
|
+
outsource its core execution steps to a guideline.
|
|
64
|
+
- Do NOT move a skill's operational core (procedure, validation,
|
|
65
|
+
decision logic) into a guideline.
|
|
66
|
+
- A skill that becomes "go read the guideline" has lost its purpose
|
|
67
|
+
— restore the workflow.
|
|
68
|
+
|
|
69
|
+
## Adding new guidelines
|
|
70
|
+
|
|
71
|
+
When a new language or framework is introduced, create a directory:
|
|
72
|
+
|
|
73
|
+
docs/guidelines/{language}/
|
|
74
|
+
|
|
75
|
+
Follow the existing PHP structure as a template. Read the specific
|
|
76
|
+
guideline file on demand — don't memorize the full list.
|
|
@@ -60,3 +60,79 @@ Compression may remove:
|
|
|
60
60
|
- Verbose explanations
|
|
61
61
|
- Redundant examples (keep the strongest)
|
|
62
62
|
- Commentary that doesn't affect execution
|
|
63
|
+
|
|
64
|
+
## Senior-tier patterns
|
|
65
|
+
|
|
66
|
+
Detail spec for the four blocks the [`skill-quality`](../../../rules/skill-quality.md)
|
|
67
|
+
rule requires on `tier: senior` skills. Each block ≤ 6-line spec + 1
|
|
68
|
+
reference pattern. Forward-only — applies to new senior-tier skills,
|
|
69
|
+
no retrofit on existing Wing-1 skills.
|
|
70
|
+
|
|
71
|
+
### 1. Context-First lead (description)
|
|
72
|
+
|
|
73
|
+
Two-sentence frontmatter `description`. First sentence: cognition
|
|
74
|
+
cluster anchor — name the domain + the senior role's stance. Second
|
|
75
|
+
sentence: the trigger — what the user types that should fire this.
|
|
76
|
+
|
|
77
|
+
Pattern:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
description: "Use when {trigger paraphrase}. {Domain} cognition for the
|
|
81
|
+
{senior role} — produces {artifact name}."
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Anti-pattern: leading with the artifact ("Produces a DCF model …") —
|
|
85
|
+
buries the cognition cluster, undertriggers on cluster-shaped prompts.
|
|
86
|
+
|
|
87
|
+
### 2. Related Skills (`## Related Skills`)
|
|
88
|
+
|
|
89
|
+
Two named lists, no ambiguity:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
## Related Skills
|
|
93
|
+
|
|
94
|
+
**WHEN to use this**
|
|
95
|
+
- {situation A this skill resolves better than {peer-1}}
|
|
96
|
+
- {situation B}
|
|
97
|
+
|
|
98
|
+
**WHEN NOT to use this**
|
|
99
|
+
- {situation C} — route to [`{peer-1}`](../{peer-1}/SKILL.md)
|
|
100
|
+
- {situation D} — route to [`{peer-2}`](../{peer-2}/SKILL.md)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
WHEN-NOT entries MUST name the peer and link it. Naming without a
|
|
104
|
+
link drifts the moment the peer renames.
|
|
105
|
+
|
|
106
|
+
### 3. Proactive Triggers (`## When the agent should load this`)
|
|
107
|
+
|
|
108
|
+
3–5 concrete user-prompt patterns the agent watches for. Concrete =
|
|
109
|
+
phrases users actually type, not abstract categories.
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
## When the agent should load this
|
|
113
|
+
|
|
114
|
+
- "should we build feature X or Y first" → opportunity-tree shaped
|
|
115
|
+
- "what's the ICE / RICE on this backlog" → prioritization shaped
|
|
116
|
+
- "how do I split this epic into shippable slices" → INVEST shaped
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Anti-pattern: abstract categories ("prioritization questions",
|
|
120
|
+
"product-shaped requests") — the routing layer matches phrases, not
|
|
121
|
+
taxonomies.
|
|
122
|
+
|
|
123
|
+
### 4. Output Artifacts (`## Output`)
|
|
124
|
+
|
|
125
|
+
1–4 named artifacts with concrete shape. Each entry: name +
|
|
126
|
+
shape-hint the orchestrator can cite by name in a handoff.
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
## Output
|
|
130
|
+
|
|
131
|
+
1. **opportunity-tree.md** — markdown tree, root = north-star metric,
|
|
132
|
+
leaves = candidate solutions with hypothesis + evidence rank
|
|
133
|
+
2. **prioritization-table.md** — markdown table, columns =
|
|
134
|
+
{opportunity, ICE score, evidence-grade, owner, next-step}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Anti-pattern: prose summary ("a doc explaining the prioritization") —
|
|
138
|
+
no orchestrator-citable identifier, no shape contract.
|
package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md
CHANGED
|
@@ -4,7 +4,7 @@ Lookup table for the `slash-command-routing-policy` rule. Lists the
|
|
|
4
4
|
locked clusters and their sub-commands so the rule itself can stay at
|
|
5
5
|
its current LOC while still reflecting the full surface. Source of
|
|
6
6
|
truth for the cluster names is
|
|
7
|
-
[`docs/contracts/command-clusters.md`](
|
|
7
|
+
[`docs/contracts/command-clusters.md`](../../../../../docs/contracts/command-clusters.md);
|
|
8
8
|
this file mirrors that contract for runtime lookup. Linter:
|
|
9
9
|
`scripts/check_cluster_patterns.py` (verifies dispatcher shape).
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ this file mirrors that contract for runtime lookup. Linter:
|
|
|
15
15
|
| `/fix` | 1 | `ci` · `pr` · `pr-bots` · `pr-developers` · `portability` · `refs` · `seeder` | `/fix-ci` · `/fix-pr-comments` · `/fix-pr-bot-comments` · `/fix-pr-developer-comments` · `/fix-portability` · `/fix-references` · `/fix-seeder` |
|
|
16
16
|
| `/optimize` | 1 | `agents` · `augmentignore` · `rtk` · `skills` | `/optimize-agents` · `/optimize-augmentignore` · `/optimize-rtk-filters` · `/optimize-skills` |
|
|
17
17
|
| `/feature` | 1 | `explore` · `plan` · `refactor` · `roadmap` | `/feature-explore` · `/feature-plan` · `/feature-refactor` · `/feature-roadmap` |
|
|
18
|
-
| `/chat-history` | 2 | `show`
|
|
18
|
+
| `/chat-history` | 2 | `show` | `/chat-history` (legacy status) — `resume` / `clear` / `checkpoint` removed in `road-to-chat-history-hook-only` |
|
|
19
19
|
| `/agents` | 2 | `audit` · `cleanup` · `prepare` | `/agents-audit` · `/agents-cleanup` · `/agents-prepare` |
|
|
20
20
|
| `/memory` | 2 | `add` · `load` · `promote` · `propose` | `/memory-add` · `/memory-full` · `/memory-promote` · `/propose-memory` |
|
|
21
21
|
| `/roadmap` | 2 | `create` · `execute` | `/roadmap-create` · `/roadmap-execute` |
|
|
@@ -25,8 +25,8 @@ this file mirrors that contract for runtime lookup. Linter:
|
|
|
25
25
|
| `/override` | 2 | `create` · `manage` | `/override-create` · `/override-manage` |
|
|
26
26
|
| `/copilot-agents` | 2 | `init` · `optimize` | `/copilot-agents-init` · `/copilot-agents-optimize` |
|
|
27
27
|
| `/judge` | 2 | `solo` · `on-diff` · `steps` | `/judge` (legacy standalone) · `/do-and-judge` · `/do-in-steps` |
|
|
28
|
-
| `/commit` | 2 | flag: `--in-chunks` | `/commit
|
|
29
|
-
| `/create-pr` | 2 | flag: `--description-only` | `/create-pr-
|
|
28
|
+
| `/commit` | 2 | flag: `--in-chunks` | `/commit:in-chunks` |
|
|
29
|
+
| `/create-pr` | 2 | flag: `--description-only` | `/create-pr:description-only` |
|
|
30
30
|
|
|
31
31
|
## Routing semantics
|
|
32
32
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Think Before Action — mechanics
|
|
2
|
+
|
|
3
|
+
Workflow tables, verification matrix, and failure modes for the
|
|
4
|
+
[`think-before-action`](../../../rules/think-before-action.md) rule.
|
|
5
|
+
The rule body holds the obligation surface (analyze before coding,
|
|
6
|
+
verify with real tools, no blind retries). This file is the lookup
|
|
7
|
+
material agents pull when the rule fires.
|
|
8
|
+
|
|
9
|
+
## The Developer Workflow — five-step order
|
|
10
|
+
|
|
11
|
+
Work like a developer, not a text generator. Skipping steps 1–3 is the
|
|
12
|
+
#1 cause of wrong implementations and wasted retries.
|
|
13
|
+
|
|
14
|
+
1. **Understand** — Read the task, ticket, acceptance criteria. Unclear
|
|
15
|
+
→ ask, don't assume.
|
|
16
|
+
2. **Analyze** — Read affected code, trace data flow, compare with
|
|
17
|
+
requirements and existing patterns.
|
|
18
|
+
3. **Plan** — Decide what to change, what NOT to change, and how to
|
|
19
|
+
verify success.
|
|
20
|
+
4. **Implement** — Focused changes. Follow existing patterns. No
|
|
21
|
+
unrelated rewrites.
|
|
22
|
+
5. **Verify** — Run tests, hit the endpoint, check the UI. Real
|
|
23
|
+
execution, never "should work".
|
|
24
|
+
|
|
25
|
+
## Minimum read set — read before you write
|
|
26
|
+
|
|
27
|
+
Before editing code, read the minimum set that defines its behavior:
|
|
28
|
+
|
|
29
|
+
1. **Symbol under edit** — full method/function body, not just the
|
|
30
|
+
planned line.
|
|
31
|
+
2. **Direct callers** — one level up (`grep -rn "<symbol>"` + open
|
|
32
|
+
the matches).
|
|
33
|
+
3. **Tests** — if a test file exists, it encodes the contract.
|
|
34
|
+
4. **One layer of related abstractions** — interface, parent class,
|
|
35
|
+
or trait (one hop, not the full hierarchy).
|
|
36
|
+
5. **Data changes** — the migration that created the column + any
|
|
37
|
+
seeder/factory that references it.
|
|
38
|
+
|
|
39
|
+
Stop expanding once you can explain, in your own words, what the
|
|
40
|
+
symbol does, who calls it, and what breaks if you change its
|
|
41
|
+
behavior. Cannot → read more.
|
|
42
|
+
|
|
43
|
+
## Consult memory before editing
|
|
44
|
+
|
|
45
|
+
Prior decisions and invariants live in the memory layer. Via
|
|
46
|
+
[`memory-access`](../../../../../docs/guidelines/agent-infra/memory-access.md),
|
|
47
|
+
call `retrieve(types=["architecture-decisions", "domain-invariants"], keys=<touched paths>, limit=3)`.
|
|
48
|
+
A matching `architecture-decision` explains *why* the current shape
|
|
49
|
+
exists; a matching `domain-invariant` is a hard constraint. Cite the
|
|
50
|
+
`id` if a match influences the plan.
|
|
51
|
+
|
|
52
|
+
## Verify with real tools
|
|
53
|
+
|
|
54
|
+
| What changed | How to verify |
|
|
55
|
+
|---|---|
|
|
56
|
+
| **Backend/API** | `curl`, Postman (or Postman MCP if available), test endpoint |
|
|
57
|
+
| **Frontend/UI** | Playwright MCP or browser — check rendered state, interactions |
|
|
58
|
+
| **Logic/flow** | Xdebug (or Xdebug MCP if available) — trace execution, inspect variables |
|
|
59
|
+
| **CLI/Jobs** | Run the command, check side effects, verify exit code |
|
|
60
|
+
| **Database** | Query the result, check migrations ran correctly |
|
|
61
|
+
|
|
62
|
+
If a debugging/testing tool is available as MCP server — prefer it
|
|
63
|
+
over manual alternatives. Verification not possible (no endpoint, no
|
|
64
|
+
UI, no test) → state what is missing and explain how the change
|
|
65
|
+
should be tested.
|
|
66
|
+
|
|
67
|
+
## Reduce output — targeted tools over full dumps
|
|
68
|
+
|
|
69
|
+
Never load full datasets into context. Extract what you need:
|
|
70
|
+
|
|
71
|
+
- `jq` for JSON: `curl -s /api/users | jq '.[0] | {id, email}'` — not the full response
|
|
72
|
+
- `rg` / `grep` for text: search specific patterns, not full files
|
|
73
|
+
- `head`, `tail`, `cut`, `sort`, `uniq` for narrowing results
|
|
74
|
+
- `--filter`, `--json`, `--format` flags on CLI tools — use them
|
|
75
|
+
- Laravel: `route:list --json | jq` over raw `route:list` dump
|
|
76
|
+
- Logs: filter by request ID, timestamp, or error type — not full log files
|
|
77
|
+
|
|
78
|
+
## No blind retries
|
|
79
|
+
|
|
80
|
+
- Failure → **read the error**, analyze the cause, then fix it.
|
|
81
|
+
- Do NOT retry the same approach hoping for a different result.
|
|
82
|
+
- Do NOT loop through trial-and-error when one targeted inspection
|
|
83
|
+
would reveal the cause.
|
|
84
|
+
- Max 2 retries for the same approach — then stop and rethink.
|
|
85
|
+
|
|
86
|
+
## Open files are context, not intent
|
|
87
|
+
|
|
88
|
+
The editor may report that the user has a file open. Background
|
|
89
|
+
context only — does NOT mean the user's message is about that file.
|
|
90
|
+
|
|
91
|
+
- The user's message determines intent — not which file is open.
|
|
92
|
+
- A user can have `README.md` open and type `/compress` — intent is
|
|
93
|
+
to compress, not to discuss the README.
|
|
94
|
+
- A user can have `UserController.php` open and ask "how do tests
|
|
95
|
+
work?" — intent is testing, not the controller.
|
|
96
|
+
- Treat the open file as relevant only when the user's message
|
|
97
|
+
explicitly references it (e.g. "fix this file", "what does this
|
|
98
|
+
do?", "update the open file").
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Token Efficiency — mechanics
|
|
2
|
+
|
|
3
|
+
Anti-loop patterns, conversation efficiency rules, and exception
|
|
4
|
+
catalog for the [`token-efficiency`](../../../rules/token-efficiency.md)
|
|
5
|
+
rule. The rule body holds the two Iron Laws and the fresh-output
|
|
6
|
+
principle; this file is the lookup material.
|
|
7
|
+
|
|
8
|
+
## Anti-loop: Extended Reasoning
|
|
9
|
+
|
|
10
|
+
Do NOT use extended reasoning / chain-of-thought tools for simple
|
|
11
|
+
tasks like viewing files, running commands, or making straightforward
|
|
12
|
+
edits. They are ONLY for genuinely complex multi-step reasoning. If
|
|
13
|
+
calling such tools more than once per task — you are looping. Stop
|
|
14
|
+
immediately and act directly.
|
|
15
|
+
|
|
16
|
+
## Anti-loop: "CRITICAL INSTRUCTION" and self-prompting
|
|
17
|
+
|
|
18
|
+
Generating text that starts with "CRITICAL INSTRUCTION", "I need
|
|
19
|
+
to", "Let me think", "Related tools:", or similar self-directed
|
|
20
|
+
reasoning inside a tool call or as a preamble before acting → **you
|
|
21
|
+
are in a loop**. Happens after connection errors or when the user
|
|
22
|
+
says "continue" / "mach weiter".
|
|
23
|
+
|
|
24
|
+
**Immediate action:**
|
|
25
|
+
|
|
26
|
+
1. STOP generating self-instructions.
|
|
27
|
+
2. Read the last user message — what did they actually ask?
|
|
28
|
+
3. Do that ONE thing directly. No planning monologue, no tool
|
|
29
|
+
selection reasoning.
|
|
30
|
+
4. Don't know what the user wanted → ask: "Where were we?"
|
|
31
|
+
|
|
32
|
+
## Conversation Efficiency
|
|
33
|
+
|
|
34
|
+
### Act, skip narration
|
|
35
|
+
|
|
36
|
+
- **Skip repeating the user's request.** They know what they asked.
|
|
37
|
+
- **Just do it** — skip announcing what you're about to do.
|
|
38
|
+
- **Skip explaining obvious tool calls.** Reading a file needs no
|
|
39
|
+
justification.
|
|
40
|
+
- **Report only outcomes** — skip intermediate step summaries unless
|
|
41
|
+
the user needs them.
|
|
42
|
+
|
|
43
|
+
This rule NEVER overrides `user-interaction` or command rules. Token
|
|
44
|
+
efficiency means fewer *unnecessary* words — NOT skipping required
|
|
45
|
+
questions, numbered options, or command steps. When a rule or
|
|
46
|
+
command says "ask the user", you ask.
|
|
47
|
+
|
|
48
|
+
### Stop early — max 2 retries
|
|
49
|
+
|
|
50
|
+
- Command fails twice with same error → stop, rethink. Try a
|
|
51
|
+
different approach.
|
|
52
|
+
- `grep` / search returns nothing after 2 attempts → switch approach
|
|
53
|
+
or ask the user.
|
|
54
|
+
- Max 3 diagnostic commands per error. Read the error, think, act.
|
|
55
|
+
- One hypothesis at a time. Pick the most likely, try it. Fails →
|
|
56
|
+
ask.
|
|
57
|
+
|
|
58
|
+
### Keep intermediate output minimal
|
|
59
|
+
|
|
60
|
+
Read `personal.minimal_output` (default: `true`) and
|
|
61
|
+
`personal.play_by_play` (default: `false`) from `.agent-settings.yml`.
|
|
62
|
+
|
|
63
|
+
When `personal.minimal_output: true`:
|
|
64
|
+
|
|
65
|
+
- Multi-step work: short bullet points only, no paragraphs.
|
|
66
|
+
- No thinking out loud — user doesn't need your reasoning.
|
|
67
|
+
- `personal.play_by_play: false` → silently investigate, report
|
|
68
|
+
conclusion only.
|
|
69
|
+
- `personal.play_by_play: true` → briefly share intermediate
|
|
70
|
+
findings.
|
|
71
|
+
- At the end: concise summary — what changed, what user needs to
|
|
72
|
+
know.
|
|
73
|
+
|
|
74
|
+
### Don't re-read what you already know
|
|
75
|
+
|
|
76
|
+
- Edited a file → edit tool showed result. Don't re-read.
|
|
77
|
+
- Ran a command → you have output. Don't re-run to "verify".
|
|
78
|
+
- File in context from recent messages → don't reload.
|
|
79
|
+
|
|
80
|
+
### Minimize tool calls
|
|
81
|
+
|
|
82
|
+
- Parallel reads — don't read 5 files sequentially.
|
|
83
|
+
- Regex search over full file reads. View specific line ranges.
|
|
84
|
+
- One codebase search call with all symbols — not 5 separate.
|
|
85
|
+
- Short question → short answer. Summary tables only for 3+ items.
|
|
86
|
+
|
|
87
|
+
### Exceptions
|
|
88
|
+
|
|
89
|
+
- Small output (< 30 lines) — read directly.
|
|
90
|
+
- Debugging — OK to read more context around one error.
|
|
91
|
+
- User explicitly asks for full output — show it.
|
|
92
|
+
|
|
93
|
+
→ Detailed patterns: `docs/guidelines/agent-infra/output-patterns.md`
|
|
@@ -1,17 +1,133 @@
|
|
|
1
1
|
# User Interaction — mechanics
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
summary patterns for the
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Rationale, failure-mode catalog, format examples, progress
|
|
4
|
+
indicators, and summary patterns for the
|
|
5
|
+
[`user-interaction`](../../../rules/user-interaction.md) rule. The
|
|
6
|
+
rule body holds the two Iron Law fenced blocks (single-source
|
|
7
|
+
recommendation, pre-send self-check); this file is the lookup
|
|
8
|
+
material for everything else.
|
|
9
|
+
|
|
10
|
+
## Why the agent must take a position
|
|
11
|
+
|
|
12
|
+
The agent has read the code, the contracts, the trade-offs.
|
|
13
|
+
Refusing to take a position dumps that work back on the user. Take
|
|
14
|
+
the position; be wrong out loud if needed. "Egal, was bevorzugst
|
|
15
|
+
Du?" / "no preference" is NEVER acceptable.
|
|
16
|
+
|
|
17
|
+
## Position-agnostic — the most common slip
|
|
18
|
+
|
|
19
|
+
End-of-turn "Wie weiter?" / "What next?" / "How to proceed?" / "How
|
|
20
|
+
should we continue?" blocks with numbered options ARE numbered-options
|
|
21
|
+
blocks. Same Iron Law applies — exactly one `Empfehlung: N` /
|
|
22
|
+
`Recommendation: N` line, every time. No "these are just follow-up
|
|
23
|
+
suggestions" exception, no "the user knows better here" exception, no
|
|
24
|
+
"I genuinely don't have a preference" exception. If the agent prints
|
|
25
|
+
`1. … 2. … 3. …` anywhere in the reply, the recommendation line is
|
|
26
|
+
mandatory.
|
|
27
|
+
|
|
28
|
+
## Format — non-negotiable
|
|
29
|
+
|
|
30
|
+
- Options block stays NEUTRAL — no `(recommended)`, no `(rec)`, no
|
|
31
|
+
`←`, no bold, no checkmark.
|
|
32
|
+
- Directly after the options block, ONE line, bolded, in the user's
|
|
33
|
+
language:
|
|
34
|
+
- English: `**Recommendation: N — <option-name>** — <why>. Caveat: <flip-condition>.`
|
|
35
|
+
- German: `**Empfehlung: N — <option-name>** — <warum>. Caveat: <flip-bedingung>.`
|
|
36
|
+
- Other numbers MAY appear later in the prose, but ONLY as caveats
|
|
37
|
+
(`escalate to 3 if …`, `flip to 1 when …`). NEVER as a primary
|
|
38
|
+
recommendation.
|
|
39
|
+
- Genuine tie (rare — true 50/50 with missing data) → say what data
|
|
40
|
+
would break the tie and ask for that instead.
|
|
41
|
+
|
|
42
|
+
## No trailing open-ended question
|
|
43
|
+
|
|
44
|
+
Reply contains numbered options → the recommendation line IS the
|
|
45
|
+
closer. No `Welcher Pfad?` / `What's it gonna be?` / `Was meinst
|
|
46
|
+
Du?` / `Was sagst Du?` / `Welche willst Du?` / `What do you think?`
|
|
47
|
+
after the recommendation — that reframes the vote as opinion-poll
|
|
48
|
+
and is hedging in disguise. The user picks a number; the agent does
|
|
49
|
+
not re-ask. Permitted: a clarifying caveat sentence on the
|
|
50
|
+
recommendation line itself (`Caveat: flip to 2 if …`). Forbidden:
|
|
51
|
+
any standalone trailing question that re-opens the choice.
|
|
52
|
+
|
|
53
|
+
## What does NOT count as a recommendation
|
|
54
|
+
|
|
55
|
+
- "Both work" / "either is fine" / "depends on what you prefer"
|
|
56
|
+
- Listing pros and cons without picking a number
|
|
57
|
+
- "I'd lean towards X" without a reason
|
|
58
|
+
- Hiding behind "you know the project better"
|
|
59
|
+
- Inline `(recommended)` tag with no follow-up `Recommendation: N` line
|
|
60
|
+
|
|
61
|
+
## Pre-send self-check details
|
|
62
|
+
|
|
63
|
+
Before emitting any reply that contains numbered options, scan the
|
|
64
|
+
**entire drafted reply** — top to bottom, including end-of-turn
|
|
65
|
+
"Wie weiter?" / "What next?" continuation menus, follow-up
|
|
66
|
+
suggestion blocks, and any list of `1. … 2. … 3. …` regardless of
|
|
67
|
+
position or framing:
|
|
68
|
+
|
|
69
|
+
1. Count occurrences of `(recommended)` / `(rec)` / `(empfohlen)`
|
|
70
|
+
inline next to a numbered option → MUST be **zero**. Found one →
|
|
71
|
+
rewrite, drop the tag.
|
|
72
|
+
2. Count `1\\.\\s` / `2\\.\\s` / `3\\.\\s` patterns inside blockquotes
|
|
73
|
+
or top-level prose → if **any** numbered-option block exists
|
|
74
|
+
anywhere in the reply, the recommendation line is mandatory.
|
|
75
|
+
3. Count distinct `Recommendation:\\s*N` / `Empfehlung:\\s*N` lines
|
|
76
|
+
(case-insensitive) → MUST be **exactly one per options block**.
|
|
77
|
+
Zero → add one. Two or more distinct numbers → rewrite, pick one.
|
|
78
|
+
4. The number on the recommendation line MUST exist in the option
|
|
79
|
+
block it follows.
|
|
80
|
+
5. Multiple options blocks (e.g. clarification block AND end-of-turn
|
|
81
|
+
menu) → each block gets its own `Recommendation: N` line directly
|
|
82
|
+
underneath.
|
|
83
|
+
|
|
84
|
+
Mechanical backstop:
|
|
85
|
+
`python3 scripts/check_reply_consistency.py --stdin < draft.md`
|
|
86
|
+
(non-zero exit on any rule above). Self-scan is the primary gate;
|
|
87
|
+
the script is the deterministic safety net for ambiguous cases.
|
|
8
88
|
|
|
9
89
|
## Common failure modes — known, named, no excuses
|
|
10
90
|
|
|
11
|
-
- **End-of-turn menu skipped.** Reply answers
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **
|
|
91
|
+
- **End-of-turn menu skipped.** Reply answers fine, then ends with
|
|
92
|
+
`1. … 2. … 3. …` and no `Empfehlung:`. Iron Law 1 violated — these
|
|
93
|
+
are numbered options, position is irrelevant.
|
|
94
|
+
- **Trailing-question hedge.** Reply has options + recommendation,
|
|
95
|
+
but ends with `Welcher Pfad?` / `What's it gonna be?` — reframes
|
|
96
|
+
the vote as opinion-poll. Banned by Iron Law 1.
|
|
97
|
+
- **"Genuinely no preference" hedge.** Pick anyway. Agent has more
|
|
98
|
+
context than user on the trade-off; refusing to pick dumps the
|
|
99
|
+
work back. Pick the safest option, name the flip-condition.
|
|
100
|
+
- **"User knows the project better" hedge.** Same failure mode,
|
|
101
|
+
different costume. The user asked for an opinion by virtue of
|
|
102
|
+
accepting the options block; deliver it.
|
|
103
|
+
- **Multi-block reply with one recommendation.** Two options blocks
|
|
104
|
+
but only one `Empfehlung:` line — second block unguarded. Rule 5
|
|
105
|
+
of Iron Law 2 closes this.
|
|
106
|
+
|
|
107
|
+
## Slip handling
|
|
108
|
+
|
|
109
|
+
Same protocol as
|
|
110
|
+
[`language-and-tone § slip-handling`](../../../rules/language-and-tone.md#slip-handling).
|
|
111
|
+
User calls out a missing or wrong recommendation → acknowledge once
|
|
112
|
+
in the user's language, rewrite the reply with a recommendation,
|
|
113
|
+
ship. No "from now on" promises — only the next reply proves
|
|
114
|
+
compliance.
|
|
115
|
+
|
|
116
|
+
## Numbered Options — rules
|
|
117
|
+
|
|
118
|
+
- **Every question with choices** must use numbered options — no
|
|
119
|
+
exceptions.
|
|
120
|
+
- **Every numbered list with `1. … 2. … 3. …`** is a
|
|
121
|
+
numbered-options block, regardless of position. End-of-turn "Wie
|
|
122
|
+
weiter?" / "What next?" / "How to proceed?" menus, mid-reply
|
|
123
|
+
continuation prompts, and clarification blocks all count.
|
|
124
|
+
- **Keep options short** — one line each, with a brief explanation
|
|
125
|
+
after the dash.
|
|
126
|
+
- **Always include a "skip" or "no change" option** when applicable.
|
|
127
|
+
- **Always state a recommendation** — Iron Law 1.
|
|
128
|
+
- **Use the user's language** for the question and options.
|
|
129
|
+
- **Accept both** the number and a natural-language answer ("1" or
|
|
130
|
+
"the first one").
|
|
15
131
|
|
|
16
132
|
## Examples
|
|
17
133
|
|
|
@@ -27,3 +27,47 @@ The Hard Floor still applies on every surface, including cloud. There
|
|
|
27
27
|
is no "cloud override" for production-branch merges, deploys, pushes,
|
|
28
28
|
prod data/infra, or whimsical bulk deletions — see
|
|
29
29
|
[`non-destructive-by-default`](../../rules/non-destructive-by-default.md#cloud-behavior).
|
|
30
|
+
|
|
31
|
+
## Blocking — STILL ASK regardless of `personal.autonomy`
|
|
32
|
+
|
|
33
|
+
Beyond the Hard Floor, the autonomy setting also never overrides:
|
|
34
|
+
|
|
35
|
+
- **Vague-request triggers** in
|
|
36
|
+
[`ask-when-uncertain`](../../rules/ask-when-uncertain.md) —
|
|
37
|
+
ambiguous requirements stay ambiguous; pick-one-and-pray is wrong.
|
|
38
|
+
- **Architectural / structural choices** the codebase doesn't already
|
|
39
|
+
settle (multi-stack picks, library introductions).
|
|
40
|
+
- **Security-sensitive paths** — see
|
|
41
|
+
[`security-sensitive-stop`](../../rules/security-sensitive-stop.md).
|
|
42
|
+
- **Scope expansion** beyond the stated task — see
|
|
43
|
+
[`scope-control`](../../rules/scope-control.md).
|
|
44
|
+
- **Remote-state operations** — push, merge, rebase, force-push,
|
|
45
|
+
branch create/delete/switch, PR create/close/retarget, tag/release.
|
|
46
|
+
Permission-gated by
|
|
47
|
+
[`scope-control`](../../rules/scope-control.md); the prod-trunk
|
|
48
|
+
and deploy-tied subset is governed by
|
|
49
|
+
[`non-destructive-by-default`](../../rules/non-destructive-by-default.md).
|
|
50
|
+
- **Destructive ops** — see
|
|
51
|
+
[`non-destructive-by-default`](../../rules/non-destructive-by-default.md)
|
|
52
|
+
for the full taxonomy (whimsical bulk deletions, content
|
|
53
|
+
destruction, commits containing bulk deletions or infra changes).
|
|
54
|
+
|
|
55
|
+
In doubt whether something is trivial or blocking → it is blocking.
|
|
56
|
+
Ask.
|
|
57
|
+
|
|
58
|
+
## Commit policy summary
|
|
59
|
+
|
|
60
|
+
Committing is governed by the canonical
|
|
61
|
+
[`commit-policy`](../../rules/commit-policy.md) rule, which applies
|
|
62
|
+
regardless of `personal.autonomy`:
|
|
63
|
+
|
|
64
|
+
- NEVER commit unless user said so this turn, a commit command was
|
|
65
|
+
invoked, a standing instruction is active, or the roadmap
|
|
66
|
+
authorizes it.
|
|
67
|
+
- NEVER ask about committing. The user invokes a command or says so.
|
|
68
|
+
- In autonomous mode, the **only** permitted commit-related question
|
|
69
|
+
is the one-shot pre-scan ask at the start of roadmap execution.
|
|
70
|
+
|
|
71
|
+
Push, merge, rebase, branch creation, PR operations, and tags
|
|
72
|
+
remain permission-gated by
|
|
73
|
+
[`scope-control § git-operations`](../../rules/scope-control.md#git-operations--permission-gated).
|
|
@@ -91,7 +91,7 @@ produce opus-level quality by enforcing habits that weaker models skip by defaul
|
|
|
91
91
|
- **Default to `sonnet`** — it's the cost-efficient workhorse.
|
|
92
92
|
- **Escalate to `opus`** only when architecture, refactoring, or unclear debugging is involved.
|
|
93
93
|
- **After Opus work** (architecture plan, refactoring design, root cause found):
|
|
94
|
-
→ Recommend switching back to `sonnet` for
|
|
94
|
+
→ Recommend switching back to `sonnet` for impl.
|
|
95
95
|
- **Use `gpt`** for large-scale analysis, searching across many files, or automation.
|
|
96
96
|
|
|
97
97
|
## Recommendation Flow
|
|
@@ -121,7 +121,7 @@ When user says they want to continue with the current model:
|
|
|
121
121
|
### Downgrade reminder
|
|
122
122
|
|
|
123
123
|
After completing an opus-level task (architecture plan done, refactoring complete, root cause found),
|
|
124
|
-
remind the user to switch back to sonnet for the
|
|
124
|
+
remind the user to switch back to sonnet for the impl phase:
|
|
125
125
|
|
|
126
126
|
```
|
|
127
127
|
> 💡 The {architecture/debugging/design} phase is done.
|
|
@@ -155,7 +155,7 @@ When a project using this package wants to **optimize** a shared rule or skill:
|
|
|
155
155
|
|
|
156
156
|
### Anti-patterns
|
|
157
157
|
|
|
158
|
-
- Keeping the override after upstream merge →
|
|
158
|
+
- Keeping the override after upstream merge → → drift
|
|
159
159
|
- Submitting only the compressed version → breaks source-of-truth workflow
|
|
160
160
|
- Submitting project-specific behavior as universal improvement
|
|
161
161
|
- Forgetting to create the PR → improvement stays siloed
|
|
@@ -52,12 +52,12 @@ Concrete and user-facing. Each finding names a missing outcome, an
|
|
|
52
52
|
unverifiable AC, or a scope item whose removal would not hurt the
|
|
53
53
|
user. When the persona proposes a rewritten AC, it is a single
|
|
54
54
|
sentence in the form "the user can X when Y". Findings that are
|
|
55
|
-
purely
|
|
55
|
+
purely impl concerns are out of scope — escalate to
|
|
56
56
|
`developer` or `senior-engineer`.
|
|
57
57
|
|
|
58
58
|
## Anti-Patterns
|
|
59
59
|
|
|
60
|
-
- Do NOT write
|
|
60
|
+
- Do NOT write impl details or technical designs — that
|
|
61
61
|
is the `developer` and `senior-engineer` space.
|
|
62
62
|
- Do NOT invoke "business value" as an argument without naming the
|
|
63
63
|
user and the outcome.
|
|
@@ -38,7 +38,7 @@ It is the lens that refuses to confuse coverage with confidence.
|
|
|
38
38
|
test would catch?
|
|
39
39
|
- Which assertion is missing — the one that would have caught the
|
|
40
40
|
bug we just fixed, or the bug one ticket away?
|
|
41
|
-
- Where is the test verifying the
|
|
41
|
+
- Where is the test verifying the impl instead of the
|
|
42
42
|
behavior?
|
|
43
43
|
- Which boundary — empty, null, max, concurrent, re-entrant — is
|
|
44
44
|
not represented in the test suite for this code path?
|
|
@@ -8,7 +8,7 @@ source: package
|
|
|
8
8
|
|
|
9
9
|
# Agent Authority — Priority Index
|
|
10
10
|
|
|
11
|
-
Four rules answer **"may the agent do this autonomously?"**
|
|
11
|
+
Four rules answer **"may the agent do this autonomously?"** Higher band wins.
|
|
12
12
|
|
|
13
13
|
| Band | Trigger | Canonical rule |
|
|
14
14
|
|---|---|---|
|
|
@@ -17,9 +17,8 @@ Four rules answer **"may the agent do this autonomously?"** Check bands in order
|
|
|
17
17
|
| **3. Commit Default** | About to commit — never, unless one of four exceptions fires | [`commit-policy`](commit-policy.md) |
|
|
18
18
|
| **4. Trivial-vs-Blocking** | Routine workflow question — act or ask | [`autonomous-execution`](autonomous-execution.md) |
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Rules
|
|
21
21
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- **Unsure → ask.** [`ask-when-uncertain`](ask-when-uncertain.md) is the universal escape hatch.
|
|
22
|
+
- Hard Floor wins, always — autonomy / roadmap / standing instruction never lift.
|
|
23
|
+
- Higher band wins on conflict — commit exception ≠ Hard Floor override; scope permission ≠ commit override.
|
|
24
|
+
- Unsure → [`ask-when-uncertain`](ask-when-uncertain.md).
|