@event4u/agent-config 8.12.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +164 -0
- package/README.md +1 -1
- package/dist/agent-src/commands/agent-handoff.md +35 -0
- package/dist/agent-src/commands/agents/init.md +1 -0
- package/dist/agent-src/commands/agents/optimize.md +1 -0
- package/dist/agent-src/commands/agents/user/accept.md +3 -2
- package/dist/agent-src/commands/agents/user/init.md +5 -4
- package/dist/agent-src/commands/agents/user/update.md +3 -2
- package/dist/agent-src/commands/agents/user.md +1 -0
- package/dist/agent-src/commands/agents.md +1 -0
- package/dist/agent-src/commands/analytics/show.md +1 -0
- package/dist/agent-src/commands/analytics.md +1 -0
- package/dist/agent-src/commands/analyze/decision.md +1 -0
- package/dist/agent-src/commands/analyze/incident.md +1 -0
- package/dist/agent-src/commands/analyze/near-miss.md +1 -0
- package/dist/agent-src/commands/analyze/postmortem.md +1 -0
- package/dist/agent-src/commands/analyze/premortem.md +1 -0
- package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
- package/dist/agent-src/commands/analyze.md +3 -2
- package/dist/agent-src/commands/brand/identity.md +6 -5
- package/dist/agent-src/commands/brand/review.md +6 -5
- package/dist/agent-src/commands/brand/strategy.md +6 -4
- package/dist/agent-src/commands/brand/tokens.md +7 -6
- package/dist/agent-src/commands/brand/voice.md +5 -4
- package/dist/agent-src/commands/brand.md +9 -7
- package/dist/agent-src/commands/bug/fix.md +1 -0
- package/dist/agent-src/commands/bug/investigate.md +1 -0
- package/dist/agent-src/commands/bug.md +2 -1
- package/dist/agent-src/commands/challenge-me/vision.md +1 -0
- package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
- package/dist/agent-src/commands/challenge-me.md +28 -6
- package/dist/agent-src/commands/chat-history.md +1 -0
- package/dist/agent-src/commands/check-current-md.md +1 -0
- package/dist/agent-src/commands/commit.md +1 -0
- package/dist/agent-src/commands/context/create.md +3 -2
- package/dist/agent-src/commands/context.md +1 -0
- package/dist/agent-src/commands/cost/profile.md +1 -0
- package/dist/agent-src/commands/cost.md +2 -1
- package/dist/agent-src/commands/council/analysis.md +1 -0
- package/dist/agent-src/commands/council/debate.md +1 -0
- package/dist/agent-src/commands/council/default.md +21 -20
- package/dist/agent-src/commands/council/design.md +1 -0
- package/dist/agent-src/commands/council/optimize.md +1 -0
- package/dist/agent-src/commands/council/pr.md +1 -0
- package/dist/agent-src/commands/council.md +1 -0
- package/dist/agent-src/commands/estimate-ticket.md +1 -0
- package/dist/agent-src/commands/feature/dev.md +1 -0
- package/dist/agent-src/commands/feature/explore.md +1 -0
- package/dist/agent-src/commands/feature/plan.md +1 -0
- package/dist/agent-src/commands/feature/refactor.md +1 -0
- package/dist/agent-src/commands/feature/roadmap.md +1 -0
- package/dist/agent-src/commands/feature.md +2 -1
- package/dist/agent-src/commands/fix/pr-comments.md +19 -0
- package/dist/agent-src/commands/fix.md +2 -1
- package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
- package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
- package/dist/agent-src/commands/ghostwriter/show.md +1 -0
- package/dist/agent-src/commands/ghostwriter/write.md +1 -0
- package/dist/agent-src/commands/ghostwriter.md +1 -0
- package/dist/agent-src/commands/grill-me.md +17 -12
- package/dist/agent-src/commands/humanize.md +1 -0
- package/dist/agent-src/commands/image/analyse.md +2 -1
- package/dist/agent-src/commands/image/create.md +1 -0
- package/dist/agent-src/commands/image/verify.md +1 -0
- package/dist/agent-src/commands/image.md +16 -12
- package/dist/agent-src/commands/implement-ticket.md +1 -0
- package/dist/agent-src/commands/judge/on-diff.md +1 -0
- package/dist/agent-src/commands/judge/solo.md +1 -0
- package/dist/agent-src/commands/judge/steps.md +1 -0
- package/dist/agent-src/commands/judge.md +1 -0
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
- package/dist/agent-src/commands/knowledge/forget.md +1 -0
- package/dist/agent-src/commands/knowledge/ingest.md +1 -0
- package/dist/agent-src/commands/knowledge/list.md +10 -0
- package/dist/agent-src/commands/knowledge.md +1 -0
- package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
- package/dist/agent-src/commands/memory/mine-session.md +1 -0
- package/dist/agent-src/commands/memory/promote.md +3 -2
- package/dist/agent-src/commands/memory.md +1 -0
- package/dist/agent-src/commands/mission/upgrade.md +45 -24
- package/dist/agent-src/commands/mode.md +1 -0
- package/dist/agent-src/commands/module/create.md +1 -0
- package/dist/agent-src/commands/module/explore.md +1 -0
- package/dist/agent-src/commands/module.md +1 -0
- package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
- package/dist/agent-src/commands/optimize/project.md +1 -0
- package/dist/agent-src/commands/optimize/prompt.md +1 -0
- package/dist/agent-src/commands/optimize.md +2 -1
- package/dist/agent-src/commands/orchestrate.md +1 -0
- package/dist/agent-src/commands/override.md +1 -0
- package/dist/agent-src/commands/package.md +2 -1
- package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
- package/dist/agent-src/commands/post-as/me.md +1 -0
- package/dist/agent-src/commands/post-as.md +1 -0
- package/dist/agent-src/commands/pr/create/description-only.md +1 -0
- package/dist/agent-src/commands/pr/create.md +28 -0
- package/dist/agent-src/commands/prediction-pool.md +7 -6
- package/dist/agent-src/commands/prepare-for-review.md +1 -0
- package/dist/agent-src/commands/profile/activate.md +1 -0
- package/dist/agent-src/commands/profile/deactivate.md +1 -0
- package/dist/agent-src/commands/profile.md +1 -0
- package/dist/agent-src/commands/project.md +2 -1
- package/dist/agent-src/commands/refine-ticket.md +7 -0
- package/dist/agent-src/commands/research/deep.md +1 -0
- package/dist/agent-src/commands/research.md +1 -0
- package/dist/agent-src/commands/review/routing.md +1 -0
- package/dist/agent-src/commands/review.md +2 -1
- package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
- package/dist/agent-src/commands/roadmap/materialize.md +1 -0
- package/dist/agent-src/commands/roadmap/process-full.md +1 -0
- package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
- package/dist/agent-src/commands/roadmap/process-step.md +1 -0
- package/dist/agent-src/commands/roadmap.md +1 -0
- package/dist/agent-src/commands/security-audit-config.md +2 -1
- package/dist/agent-src/commands/skill/preview.md +1 -0
- package/dist/agent-src/commands/skill.md +1 -0
- package/dist/agent-src/commands/skills/discover.md +1 -0
- package/dist/agent-src/commands/skills.md +1 -0
- package/dist/agent-src/commands/sync/agent-settings.md +1 -0
- package/dist/agent-src/commands/sync.md +2 -1
- package/dist/agent-src/commands/team/adversarial.md +97 -0
- package/dist/agent-src/commands/team/delegate.md +110 -0
- package/dist/agent-src/commands/team/review.md +85 -0
- package/dist/agent-src/commands/team/status.md +123 -0
- package/dist/agent-src/commands/team-knowledge.md +8 -6
- package/dist/agent-src/commands/team.md +152 -0
- package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
- package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
- package/dist/agent-src/commands/tests/execute.md +1 -0
- package/dist/agent-src/commands/tests.md +2 -1
- package/dist/agent-src/commands/update-form-request-messages.md +1 -0
- package/dist/agent-src/commands/upstream-contribute.md +1 -0
- package/dist/agent-src/commands/video/from-script.md +3 -2
- package/dist/agent-src/commands/video/from-song.md +22 -21
- package/dist/agent-src/commands/video/scene.md +1 -0
- package/dist/agent-src/commands/video/stitch.md +2 -1
- package/dist/agent-src/commands/video/storyboard.md +1 -0
- package/dist/agent-src/commands/video.md +1 -0
- package/dist/agent-src/commands/work.md +1 -0
- package/dist/agent-src/commands/worktree/cleanup.md +8 -7
- package/dist/agent-src/commands/worktree/create.md +1 -0
- package/dist/agent-src/commands/worktree/verify.md +1 -0
- package/dist/agent-src/commands/worktree.md +1 -0
- package/dist/agent-src/rules/active-remediation.md +12 -36
- package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
- package/dist/agent-src/rules/context-hygiene.md +19 -113
- package/dist/agent-src/rules/design-fidelity.md +4 -60
- package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
- package/dist/agent-src/rules/improve-before-implement.md +6 -0
- package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
- package/dist/agent-src/rules/size-enforcement.md +10 -0
- package/dist/agent-src/rules/tool-safety.md +17 -3
- package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
- package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
- package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
- package/dist/agent-src/skills/code-review/SKILL.md +105 -93
- package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
- package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
- package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
- package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
- package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
- package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
- package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
- package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
- package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
- package/dist/agent-src/skills/docker/SKILL.md +10 -0
- package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
- package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
- package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
- package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
- package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
- package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
- package/dist/agent-src/skills/laravel/SKILL.md +10 -0
- package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
- package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
- package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
- package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
- package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
- package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
- package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
- package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
- package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
- package/dist/agent-src/skills/terraform/SKILL.md +10 -0
- package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
- package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +378 -174
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -4
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +16 -8
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +14 -6
- package/dist/install/install.mjs +46 -0
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/router.json +1 -1
- package/dist/scripts/condense.js +5 -0
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +11 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +9 -2
- package/docs/SKILL_CENSUS.md +8 -0
- package/docs/architecture.md +3 -3
- package/docs/benchmark.md +67 -2
- package/docs/catalog.md +10 -4
- package/docs/command-flows.md +6 -1
- package/docs/contracts/ai-council-config.md +9 -2
- package/docs/contracts/ai-team-config.md +224 -0
- package/docs/contracts/command-clusters.md +1 -0
- package/docs/contracts/prelaunch-diagnostics.md +151 -0
- package/docs/contracts/release-pr-gating.md +1 -0
- package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
- package/docs/featured-skills.md +2 -2
- package/docs/getting-started-by-role.md +3 -1
- package/docs/getting-started.md +42 -1
- package/docs/governance-advantage.md +1 -1
- package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
- package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
- package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
- package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
- package/docs/guidelines/design-fidelity-mechanics.md +76 -0
- package/docs/maintainers/branch-protection.md +18 -0
- package/docs/parity/command-frontmatter.md +60 -0
- package/docs/proof.md +7 -6
- package/package.json +1 -1
- package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/src/config/agent-settings.template.yml +71 -7
- package/src/config/prelaunch-areas.yml +36 -0
- package/src/scripts/_cli/cmd_doctor.ts +288 -1
- package/src/scripts/_lib/claude_plugin.ts +114 -4
- package/src/scripts/_lib/orchestration_record.ts +5 -0
- package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
- package/src/scripts/ai_team/config.ts +234 -0
- package/src/scripts/ai_team/review_gate.ts +636 -0
- package/src/scripts/ai_team/team_dispatch.ts +612 -0
- package/src/scripts/bench_ab_task_runner.ts +11 -1
- package/src/scripts/bench_parity_count.ts +279 -0
- package/src/scripts/build_linear_digest.ts +3 -1
- package/src/scripts/check_bridge_derivation.ts +172 -0
- package/src/scripts/check_consumer_scope_flip.ts +179 -0
- package/src/scripts/check_council_config_location.ts +115 -15
- package/src/scripts/check_host_loadability.ts +81 -0
- package/src/scripts/condense.ts +5 -0
- package/src/scripts/hook_manifest.yaml +12 -1
- package/src/scripts/install.ts +39 -0
- package/src/scripts/lint_handoffs.ts +42 -0
- package/src/scripts/lint_skill_descriptions.ts +228 -0
- package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
- package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
- package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
- package/src/scripts/lint_supported_tools_matrix.ts +35 -0
- package/src/scripts/optimize_skill_description.ts +144 -0
- package/src/scripts/orchestration_record.ts +2 -1
- package/src/scripts/prelaunch_diagnostics.ts +248 -0
- package/src/scripts/rule_backlinks.ts +0 -0
- package/src/scripts/run_skill_evals.ts +70 -4
- package/src/scripts/schemas/command.schema.json +7 -0
- package/src/scripts/schemas/evals.schema.json +105 -14
- package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
- package/src/scripts/schemas/skill.schema.json +18 -1
- package/src/scripts/schemas/subagent.schema.json +6 -0
- package/src/scripts/skill_linter.ts +43 -3
- package/src/scripts/smoke_host_loadability.sh +73 -0
- package/src/scripts/team_review_gate_hook.ts +115 -0
- package/src/scripts/trigger_eval_grandfather.json +1 -2
- package/src/scripts/utilization_report.ts +225 -0
- package/src/server/schemas/settings.ts +25 -0
|
@@ -8,6 +8,8 @@ triggers:
|
|
|
8
8
|
- intent: "tool loop"
|
|
9
9
|
- intent: "fresh chat"
|
|
10
10
|
- keyword: "3-failure"
|
|
11
|
+
routes_to:
|
|
12
|
+
- "guideline:agent-infra/context-hygiene-mechanics"
|
|
11
13
|
workspaces: [agent-config-maintainer, construction, engineering, finance, founder, gtm, legal-review-prep, ops, product, small-business]
|
|
12
14
|
packs: [meta]
|
|
13
15
|
---
|
|
@@ -24,31 +26,13 @@ packs: [meta]
|
|
|
24
26
|
|
|
25
27
|
Monitor for **context decay** — long conversations degrade quality and waste tokens.
|
|
26
28
|
|
|
27
|
-
**Suggest a new chat when:**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- Topic **changes completely**
|
|
31
|
-
- Re-reading files already in context
|
|
32
|
-
- **15+ completed tasks** and new unrelated topic
|
|
33
|
-
- Branch changed since start
|
|
34
|
-
- ~24 hours passed
|
|
29
|
+
**Suggest a new chat when:** ~20+ user messages · complete topic change ·
|
|
30
|
+
re-reading files already in context · 15+ completed tasks and a new unrelated
|
|
31
|
+
topic · branch changed since start · ~24 hours passed.
|
|
35
32
|
|
|
36
33
|
**Repeat** at multiples: messages 20/40/60, tasks 15/30/45.
|
|
37
|
-
**ONLY at exact thresholds.** Between: silence.
|
|
38
|
-
|
|
39
|
-
**How to suggest:**
|
|
40
|
-
|
|
41
|
-
Estimate token cost: responses × ~1,500 tokens.
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
> ⚡ This conversation has ~{N} messages (~{N×1500} tokens history cost — charged on EVERY request).
|
|
45
|
-
> A fresh chat saves ~{N×1500} input tokens per request.
|
|
46
|
-
>
|
|
47
|
-
> 1. Start fresh — I'll initiate a session handoff
|
|
48
|
-
> 2. Continue here
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**If the user picks 1:** Initiate a session handoff or start fresh.
|
|
34
|
+
**ONLY at exact thresholds.** Between: silence. Suggestion template
|
|
35
|
+
(token-cost estimate + numbered options): the mechanics guideline below.
|
|
52
36
|
|
|
53
37
|
## The 3-Failure Rule
|
|
54
38
|
|
|
@@ -58,40 +42,20 @@ When **3 consecutive attempts** at the same task fail (code fix, test fix, confi
|
|
|
58
42
|
2. **State dump** — summarize what was tried, what failed, and what you know so far.
|
|
59
43
|
3. **Recommend fresh start** — suggest a fresh session with the state dump as context, or ask for a different approach.
|
|
60
44
|
|
|
61
|
-
**What counts as a failure:**
|
|
62
|
-
|
|
63
|
-
- Code change that doesn't fix the problem
|
|
64
|
-
- Test that still fails after the fix
|
|
65
|
-
- Quality check (type-checker, linter, formatter) that still errors
|
|
66
|
-
- Build/deploy that fails after config change
|
|
67
|
-
|
|
68
|
-
**Does NOT reset the counter:** Unrelated tasks. User providing new information (course correction).
|
|
45
|
+
**What counts as a failure:** a change that doesn't fix the problem · a test still failing after the fix · a quality check still erroring · a build/deploy failing after a config change. **Does NOT reset the counter:** unrelated tasks; the user providing new information (course correction).
|
|
69
46
|
|
|
70
47
|
**Failure identity — same error vs new error.** Failure signature = **same target + same error class** (same failing test + same assertion/exception, same lint rule id, same build error).
|
|
71
48
|
|
|
72
49
|
- **Same failure signature twice → stop and pivot now.** Don't burn the third attempt on a near-identical retry of a fix that already failed the same way — a repeated identical signature means the hypothesis is wrong, not under-applied. Change strategy (re-read source, new hypothesis, ask).
|
|
73
50
|
- **New error signature each attempt = progress.** Peeling one error to reveal a different one is forward motion; counter continues — learning, not looping.
|
|
74
51
|
|
|
75
|
-
**Hard-blocker classes — skip retries, go straight to ask/surface.** On the **first** occurrence, do not count toward the 3 — stop and surface:
|
|
76
|
-
|
|
77
|
-
- Missing credentials / unset required secret or token.
|
|
78
|
-
- Permission denied (auth/authz, file mode, protected branch, scope).
|
|
79
|
-
- Spend / quota / rate limit reached (billing cap, API quota, 429 that won't self-clear).
|
|
80
|
-
- External-service `5xx` / outage / DNS-unreachable — a dependency is down, not your code.
|
|
81
|
-
|
|
82
|
-
Retrying a hard-blocker is the canonical wasted-attempt; the fix is a decision or external change only the user/environment can make.
|
|
52
|
+
**Hard-blocker classes — skip retries, go straight to ask/surface.** On the **first** occurrence, do not count toward the 3 — stop and surface: missing credentials / unset secret · permission denied · spend / quota / rate limit reached · external-service 5xx / outage. Retrying a hard-blocker is the canonical wasted attempt; the fix is a decision or external change only the user/environment can make.
|
|
83
53
|
|
|
84
54
|
## Tool Loop Detection
|
|
85
55
|
|
|
86
56
|
Calling the **same tool** more than **2 times in a row** with similar parameters = loop.
|
|
87
|
-
|
|
88
|
-
**
|
|
89
|
-
1. **STOP** all tool calls.
|
|
90
|
-
2. **Do the task directly** — write the code, run the command, answer the question.
|
|
91
|
-
3. If you can't proceed — ask the user for help.
|
|
92
|
-
|
|
93
|
-
`sequentialthinking` is especially prone to loops. Use at most **once** per task,
|
|
94
|
-
NEVER for simple file operations, command execution, or straightforward edits.
|
|
57
|
+
**Immediate action:** 1. STOP all tool calls. 2. Do the task directly. 3. Can't proceed → ask the user.
|
|
58
|
+
`sequentialthinking` is especially prone to loops: at most **once** per task, NEVER for simple file operations, command execution, or straightforward edits.
|
|
95
59
|
|
|
96
60
|
## Read-Loop Detection — the 15 / 25 rule
|
|
97
61
|
|
|
@@ -101,74 +65,16 @@ EVERY TURN MUST EDIT, RUN, OR ASK.
|
|
|
101
65
|
```
|
|
102
66
|
|
|
103
67
|
**Read-only turn:** only `view` / `codebase-retrieval` / `grep` /
|
|
104
|
-
`git log` / `git show`. No
|
|
105
|
-
test/build/quality run, no `git commit`.
|
|
106
|
-
|
|
107
|
-
**15-min warning (3 read-only turns in a row) — change approach.**
|
|
108
|
-
Next turn MUST contain at least one of: an edit, a test/build/quality
|
|
109
|
-
command, or an explicit user question. Self-check:
|
|
110
|
-
|
|
111
|
-
1. Source expectation known? If no → read **once**, then act.
|
|
112
|
-
2. Can a single failing test name the error? If yes → run it now.
|
|
113
|
-
3. Regression in working code? → `git log` + `git show <sha> -- <file>`.
|
|
114
|
-
4. Guessing at mock / payload shape? → read the producer **once**.
|
|
115
|
-
|
|
116
|
-
**25-min abort (5 read-only turns) — STOP and ask:**
|
|
68
|
+
`git log` / `git show`. No edit/save, no test/build/quality run, no `git commit`.
|
|
117
69
|
|
|
118
|
-
|
|
119
|
-
> ⛔ Loop: N read-only turns, ~M min. Read: <files>. Hypothesis: <X>.
|
|
120
|
-
> 1. Different approach (suggestion: <Y>)
|
|
121
|
-
> 2. Point me at the right spot
|
|
122
|
-
> 3. Fresh chat with state dump
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Non-bypassable. Autonomous mandate (`/work`, `/roadmap:process-*`,
|
|
126
|
-
"entscheide selbst") does **not** lift the abort — it is the safety
|
|
127
|
-
net that protects autonomy from becoming a token sink.
|
|
128
|
-
|
|
129
|
-
Debug procedure for "I'm in a read loop fixing tests" →
|
|
130
|
-
[`systematic-debugging § Debug micro-loop`](../skills/systematic-debugging/SKILL.md#debug-micro-loop--one-test-one-fix-one-re-run).
|
|
131
|
-
|
|
132
|
-
## State dump format
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
## State Dump: [Task]
|
|
136
|
-
### Tried: 1. [Approach] → [Why failed] 2. ... 3. ...
|
|
137
|
-
### Known: [Key facts]
|
|
138
|
-
### Hypothesis: [Best guess for root cause]
|
|
139
|
-
### Recommendation: [Next approach for fresh session]
|
|
140
|
-
```
|
|
70
|
+
**15-min warning (3 read-only turns in a row) — change approach.** The next turn MUST contain at least one of: an edit, a test/build/quality command, or an explicit user question (self-check in the mechanics guideline).
|
|
141
71
|
|
|
142
|
-
|
|
72
|
+
**25-min abort (5 read-only turns) — STOP and ask** with the abort block (template in the mechanics guideline). Non-bypassable: an autonomous mandate does **not** lift the abort — it is the safety net that protects autonomy from becoming a token sink.
|
|
143
73
|
|
|
144
|
-
|
|
74
|
+
Body migrated to [`guideline:agent-infra/context-hygiene-mechanics`](../docs/guidelines/agent-infra/context-hygiene-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — the freshness-suggestion template, the read-loop self-check + abort block, the state-dump format + `/agent-handoff` pointer, the Augment ignored-skills recovery flow, and the Copilot no-hook fallback (manual `context_hygiene_hook` refresh).
|
|
75
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
145
76
|
|
|
146
|
-
|
|
147
|
-
If you need an ignored skill: read its SKILL.md directly, apply guidance, then ask:
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
> 💡 I loaded `{name}` manually — currently ignored in `.augmentignore`.
|
|
151
|
-
> 1. Remove from ignore — relevant for this project
|
|
152
|
-
> 2. Keep ignored — one-off
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Copilot fallback
|
|
156
|
-
|
|
157
|
-
GitHub Copilot has no `PostToolUse` hook surface, so
|
|
158
|
-
`scripts/context_hygiene_hook.ts` cannot run structurally and
|
|
159
|
-
`agents/runtime/state/context-hygiene.json` is not maintained automatically
|
|
160
|
-
(turn count, loop signal, freshness milestones at 20/40/60).
|
|
161
|
-
|
|
162
|
-
The cooperative path: track turns and tool-loop signals from memory
|
|
163
|
-
during the conversation and apply the suggest-a-new-chat / 3-failure
|
|
164
|
-
stop / loop-detection rules above. To refresh the state file
|
|
165
|
-
manually so the dashboard or another tool can read the latest
|
|
166
|
-
counters, run:
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
./scripts-run src/scripts/context_hygiene_hook < /dev/null
|
|
170
|
-
```
|
|
77
|
+
## See also
|
|
171
78
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Exit code is always 0 — hooks must never block the agent loop.
|
|
79
|
+
- [`guideline:agent-infra/context-hygiene-mechanics`](../docs/guidelines/agent-infra/context-hygiene-mechanics.md) — templates + per-host procedures.
|
|
80
|
+
- [`systematic-debugging § Debug micro-loop`](../skills/systematic-debugging/SKILL.md) — the read-loop debug procedure.
|
|
@@ -17,6 +17,8 @@ applies_to_user_types:
|
|
|
17
17
|
- "creator"
|
|
18
18
|
- "developer"
|
|
19
19
|
- "maintainer"
|
|
20
|
+
routes_to:
|
|
21
|
+
- "guideline:design-fidelity-mechanics"
|
|
20
22
|
workspaces: [engineering]
|
|
21
23
|
packs: [frontend-design]
|
|
22
24
|
---
|
|
@@ -71,66 +73,8 @@ porting, or modifying UI to match it.
|
|
|
71
73
|
- The user explicitly invites exploration ("show me options", "redesign this", "improve the layout") — that authorises deviation for that turn.
|
|
72
74
|
- Non-UI surfaces (scripts, CLI, backend).
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Name what the spec shows, what you would change, and why — as a numbered option
|
|
77
|
-
per [`user-interaction`](user-interaction.md). The user picks. Honesty about
|
|
78
|
-
**behaviour** (a control not yet wired) never licenses changing the **design**:
|
|
79
|
-
a faithful visual plus a labelled "not wired yet" note beats an invented
|
|
80
|
-
redesign.
|
|
81
|
-
|
|
82
|
-
## Failure modes
|
|
83
|
-
|
|
84
|
-
- Swapping the prototype's font / typeface because another "reads better".
|
|
85
|
-
- Replacing a specified control (slider, stepper, chip) with a different control.
|
|
86
|
-
- Dropping or adding an element the prototype shows ("+", a send→stop toggle, a warning chip).
|
|
87
|
-
- Restructuring layout or moving sections "because the flow is better".
|
|
88
|
-
- Treating an internal "honesty gate" or "stub" concern as licence to redesign the UI.
|
|
89
|
-
- Re-running a redesign after the user already said "match the prototype".
|
|
90
|
-
|
|
91
|
-
## Surgical visual edits
|
|
92
|
-
|
|
93
|
-
A request to change one visual thing — a colour, a label, a single element — is
|
|
94
|
-
a **targeted edit**, not a redesign licence. Apply the same
|
|
95
|
-
[`minimal-safe-diff`](minimal-safe-diff.md) discipline to design work that
|
|
96
|
-
backend edits have always owed.
|
|
97
|
-
|
|
98
|
-
- **Change only the semantic target.** Preserve the surrounding layout,
|
|
99
|
-
spacing, typography, dimensions, content, animation, and interaction states.
|
|
100
|
-
Do not rewrite the component, reflow the section, or "modernise" neighbours
|
|
101
|
-
while you are in there. (fixtures: `daf-edit-preservation`, `daf-unwanted-variations`.)
|
|
102
|
-
- **A broader redesign needs an explicit trigger.** Only phrases like *"new
|
|
103
|
-
direction"*, *"from scratch"*, *"make it feel premium"*, *"rework the flow"*,
|
|
104
|
-
or *"give me variations / options"* license a from-scratch rework. Absent such
|
|
105
|
-
a phrase, a "fix / change / update the X" request is surgical — when unsure
|
|
106
|
-
which, ask ([`ask-when-uncertain`](ask-when-uncertain.md)). (fixture: `daf-redesign-trigger`.)
|
|
107
|
-
- **Preserve stable anchors.** Where the host exposes DOM/comment metadata, keep
|
|
108
|
-
comment anchors and screen labels intact so the edit stays locatable. Where
|
|
109
|
-
the host has no such surface, preserve stable semantic anchors already present
|
|
110
|
-
in source comments / `data-*` attributes — never strip them, and do not invent
|
|
111
|
-
new ones.
|
|
112
|
-
|
|
113
|
-
## Asset & imagery discipline
|
|
114
|
-
|
|
115
|
-
Visual artifacts carry **real assets or honest placeholders — never fabricated
|
|
116
|
-
brand evidence**. The design-surface instance of the no-invented-facts floor.
|
|
117
|
-
|
|
118
|
-
- **Copy owned assets through the project's accepted path.** Reference or copy
|
|
119
|
-
project-owned assets (logos, icons, fonts, images) via the target project's
|
|
120
|
-
asset directory/pipeline — never hotlink a design-system's internal URL, never
|
|
121
|
-
bulk-copy a huge source folder. (fixtures: `daf-missing-asset`, `daf-external-asset-url`.)
|
|
122
|
-
- **Real imagery where inspection matters.** On visual pages/decks, use actual
|
|
123
|
-
product / place / object / state imagery where the image IS the proof (a
|
|
124
|
-
product screenshot, a real dashboard state). Decorative atmosphere is not proof
|
|
125
|
-
— never pass a stock-like or invented image off as the real product. An
|
|
126
|
-
invented product screenshot is fabricated evidence. (fixture: `daf-invented-screenshot`.)
|
|
127
|
-
- **Icons follow the iconography floor** — no emoji-as-icon in serious UI, no
|
|
128
|
-
hand-rolled icon when a set exists; see
|
|
129
|
-
[`iconography`](../skills/iconography/SKILL.md) § Iconography floor.
|
|
130
|
-
- **Ask before adding material — no unrequested filler.** Never generate copy,
|
|
131
|
-
placeholder sections, or decorative blocks the user did not ask for to "complete"
|
|
132
|
-
a design. Brief silent on a region → surface the gap ([`ask-when-uncertain`](ask-when-uncertain.md))
|
|
133
|
-
or leave an honest placeholder; never invent filler to fill space.
|
|
76
|
+
Body migrated to [`guideline:design-fidelity-mechanics`](../docs/guidelines/design-fidelity-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — surgical visual edits (targeted-edit vs redesign-trigger discipline, stable anchors), asset & imagery discipline (owned-asset path, real-imagery-as-proof, iconography floor, no unrequested filler), deviation-surfacing shape, failure-mode catalog, `daf-*` fixtures.
|
|
77
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
134
78
|
|
|
135
79
|
## See also
|
|
136
80
|
|
|
@@ -15,6 +15,8 @@ validator_ignore:
|
|
|
15
15
|
- type: "substring"
|
|
16
16
|
pattern: ".agent-src.uncondensed/"
|
|
17
17
|
reason: "Rule names the authoring tree as the gated-entry location for new domain plates."
|
|
18
|
+
routes_to:
|
|
19
|
+
- "guideline:agent-infra/domain-adoption-gates"
|
|
18
20
|
workspaces: [agent-config-maintainer]
|
|
19
21
|
packs: [meta]
|
|
20
22
|
---
|
|
@@ -40,116 +42,18 @@ ALL THREE PASS, OR THE ROADMAP MARKS THE DOMAIN GATED.
|
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
The three gates fire before any skill, guideline, command, or rule from the
|
|
43
|
-
domain enters
|
|
44
|
-
|
|
45
|
+
domain enters `src/`. A council session may inform the decision but cannot
|
|
46
|
+
replace the gate evidence. Any gate not citeable → **defer** + a watch-only
|
|
47
|
+
note under `agents/settings/contexts/domain-watch/<domain>.md`; never silently
|
|
48
|
+
shrink scope to dodge a gate.
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
At least one of the following must be **true and citeable** in the roadmap:
|
|
49
|
-
|
|
50
|
-
- **≥ 2 consumer projects** in the domain. Cite repository names or
|
|
51
|
-
`agents/settings/contexts/` notes — not "I think there might be".
|
|
52
|
-
- **Named user direction with target.** A specific user ask plus a target
|
|
53
|
-
project / use case — e.g. "harvest the mobile skills for project X, due
|
|
54
|
-
next quarter". Vague *"this might be useful"* does not count.
|
|
55
|
-
- **Public-incident pull.** A reproducible incident on a consumer project
|
|
56
|
-
the domain would have prevented, captured in `agents/settings/contexts/` with
|
|
57
|
-
the missing surface area named.
|
|
58
|
-
|
|
59
|
-
If none of the three is citeable, **defer**. Open a watch-only context note
|
|
60
|
-
under `agents/settings/contexts/domain-watch/<domain>.md` listing the missing signal
|
|
61
|
-
so the next harvest can re-evaluate without re-relitigating the case.
|
|
62
|
-
|
|
63
|
-
## Gate 2 — Named maintenance owner
|
|
64
|
-
|
|
65
|
-
Domain plates rot. Pick the owner before the import, not after.
|
|
66
|
-
|
|
67
|
-
- The roadmap names a **single maintainer** (not "the team", not "TBD")
|
|
68
|
-
responsible for the domain quarterly review.
|
|
69
|
-
- The owner commits to the **refresh cadence** — quarterly review at
|
|
70
|
-
minimum, faster if the domain is volatile (mobile RN/Expo SDK,
|
|
71
|
-
ML model APIs).
|
|
72
|
-
- Each adopted artefact carries an **inline upstream-source line** with
|
|
73
|
-
SHA + last-checked timestamp so refresh is mechanical, not archaeological.
|
|
74
|
-
|
|
75
|
-
If no owner is named or no cadence is set, **defer**. An unowned domain
|
|
76
|
-
plate becomes broken authoritative-links and stale skills inside two cycles.
|
|
77
|
-
|
|
78
|
-
## Gate 3 — CI-tooling decision
|
|
79
|
-
|
|
80
|
-
Either the domain's verification tooling is validated in CI, or the suite
|
|
81
|
-
explicitly accepts platform-bound reference-only status.
|
|
82
|
-
|
|
83
|
-
- **Validated.** The CI pipeline runs the relevant linters/tests/integration
|
|
84
|
-
checks for the domain (e.g. `mobile-e2e` runners, ML model validation,
|
|
85
|
-
contract conformance) on every PR. Cost noted in the roadmap risk
|
|
86
|
-
register.
|
|
87
|
-
- **Out-of-scope (reference-only).** The domain is a platform fact the
|
|
88
|
-
suite cannot validate (iOS Simulator on non-macOS runners, GPU-bound
|
|
89
|
-
ML, hardware-bound IoT). The roadmap states this explicitly; affected
|
|
90
|
-
artefacts carry a "reference-only on \<unsupported platforms\>" header
|
|
91
|
-
so consumers do not file false-positive bugs.
|
|
92
|
-
|
|
93
|
-
If neither line is drawn, **defer**. Half-validated CI silently rots the
|
|
94
|
-
domain — green builds while the underlying tooling drifts.
|
|
95
|
-
|
|
96
|
-
## Sunset Policy stacks on top
|
|
97
|
-
|
|
98
|
-
Every domain track inherits the authoritative-link Sunset path documented
|
|
99
|
-
in any plate that imports volatile upstream content:
|
|
100
|
-
|
|
101
|
-
- Volatile content (SDK-pinned, API-pinned, tool-version-pinned) lives as
|
|
102
|
-
guideline body + SHA-pinned upstream link, not as forked scripts.
|
|
103
|
-
- Refresh trigger: quarterly cadence or earlier if a SHA-pinned link
|
|
104
|
-
404s in CI.
|
|
105
|
-
- The `check-refs` and `check-portability` linters apply unchanged.
|
|
106
|
-
|
|
107
|
-
Adopting a domain does not exempt it from any other suite-wide rule —
|
|
108
|
-
`augment-edit-discipline`, `skill-quality`, `size-enforcement`,
|
|
109
|
-
`rule-type-governance`. Every domain artefact passes the same gates as a
|
|
110
|
-
core artefact.
|
|
111
|
-
|
|
112
|
-
## Failure modes
|
|
113
|
-
|
|
114
|
-
- *"It's just one skill, not a domain."* — Audit the skill's prerequisites.
|
|
115
|
-
If it pulls in a new toolchain, simulator, language runtime, or
|
|
116
|
-
platform-specific build system, it **is** a domain entry. Run the gates.
|
|
117
|
-
- *"The upstream is well-maintained, we can just track it."* — Tracking
|
|
118
|
-
upstream means owning the diff, the breaking changes, and the migrations.
|
|
119
|
-
Tracking is maintenance work; budget for it under Gate 2 or skip the
|
|
120
|
-
adoption.
|
|
121
|
-
- *"We'll add CI later."* — Later does not arrive. Either CI is wired in
|
|
122
|
-
the same plate, or the artefacts ship with explicit reference-only
|
|
123
|
-
headers so users do not assume validated coverage.
|
|
124
|
-
- *"Council convergence is enough."* — Council informs the gates; it does
|
|
125
|
-
not replace them. A council session may surface that all three gates
|
|
126
|
-
pass; the roadmap still cites the evidence.
|
|
127
|
-
- *"Demand-signal is the user asking once."* — Single-shot interest is a
|
|
128
|
-
watch trigger, not an open trigger. Either name the target use case
|
|
129
|
-
with project + timeline, or open a watch note and wait.
|
|
130
|
-
|
|
131
|
-
## What to do when the gates fail
|
|
132
|
-
|
|
133
|
-
1. Mark the domain plate `[-] gated — <gate name> not met` in the relevant
|
|
134
|
-
roadmap. Do **not** silently shrink scope to dodge the gate.
|
|
135
|
-
2. Open a watch-only context note under `agents/settings/contexts/domain-watch/`
|
|
136
|
-
capturing what's missing — citations, owner candidates, CI feasibility.
|
|
137
|
-
3. Re-evaluate at the next harvest cycle. The note is the evidence trail
|
|
138
|
-
so the same questions are not relitigated.
|
|
139
|
-
|
|
140
|
-
## Allowed without gates
|
|
141
|
-
|
|
142
|
-
- Adding **a single skill** to an **already-opened** domain follows the
|
|
143
|
-
regular harvest plate; the gates do not re-fire per skill.
|
|
144
|
-
- Authoring a **guideline** that documents a domain the suite already
|
|
145
|
-
ships in — the domain is open, the guideline is a within-domain artefact.
|
|
146
|
-
- A **rule** that constrains an already-opened domain — within-domain.
|
|
50
|
+
Body migrated to [`guideline:agent-infra/domain-adoption-gates`](../docs/guidelines/agent-infra/domain-adoption-gates.md) (per P4 of `road-to-kernel-and-router.md`) — per-gate evidence bars (demand signal, named owner + cadence, CI-vs-reference-only), the sunset policy, the failure-mode catalog, the gates-fail procedure, and the allowed-without-gates list.
|
|
51
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
147
52
|
|
|
148
53
|
## See also
|
|
149
54
|
|
|
150
|
-
- [`augment-edit-discipline`](augment-edit-discipline.md) —
|
|
151
|
-
|
|
152
|
-
in sync; domain plates inherit both floors
|
|
55
|
+
- [`augment-edit-discipline`](augment-edit-discipline.md) — portability +
|
|
56
|
+
cross-reference floors domain plates inherit
|
|
153
57
|
- [`size-enforcement`](size-enforcement.md) — size budgets apply per
|
|
154
58
|
artefact regardless of domain
|
|
155
59
|
- [`rule-type-governance`](rule-type-governance.md) — within-domain rules
|
|
@@ -28,6 +28,8 @@ validator_ignore:
|
|
|
28
28
|
- type: "substring"
|
|
29
29
|
pattern: "scripts/lint_framework_leakage"
|
|
30
30
|
reason: "Rule cites the enforcing linter script by name in body and enforcement section."
|
|
31
|
+
routes_to:
|
|
32
|
+
- "guideline:agent-infra/framework-neutrality-patterns"
|
|
31
33
|
workspaces: [agent-config-maintainer]
|
|
32
34
|
packs: [meta]
|
|
33
35
|
---
|
|
@@ -49,11 +51,8 @@ into surfaces the agent must trigger on regardless of project stack.
|
|
|
49
51
|
|
|
50
52
|
## Scope
|
|
51
53
|
|
|
52
|
-
This rule fires on edits under
|
|
53
|
-
|
|
54
|
-
- `.agent-src.uncondensed/skills/`
|
|
55
|
-
- `.agent-src.uncondensed/rules/`
|
|
56
|
-
- `.agent-src.uncondensed/commands/`
|
|
54
|
+
This rule fires on edits under `src/skills/`, `src/rules/`, and
|
|
55
|
+
`src/agent-src/commands/`.
|
|
57
56
|
|
|
58
57
|
**Exempt** (file or directory name matches — these are correctly
|
|
59
58
|
framework-specific): `laravel*`, `symfony*`, `nextjs*`, `react-*`,
|
|
@@ -63,63 +62,16 @@ framework-specific): `laravel*`, `symfony*`, `nextjs*`, `react-*`,
|
|
|
63
62
|
`^terraform*`, `^terragrunt*`, `^traefik`, `^mobile-e2e`,
|
|
64
63
|
`-routing$`, `project-analysis-(laravel|symfony|nextjs|react|node-express|zend-laminas)`.
|
|
65
64
|
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
| Pattern | Why it leaks | Fix |
|
|
69
|
-
|---|---|---|
|
|
70
|
-
| `FormRequest` as a mandate | Laravel-only validation class | Say "request-validation primitive (FormRequest in Laravel, zod in Next.js, pydantic in FastAPI)" or move to `laravel-validation` carve-out |
|
|
71
|
-
| `php artisan …` as a canonical command | Laravel CLI | Generalize to "the framework's CLI" or move to `artisan-commands` carve-out |
|
|
72
|
-
| `PHPStan` as the only example | PHP-only static analyser | List peers (`mypy` for Python, `tsc` for TypeScript) or move to `quality-tools` carve-out |
|
|
73
|
-
| `composer.json` mentioned alone | PHP package manifest | Add `package.json` / `pyproject.toml` peers, or move to a PHP-scoped carve-out |
|
|
74
|
-
| `Eloquent` / `Model::…` | Laravel ORM | Generalize to "the project's ORM/data layer" or move to `eloquent` carve-out |
|
|
75
|
-
| `Pest` as the only test runner | PHP/Laravel test framework | List peers (`pytest`, `vitest`, `jest`) or move to `pest-testing` carve-out |
|
|
76
|
-
| `Blade` / `Livewire` / `Flux` as default UI | Laravel view stack | Generalize to "the project's UI layer" or move to `blade-ui` / `livewire` / `flux` carve-outs |
|
|
77
|
-
| `vendor/bin/<tool>` as a canonical path | PHP/Composer-specific binary path | Say "the project's quality CLI" or carve-out it |
|
|
78
|
-
| `Rector` as the only refactor tool | PHP-only refactorer | List peers (`ts-morph`, `libcst`) or carve-out it |
|
|
79
|
-
| "every controller" / "all controllers" | Assumes MVC PHP framework | Generalize to "every request handler" / "every endpoint" |
|
|
80
|
-
|
|
81
|
-
## Allowed: cross-stack documentation
|
|
82
|
-
|
|
83
|
-
Multi-stack tables or detection maps with **at least two ecosystems
|
|
84
|
-
side-by-side** are documentation, not leakage. The linter's
|
|
85
|
-
auto-detect heuristic (Step 0.5 of the audit roadmap) skips a hit when
|
|
86
|
-
its ±2-line window contains patterns from a different ecosystem family
|
|
87
|
-
(`php_family` vs `js_family` vs `python_family`).
|
|
88
|
-
|
|
89
|
-
Example (allowed):
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
- PHP/Composer project → `composer.json` present
|
|
93
|
-
- Node project → `package.json` present
|
|
94
|
-
- Python project → `pyproject.toml` present
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Allowed: carve-out pointers
|
|
98
|
-
|
|
99
|
-
A generic artifact may end a section with a one-line handoff to its
|
|
100
|
-
framework-specific peers. Canonical shape:
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
→ Laravel-specific: see [laravel-validation](../skills/laravel-validation/SKILL.md)
|
|
104
|
-
→ Next.js-specific: see [nextjs-patterns](../skills/nextjs-patterns/SKILL.md)
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
The pointer is a link, not a procedure — the generic artifact never
|
|
108
|
-
inlines stack-specific code.
|
|
109
|
-
|
|
110
|
-
## Enforcement
|
|
111
|
-
|
|
112
|
-
`scripts/lint_framework_leakage.ts` runs in the package CI pipeline.
|
|
113
|
-
Exit codes:
|
|
65
|
+
## The discipline in one breath
|
|
114
66
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
67
|
+
Framework names in a generic artifact appear only as **multi-stack peers**
|
|
68
|
+
(≥ 2 ecosystems side-by-side — documentation, not leakage) or as a one-line
|
|
69
|
+
**carve-out pointer** to the framework-specific artifact — never as the
|
|
70
|
+
mandated procedure. `scripts/lint_framework_leakage.ts` is the deterministic
|
|
71
|
+
CI backstop (exit 1 on a non-allowlisted hit in a generic artifact).
|
|
120
72
|
|
|
121
|
-
|
|
122
|
-
|
|
73
|
+
Body migrated to [`guideline:agent-infra/framework-neutrality-patterns`](../docs/guidelines/agent-infra/framework-neutrality-patterns.md) (per P4 of `road-to-kernel-and-router.md`) — the 10-row forbidden-pattern table with fixes, the cross-stack documentation allowance + auto-detect heuristic, the carve-out pointer shape, and the linter exit-code contract.
|
|
74
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
123
75
|
|
|
124
76
|
## See also
|
|
125
77
|
|
|
@@ -38,10 +38,16 @@ Before implementing:
|
|
|
38
38
|
- Tasks where the user said "just do it" or "skip validation"
|
|
39
39
|
- Trivial changes (rename, typo, formatting)
|
|
40
40
|
|
|
41
|
+
## Demand gate — should this exist? (build / defer)
|
|
42
|
+
|
|
43
|
+
On a "build me an app / add this feature" ask, ONE reflexive pre-check before the three checks: **who asked · what breaks if unbuilt · what's the evidence?** Recommend **build** only at a real retention/activation blocker (evidence, not anxiety); else **defer/validate**, naming the missing evidence. Advisory — "just build it" proceeds immediately; no network lookup. Hierarchy + build/defer table: guideline § 8-pre.
|
|
44
|
+
|
|
41
45
|
## The three checks
|
|
42
46
|
|
|
43
47
|
Run, in order: **1. Is the request clear?** · **2. Does it fit the existing architecture?** · **3. Is the approach sound?**
|
|
44
48
|
|
|
49
|
+
Verification stays concrete — a `curl` probe against the endpoint, a Playwright spec, an `xdebug` step-through, or the project's test runner with a targeted filter — never a from-memory assertion (full section in the guideline below).
|
|
50
|
+
|
|
45
51
|
Body migrated to [`guideline:agent-infra/agent-interaction-and-decision-quality` § 8](../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md#8-improve-before-implement--pre-implementation-validation) (per P4 of `road-to-kernel-and-router.md`) — the three checks' detail, how-to-challenge example, scope limits, verify-with-concrete-tools, RDP intent-inference.
|
|
46
52
|
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
47
53
|
|
|
@@ -9,6 +9,8 @@ triggers:
|
|
|
9
9
|
- keyword: "drive-by"
|
|
10
10
|
- keyword: "rewrite"
|
|
11
11
|
- keyword: "fix"
|
|
12
|
+
routes_to:
|
|
13
|
+
- "guideline:agent-infra/minimal-safe-diff-mechanics"
|
|
12
14
|
workspaces: [engineering]
|
|
13
15
|
packs: [engineering-base]
|
|
14
16
|
---
|
|
@@ -47,21 +49,6 @@ Ask yourself, in order:
|
|
|
47
49
|
3. **Is any of this a refactor?** If yes, it belongs in its own commit or
|
|
48
50
|
PR, clearly labeled as a refactor, with no behavior change.
|
|
49
51
|
|
|
50
|
-
## When the task seems to require a larger change
|
|
51
|
-
|
|
52
|
-
- A rename, restructure, or framework upgrade that crosses the minimal-diff
|
|
53
|
-
line is a **separate, explicit** task — ask the user before expanding.
|
|
54
|
-
- A bug fix that exposes a broader design problem stays a bug fix. Log the
|
|
55
|
-
design problem as a follow-up (ticket, note, TODO) and ship the fix alone.
|
|
56
|
-
- A new feature that tempts you to "clean up" the module first: resist.
|
|
57
|
-
Add the feature, commit it, then propose the cleanup as a separate change.
|
|
58
|
-
|
|
59
|
-
## Auto-formatter or linter rewrites unrelated code
|
|
60
|
-
|
|
61
|
-
Revert those hunks before staging. The diff you present is the diff you own.
|
|
62
|
-
If project policy forbids partial formatting, split into two commits:
|
|
63
|
-
*format only* · *behavior change*.
|
|
64
|
-
|
|
65
52
|
## Red flags in your own diff — reject them
|
|
66
53
|
|
|
67
54
|
Files the task never mentioned · import reordering, whitespace, or comments
|
|
@@ -74,37 +61,6 @@ task scope · dependency bumps "because it was close to the cache".
|
|
|
74
61
|
Ask. A minimal diff plus one follow-up is cheaper than a sprawling diff the
|
|
75
62
|
reviewer has to untangle.
|
|
76
63
|
|
|
77
|
-
## Anti-over-engineering
|
|
78
|
-
|
|
79
|
-
The smallest change is also the least *abstract* and least *speculative* one:
|
|
80
|
-
|
|
81
|
-
- **Three similar lines beat a premature abstraction.** Do not extract a helper
|
|
82
|
-
/ generic / config layer to dedupe two or three call sites — inline
|
|
83
|
-
repetition is cheaper to read and change than the wrong abstraction. Per new
|
|
84
|
-
abstraction: **cite the second caller — or inline it.**
|
|
85
|
-
- **No speculative features.** Nothing beyond what was asked: no
|
|
86
|
-
configurability or "flexibility" nobody requested, no parameters with one
|
|
87
|
-
call site, no error handling for scenarios that cannot occur in this
|
|
88
|
-
codebase.
|
|
89
|
-
- **The rewrite trigger.** If the change could be half the size without losing
|
|
90
|
-
behavior, rewrite before presenting. Self-check: *"Would a senior engineer
|
|
91
|
-
call this overcomplicated?"* — if yes, simplify.
|
|
92
|
-
- **No tombstones.** Delete removed code completely — no `_oldName` renames,
|
|
93
|
-
no `// removed X` / `// no longer used` markers, no dead re-export shims kept
|
|
94
|
-
"for safety". Git history is the tombstone.
|
|
95
|
-
- **No docstrings/comments on untouched code.** Do not annotate code the diff
|
|
96
|
-
does not change.
|
|
97
|
-
|
|
98
|
-
Wrong/right pairs for each ban:
|
|
99
|
-
[`simplicity-and-goal-demos`](../docs/guidelines/agent-infra/simplicity-and-goal-demos.md)
|
|
100
|
-
— the demos are the recognition surface; match your diff against the *right*
|
|
101
|
-
column before presenting.
|
|
102
|
-
|
|
103
|
-
**Not adopted (council):** the source's "validate only at system boundaries /
|
|
104
|
-
trust internal code" clause is **rejected** — internal code can be wrong, and
|
|
105
|
-
"trust" is not a testing strategy. Keep validating internal invariants; this
|
|
106
|
-
fold is about *diff shape*, not about dropping internal checks.
|
|
107
|
-
|
|
108
64
|
## Own-orphan cleanup
|
|
109
65
|
|
|
110
66
|
Your diff cleans up exactly the mess it made — nothing more:
|
|
@@ -122,45 +78,9 @@ Your diff cleans up exactly the mess it made — nothing more:
|
|
|
122
78
|
own-orphan (delete); otherwise → note. (`downstream-changes` runs the same
|
|
123
79
|
sweep for renames — this is that sweep applied to the new diff.)
|
|
124
80
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
This rule stays in force during production incidents. "Break-glass mode"
|
|
128
|
-
narrows verification (see `verify-before-complete`) — it does **not**
|
|
129
|
-
license drive-by edits.
|
|
130
|
-
|
|
131
|
-
Allowed during break-glass:
|
|
132
|
-
|
|
133
|
-
- The **smallest** change that stops the bleeding — one file, one
|
|
134
|
-
method, one guard — preferred over any refactor.
|
|
135
|
-
- A fast revert to a known-good commit, even if it undoes unrelated
|
|
136
|
-
improvements shipped in the same PR.
|
|
137
|
-
|
|
138
|
-
Not allowed, even in break-glass:
|
|
139
|
-
|
|
140
|
-
- "While I'm in there" cleanups, reformatting, or dependency bumps.
|
|
141
|
-
- Expanding the fix to neighboring modules without evidence they are
|
|
142
|
-
part of the incident.
|
|
143
|
-
- Merging the hotfix with pending refactors from another branch.
|
|
144
|
-
|
|
145
|
-
After the incident, open a **follow-up PR** for any scope that was
|
|
146
|
-
intentionally deferred and reference the break-glass commit in its
|
|
147
|
-
description.
|
|
148
|
-
|
|
149
|
-
## Bounded remediation carve-out
|
|
81
|
+
Body migrated to [`guideline:agent-infra/minimal-safe-diff-mechanics`](../docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — larger-change guidance, auto-formatter hunk handling, anti-over-engineering criteria (premature abstraction, speculative features, rewrite trigger, no tombstones + the council's rejected trust-internal-code clause), break-glass exception, and the full bounded-remediation carve-out prose (five conditions summarized: same path/module, ≤ ~10 lines, no API change, no dependency/migration, verification in the same commit — everything outside is note + ask per `active-remediation`; a live cross-user/tenant exposure is the sole interrupt).
|
|
82
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
150
83
|
|
|
151
|
-
|
|
152
|
-
bounded exception — a **small, task-aligned security/correctness fix in code
|
|
153
|
-
the current task already touches** — is governed by
|
|
154
|
-
[`active-remediation`](active-remediation.md). It is permitted inline **only**
|
|
155
|
-
when ALL hold: same request path / module, ≤ ~10 changed lines in one
|
|
156
|
-
production file (plus its test file), no public-API / response-shape change, no dependency bump or migration,
|
|
157
|
-
and its verification (e.g. the negative test) ships in the same commit.
|
|
158
|
-
Anything outside those five conditions is **not** this carve-out — it is
|
|
159
|
-
note + ask per `active-remediation`. This never licenses reformatting,
|
|
160
|
-
renames, dependency bumps, or version upgrades (a syntax-idiom modernization
|
|
161
|
-
is allowed only under `active-remediation`'s version-gated, behavior-preserving
|
|
162
|
-
clause; a dependency/version bump stays ask-only). The sole case that may
|
|
163
|
-
interrupt is a **live cross-user/tenant data exposure** ([`broken-access-control`](broken-access-control.md)) —
|
|
164
|
-
fix-now-if-small, else stop and surface; never defer it silently.
|
|
84
|
+
## See also
|
|
165
85
|
|
|
166
|
-
|
|
86
|
+
`scope-control` · `downstream-changes` · `think-before-action` · `preservation-guard` · `verify-before-complete` · [`active-remediation`](active-remediation.md) · [`broken-access-control`](broken-access-control.md).
|
|
@@ -25,6 +25,16 @@ packs: [meta]
|
|
|
25
25
|
|
|
26
26
|
- If a component grows too large, mixes responsibilities, or becomes hard to scan → split or refactor.
|
|
27
27
|
|
|
28
|
+
## Per-tool pitfall content
|
|
29
|
+
|
|
30
|
+
Known-pitfall / troubleshooting content for a tool is a **`## Known pitfalls`
|
|
31
|
+
section on that tool's existing skill** (format: `skill-writing` § Known-pitfalls
|
|
32
|
+
section) — **never** a new skill per pitfall, and **never** a generated per-tool
|
|
33
|
+
grid. A per-vendor pitfall generator (N slots × M tools) is exactly the
|
|
34
|
+
skill-sprawl this rule exists to prevent; the topic taxonomy is a *checklist for
|
|
35
|
+
authoring one good section*, not a template for many thin skills. Cap: **≤ 5
|
|
36
|
+
real, sourced entries** per skill.
|
|
37
|
+
|
|
28
38
|
- Prefer small files:
|
|
29
39
|
- Rules and system instructions should stay well below 200 lines
|
|
30
40
|
- Smaller (≈60 lines) is strongly preferred
|