@event4u/agent-config 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent-src/commands/{agents-audit.md → agents/audit.md} +4 -3
- package/.agent-src/commands/{agents-cleanup.md → agents/cleanup.md} +12 -6
- package/.agent-src/commands/{agents-prepare.md → agents/prepare.md} +4 -3
- package/.agent-src/commands/agents.md +46 -0
- package/.agent-src/commands/{chat-history-checkpoint.md → chat-history/checkpoint.md} +4 -4
- package/.agent-src/commands/{chat-history-clear.md → chat-history/clear.md} +4 -4
- package/.agent-src/commands/{chat-history-resume.md → chat-history/resume.md} +4 -4
- package/.agent-src/commands/chat-history/show.md +107 -0
- package/.agent-src/commands/chat-history.md +33 -89
- package/.agent-src/commands/{commit-in-chunks.md → commit/in-chunks.md} +15 -13
- package/.agent-src/commands/commit.md +22 -2
- package/.agent-src/commands/{context-create.md → context/create.md} +4 -3
- package/.agent-src/commands/{context-refactor.md → context/refactor.md} +4 -3
- package/.agent-src/commands/context.md +44 -0
- package/.agent-src/commands/{copilot-agents-init.md → copilot-agents/init.md} +4 -3
- package/.agent-src/commands/{copilot-agents-optimize.md → copilot-agents/optimize.md} +4 -3
- package/.agent-src/commands/copilot-agents.md +44 -0
- package/.agent-src/commands/council/default.md +221 -0
- package/.agent-src/commands/{council-design.md → council/design.md} +6 -5
- package/.agent-src/commands/{council-optimize.md → council/optimize.md} +7 -6
- package/.agent-src/commands/{council-pr.md → council/pr.md} +6 -5
- package/.agent-src/commands/council.md +47 -212
- package/.agent-src/commands/{create-pr-description.md → create-pr/description-only.md} +4 -2
- package/.agent-src/commands/create-pr.md +26 -5
- package/.agent-src/commands/{feature-dev.md → feature/dev.md} +5 -10
- package/.agent-src/commands/{feature-explore.md → feature/explore.md} +4 -8
- package/.agent-src/commands/{feature-plan.md → feature/plan.md} +4 -8
- package/.agent-src/commands/{feature-refactor.md → feature/refactor.md} +4 -8
- package/.agent-src/commands/{feature-roadmap.md → feature/roadmap.md} +6 -10
- package/.agent-src/commands/feature.md +6 -12
- package/.agent-src/commands/{fix-ci.md → fix/ci.md} +4 -8
- package/.agent-src/commands/{fix-portability.md → fix/portability.md} +4 -8
- package/.agent-src/commands/{fix-pr-bot-comments.md → fix/pr-bots.md} +4 -8
- package/.agent-src/commands/{fix-pr-developer-comments.md → fix/pr-developers.md} +4 -8
- package/.agent-src/commands/{fix-pr-comments.md → fix/pr.md} +7 -11
- package/.agent-src/commands/{fix-references.md → fix/refs.md} +4 -8
- package/.agent-src/commands/{fix-seeder.md → fix/seeder.md} +4 -8
- package/.agent-src/commands/fix.md +7 -13
- package/.agent-src/commands/{do-and-judge.md → judge/on-diff.md} +4 -3
- package/.agent-src/commands/judge/solo.md +90 -0
- package/.agent-src/commands/{do-in-steps.md → judge/steps.md} +4 -3
- package/.agent-src/commands/judge.md +35 -70
- package/.agent-src/commands/{memory-add.md → memory/add.md} +4 -3
- package/.agent-src/commands/{memory-full.md → memory/load.md} +4 -3
- package/.agent-src/commands/{memory-promote.md → memory/promote.md} +4 -3
- package/.agent-src/commands/{propose-memory.md → memory/propose.md} +4 -3
- package/.agent-src/commands/memory.md +48 -0
- package/.agent-src/commands/{module-create.md → module/create.md} +4 -3
- package/.agent-src/commands/{module-explore.md → module/explore.md} +4 -3
- package/.agent-src/commands/module.md +44 -0
- package/.agent-src/commands/{optimize-agents.md → optimize/agents.md} +4 -8
- package/.agent-src/commands/{optimize-augmentignore.md → optimize/augmentignore.md} +4 -9
- package/.agent-src/commands/{optimize-rtk-filters.md → optimize/rtk.md} +4 -8
- package/.agent-src/commands/{optimize-skills.md → optimize/skills.md} +4 -8
- package/.agent-src/commands/optimize.md +4 -10
- package/.agent-src/commands/{override-create.md → override/create.md} +4 -3
- package/.agent-src/commands/{override-manage.md → override/manage.md} +4 -3
- package/.agent-src/commands/override.md +44 -0
- package/.agent-src/commands/{roadmap-create.md → roadmap/create.md} +4 -3
- package/.agent-src/commands/{roadmap-execute.md → roadmap/execute.md} +4 -3
- package/.agent-src/commands/roadmap.md +44 -0
- package/.agent-src/commands/{tests-create.md → tests/create.md} +4 -3
- package/.agent-src/commands/{tests-execute.md → tests/execute.md} +4 -3
- package/.agent-src/commands/tests.md +44 -0
- package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +72 -0
- package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +79 -0
- package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +98 -0
- package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +87 -0
- package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +85 -0
- package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +65 -0
- package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +78 -0
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +62 -0
- package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +55 -0
- package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +53 -0
- package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +77 -0
- package/.agent-src/contexts/judges/no-consolidate-rationale.md +102 -0
- package/.agent-src/contexts/judges/persona-voice-rubric.md +140 -0
- package/.agent-src/rules/artifact-engagement-recording.md +13 -69
- package/.agent-src/rules/ask-when-uncertain.md +27 -42
- package/.agent-src/rules/augment-portability.md +15 -61
- package/.agent-src/rules/augment-source-of-truth.md +27 -93
- package/.agent-src/rules/cli-output-handling.md +10 -76
- package/.agent-src/rules/command-suggestion-policy.md +18 -59
- package/.agent-src/rules/commit-conventions.md +17 -14
- package/.agent-src/rules/context-hygiene.md +6 -0
- package/.agent-src/rules/direct-answers.md +35 -59
- package/.agent-src/rules/docker-commands.md +5 -5
- package/.agent-src/rules/docs-sync.md +15 -69
- package/.agent-src/rules/language-and-tone.md +48 -72
- package/.agent-src/rules/missing-tool-handling.md +28 -22
- package/.agent-src/rules/no-cheap-questions.md +39 -53
- package/.agent-src/rules/no-roadmap-references.md +73 -0
- package/.agent-src/rules/onboarding-gate.md +7 -0
- package/.agent-src/rules/package-ci-checks.md +21 -61
- package/.agent-src/rules/preservation-guard.md +64 -29
- package/.agent-src/rules/review-routing-awareness.md +24 -43
- package/.agent-src/rules/roadmap-progress-sync.md +31 -65
- package/.agent-src/rules/rule-type-governance.md +28 -0
- package/.agent-src/rules/security-sensitive-stop.md +8 -8
- package/.agent-src/rules/skill-quality.md +16 -48
- package/.agent-src/rules/slash-command-routing-policy.md +7 -4
- package/.agent-src/rules/think-before-action.md +52 -42
- package/.agent-src/rules/tool-safety.md +19 -16
- package/.agent-src/rules/ui-audit-gate.md +24 -38
- package/.agent-src/rules/user-interaction.md +13 -68
- package/.agent-src/skills/ai-council/SKILL.md +2 -0
- package/.agent-src/skills/api-testing/SKILL.md +1 -1
- package/.agent-src/skills/check-refs/SKILL.md +59 -40
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +86 -28
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +5 -5
- package/.agent-src/skills/developer-like-execution/SKILL.md +4 -4
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +101 -65
- package/.agent-src/skills/flux/SKILL.md +30 -10
- package/.agent-src/skills/github-ci/SKILL.md +2 -2
- package/.agent-src/skills/judge-code-quality/SKILL.md +7 -8
- package/.agent-src/skills/judge-security-auditor/SKILL.md +4 -5
- package/.agent-src/skills/judge-test-coverage/SKILL.md +3 -4
- package/.agent-src/skills/lint-skills/SKILL.md +57 -39
- package/.agent-src/skills/md-language-check/SKILL.md +61 -39
- package/.agent-src/skills/override-management/SKILL.md +5 -5
- package/.agent-src/skills/quality-tools/SKILL.md +2 -2
- package/.agent-src/skills/react-shadcn-ui/SKILL.md +116 -43
- package/.agent-src/skills/readme-reviewer/SKILL.md +30 -29
- package/.agent-src/skills/readme-writing/SKILL.md +78 -53
- package/.agent-src/skills/readme-writing-package/SKILL.md +50 -47
- package/.agent-src/skills/receiving-code-review/SKILL.md +52 -47
- package/.agent-src/skills/refine-prompt/SKILL.md +0 -1
- package/.agent-src/skills/requesting-code-review/SKILL.md +35 -30
- package/.agent-src/skills/security/SKILL.md +7 -2
- package/.agent-src/skills/security-audit/SKILL.md +7 -3
- package/.agent-src/skills/systematic-debugging/SKILL.md +68 -60
- package/.agent-src/skills/test-driven-development/SKILL.md +59 -57
- package/.agent-src/skills/test-performance/SKILL.md +0 -1
- package/.agent-src/skills/traefik/SKILL.md +4 -4
- package/.agent-src/skills/verify-completion-evidence/SKILL.md +28 -26
- package/.agent-src/templates/roadmaps.md +4 -0
- package/.claude-plugin/marketplace.json +22 -11
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +125 -1
- package/README.md +18 -17
- package/docs/architecture.md +4 -6
- package/docs/catalog.md +67 -39
- package/docs/contracts/STABILITY.md +13 -7
- package/docs/contracts/adr-chat-history-split.md +1 -3
- package/docs/contracts/adr-command-suggestion.md +0 -2
- package/docs/contracts/adr-implement-ticket-runtime.md +1 -2
- package/docs/contracts/adr-product-ui-track.md +3 -6
- package/docs/contracts/adr-prompt-driven-execution.md +3 -4
- package/docs/contracts/agent-memory-contract.md +6 -11
- package/docs/contracts/artifact-engagement-flow.md +6 -9
- package/docs/contracts/command-clusters.md +56 -46
- package/docs/contracts/command-suggestion-flow.md +1 -3
- package/docs/contracts/context-paths.md +99 -0
- package/docs/contracts/file-ownership-matrix.json +6722 -0
- package/docs/contracts/file-ownership-matrix.md +134 -0
- package/docs/contracts/implement-ticket-flow.md +6 -9
- package/docs/contracts/linear-ai-rules-inclusion.md +0 -1
- package/docs/contracts/linear-ai-three-layers.md +0 -2
- package/docs/contracts/load-context-budget-model.md +258 -0
- package/docs/contracts/load-context-schema.md +21 -3
- package/docs/contracts/roadmap-complexity-standard.md +137 -0
- package/docs/contracts/rule-interactions.md +0 -1
- package/docs/contracts/rule-priority-hierarchy.md +1 -1
- package/docs/contracts/ui-track-flow.md +7 -17
- package/docs/customization.md +2 -0
- package/docs/getting-started.md +5 -4
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
- package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +100 -0
- package/docs/guidelines/agent-infra/direct-answers-demos.md +145 -0
- package/docs/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
- package/package.json +1 -1
- package/scripts/_phase2_shim_helper.py +109 -0
- package/scripts/agent-config +30 -0
- package/scripts/ai_council/one_off_archive/2026-05/README.md +45 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_2a4_acceptance.py +208 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +206 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_estimate.py +67 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_review.py +292 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_followups_review.py +259 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py +209 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase4_dispatch_latency.py +108 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py +92 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py +257 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_post_revert.py +197 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_rule_hardening_v1.py +251 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_open_questions.py +232 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_optimization.py +144 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_gaps.py +252 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_review.py +240 -0
- package/scripts/build_rule_trigger_matrix.py +360 -0
- package/scripts/check_always_budget.py +402 -45
- package/scripts/check_cluster_patterns.py +159 -0
- package/scripts/check_command_count_messaging.py +14 -7
- package/scripts/check_context_paths.py +201 -0
- package/scripts/check_no_roadmap_refs.py +155 -0
- package/scripts/check_one_off_location.py +81 -0
- package/scripts/check_phase_coupling.py +148 -0
- package/scripts/check_portability.py +2 -0
- package/scripts/check_references.py +35 -2
- package/scripts/check_safety_floor_untouched.py +125 -0
- package/scripts/command_suggester/loader.py +4 -1
- package/scripts/compress.py +64 -15
- package/scripts/context_hygiene_hook.py +173 -0
- package/scripts/generate_index.py +6 -2
- package/scripts/generate_ownership_matrix.py +323 -0
- package/scripts/hooks/augment-context-hygiene.sh +55 -0
- package/scripts/hooks/augment-onboarding-gate.sh +55 -0
- package/scripts/hooks/augment-roadmap-progress.sh +57 -0
- package/scripts/install.py +105 -45
- package/scripts/lint_examples.py +98 -0
- package/scripts/lint_no_new_atomic_commands.py +12 -11
- package/scripts/lint_roadmap_complexity.py +127 -0
- package/scripts/onboarding_gate_hook.py +137 -0
- package/scripts/requirements-evals.txt +1 -0
- package/scripts/roadmap_progress_hook.py +159 -0
- package/scripts/schemas/command.schema.json +4 -3
- package/scripts/schemas/rule.schema.json +5 -0
- package/scripts/skill_linter.py +1 -0
- package/scripts/sync_agent_settings.py +25 -2
- package/scripts/update_counts.py +7 -0
- /package/scripts/ai_council/{_one_off_rebalancing_audit.py → one_off_archive/2026-05/_one_off_rebalancing_audit.py} +0 -0
- /package/scripts/ai_council/{_one_off_roundtrip.py → one_off_archive/2026-05/_one_off_roundtrip.py} +0 -0
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
description: "After a /implement-ticket or /work phase-step (refine/memory/analyze/plan/implement/test/verify/report) or full task — emit one telemetry:record call with consulted+applied ids when enabled"
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
<!-- cloud_safe: noop -->
|
|
@@ -15,11 +17,10 @@ Default-off; opt-in via `.agent-settings.yml`. Zero overhead when disabled.
|
|
|
15
17
|
|
|
16
18
|
The schema, CLI, and storage layer are owned by
|
|
17
19
|
[`scripts/telemetry/`](../../../scripts/telemetry/) and the
|
|
18
|
-
`./agent-config telemetry:record` / `telemetry:status` commands
|
|
19
|
-
|
|
20
|
-
[`
|
|
21
|
-
|
|
22
|
-
structured.
|
|
20
|
+
`./agent-config telemetry:record` / `telemetry:status` commands. The
|
|
21
|
+
recording contract lives in
|
|
22
|
+
[`docs/contracts/artifact-engagement-flow.md`](../../docs/contracts/artifact-engagement-flow.md).
|
|
23
|
+
This rule says **when** to call the CLI, not how the file is structured.
|
|
23
24
|
|
|
24
25
|
## Activation gate — read settings ONCE per task, then cache
|
|
25
26
|
|
|
@@ -60,73 +61,16 @@ consulted three times in the same boundary records once.
|
|
|
60
61
|
When in doubt → record as `consulted` only. Over-recording `applied`
|
|
61
62
|
inflates the engagement signal and defeats the purpose.
|
|
62
63
|
|
|
63
|
-
##
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
--consulted skills:eloquent \
|
|
71
|
-
--consulted rules:scope-control \
|
|
72
|
-
--applied skills:php-coder \
|
|
73
|
-
--applied rules:scope-control
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- `--task-id` — the ticket key (`PROJ-123`) for `/implement-ticket`, or a
|
|
77
|
-
short opaque slug derived from the prompt for `/work`. **Never** a
|
|
78
|
-
branch name, a file path, or a free-text title.
|
|
79
|
-
- `--boundary` — `task` or `phase-step`, matching the cadence above.
|
|
80
|
-
- `--consulted <kind>:<id>` — repeat per artefact. `<kind>` is one of
|
|
81
|
-
`skills`, `rules`, `commands`, `guidelines`, `personas`.
|
|
82
|
-
- `--applied <kind>:<id>` — repeat per artefact actually applied.
|
|
83
|
-
- Exit `0` always when disabled (silent). Exit `1` on schema validation
|
|
84
|
-
failure (rule must NOT swallow this — surface to the user). Exit `2`
|
|
85
|
-
on IO failure.
|
|
86
|
-
|
|
87
|
-
## Privacy contract — what NEVER goes into a record
|
|
88
|
-
|
|
89
|
-
The CLI rejects most violations on the input boundary, but the agent must
|
|
90
|
-
not even attempt these:
|
|
91
|
-
|
|
92
|
-
- ❌ File paths (`src/Foo.php`, `tests/...`) — id fields are
|
|
93
|
-
artefact identifiers only.
|
|
94
|
-
- ❌ Source code, prompt text, ticket body, AC text.
|
|
95
|
-
- ❌ Branch names, commit shas, PR numbers, URLs.
|
|
96
|
-
- ❌ Secrets, env vars, credentials, customer data.
|
|
97
|
-
- ❌ Free-text strings longer than 200 chars (CLI enforces; agent must
|
|
98
|
-
not generate).
|
|
99
|
-
|
|
100
|
-
When in doubt → **don't record**. A missing event is cheap; a leaked
|
|
101
|
-
prompt is not.
|
|
102
|
-
|
|
103
|
-
## Failure modes — DO NOT block the user's task
|
|
104
|
-
|
|
105
|
-
- Schema rejection (CLI exit `1`) → log the message internally, continue
|
|
106
|
-
the user's task. Do **not** halt the dispatch loop.
|
|
107
|
-
- IO failure (CLI exit `2`) → same. The telemetry is **observation**, not
|
|
108
|
-
a delivery requirement.
|
|
109
|
-
- Settings malformed → already handled by the CLI: it falls back to
|
|
110
|
-
disabled and exits `0`. Agent treats it as "disabled this task".
|
|
111
|
-
|
|
112
|
-
The only error the agent surfaces is when the user explicitly asked for
|
|
113
|
-
recording (`telemetry:status` confirms enabled) but no event reached the
|
|
114
|
-
log — that is a real bug, not a swallowed error.
|
|
115
|
-
|
|
116
|
-
## What this rule does NOT do
|
|
117
|
-
|
|
118
|
-
- Run when `enabled: false` (cost floor is zero — see
|
|
119
|
-
[`tests/telemetry/test_cost_floor.py`](../../../tests/telemetry/test_cost_floor.py)).
|
|
120
|
-
- Track the agent's tool calls, file reads, or token spend — that is
|
|
121
|
-
out of scope, see the roadmap's "out-of-scope" section.
|
|
122
|
-
- Decide retirement. Phase 4's aggregator + report renderer are the only
|
|
123
|
-
consumers that may interpret the JSONL.
|
|
124
|
-
- Run on cloud surfaces (Claude.ai Web, Skills API). The
|
|
125
|
-
`cloud_safe: noop` marker keeps it inert there.
|
|
64
|
+
## Mechanics — CLI invocation, privacy contract, failure handling
|
|
65
|
+
|
|
66
|
+
The exact `telemetry:record` call shape with all flags, the privacy
|
|
67
|
+
contract (what NEVER goes into a record), the failure-mode handling
|
|
68
|
+
(do NOT block the user's task), and the "what this rule does NOT do"
|
|
69
|
+
catalog live in
|
|
70
|
+
[`contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md`](../contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md).
|
|
126
71
|
|
|
127
72
|
## See also
|
|
128
73
|
|
|
129
|
-
- [`road-to-artifact-engagement-telemetry`](../../../agents/roadmaps/road-to-artifact-engagement-telemetry.md) — phase contract
|
|
130
74
|
- [`docs/contracts/artifact-engagement-flow.md`](../../docs/contracts/artifact-engagement-flow.md) — recording contract details
|
|
131
75
|
- [`/implement-ticket`](../commands/implement-ticket.md) and [`/work`](../commands/work.md) — boundary points where this rule fires
|
|
132
76
|
- [`scripts/telemetry/`](../../../scripts/telemetry/) — engine source
|
|
@@ -17,16 +17,13 @@ ONE QUESTION PER TURN. NO EXCEPTIONS.
|
|
|
17
17
|
ASK. WAIT FOR THE ANSWER. THEN ASK THE NEXT.
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Even if they would fit on one screen. Even if batching "feels more
|
|
24
|
-
efficient". Full self-check, ordering, and handoff rules under
|
|
25
|
-
[How to ask](#how-to-ask).
|
|
20
|
+
Absolute. Not a default, not "usually". Every turn with a question
|
|
21
|
+
has **exactly one**. Even if trivial, independent, or batchable.
|
|
22
|
+
Self-check, ordering, handoff under [How to ask](#how-to-ask).
|
|
26
23
|
|
|
27
24
|
## When to ask
|
|
28
25
|
|
|
29
|
-
- Requirement
|
|
26
|
+
- Requirement ambiguous or multi-interpretable
|
|
30
27
|
- Not 100% sure which approach is correct
|
|
31
28
|
- About to touch code you haven't fully understood
|
|
32
29
|
- Choosing between multiple valid approaches
|
|
@@ -34,47 +31,35 @@ efficient". Full self-check, ordering, and handoff rules under
|
|
|
34
31
|
|
|
35
32
|
## Vague-request triggers — MUST ask
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
These patterns are too vague to execute safely. Match without further
|
|
35
|
+
context → ask **before** touching code:
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| "handle errors properly" | Which errors? How? Log, retry, propagate? | "For which failure modes, and what should happen on error?" |
|
|
50
|
-
| "add a UI / component / tile / page" when the repo mixes frameworks | Which stack? Tailwind? Flux? Livewire? Custom? | "This repo uses {A} and {B} for UI — which one for this?" |
|
|
37
|
+
- "improve / optimize this" — metric? speed, readability, memory?
|
|
38
|
+
- "add caching" — store? scope? invalidation?
|
|
39
|
+
- "make it better / cleaner" — by what standard?
|
|
40
|
+
- "clean up this file" — dead code? format? refactor?
|
|
41
|
+
- "fix this" (no symptom) — what output is wrong?
|
|
42
|
+
- "refactor X" — target pattern? boundaries?
|
|
43
|
+
- "use best practices" — whose? for what?
|
|
44
|
+
- "handle errors properly" — which errors? log/retry/propagate?
|
|
45
|
+
- "add a UI/component/tile/page" in mixed-framework repo — which stack?
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
Example questions per pattern:
|
|
48
|
+
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#vague-request-triggers--example-questions).
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Be specific. Present numbered options (per `user-interaction`). Keep it short.
|
|
50
|
+
**Escape hatch:** if context (ticket, open file, prior turn) makes
|
|
51
|
+
the answer unambiguous, proceed — but state the assumption.
|
|
58
52
|
|
|
59
|
-
|
|
60
|
-
This section adds the rationale, self-check, and ordering.
|
|
61
|
-
|
|
62
|
-
The user must never have to track sub-numbers, scroll through stacked
|
|
63
|
-
option blocks, or split their reply across multiple questions. One
|
|
64
|
-
question, numbered options (per `user-interaction`), one short
|
|
65
|
-
answer, next turn.
|
|
53
|
+
## How to ask
|
|
66
54
|
|
|
67
|
-
|
|
55
|
+
Numbered options (per `user-interaction`). Short. The Iron Law is at
|
|
56
|
+
the top; this section adds self-check and ordering.
|
|
68
57
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
| Tool / library selection | Downstream choices branch from it |
|
|
75
|
-
| "Which approach: A vs B vs C" | Each answer opens a different follow-up |
|
|
76
|
-
| Even "independent" yes/no pairs | User still has to parse two contexts |
|
|
77
|
-
| Any question the user has to **think** about, not just pick | Thinking load compounds when stacked |
|
|
58
|
+
The user must never track sub-numbers, scroll stacked option blocks,
|
|
59
|
+
or split a reply across multiple questions. Rationale shorthand: if
|
|
60
|
+
the user has to *think* about an answer, that answer almost always
|
|
61
|
+
reframes the next question. Full rationale:
|
|
62
|
+
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#one-question-per-turn--why-serial-always-wins).
|
|
78
63
|
|
|
79
64
|
### Self-check before asking
|
|
80
65
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
type: "auto"
|
|
3
3
|
description: "Editing or creating files inside .augment/ directory — skills, rules, commands, templates, contexts must be project-agnostic"
|
|
4
4
|
source: package
|
|
5
|
+
load_context:
|
|
6
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/augment-portability-mechanics.md
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Package Portability
|
|
@@ -36,76 +38,28 @@ content into any of them pollutes downstream projects or misleads agents.
|
|
|
36
38
|
|
|
37
39
|
## Runtime invocations — no `task` commands
|
|
38
40
|
|
|
39
|
-
Skills, rules, commands, guidelines, personas, and context docs
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
all. A skill that instructs an agent to run `task <something>`
|
|
44
|
-
silently breaks in every project without a `Taskfile.yml`.
|
|
45
|
-
|
|
46
|
-
**Rule:** Never reference a `task <something>` invocation inside any
|
|
47
|
-
artefact file under `.agent-src.uncompressed/{skills,rules,commands,guidelines,personas,contexts}/`
|
|
41
|
+
Skills, rules, commands, guidelines, personas, and context docs run in
|
|
42
|
+
**consumer projects**, which may not have Task installed. **Never**
|
|
43
|
+
reference a `task <something>` invocation inside any artefact file
|
|
44
|
+
under `.agent-src.uncompressed/{skills,rules,commands,guidelines,personas,contexts}/`
|
|
48
45
|
(and therefore also not in the compressed mirror under `.agent-src/`).
|
|
49
|
-
Use
|
|
50
|
-
|
|
51
|
-
| ❌ Forbidden | ✅ Portable |
|
|
52
|
-
|---|---|
|
|
53
|
-
| `task sync` | `bash scripts/compress.sh --sync` |
|
|
54
|
-
| `task sync-check` | `bash scripts/compress.sh --check` |
|
|
55
|
-
| `task sync-check-hashes` | `bash scripts/compress.sh --check-hashes` |
|
|
56
|
-
| `task sync-changed` | `bash scripts/compress.sh --changed` |
|
|
57
|
-
| `task sync-mark-done -- X` | `bash scripts/compress.sh --mark-done X` |
|
|
58
|
-
| `task generate-tools` | `python3 scripts/compress.py --generate-tools` |
|
|
59
|
-
| `task lint-skills` | `python3 scripts/skill_linter.py --all` |
|
|
60
|
-
| `task check-refs` | `python3 scripts/check_references.py` |
|
|
61
|
-
| `task check-portability` | `python3 scripts/check_portability.py` |
|
|
62
|
-
| `task check-compression` | `python3 scripts/check_compression.py` |
|
|
63
|
-
| `task validate-schema` | `python3 scripts/validate_frontmatter.py` |
|
|
64
|
-
| `task counts-check` | `python3 scripts/update_counts.py --check` |
|
|
65
|
-
| `task roadmap-progress` | `./agent-config roadmap:progress` |
|
|
66
|
-
| `task ci` | run each underlying script directly (no single portable equivalent) |
|
|
67
|
-
|
|
68
|
-
Task remains a convenience shortcut for maintainers working on the
|
|
69
|
-
package repo itself — `task ci` is the recommended local gate before
|
|
70
|
-
a PR and lives in `Taskfile.yml`, `AGENTS.md`, and the package README.
|
|
71
|
-
Those maintainer-facing surfaces are outside the scope of this rule.
|
|
72
|
-
Artefact files must assume Task is absent.
|
|
73
|
-
|
|
74
|
-
The detection pattern *"if the consumer has a `Makefile` / build
|
|
75
|
-
script, prefer its targets over raw commands"* is still allowed when
|
|
76
|
-
the skill adapts to the **consumer's own** tooling (e.g.
|
|
77
|
-
`tests-execute` detecting `php artisan test` vs `vendor/bin/pest`).
|
|
78
|
-
It is not allowed to reference `task <name>` as the detected target —
|
|
79
|
-
every direct invocation must resolve to a real script path.
|
|
46
|
+
Use direct script invocations instead.
|
|
80
47
|
|
|
81
48
|
## Consumer CLI — `./agent-config`
|
|
82
49
|
|
|
83
50
|
A subset of package scripts is exposed through a project-local CLI
|
|
84
51
|
wrapper `./agent-config` (written into the project root by the
|
|
85
52
|
installer, gitignored). Artefacts MUST prefer the CLI over raw
|
|
86
|
-
`python3 scripts/…` paths for every command the CLI already covers
|
|
87
|
-
because the raw paths only resolve inside the package repo — in a
|
|
88
|
-
consumer project the scripts live under `node_modules/` or `vendor/`.
|
|
53
|
+
`python3 scripts/…` paths for every command the CLI already covers.
|
|
89
54
|
|
|
90
|
-
|
|
91
|
-
|---|---|
|
|
92
|
-
| `python3 scripts/mcp_render.py` | `./agent-config mcp:render` |
|
|
93
|
-
| `python3 scripts/mcp_render.py --check` | `./agent-config mcp:check` |
|
|
94
|
-
| `python3 .augment/scripts/update_roadmap_progress.py` | `./agent-config roadmap:progress` |
|
|
95
|
-
| `python3 .augment/scripts/update_roadmap_progress.py --check` | `./agent-config roadmap:progress-check` |
|
|
96
|
-
| `bash scripts/first-run.sh` | `./agent-config first-run` |
|
|
97
|
-
| `PYTHONPATH=… python3 -m implement_ticket` | `./agent-config implement-ticket` |
|
|
98
|
-
| `python3 scripts/memory_lookup.py` | `./agent-config memory:lookup` |
|
|
99
|
-
| `python3 scripts/memory_signal.py` | `./agent-config memory:signal` |
|
|
100
|
-
| `python3 scripts/memory_hash.py` | `./agent-config memory:hash` |
|
|
101
|
-
| `python3 scripts/check_memory.py` | `./agent-config memory:check` |
|
|
102
|
-
| `python3 scripts/check_memory_proposal.py` | `./agent-config memory:check-proposal` |
|
|
103
|
-
| `python3 scripts/check_proposal.py` | `./agent-config proposal:check` |
|
|
104
|
-
| `python3 scripts/refine_ticket_detect.py` | `./agent-config refine-ticket:detect` |
|
|
55
|
+
## Translation tables — see mechanics
|
|
105
56
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
57
|
+
The full `task`-to-script translation table, the `./agent-config`
|
|
58
|
+
CLI mapping, and the rationale (Task absence on consumers,
|
|
59
|
+
maintainer-vs-artefact split) all live in
|
|
60
|
+
[`contexts/communication/rules-auto/augment-portability-mechanics.md`](../contexts/communication/rules-auto/augment-portability-mechanics.md).
|
|
61
|
+
Pull it whenever an artefact is about to mention a runtime
|
|
62
|
+
invocation.
|
|
109
63
|
|
|
110
64
|
## Enforcement
|
|
111
65
|
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
type: "auto"
|
|
3
3
|
description: "Creating, editing, or modifying files inside .agent-src/ or .augment/ — the source of truth is .agent-src.uncompressed/, never edit the generated directories directly"
|
|
4
4
|
source: package
|
|
5
|
+
load_context:
|
|
6
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Source of Truth
|
|
8
10
|
|
|
9
|
-
`.agent-src.uncompressed/` is the **single source of truth**.
|
|
10
|
-
ships as `.agent-src/`. In the package repo, `.augment/` is a local
|
|
11
|
-
of `.agent-src/` for Augment Code (rules copied, rest symlinked).
|
|
12
|
-
projects still see `.augment/` as the installed runtime tree.
|
|
11
|
+
`.agent-src.uncompressed/` is the **single source of truth**. The compressed
|
|
12
|
+
output ships as `.agent-src/`. In the package repo, `.augment/` is a local
|
|
13
|
+
projection of `.agent-src/` for Augment Code (rules copied, rest symlinked).
|
|
14
|
+
Consumer projects still see `.augment/` as the installed runtime tree.
|
|
13
15
|
|
|
14
|
-
Never edit any generated
|
|
16
|
+
Never edit any of these generated layers directly:
|
|
15
17
|
|
|
16
18
|
- `.agent-src/` — compressed output shipped in the package
|
|
17
|
-
- `.augment/` — local projection (gitignored in package; installer
|
|
19
|
+
- `.augment/` — local projection (gitignored in the package repo; installer
|
|
20
|
+
output in consumer projects)
|
|
18
21
|
- `.claude/`, `.cursor/`, `.clinerules/`, `.windsurfrules` — tool projections
|
|
19
22
|
|
|
20
23
|
## The Iron Rule
|
|
@@ -24,73 +27,20 @@ NEVER create or edit files in .agent-src/ or .augment/ directly — not even "ju
|
|
|
24
27
|
ALWAYS work in .agent-src.uncompressed/ — then compress via /compress command.
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
**ZERO exceptions.** Even if
|
|
28
|
-
Edit `.agent-src.uncompressed/` first. Always.
|
|
30
|
+
**There are ZERO exceptions to this rule.** Even if:
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
- You "know" the compressed content is correct
|
|
33
|
+
- It's "just adding a missing section"
|
|
34
|
+
- It's "faster to edit the compressed file directly"
|
|
35
|
+
- The fix is "trivially obvious"
|
|
31
36
|
|
|
32
|
-
**
|
|
37
|
+
**STOP. Edit `.agent-src.uncompressed/` first. Always.**
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
Direct edits to `.agent-src/` break compression hashes, cause CI failures
|
|
40
|
+
("Verify compression hashes" step), and create drift between source and output.
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
3. **Before commit/push:** Check if compression is needed (`bash scripts/compress.sh --changed`).
|
|
39
|
-
If files need compression, ask the user:
|
|
40
|
-
```
|
|
41
|
-
> 📦 {N} .agent-src files need compression before commit.
|
|
42
|
-
>
|
|
43
|
-
> 1. Compress now — run /compress
|
|
44
|
-
> 2. Later — commit without compression
|
|
45
|
-
```
|
|
46
|
-
4. If compressing: run `/compress` command, then `bash scripts/compress.sh --mark-done {path}`
|
|
47
|
-
|
|
48
|
-
For new non-.md files (`.php`, configs): `bash scripts/compress.sh --sync` copies them automatically.
|
|
49
|
-
|
|
50
|
-
**Key change:** Compression happens once before commit/push — not after every edit.
|
|
51
|
-
This avoids interruptions when work is still in progress.
|
|
52
|
-
|
|
53
|
-
## What "compress" means
|
|
54
|
-
|
|
55
|
-
- Remove articles (a, an, the), filler, hedging, connective fluff
|
|
56
|
-
- Shorten phrases: "in order to" → "to", "make sure to" → "ensure"
|
|
57
|
-
- Fragments OK: "Run tests before commit" not "You should always run tests before committing"
|
|
58
|
-
- Merge redundant bullets
|
|
59
|
-
|
|
60
|
-
## What NEVER changes during compression
|
|
61
|
-
|
|
62
|
-
- Code blocks, inline code, URLs, file paths, commands
|
|
63
|
-
- Headings (exact text preserved)
|
|
64
|
-
- Tables (structure preserved, compress cell text only)
|
|
65
|
-
- YAML frontmatter
|
|
66
|
-
- Technical terms, library names, API names
|
|
67
|
-
- Strong language: "NEVER", "MUST", "Do NOT" — these are load-bearing
|
|
68
|
-
|
|
69
|
-
## Commands workflow
|
|
70
|
-
|
|
71
|
-
Commands live in `.agent-src.uncompressed/commands/{name}.md` (single source of truth).
|
|
72
|
-
Claude Code reads them via symlinks in `.claude/skills/{name}/SKILL.md`.
|
|
73
|
-
|
|
74
|
-
**Required frontmatter for commands:**
|
|
75
|
-
|
|
76
|
-
```yaml
|
|
77
|
-
name: {command-name}
|
|
78
|
-
description: {what it does}
|
|
79
|
-
disable-model-invocation: true
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
- `name` and `disable-model-invocation: true` are required for Claude Code compatibility
|
|
83
|
-
- Augment ignores unknown frontmatter fields — no conflict
|
|
84
|
-
- Template: `.agent-src.uncompressed/templates/command.md`
|
|
85
|
-
|
|
86
|
-
**Creating a new command:**
|
|
87
|
-
|
|
88
|
-
1. Create `.agent-src.uncompressed/commands/{name}.md` (use template)
|
|
89
|
-
2. Run `python3 scripts/skill_linter.py` — must be 0 FAIL
|
|
90
|
-
3. Compress via `/compress`, which writes to `.agent-src/commands/`
|
|
91
|
-
4. Run `python3 scripts/compress.py --generate-tools` — creates Claude symlink automatically
|
|
92
|
-
|
|
93
|
-
**Never** create `.claude/skills/{name}/SKILL.md` manually for commands — always use the symlink workflow.
|
|
42
|
+
**Compression is ONLY done via the `/compress` command.** The command handles
|
|
43
|
+
hashing, sync verification, and quality checks automatically.
|
|
94
44
|
|
|
95
45
|
## Pre-review consistency checkpoints
|
|
96
46
|
|
|
@@ -101,28 +51,12 @@ Before asking for review or creating a PR, verify derived outputs are not stale:
|
|
|
101
51
|
3. Before merge: verify derived outputs (`.agent-src/`, `.augment/`, `.claude/skills/`) are regenerated
|
|
102
52
|
4. Do NOT leave `.agent-src/` stale across review cycles
|
|
103
53
|
|
|
104
|
-
##
|
|
105
|
-
|
|
106
|
-
`.claude/skills/` contains symlinks to **both** `.agent-src/skills/` and `.agent-src/commands/`.
|
|
107
|
-
Claude Code treats both as "skills" — but they are different artifact types in our taxonomy.
|
|
108
|
-
|
|
109
|
-
| `.claude/skills/{name}/SKILL.md` points to... | Actual type |
|
|
110
|
-
|---|---|
|
|
111
|
-
| `.agent-src/skills/{name}/SKILL.md` | **Skill** (workflow) |
|
|
112
|
-
| `.agent-src/commands/{name}.md` | **Command** (slash-invoked procedure) |
|
|
113
|
-
|
|
114
|
-
Always check the symlink target to determine the actual artifact type.
|
|
115
|
-
Commands have `disable-model-invocation: true` in their frontmatter.
|
|
116
|
-
|
|
117
|
-
## Quick reference
|
|
54
|
+
## Mechanics — workflow, compression rules, commands, symlinks, quick reference
|
|
118
55
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
| Check what needs compression | `bash scripts/compress.sh --changed` |
|
|
127
|
-
| Mark file as compressed | `bash scripts/compress.sh --mark-done {path}` |
|
|
128
|
-
| Verify everything is in sync | `bash scripts/compress.sh --check` |
|
|
56
|
+
The authoring workflow, what compression does (and never touches), the
|
|
57
|
+
commands workflow with required frontmatter, the multi-agent symlink
|
|
58
|
+
mapping, and the per-task quick-reference table live in
|
|
59
|
+
[`contexts/communication/rules-auto/augment-source-of-truth-mechanics.md`](../contexts/communication/rules-auto/augment-source-of-truth-mechanics.md).
|
|
60
|
+
Pull it whenever an edit, new file, new command, or sync question
|
|
61
|
+
fires — the rule above is the obligation surface; the mechanics file
|
|
62
|
+
is the lookup material.
|
|
@@ -3,6 +3,8 @@ type: "auto"
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
description: "Running CLI commands that produce verbose output — git, tests, linters, docker, build tools, artisan, npm, composer. Wrap with rtk when installed; tail/grep is fallback."
|
|
5
5
|
source: package
|
|
6
|
+
load_context:
|
|
7
|
+
- .agent-src.uncompressed/contexts/communication/rules-auto/cli-output-handling-mechanics.md
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Development Efficiency
|
|
@@ -32,83 +34,15 @@ exits 0. Caching the result for the session is fine.
|
|
|
32
34
|
For the full rtk subcommand catalog and project-local filter setup → see
|
|
33
35
|
the `rtk-output-filtering` skill.
|
|
34
36
|
|
|
35
|
-
##
|
|
37
|
+
## Lookup material — see mechanics
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Search before reading
|
|
45
|
-
|
|
46
|
-
- **Search first** — `codebase-retrieval`, `search_query_regex`, or `grep`.
|
|
47
|
-
- **Load only what you need** — use `view_range` or `search_query_regex`, not full files.
|
|
48
|
-
- **Small files** (< 50 lines) — OK to read fully.
|
|
49
|
-
|
|
50
|
-
### Ignored files (`.augmentignore`)
|
|
51
|
-
|
|
52
|
-
- `vendor/`, `node_modules/`, lock files, and generated files are excluded from `codebase-retrieval`.
|
|
53
|
-
- When you need to understand a vendor package (base class, interface, API), **read the specific file** with `view`. This bypasses the ignore.
|
|
54
|
-
- Load only the file you need — never browse entire vendor directories.
|
|
55
|
-
|
|
56
|
-
### Minimize tool calls
|
|
57
|
-
|
|
58
|
-
- **Parallel reads** — read multiple files in one batch, not sequentially.
|
|
59
|
-
- **`search_query_regex`** over full file reads.
|
|
60
|
-
- **`view_range`** when you know the exact lines.
|
|
61
|
-
- **One `codebase-retrieval` call** with all symbols — batch, not 5 separate calls.
|
|
62
|
-
|
|
63
|
-
## Fallback Pattern: Redirect, Summarize, Target
|
|
64
|
-
|
|
65
|
-
When `rtk` has no matching subcommand for the tool at hand, fall back to
|
|
66
|
-
this pattern. Every command that MAY produce more than ~30 lines of output:
|
|
67
|
-
|
|
68
|
-
### Step 1: Redirect to file
|
|
69
|
-
```bash
|
|
70
|
-
docker compose exec -T <service> <command> 2>&1 > /tmp/<tool>-output.txt
|
|
71
|
-
echo "EXIT=$?"
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Step 2: Read ONLY the summary
|
|
75
|
-
```bash
|
|
76
|
-
tail -5 /tmp/<tool>-output.txt
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Step 3: If errors exist, read ONLY what you need to fix
|
|
80
|
-
```bash
|
|
81
|
-
grep "ERROR\|error\|✏️" /tmp/<tool>-output.txt | head -20
|
|
82
|
-
grep "app/Services/MyService.php" /tmp/<tool>-output.txt
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**NEVER** do:
|
|
86
|
-
- `cat /tmp/<tool>-output.txt` (loads everything)
|
|
87
|
-
- Read the full output of a passing command (waste)
|
|
88
|
-
- Read diffs you don't plan to act on
|
|
89
|
-
|
|
90
|
-
## General Rules
|
|
91
|
-
|
|
92
|
-
For tool-specific commands → see the `quality-tools` skill.
|
|
93
|
-
|
|
94
|
-
1. **Exit code first**: Check `$?` before reading ANY output. If 0, you're done — skip reading.
|
|
95
|
-
2. **Summary line**: Most tools print a summary as the last few lines. That's all you need.
|
|
96
|
-
3. **Targeted grep**: When you need details, `grep` for the specific file or error type.
|
|
97
|
-
4. **Read once, act, move on**: Once you've read output and acted on it, skip re-reading.
|
|
98
|
-
5. **Iterative fixing**: Fix one error at a time, re-run, check exit code.
|
|
99
|
-
Output becomes stale after each fix — always re-run before reading again.
|
|
100
|
-
|
|
101
|
-
## CLI Over MCP
|
|
102
|
-
|
|
103
|
-
MCP servers are **significantly more token-expensive** than CLI equivalents.
|
|
104
|
-
When both options exist, prefer the CLI tool.
|
|
105
|
-
|
|
106
|
-
- **Git**: `git` CLI, not Git MCP
|
|
107
|
-
- **Files**: shell commands, not filesystem MCP
|
|
108
|
-
- **APIs**: `curl`/`httpie`, not HTTP MCP
|
|
109
|
-
- **Database**: `mysql`/`psql` CLI, not DB MCP
|
|
110
|
-
|
|
111
|
-
Exception: MCPs with **unique capabilities** (Sentry, Playwright, Jira).
|
|
39
|
+
Codebase-navigation tips, the redirect-summarize-target fallback
|
|
40
|
+
pattern (with the three-step `tail`/`grep` recipe), the general rules
|
|
41
|
+
(exit code first, summary line, targeted `grep`, read-once-act-move-on,
|
|
42
|
+
iterative fixing), and the CLI-over-MCP catalog all live in
|
|
43
|
+
[`contexts/communication/rules-auto/cli-output-handling-mechanics.md`](../contexts/communication/rules-auto/cli-output-handling-mechanics.md).
|
|
44
|
+
Pull it whenever a verbose command is about to run without an `rtk`
|
|
45
|
+
match.
|
|
112
46
|
|
|
113
47
|
## Exceptions
|
|
114
48
|
|