@event4u/agent-config 1.20.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/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 +60 -64
- 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 +17 -5
- package/.agent-src/commands/council.md +1 -1
- 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/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/slash-command-routing-policy-mechanics.md +1 -1
- 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 +128 -5
- 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 -50
- 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 +41 -106
- 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 +5 -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 +7 -0
- 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 -113
- 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 +22 -108
- 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 +65 -0
- 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/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 +1 -1
- 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/migration-creator/SKILL.md +7 -7
- package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
- 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/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/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/universal-project-analysis/SKILL.md +1 -1
- package/.agent-src/templates/AGENTS.md +1 -1
- package/.agent-src/templates/agent-settings.md +21 -16
- 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/.claude-plugin/marketplace.json +4 -1
- package/AGENTS.md +32 -5
- package/CHANGELOG.md +69 -3
- package/README.md +22 -21
- package/config/agent-settings.template.yml +44 -10
- package/config/gitignore-block.txt +7 -0
- package/docs/architecture.md +86 -5
- package/docs/catalog.md +16 -6
- package/docs/contracts/agent-memory-contract.md +1 -1
- package/docs/contracts/context-paths.md +2 -1
- package/docs/contracts/file-ownership-matrix.json +354 -500
- 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/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 +17 -6
- 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 +2 -2
- 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/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/ai_council/session.py +107 -5
- package/scripts/build_linear_digest.py +3 -5
- 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 +2 -0
- 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 +9 -5
- package/scripts/council_prune.py +81 -0
- package/scripts/count_token_optimizer_usage.sh +54 -0
- package/scripts/install.sh +44 -2
- package/scripts/iron_law_sha.py +98 -0
- 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/schemas/rule.schema.json +55 -6
- package/scripts/skill_linter.py +196 -6
- package/scripts/smoke_path_resolution.py +93 -0
- package/scripts/validate_frontmatter.py +41 -1
- 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/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
- /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
|
@@ -8,8 +8,7 @@ source: package
|
|
|
8
8
|
|
|
9
9
|
# Direct Answers
|
|
10
10
|
|
|
11
|
-
Three Iron Laws govern every reply.
|
|
12
|
-
momentum, politeness defaults, and the urge to fill space.
|
|
11
|
+
Three Iron Laws govern every reply.
|
|
13
12
|
|
|
14
13
|
## Iron Law 1 — No Flattery
|
|
15
14
|
|
|
@@ -19,11 +18,10 @@ NEVER PRAISE THE USER'S IDEA TO MAKE THEM HAPPY.
|
|
|
19
18
|
ANSWER THE SUBSTANCE. SHIP THE TRUTH.
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
- No positive
|
|
23
|
-
- No subjective
|
|
24
|
-
- "Good catch" / "you're right" only when literally true
|
|
25
|
-
-
|
|
26
|
-
- Failure mode — praise hedging bad news; drop the cushion, deliver the news.
|
|
21
|
+
- No positive-adjective opener about user / question / idea / work.
|
|
22
|
+
- No subjective judgment on user code unless evaluation was asked.
|
|
23
|
+
- "Good catch" / "you're right" only when literally true.
|
|
24
|
+
- Mistakes — one-sentence acknowledge, switch behavior, no apology theatre.
|
|
27
25
|
|
|
28
26
|
## Iron Law 2 — No Invented Facts (severity-tiered)
|
|
29
27
|
|
|
@@ -33,16 +31,14 @@ THE MORE LOAD-BEARING THE CLAIM, THE HARDER YOU VERIFY.
|
|
|
33
31
|
WHEN VERIFICATION IS NOT WORTH THE COST → ASK.
|
|
34
32
|
```
|
|
35
33
|
|
|
36
|
-
| Severity |
|
|
34
|
+
| Severity | Action |
|
|
37
35
|
|---|---|
|
|
38
|
-
| **High — load-bearing
|
|
39
|
-
| **Medium — project-shape
|
|
40
|
-
| **Low — well-known idioms
|
|
36
|
+
| **High** — load-bearing (paths, signatures, versions, security, "this passes") | Verify with `view` / `grep` / `codebase-retrieval` / fresh output. Too expensive → ask. |
|
|
37
|
+
| **Medium** — project-shape (conventions, file location) | One-tool-call verify, else hedge: *"I'd guess X — not checked"*. |
|
|
38
|
+
| **Low** — well-known idioms | Inference OK; mark as inference if not 100% sure. |
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
[`asking-and-brevity-examples`](
|
|
44
|
-
Override: "just guess", "rough estimate is fine", "skip the verify"
|
|
45
|
-
→ drop to Low for that turn.
|
|
40
|
+
Override: "just guess" / "rough estimate" / "skip verify" → drop to Low for that turn.
|
|
41
|
+
Examples + hedge patterns: [`asking-and-brevity-examples § severity`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
|
|
46
42
|
|
|
47
43
|
## Iron Law 3 — Brevity by Default
|
|
48
44
|
|
|
@@ -51,49 +47,24 @@ THE SHORTEST REPLY THAT FULLY ANSWERS THE QUESTION IS THE RIGHT REPLY.
|
|
|
51
47
|
LONG ANSWERS ARE A FAILURE MODE, NOT A SIGN OF EFFORT.
|
|
52
48
|
```
|
|
53
49
|
|
|
54
|
-
- Skip restating the
|
|
55
|
-
- Skip announcing intent ("Let me…", "I will now…") — just do.
|
|
50
|
+
- Skip restating the question; skip "Let me…" intent announcements.
|
|
56
51
|
- Skip explaining tool use — the call result speaks.
|
|
57
52
|
- Skip post-hoc summary unless rechecking a decision.
|
|
58
|
-
- Multi-step → bullets
|
|
59
|
-
- One-true-answer question → one sentence + the answer.
|
|
53
|
+
- Multi-step → bullets. One-true-answer → one sentence.
|
|
60
54
|
|
|
61
|
-
`
|
|
62
|
-
length. **Never overrides** `user-interaction` (numbered options stay)
|
|
63
|
-
or command-mandated steps.
|
|
55
|
+
Never overrides `user-interaction` (numbered options stay) or command-mandated steps.
|
|
64
56
|
|
|
65
57
|
## Emoji Scope — functional markers only
|
|
66
58
|
|
|
67
|
-
**Whitelist:** mode markers
|
|
68
|
-
|
|
69
|
-
roadmap checkboxes `[x]` / `[~]` / `[-]`.
|
|
59
|
+
**Whitelist:** mode markers (`role-mode-adherence`); CLI status `❌` / `✅` / `⚠️`; roadmap checkboxes `[x]` / `[~]` / `[-]`.
|
|
60
|
+
**Blacklist:** opening flair (✨, 🚀, 🎉, 💡, 🔥, 👍); empathy (❤️, 🤗, 😊); section dividers; reaction emojis. Unsure → blacklist.
|
|
70
61
|
|
|
71
|
-
|
|
72
|
-
empathy (❤️, 🤗, 😊); section dividers, headline ornaments, reaction
|
|
73
|
-
emojis. Unsure → assume blacklist.
|
|
62
|
+
## Failure modes & examples
|
|
74
63
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--failure-modes-the-user-will-call-out).
|
|
79
|
-
On call-out: acknowledge once in the user's language, switch, no
|
|
80
|
-
excuses (mirrors `language-and-tone` § slip handling).
|
|
64
|
+
Trigger phrases + correction pattern: [`asking-and-brevity-examples § failure-modes`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--failure-modes-the-user-will-call-out).
|
|
65
|
+
Pattern Memory (wrong / right / why): [`direct-answers-demos`](../docs/guidelines/agent-infra/direct-answers-demos.md).
|
|
66
|
+
Outcome baseline: [`tests/golden/outcomes/direct_answers.json`](../../tests/golden/outcomes/direct_answers.json).
|
|
81
67
|
|
|
82
68
|
## Interactions
|
|
83
69
|
|
|
84
|
-
|
|
85
|
-
CLI-icon two-space rule.
|
|
86
|
-
- `ask-when-uncertain` — resolution surface for Iron Law 2 gaps.
|
|
87
|
-
- `think-before-action` — how to verify code-behavior claims.
|
|
88
|
-
- `verify-before-complete` — completion-claim evidence gate.
|
|
89
|
-
- `token-efficiency` — loop-side brevity.
|
|
90
|
-
- `user-interaction` — numbered-options Iron Law overrides brevity.
|
|
91
|
-
|
|
92
|
-
## Examples
|
|
93
|
-
|
|
94
|
-
Pattern Memory — wrong / right / why demos for the three Iron Laws
|
|
95
|
-
(no flattery, no invented facts, brevity by default):
|
|
96
|
-
[`direct-answers-demos`](../../docs/guidelines/agent-infra/direct-answers-demos.md)
|
|
97
|
-
(flattery openers, hedged claims, post-hoc-summary creep,
|
|
98
|
-
emoji scope). Outcome baseline locked at
|
|
99
|
-
[`tests/golden/outcomes/direct_answers.json`](../../tests/golden/outcomes/direct_answers.json).
|
|
70
|
+
`language-and-tone` · `ask-when-uncertain` · `think-before-action` · `verify-before-complete` · `token-efficiency` · `user-interaction` (overrides brevity).
|
|
@@ -1,54 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: "auto"
|
|
3
3
|
tier: "3"
|
|
4
|
-
alwaysApply: false
|
|
5
4
|
description: "Running PHP commands inside Docker containers — artisan, composer, phpstan, rector, ecs, phpunit, tests, migrations, and any CLI tool execution"
|
|
6
5
|
source: package
|
|
6
|
+
triggers:
|
|
7
|
+
- keyword: "docker"
|
|
8
|
+
- keyword: "artisan"
|
|
9
|
+
- keyword: "composer"
|
|
10
|
+
- phrase: "inside the container"
|
|
11
|
+
routes_to:
|
|
12
|
+
- "skill:docker"
|
|
7
13
|
---
|
|
8
14
|
|
|
9
|
-
# Docker
|
|
15
|
+
# Docker Commands
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
**Iron Law.** Run PHP / artisan / composer / phpstan / rector / ecs / phpunit inside the project container, never on the host.
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Detect the correct PHP container service name from `docker-compose.yml` / `compose.yaml`.
|
|
16
|
-
Read the compose file to find the PHP service name — it varies per project.
|
|
17
|
-
|
|
18
|
-
Use `docker compose exec -T <service> ...` for non-interactive commands (scripts, CI).
|
|
19
|
-
Use `make console` to enter the container interactively (if available).
|
|
20
|
-
|
|
21
|
-
## Tooling Detection
|
|
22
|
-
|
|
23
|
-
Check if `artisan` exists in the project root:
|
|
24
|
-
|
|
25
|
-
- **Laravel** (`artisan` exists): `php artisan test`, `vendor/bin/phpstan analyse`, `vendor/bin/rector process`
|
|
26
|
-
- **Composer** (no `artisan`): `vendor/bin/phpunit`, `vendor/bin/phpstan analyse`, `vendor/bin/rector process`
|
|
27
|
-
|
|
28
|
-
## Examples (Laravel project)
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
docker compose exec -T <php-service> vendor/bin/phpstan analyse
|
|
32
|
-
docker compose exec -T <php-service> vendor/bin/rector process
|
|
33
|
-
docker compose exec -T <php-service> vendor/bin/ecs check --fix
|
|
34
|
-
docker compose exec -T <php-service> php artisan test
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Examples (Composer project)
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
docker compose exec -T <php-service> vendor/bin/phpstan analyse
|
|
41
|
-
docker compose exec -T <php-service> vendor/bin/rector process
|
|
42
|
-
docker compose exec -T <php-service> vendor/bin/ecs check --fix
|
|
43
|
-
docker compose exec -T <php-service> vendor/bin/phpunit
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Build / Task Runner
|
|
47
|
-
|
|
48
|
-
Before using raw `docker compose exec` commands, check if the consumer
|
|
49
|
-
project ships a `Makefile` for common targets (e.g. `make console`,
|
|
50
|
-
`make test`, `make phpstan`). Read the Makefile first to discover
|
|
51
|
-
available shortcuts. If the project uses a different task runner,
|
|
52
|
-
inspect its config file before defaulting to raw `docker compose exec`.
|
|
53
|
-
|
|
54
|
-
Frontend commands (npm, webpack) run on the host or in the node container.
|
|
19
|
+
Body migrated to `skill:docker` (per P4 of `road-to-kernel-and-router.md`).
|
|
20
|
+
Trigger-set above activates this routing under the `balanced` and `full` profiles.
|
|
@@ -3,64 +3,18 @@ type: "auto"
|
|
|
3
3
|
tier: "2a"
|
|
4
4
|
description: "Keeping .augment/ contexts, counts, and cross-references in sync when creating, renaming, or deleting skills, commands, rules, guidelines, templates, or any agent infrastructure files"
|
|
5
5
|
source: package
|
|
6
|
-
|
|
7
|
-
- .agent-src.uncompressed/
|
|
6
|
+
triggers:
|
|
7
|
+
- path_prefix: ".agent-src.uncompressed/"
|
|
8
|
+
- path_prefix: ".augment/"
|
|
9
|
+
- keyword: "rename"
|
|
10
|
+
- keyword: "delete"
|
|
11
|
+
routes_to:
|
|
12
|
+
- "skill:agent-docs-writing"
|
|
8
13
|
---
|
|
9
14
|
|
|
10
15
|
# Docs Sync
|
|
11
16
|
|
|
12
|
-
|
|
17
|
+
**Iron Law.** On any add / rename / delete of skill / rule / command / guideline, update counts and cross-references in the same edit.
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
in the same response** — not later, not in a follow-up, not when reminded.
|
|
17
|
-
|
|
18
|
-
A new rule/skill/command without its index entry, count update, and context update is **incomplete work**.
|
|
19
|
-
|
|
20
|
-
**Mandatory sequence when creating/deleting any `.augment/` file:**
|
|
21
|
-
1. Create/delete the file
|
|
22
|
-
2. **Immediately** update `contexts/augment-infrastructure.md` (counts + category tables)
|
|
23
|
-
3. Check cross-references in contexts and routing hints (inline "see X skill" references)
|
|
24
|
-
4. If a **skill** was added/renamed/deleted: update distribution manifests
|
|
25
|
-
5. If a **hook** was added/renamed/deleted: update hook registries
|
|
26
|
-
6. If **content** changed: run the consistency grep across other artefacts
|
|
27
|
-
|
|
28
|
-
Steps 2–6 are NOT optional. Do NOT present the result to the user until all steps are done.
|
|
29
|
-
|
|
30
|
-
**Two modes:**
|
|
31
|
-
- **Reactive** (automatic): Triggered by add/remove/rename or scope/description/count changes → sync counts, contexts, cross-references, manifests, registries.
|
|
32
|
-
- **Proactive** (on demand): Full audit → find duplicates, thin skills, redundancy, stale content → fix or merge. Ask before destructive actions.
|
|
33
|
-
|
|
34
|
-
## Settings template sync
|
|
35
|
-
|
|
36
|
-
When a skill, rule, or command **reads a new setting** from `.agent-settings.yml` that does not yet
|
|
37
|
-
exist in `.augment/templates/agent-settings.md`:
|
|
38
|
-
|
|
39
|
-
1. **Add the key** with its default value to the template block.
|
|
40
|
-
2. **Add a row** to the Settings Reference table.
|
|
41
|
-
3. **Add a comment** above the key explaining what it does.
|
|
42
|
-
4. **Update the local `.agent-settings.yml`** — add the new key with its default value.
|
|
43
|
-
Preserve all existing values, apply template order and comments. Follow the
|
|
44
|
-
[section-aware merge rules](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)
|
|
45
|
-
so the user benefits immediately without running a separate command.
|
|
46
|
-
|
|
47
|
-
**This step is mandatory.** If the template gains a new key but the local `.agent-settings.yml`
|
|
48
|
-
is not updated, the user cannot discover the new setting exists.
|
|
49
|
-
|
|
50
|
-
## Lookup tables and details — see mechanics
|
|
51
|
-
|
|
52
|
-
The exact "what to update" tables, cross-reference targets,
|
|
53
|
-
distribution-manifest update tables (`marketplace.json` etc.), hook
|
|
54
|
-
registry update tables (`__init__.py`, consumer-settings JSON), the
|
|
55
|
-
failure mode that motivated the manifest section, and the content
|
|
56
|
-
consistency `grep` snippet all live in
|
|
57
|
-
[`contexts/communication/rules-auto/docs-sync-mechanics.md`](../contexts/communication/rules-auto/docs-sync-mechanics.md).
|
|
58
|
-
Pull it whenever a sync trigger fires.
|
|
59
|
-
|
|
60
|
-
## Do NOT
|
|
61
|
-
|
|
62
|
-
- Do NOT rewrite entire files — only update the affected entries.
|
|
63
|
-
- Do NOT ask the user for permission — this is an automatic maintenance step, like updating imports.
|
|
64
|
-
- Do NOT skip cross-reference updates — stale links are worse than no links.
|
|
65
|
-
- Do NOT present a new `.augment/` file to the user without having completed all sync steps first.
|
|
66
|
-
- Do NOT defer sync to a "follow-up" — it must happen in the same response as the creation/deletion.
|
|
19
|
+
Body migrated to `skill:agent-docs-writing` (per P4 of `road-to-kernel-and-router.md`).
|
|
20
|
+
Trigger-set above activates this routing under the `balanced` and `full` profiles.
|
|
@@ -4,6 +4,11 @@ tier: "2b"
|
|
|
4
4
|
alwaysApply: false
|
|
5
5
|
description: "After EVERY code edit, find ALL downstream changes needed to existing files, including callers, tests, imports, types, and documentation"
|
|
6
6
|
source: package
|
|
7
|
+
triggers:
|
|
8
|
+
- intent: "after code edit"
|
|
9
|
+
- keyword: "callers"
|
|
10
|
+
- keyword: "imports"
|
|
11
|
+
- keyword: "downstream"
|
|
7
12
|
---
|
|
8
13
|
|
|
9
14
|
# Downstream Changes
|
|
@@ -1,54 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: "auto"
|
|
3
3
|
tier: "3"
|
|
4
|
-
alwaysApply: false
|
|
5
4
|
description: "Playwright E2E tests — locators, assertions, Page Objects, fixtures, CI, and flaky test prevention"
|
|
6
5
|
source: package
|
|
6
|
+
triggers:
|
|
7
|
+
- keyword: "playwright"
|
|
8
|
+
- keyword: "e2e"
|
|
9
|
+
- phrase: "page object"
|
|
10
|
+
routes_to:
|
|
11
|
+
- "command:e2e-heal"
|
|
7
12
|
---
|
|
8
13
|
|
|
9
14
|
# E2E Testing
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
**Iron Law.** Playwright E2E: stable locators, no `waitForTimeout`, Page Objects for shared flows, fixtures over `beforeEach`.
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
3. **Check `playwright.config.ts`** — base URL, browsers, timeouts, projects.
|
|
16
|
-
|
|
17
|
-
## Locator rules
|
|
18
|
-
|
|
19
|
-
- **Always prefer semantic locators**: `getByRole` > `getByLabel` > `getByText` > `getByTestId` > CSS.
|
|
20
|
-
- Never use auto-generated class names, dynamic IDs, or XPath.
|
|
21
|
-
- If no semantic locator works, add a `data-testid` to the component.
|
|
22
|
-
|
|
23
|
-
## Assertion rules
|
|
24
|
-
|
|
25
|
-
- **Always use web-first assertions** (`toBeVisible`, `toHaveText`, `toHaveURL`).
|
|
26
|
-
- Never use `expect(await ...)` pattern — it doesn't auto-retry.
|
|
27
|
-
- Never use `page.waitForTimeout()` — wait for a condition instead.
|
|
28
|
-
|
|
29
|
-
## Test structure rules
|
|
30
|
-
|
|
31
|
-
- One test = one user workflow or behavior.
|
|
32
|
-
- Tests must be **fully isolated** — no shared state, no execution order dependency.
|
|
33
|
-
- Page Objects contain **actions only**, never assertions.
|
|
34
|
-
- Use **fixtures** for reusable setup (auth, page objects, test data).
|
|
35
|
-
- Use **API calls** for test data setup — faster and more reliable than UI interactions.
|
|
36
|
-
|
|
37
|
-
## CI rules
|
|
38
|
-
|
|
39
|
-
- Set `workers: 1` in CI for stability.
|
|
40
|
-
- Set `retries: 2` in CI, `0` locally.
|
|
41
|
-
- Set `forbidOnly: !!process.env.CI` to prevent `.only` in CI.
|
|
42
|
-
- Collect `trace: 'on-first-retry'` — not on every run.
|
|
43
|
-
- Only install browsers you need (`npx playwright install chromium --with-deps`).
|
|
44
|
-
- Upload `playwright-report/` as CI artifact.
|
|
45
|
-
|
|
46
|
-
## Quality checks
|
|
47
|
-
|
|
48
|
-
Before claiming E2E tests are complete:
|
|
49
|
-
|
|
50
|
-
1. All tests pass locally: `npx playwright test`
|
|
51
|
-
2. No `waitForTimeout` calls in the code.
|
|
52
|
-
3. No CSS/XPath selectors where semantic locators work.
|
|
53
|
-
4. No `.only` left in test files.
|
|
54
|
-
5. Page Objects have no assertions.
|
|
18
|
+
Body migrated to `command:e2e-heal` (per P4 of `road-to-kernel-and-router.md`).
|
|
19
|
+
Trigger-set above activates this routing under the `balanced` and `full` profiles.
|
|
@@ -4,88 +4,26 @@ tier: "3"
|
|
|
4
4
|
description: "Writing or reviewing code — check relevant guideline before writing or reviewing code"
|
|
5
5
|
alwaysApply: false
|
|
6
6
|
source: package
|
|
7
|
+
load_context:
|
|
8
|
+
- ../contexts/communication/rules-auto/guidelines-mechanics.md
|
|
9
|
+
triggers:
|
|
10
|
+
- intent: "writing code"
|
|
11
|
+
- intent: "reviewing code"
|
|
12
|
+
- keyword: "convention"
|
|
7
13
|
---
|
|
8
14
|
|
|
9
15
|
# Guidelines
|
|
10
16
|
|
|
11
|
-
Coding guidelines live
|
|
12
|
-
**Always check the relevant guideline** before writing or reviewing code.
|
|
13
|
-
|
|
14
|
-
## Available Guidelines
|
|
15
|
-
|
|
16
|
-
### PHP (`../../docs/guidelines/php/`)
|
|
17
|
-
|
|
18
|
-
| File | Topic |
|
|
19
|
-
|---|---|
|
|
20
|
-
| `php.md` | General PHP style — strict types, naming, comparisons, early returns, JSON handling |
|
|
21
|
-
| `controllers.md` | Thin controllers, single responsibility, delegation to services |
|
|
22
|
-
| `eloquent.md` | Model conventions, relationships, scopes, accessors/mutators |
|
|
23
|
-
| `validations.md` | FormRequest patterns, custom rules, validation structure |
|
|
24
|
-
| `resources.md` | API Resource conventions, response structure |
|
|
25
|
-
| `jobs.md` | Queue job patterns, serialization, retry strategies |
|
|
26
|
-
| `git.md` | Branch naming, commit messages, PR conventions |
|
|
27
|
-
| `api-design.md` | API conventions — response format, status codes, pagination, error handling |
|
|
28
|
-
| `artisan-commands.md` | Console command conventions — naming, structure, safety, scheduling |
|
|
29
|
-
| `blade-ui.md` | Blade template conventions — views, components, forms, escaping |
|
|
30
|
-
| `database.md` | Database conventions — indexing, query optimization, migrations, transactions |
|
|
31
|
-
| `flux.md` | Flux UI component conventions — usage, variants, forms, Livewire integration |
|
|
32
|
-
| `livewire.md` | Livewire component conventions — state, actions, forms, performance, Alpine.js |
|
|
33
|
-
| `logging.md` | Logging conventions — levels, structured context, Sentry patterns |
|
|
34
|
-
| `naming.md` | Naming conventions — classes, database, routes, variables, modules, agent infra |
|
|
35
|
-
| `performance.md` | Performance conventions — caching, Redis, eager loading, response time targets |
|
|
36
|
-
| `security.md` | Security conventions — auth, authorization, SQL injection, XSS, CSRF, headers |
|
|
37
|
-
| `sql.md` | Raw SQL conventions — parameterization, MariaDB syntax, common mistakes |
|
|
38
|
-
| `websocket.md` | WebSocket conventions — Broadcasting, channel types, connection management |
|
|
39
|
-
| `patterns.md` | Design patterns index (links to `patterns/` subdirectory) |
|
|
40
|
-
|
|
41
|
-
### PHP Patterns (`../../docs/guidelines/php/patterns/`)
|
|
42
|
-
|
|
43
|
-
| File | Pattern |
|
|
44
|
-
|---|---|
|
|
45
|
-
| `service-layer.md` | Service classes, business logic encapsulation |
|
|
46
|
-
| `repositories.md` | Repository pattern, query encapsulation |
|
|
47
|
-
| `dtos.md` | Data Transfer Objects, SimpleDto conventions |
|
|
48
|
-
| `dependency-injection.md` | Constructor injection, service container |
|
|
49
|
-
| `events.md` | Event/Listener patterns, dispatching |
|
|
50
|
-
| `policies.md` | Authorization policies, gate definitions |
|
|
51
|
-
| `factory.md` | Factory pattern usage |
|
|
52
|
-
| `pipelines.md` | Laravel Pipeline pattern |
|
|
53
|
-
| `strategy.md` | Strategy pattern implementation |
|
|
54
|
-
|
|
55
|
-
### E2E (`../../docs/guidelines/e2e/`)
|
|
56
|
-
|
|
57
|
-
Playwright best practices, Page Objects, fixtures, CI.
|
|
58
|
-
|
|
59
|
-
### Agent Infrastructure (`../../docs/guidelines/agent-infra/`)
|
|
60
|
-
|
|
61
|
-
| File | Topic |
|
|
62
|
-
|---|---|
|
|
63
|
-
| `size-and-scope.md` | Size limits and scope boundaries for rules, skills, commands, guidelines, AGENTS.md, copilot-instructions.md |
|
|
64
|
-
| `output-patterns.md` | Redirect/Summarize/Target pattern, targeted operations, tool-first policy, general CLI rules |
|
|
17
|
+
Coding guidelines live under `docs/guidelines/` organized by language. **Always check the relevant guideline** before writing or reviewing code.
|
|
65
18
|
|
|
66
19
|
## How guidelines work
|
|
67
20
|
|
|
68
|
-
- **Guidelines** = detailed coding conventions (reference material, read on demand)
|
|
69
|
-
- **Rules** = always-active behavior constraints (auto-loaded every conversation)
|
|
70
|
-
- **Skills** = agent capabilities and workflows (matched by topic)
|
|
71
|
-
|
|
72
|
-
Guidelines are the "how to write code" docs. Rules enforce critical subsets automatically.
|
|
73
|
-
Skills reference guidelines when performing related tasks.
|
|
74
|
-
|
|
75
|
-
## Boundary: Guidelines vs Skills
|
|
76
|
-
|
|
77
|
-
- Guidelines contain **conventions and reference knowledge**. Skills contain **executable workflows**.
|
|
78
|
-
- A skill may reference a guideline for conventions, but must NOT outsource its core execution steps to a guideline.
|
|
79
|
-
- Do NOT move a skill's operational core (procedure, validation, decision logic) into a guideline.
|
|
80
|
-
- If a skill becomes "go read the guideline", it has lost its purpose — restore the workflow.
|
|
81
|
-
|
|
82
|
-
## Adding new guidelines
|
|
21
|
+
- **Guidelines** = detailed coding conventions (reference material, read on demand).
|
|
22
|
+
- **Rules** = always-active behavior constraints (auto-loaded every conversation).
|
|
23
|
+
- **Skills** = agent capabilities and workflows (matched by topic).
|
|
83
24
|
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
.augment/guidelines/{language}/
|
|
87
|
-
```
|
|
25
|
+
Guidelines are the "how to write code" docs. Rules enforce critical subsets automatically. Skills reference guidelines when performing related tasks.
|
|
88
26
|
|
|
89
|
-
|
|
27
|
+
## Index — see mechanics
|
|
90
28
|
|
|
91
|
-
|
|
29
|
+
The full file index (PHP, PHP patterns, E2E, agent-infra) plus the guidelines-vs-skills boundary and the "adding new guidelines" template live in [`contexts/communication/rules-auto/guidelines-mechanics.md`](../contexts/communication/rules-auto/guidelines-mechanics.md). The rule above is the obligation surface; the mechanics file is the catalog.
|
|
@@ -4,6 +4,14 @@ tier: "2b"
|
|
|
4
4
|
description: "Before implementing features or architectural changes — validate the request against existing code, challenge weak requirements, and suggest improvements"
|
|
5
5
|
alwaysApply: false
|
|
6
6
|
source: package
|
|
7
|
+
triggers:
|
|
8
|
+
- intent: "implement feature"
|
|
9
|
+
- intent: "architectural change"
|
|
10
|
+
- keyword: "refactor"
|
|
11
|
+
validator_ignore:
|
|
12
|
+
- type: "substring"
|
|
13
|
+
pattern: ".agent-src.uncompressed/"
|
|
14
|
+
reason: "Rule cites the authoring tree when describing where examples live."
|
|
7
15
|
---
|
|
8
16
|
|
|
9
17
|
# Improve Before Implement
|
|
@@ -42,10 +50,10 @@ Before coding, quickly verify:
|
|
|
42
50
|
- Does it follow established patterns in the codebase?
|
|
43
51
|
- Does it contradict existing conventions?
|
|
44
52
|
- Do **multiple valid patterns/frameworks** already exist (e.g. Tailwind + Flux, multiple form libraries, competing state stores)? If yes, do NOT pick one arbitrarily — ask which to use.
|
|
45
|
-
- Is the change a **second branch on the same discriminator** — second `match`/`switch` arm, second `if/elseif`, or second class hardcoded to one enum value (e.g. `Provider::FOO`, `'stripe'`)? If yes, run the Strategy sniff test before adding the branch — see [`docs/guidelines/php/patterns/strategy.md`](
|
|
53
|
+
- Is the change a **second branch on the same discriminator** — second `match`/`switch` arm, second `if/elseif`, or second class hardcoded to one enum value (e.g. `Provider::FOO`, `'stripe'`)? If yes, run the Strategy sniff test before adding the branch — see [`docs/guidelines/php/patterns/strategy.md`](../docs/guidelines/php/patterns/strategy.md#sniff-test--when-an-enumstring-discriminator-wants-to-become-a-strategy).
|
|
46
54
|
|
|
47
55
|
**If misfit** → show evidence (file references), propose alternative.
|
|
48
|
-
**If multiple valid options** → list them, ask which to use. See [`no blind implementation`](
|
|
56
|
+
**If multiple valid options** → list them, ask which to use. See [`no blind implementation`](../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md#2-no-blind-implementation).
|
|
49
57
|
|
|
50
58
|
### 3. Is the approach sound?
|
|
51
59
|
|
|
@@ -4,6 +4,10 @@ tier: "3"
|
|
|
4
4
|
description: "Language and tone — informal German Du, English code comments, .md files always English"
|
|
5
5
|
alwaysApply: true
|
|
6
6
|
source: package
|
|
7
|
+
validator_ignore:
|
|
8
|
+
- type: "substring"
|
|
9
|
+
pattern: ".agent-src.uncompressed/"
|
|
10
|
+
reason: "Rule scopes the .md-English mandate to the authoring tree."
|
|
7
11
|
---
|
|
8
12
|
|
|
9
13
|
# Language and Tone
|
|
@@ -20,113 +24,44 @@ NO "SWITCH MID-PARAGRAPH". NO "LAST 20 TURNS WERE ENGLISH".
|
|
|
20
24
|
NO "INTER-TOOL COMMENT IS JUST A NOTE" EXCEPTION.
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
Trigger
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
identifier names, log lines.
|
|
50
|
-
|
|
51
|
-
### Pre-send gate — MANDATORY before every reply
|
|
52
|
-
|
|
53
|
-
Run silently before any output:
|
|
54
|
-
|
|
55
|
-
1. **Detect** — language of the user's last chat message. Mixed →
|
|
56
|
-
**dominant** language; tie → German (project default).
|
|
57
|
-
2. **Scan** — every user-visible token per the catalog above. Inter-
|
|
58
|
-
tool commentary, headings, table headers, bullet text, the
|
|
59
|
-
`Recommendation:` / `Empfehlung:` label — all included.
|
|
60
|
-
3. **Rewrite** — if any token is in the wrong language, rewrite
|
|
61
|
-
the whole reply. No "just this sentence", no "technical term is
|
|
62
|
-
English anyway", no "the inter-tool note doesn't matter".
|
|
63
|
-
4. **Confirm** — first sentence in target language; recommendation
|
|
64
|
-
label matches target language; no English filler-phrase opener
|
|
65
|
-
(`Let me`, `Now`, `Found`, `Confirmed`, `OK`, `Alright`,
|
|
66
|
-
`Here's`, `So`) when target is German, no German opener
|
|
67
|
-
(`Lass mich`, `Jetzt`, `Gefunden`, `Bestätigt`) when target is
|
|
68
|
-
English.
|
|
69
|
-
|
|
70
|
-
### Spelled out
|
|
71
|
-
|
|
72
|
-
- German → respond in German, informal "Du" (never "Sie"). "Du"
|
|
73
|
-
capitalized at sentence start, lowercase otherwise.
|
|
74
|
-
- Code blocks, command output, file contents, and quoted tool output
|
|
75
|
-
stay in their native language; only the **prose around them**
|
|
76
|
-
mirrors the user.
|
|
77
|
-
- Numbered options (per `user-interaction`) — `.md` source English,
|
|
78
|
-
rendered reply translated at runtime.
|
|
79
|
-
|
|
80
|
-
### Slip handling
|
|
81
|
-
|
|
82
|
-
Acknowledge **once**, briefly, in the correct language
|
|
83
|
-
("Entschuldigung" / "Sorry"). Switch on the same reply. Do **not**
|
|
84
|
-
re-explain in the wrong language; do **not** promise "from now on" —
|
|
85
|
-
just do it.
|
|
86
|
-
|
|
87
|
-
Full failure-mode list and wrong-vs-correct examples in
|
|
88
|
-
[`../../docs/guidelines/agent-infra/language-and-tone-examples.md`](../../docs/guidelines/agent-infra/language-and-tone-examples.md).
|
|
27
|
+
Trigger = user's last **chat message**. Not turn count, open file, roadmap, ticket, codebase, tool output, prior reply, or files just edited. Short German (`3`, `weiter`, `mach das`) after many English turns flips the reply to German.
|
|
28
|
+
|
|
29
|
+
## User-visible prose — every token mirrors
|
|
30
|
+
|
|
31
|
+
Applies to opening / closing line, **inter-tool commentary** (`Found it`, `Let me check`, `OK`, `Alright`, `Here's`, `So`), section headings, table headers and cells, bullet text, blockquote text, status lines, and the `Recommendation:` / `Empfehlung:` label under numbered-options blocks (per [`user-interaction`](user-interaction.md) Iron Law 1). Wrong label = violation.
|
|
32
|
+
|
|
33
|
+
Stays in source language: code blocks, command output, file contents, quoted tool output, frontmatter keys, file paths, identifier names, log lines.
|
|
34
|
+
|
|
35
|
+
## Pre-send gate — MANDATORY
|
|
36
|
+
|
|
37
|
+
1. **Detect** — language of user's last chat message. Mixed → dominant; tie → German.
|
|
38
|
+
2. **Scan** — every user-visible token per catalog above.
|
|
39
|
+
3. **Rewrite** — wrong-language token → rewrite the whole reply.
|
|
40
|
+
4. **Confirm** — first sentence in target language; recommendation label matches; no English filler-phrase opener (`Let me`, `Now`, `Found`, `Confirmed`, `OK`, `Alright`, `Here's`, `So`) when target is German; no German opener (`Lass mich`, `Jetzt`, `Gefunden`, `Bestätigt`) when target is English.
|
|
41
|
+
|
|
42
|
+
## Spelled out
|
|
43
|
+
|
|
44
|
+
- German → informal "Du" (never "Sie"); capitalized at sentence start, lowercase otherwise.
|
|
45
|
+
- Code blocks / command output / file contents / quoted tool output stay native; only surrounding prose mirrors.
|
|
46
|
+
- Numbered options — `.md` source English; rendered reply translated at runtime.
|
|
47
|
+
|
|
48
|
+
## Slip handling
|
|
49
|
+
|
|
50
|
+
Acknowledge **once** in the correct language ("Entschuldigung" / "Sorry"). Switch on the same reply. No re-explain in wrong language; no "from now on" promise.
|
|
51
|
+
|
|
52
|
+
Examples + wrong-vs-correct: [`language-and-tone-examples`](../docs/guidelines/agent-infra/language-and-tone-examples.md).
|
|
89
53
|
|
|
90
54
|
## Other language rules
|
|
91
55
|
|
|
92
56
|
- Code comments in English.
|
|
93
|
-
- `.md`
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
English: headings, paragraphs, bullets, option labels, example
|
|
105
|
-
prompts, template placeholders, ASCII-art labels, table headers and
|
|
106
|
-
content. The agent translates to the user's language **at runtime**.
|
|
107
|
-
|
|
108
|
-
### Labeled-anchor exception
|
|
109
|
-
|
|
110
|
-
Quoting German examples inside English prose is **not allowed**.
|
|
111
|
-
Two correct ways:
|
|
112
|
-
|
|
113
|
-
1. **Translate to English** — trigger recognition is semantic.
|
|
114
|
-
2. **Use a labeled `DE: … · EN: …` anchor list** when the
|
|
115
|
-
multilingual nature of recognition is the point. This is the
|
|
116
|
-
**only** allowed location for German prose in an English `.md`;
|
|
117
|
-
reference phrases abstractly elsewhere and link to the anchor.
|
|
118
|
-
|
|
119
|
-
### Detection heuristic
|
|
120
|
-
|
|
121
|
-
Before saving an `.md` file under `.augment/`, `.agent-src/`,
|
|
122
|
-
`.agent-src.uncompressed/`, or `agents/`, scan for:
|
|
123
|
-
|
|
124
|
-
- Umlauts (`ä`, `ö`, `ü`, `Ä`, `Ö`, `Ü`, `ß`) outside fenced code,
|
|
125
|
-
file paths, and the labeled anchor block.
|
|
126
|
-
- German function words in unquoted prose: `für`, `nicht`, `dass`,
|
|
127
|
-
`wenn`, `sollte`, `werden`, `arbeite`, `selbstständig`, `jetzt`,
|
|
128
|
-
`einfach`, `weiter`, `lösche`, `frag`, `schreib`, `mach`.
|
|
129
|
-
- Non-English quoted phrases in body text (paragraphs, list items,
|
|
130
|
-
table cells) when the surrounding prose is English.
|
|
131
|
-
|
|
132
|
-
Hit → translate it or move it into a `DE: … · EN: …` block.
|
|
57
|
+
- `.md` files in English (see below). Translate existing German `.md` files when touched.
|
|
58
|
+
- Two spaces after `❌`, `✅`, `⚠️` in CLI; one space for other icons.
|
|
59
|
+
- One blank line max; no double/triple blanks. File ends with exactly one newline.
|
|
60
|
+
|
|
61
|
+
## `.md` files — ALWAYS English
|
|
62
|
+
|
|
63
|
+
Every text inside `.md` under `.augment/`, `.agent-src/`, `.agent-src.uncompressed/`, `agents/`: headings, paragraphs, bullets, option labels, prompts, placeholders, ASCII labels, table headers / content. Agent translates at runtime.
|
|
64
|
+
|
|
65
|
+
**Labeled-anchor exception** — quoting German inside English prose is forbidden. Either translate, OR use a labeled `DE: … · EN: …` anchor block (only allowed location for German prose).
|
|
66
|
+
|
|
67
|
+
**Detection heuristic** before saving: scan for umlauts (`ä`, `ö`, `ü`, `Ä`, `Ö`, `Ü`, `ß`) outside fenced code / paths / anchor blocks; German function words (`für`, `nicht`, `dass`, `wenn`, `sollte`, `werden`, `arbeite`, `selbstständig`, `jetzt`, `einfach`, `weiter`, `lösche`, `frag`, `schreib`, `mach`); non-English quoted phrases in body text. Hit → translate or move to `DE: … · EN: …` block.
|