aiwg 2026.6.12 → 2026.7.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.
Files changed (159) hide show
  1. package/agentic/code/addons/agentic-installer/rules/RULES-INDEX.md +2 -4
  2. package/agentic/code/addons/agentic-installer/rules/installer-authoring.md +2 -0
  3. package/agentic/code/addons/agentic-installer/rules/installer-safety.md +2 -0
  4. package/agentic/code/addons/aiwg-dev/rules/addon-boundaries.md +4 -0
  5. package/agentic/code/addons/aiwg-dev/rules/aiwg-ci-safety.md +4 -0
  6. package/agentic/code/addons/aiwg-dev/rules/aiwg-dir-reference-contract.md +4 -0
  7. package/agentic/code/addons/aiwg-dev/rules/component-completeness.md +4 -0
  8. package/agentic/code/addons/aiwg-dev/rules/no-circular-skill-calls.md +4 -0
  9. package/agentic/code/addons/aiwg-dev/rules/skill-placement.md +4 -0
  10. package/agentic/code/addons/aiwg-utils/rules/RULES-INDEX.md +27 -54
  11. package/agentic/code/addons/aiwg-utils/rules/activity-log.md +4 -0
  12. package/agentic/code/addons/aiwg-utils/rules/agent-deployment.md +2 -0
  13. package/agentic/code/addons/aiwg-utils/rules/auto-compact-continue.md +66 -180
  14. package/agentic/code/addons/aiwg-utils/rules/cli-secondary.md +52 -155
  15. package/agentic/code/addons/aiwg-utils/rules/context-bloat.md +4 -0
  16. package/agentic/code/addons/aiwg-utils/rules/context-budget.md +4 -0
  17. package/agentic/code/addons/aiwg-utils/rules/debug-source-not-output.md +4 -0
  18. package/agentic/code/addons/aiwg-utils/rules/delivery-policy.md +1 -0
  19. package/agentic/code/addons/aiwg-utils/rules/diagram-generation.md +4 -0
  20. package/agentic/code/addons/aiwg-utils/rules/escalation-discipline.md +4 -0
  21. package/agentic/code/addons/aiwg-utils/rules/god-session.md +4 -0
  22. package/agentic/code/addons/aiwg-utils/rules/human-authorization.md +1 -0
  23. package/agentic/code/addons/aiwg-utils/rules/implicit-dependencies.md +4 -0
  24. package/agentic/code/addons/aiwg-utils/rules/instruction-comprehension.md +4 -0
  25. package/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md +49 -2
  26. package/agentic/code/addons/aiwg-utils/rules/no-time-estimates.md +2 -0
  27. package/agentic/code/addons/aiwg-utils/rules/parallel-then-synthesize.md +4 -0
  28. package/agentic/code/addons/aiwg-utils/rules/post-commit-index-refresh.md +4 -0
  29. package/agentic/code/addons/aiwg-utils/rules/quiet-mode.md +4 -0
  30. package/agentic/code/addons/aiwg-utils/rules/research-before-decision.md +4 -0
  31. package/agentic/code/addons/aiwg-utils/rules/respect-repo-access-manifest.md +5 -0
  32. package/agentic/code/addons/aiwg-utils/rules/sdlc-right-sizing.md +4 -0
  33. package/agentic/code/addons/aiwg-utils/rules/skill-discovery.md +46 -331
  34. package/agentic/code/addons/aiwg-utils/rules/soul-enforcement.md +5 -0
  35. package/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md +41 -472
  36. package/agentic/code/addons/aiwg-utils/rules/tool-quota.md +4 -0
  37. package/agentic/code/addons/aiwg-utils/rules/vague-discretion.md +4 -0
  38. package/agentic/code/addons/aiwg-utils/skills/doc-sync/SKILL.md +56 -354
  39. package/agentic/code/addons/browser-control/rules/browser-control-safety.md +4 -0
  40. package/agentic/code/addons/color-palette/rules/color-output-format.md +1 -1
  41. package/agentic/code/addons/context-curator/rules/distractor-filter.md +5 -0
  42. package/agentic/code/addons/context-curator/rules/scoped-reasoning.md +5 -0
  43. package/agentic/code/addons/daemon/rules/daemon-interaction.md +1 -0
  44. package/agentic/code/addons/prose-integration/rules/prose-bridge.md +1 -0
  45. package/agentic/code/addons/prose-integration/rules/prose-resolution.md +1 -0
  46. package/agentic/code/addons/rlm/rules/rlm-context-management.md +37 -761
  47. package/agentic/code/addons/verbalized-sampling/rules/diversity-awareness.md +2 -0
  48. package/agentic/code/addons/voice-framework/rules/voice-framework.md +2 -0
  49. package/agentic/code/extensions/dev/rules/dev-ci-self-contained.md +4 -0
  50. package/agentic/code/extensions/dev/rules/dev-idempotent-builds.md +4 -0
  51. package/agentic/code/extensions/dev/rules/dev-pipeline-safety.md +4 -0
  52. package/agentic/code/extensions/dev/rules/dev-secret-hygiene.md +4 -0
  53. package/agentic/code/extensions/it/rules/it-asset-authority.md +4 -0
  54. package/agentic/code/extensions/it/rules/it-change-control.md +4 -0
  55. package/agentic/code/extensions/it/rules/it-dr-validation.md +4 -0
  56. package/agentic/code/extensions/it/rules/it-service-health.md +4 -0
  57. package/agentic/code/extensions/net/rules/net-change-blast-radius.md +4 -0
  58. package/agentic/code/extensions/net/rules/net-state-authority.md +4 -0
  59. package/agentic/code/extensions/net/rules/net-tunnel-safety.md +4 -0
  60. package/agentic/code/extensions/sec/rules/sec-access-audit-frequency.md +4 -0
  61. package/agentic/code/extensions/sec/rules/sec-cert-expiry-gates.md +4 -0
  62. package/agentic/code/extensions/sec/rules/sec-key-material-handling.md +4 -0
  63. package/agentic/code/extensions/sec/rules/sec-luks-dual-phase.md +4 -0
  64. package/agentic/code/extensions/stream/rules/stream-pipeline-gates.md +4 -0
  65. package/agentic/code/extensions/stream/rules/stream-safety.md +4 -0
  66. package/agentic/code/extensions/sys/rules/sys-hardware-safety.md +4 -0
  67. package/agentic/code/extensions/sys/rules/sys-host-independence.md +4 -0
  68. package/agentic/code/extensions/sys/rules/sys-immutable-base.md +5 -0
  69. package/agentic/code/extensions/sys/rules/sys-interactive-gate.md +4 -0
  70. package/agentic/code/frameworks/forensics-complete/rules/evidence-integrity.md +4 -0
  71. package/agentic/code/frameworks/forensics-complete/rules/non-destructive.md +4 -0
  72. package/agentic/code/frameworks/forensics-complete/rules/red-flag-escalation.md +4 -0
  73. package/agentic/code/frameworks/forensics-complete/rules/volatility-order.md +4 -0
  74. package/agentic/code/frameworks/ops-complete/rules/RULES-INDEX.md +4 -8
  75. package/agentic/code/frameworks/ops-complete/rules/ops-cross-repo.md +4 -0
  76. package/agentic/code/frameworks/ops-complete/rules/ops-documentation.md +4 -0
  77. package/agentic/code/frameworks/ops-complete/rules/ops-issue-tracking.md +4 -0
  78. package/agentic/code/frameworks/ops-complete/rules/ops-safety.md +4 -0
  79. package/agentic/code/frameworks/sdlc-complete/flows/capabilities/release-doc-sync.yaml +3 -1
  80. package/agentic/code/frameworks/sdlc-complete/rules/README.md +4 -0
  81. package/agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md +37 -74
  82. package/agentic/code/frameworks/sdlc-complete/rules/actionable-feedback.md +4 -0
  83. package/agentic/code/frameworks/sdlc-complete/rules/agent-fallback.md +34 -318
  84. package/agentic/code/frameworks/sdlc-complete/rules/agent-friendly-code.md +22 -274
  85. package/agentic/code/frameworks/sdlc-complete/rules/agent-generation-guardrails.md +20 -244
  86. package/agentic/code/frameworks/sdlc-complete/rules/anti-laziness.md +53 -796
  87. package/agentic/code/frameworks/sdlc-complete/rules/artifact-discovery.md +4 -0
  88. package/agentic/code/frameworks/sdlc-complete/rules/auto-reply-chains.md +4 -0
  89. package/agentic/code/frameworks/sdlc-complete/rules/best-output-selection.md +4 -0
  90. package/agentic/code/frameworks/sdlc-complete/rules/citation-policy.md +45 -443
  91. package/agentic/code/frameworks/sdlc-complete/rules/config-in-environment.md +2 -0
  92. package/agentic/code/frameworks/sdlc-complete/rules/conversable-agent-interface.md +4 -0
  93. package/agentic/code/frameworks/sdlc-complete/rules/criticality-panel-sizing.md +4 -0
  94. package/agentic/code/frameworks/sdlc-complete/rules/disposable-processes.md +2 -0
  95. package/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md +25 -304
  96. package/agentic/code/frameworks/sdlc-complete/rules/failure-mitigation.md +48 -247
  97. package/agentic/code/frameworks/sdlc-complete/rules/few-shot-examples.md +4 -0
  98. package/agentic/code/frameworks/sdlc-complete/rules/hitl-gates.md +31 -277
  99. package/agentic/code/frameworks/sdlc-complete/rules/hitl-patterns.md +4 -0
  100. package/agentic/code/frameworks/sdlc-complete/rules/human-gate-display.md +4 -0
  101. package/agentic/code/frameworks/sdlc-complete/rules/index-generation.md +4 -0
  102. package/agentic/code/frameworks/sdlc-complete/rules/logs-as-event-streams.md +2 -0
  103. package/agentic/code/frameworks/sdlc-complete/rules/mention-wiring.md +5 -0
  104. package/agentic/code/frameworks/sdlc-complete/rules/no-attribution.md +4 -0
  105. package/agentic/code/frameworks/sdlc-complete/rules/progressive-disclosure.md +4 -0
  106. package/agentic/code/frameworks/sdlc-complete/rules/provenance-tracking.md +39 -349
  107. package/agentic/code/frameworks/sdlc-complete/rules/qualified-references.md +4 -0
  108. package/agentic/code/frameworks/sdlc-complete/rules/reasoning-sections.md +4 -0
  109. package/agentic/code/frameworks/sdlc-complete/rules/reproducibility-validation.md +4 -0
  110. package/agentic/code/frameworks/sdlc-complete/rules/reproducibility.md +4 -0
  111. package/agentic/code/frameworks/sdlc-complete/rules/research-metadata.md +4 -0
  112. package/agentic/code/frameworks/sdlc-complete/rules/sdlc-orchestration.md +2 -0
  113. package/agentic/code/frameworks/sdlc-complete/rules/self-maintenance.md +5 -0
  114. package/agentic/code/frameworks/sdlc-complete/rules/stateless-processes.md +2 -0
  115. package/agentic/code/frameworks/sdlc-complete/rules/tao-loop.md +25 -274
  116. package/agentic/code/frameworks/sdlc-complete/rules/thought-protocol.md +4 -0
  117. package/agentic/code/frameworks/sdlc-complete/rules/token-security.md +4 -0
  118. package/agentic/code/frameworks/sdlc-complete/rules/versioning.md +4 -0
  119. package/agentic/code/frameworks/sdlc-complete/skills/doc-sync/SKILL.md +95 -206
  120. package/agentic/code/frameworks/sdlc-complete/templates/openhuman/AGENTS.md.aiwg-template +5 -0
  121. package/agentic/code/frameworks/security-engineering/rules/RULES-INDEX.md +7 -19
  122. package/agentic/code/frameworks/security-engineering/rules/api-abi-stability.md +1 -0
  123. package/agentic/code/frameworks/security-engineering/rules/banned-apis.md +1 -0
  124. package/agentic/code/frameworks/security-engineering/rules/ci-action-pinning.md +4 -0
  125. package/agentic/code/frameworks/security-engineering/rules/committer-2fa-required.md +1 -0
  126. package/agentic/code/frameworks/security-engineering/rules/crypto-flag-verification.md +1 -0
  127. package/agentic/code/frameworks/security-engineering/rules/dependency-source-policy.md +4 -0
  128. package/agentic/code/frameworks/security-engineering/rules/no-adhoc-kdf.md +1 -0
  129. package/agentic/code/frameworks/security-engineering/rules/no-binary-blobs.md +1 -0
  130. package/agentic/code/frameworks/security-engineering/rules/no-confusable-unicode.md +1 -0
  131. package/agentic/code/frameworks/security-engineering/rules/no-key-reuse-across-purposes.md +1 -0
  132. package/agentic/code/frameworks/security-engineering/rules/no-unauthenticated-encryption.md +1 -0
  133. package/agentic/code/frameworks/security-engineering/rules/strict-toolchain.md +1 -0
  134. package/agentic/code/providers/capability-matrix.yaml +20 -0
  135. package/dist/src/mcp/elicitation.mjs +149 -0
  136. package/dist/src/mcp/server.mjs +7 -0
  137. package/dist/src/mcp/tools/interaction.mjs +87 -0
  138. package/dist/src/providers/capability-matrix.d.ts +27 -0
  139. package/dist/src/providers/capability-matrix.d.ts.map +1 -1
  140. package/dist/src/providers/capability-matrix.js.map +1 -1
  141. package/package.json +3 -1
  142. package/plugins/codex-sdlc/skills/doc-sync/SKILL.md +95 -187
  143. package/plugins/sdlc/skills/doc-sync/SKILL.md +95 -187
  144. package/plugins/utils/skills/doc-sync/SKILL.md +56 -354
  145. package/tools/agents/providers/base.mjs +145 -5
  146. package/tools/agents/providers/claude.mjs +10 -0
  147. package/tools/agents/providers/codex.mjs +13 -0
  148. package/tools/agents/providers/copilot.mjs +13 -0
  149. package/tools/agents/providers/cursor.mjs +13 -0
  150. package/tools/agents/providers/factory.mjs +13 -0
  151. package/tools/agents/providers/hermes.mjs +11 -1
  152. package/tools/agents/providers/openclaw.mjs +10 -0
  153. package/tools/agents/providers/opencode.mjs +14 -0
  154. package/tools/agents/providers/windsurf.mjs +13 -0
  155. package/tools/cli/doctor.mjs +50 -0
  156. package/tools/lint/claude-context-inventory.mjs +328 -0
  157. package/tools/migrations/add-rule-enforcement-frontmatter.mjs +204 -0
  158. package/tools/validation/claude-context-repro.mjs +322 -0
  159. package/tools/warp/setup-warp.mjs +14 -0
@@ -9,13 +9,11 @@ Safety and authoring rules for the `setup.aiwg.io/v1` SetupManifest language and
9
9
  ### HIGH
10
10
 
11
11
  #### installer-safety
12
- **Summary**: 7 mandatory safety behaviors for installer-agent and setup-run: show before run, confirm destructive operations, validate schema before execution, treat agentic steps as exception-handling only, collect all required params before execution begins, never put secrets in manifests, and treat platform mismatches as skips not errors.
13
- **When to apply**: Executing any SetupManifest, generating manifests, implementing setup-run or setup-validate skills, reviewing installer output for safety compliance
12
+ **Summary**: 7 mandatory safety behaviors for installer-agent and setup-run: show before run, confirm destructive operations, validate schema before execution, treat agentic steps as exception-handling only, collect all required params before execution…
14
13
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/agentic-installer/rules/installer-safety.md
15
14
 
16
15
  #### installer-authoring
17
- **Summary**: 5 authoring rules for SetupManifest files and script templates: script-first design (agentic steps are exception handling only), always source lib scripts in bash/PowerShell templates, manifests describe while scripts act, one manifest per logical installation unit, every manifest needs a recovery procedure.
18
- **When to apply**: Writing or reviewing setup.manifest.yaml files, generating script templates, authoring setup-generate skill output, code review of installer artifacts
16
+ **Summary**: 5 authoring rules for SetupManifest files and script templates: script-first design (agentic steps are exception handling only), always source lib scripts in bash/PowerShell templates, manifests describe while scripts act, one manifest per…
19
17
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/agentic-installer/rules/installer-authoring.md
20
18
 
21
19
  ---
@@ -1,4 +1,5 @@
1
1
  ---
2
+ enforcement: high
2
3
  name: installer-authoring
3
4
  description: Authoring rules for setup.aiwg.io/v1 SetupManifest files and script templates. Enforces script-first design, template reuse, and consistent manifest structure.
4
5
  type: feedback
@@ -7,6 +8,7 @@ priority: HIGH
7
8
 
8
9
  # Installer Authoring Rules
9
10
 
11
+ **Enforcement Level**: HIGH
10
12
  Rules for writing `setup.aiwg.io/v1` SetupManifest files and their accompanying scripts.
11
13
 
12
14
  ## Rule 1: Script-First Design
@@ -1,4 +1,5 @@
1
1
  ---
2
+ enforcement: high
2
3
  name: installer-safety
3
4
  description: Mandatory safety behaviors for the installer-agent and setup-run skill. Prevents destructive actions, enforces user authorization, and protects against script injection.
4
5
  type: feedback
@@ -7,6 +8,7 @@ priority: HIGH
7
8
 
8
9
  # Installer Safety Rules
9
10
 
11
+ **Enforcement Level**: HIGH
10
12
  Mandatory behaviors for all agents and skills operating on `setup.aiwg.io/v1` manifests.
11
13
 
12
14
  ## Rule 1: Show Before Run
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: medium
3
+ ---
4
+
1
5
  # Addon Boundaries
2
6
 
3
7
  **Enforcement Level**: MEDIUM
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: high
3
+ ---
4
+
1
5
  # AIWG CI Safety
2
6
 
3
7
  **Enforcement Level**: HIGH
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: medium
3
+ ---
4
+
1
5
  # AIWG Directory Reference Contract
2
6
 
3
7
  **Enforcement Level**: MEDIUM
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: medium
3
+ ---
4
+
1
5
  # Component Completeness Rules
2
6
 
3
7
  **Enforcement Level**: MEDIUM
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: high
3
+ ---
4
+
1
5
  # No Circular Skill Calls
2
6
 
3
7
  **Enforcement Level**: HIGH
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: high
3
+ ---
4
+
1
5
  # Skill Placement Rules
2
6
 
3
7
  **Enforcement Level**: HIGH
@@ -9,140 +9,113 @@ Core meta-utility rules for agent coordination, context management, and platform
9
9
  ### HIGH
10
10
 
11
11
  #### auto-compact-continue
12
- **Summary**: The answer to "should I keep working?" is always YES — until the task's measurable completion criteria are met or the user redirects. Context pressure, long tool outputs, and high iteration counts are not scope questions. When context fills, the right response is to compact, checkpoint to durable storage (activity log, progress file at `.aiwg/working/<task>-progress.md`, git history, AIWG memory), and continue. Trust platform auto-compact (REF-910); load-bearing state must live in `CLAUDE.md` / `AGENTS.md` / `AIWG.md` / activity log / progress file / git / `.aiwg/working/` — never only in conversation turns. Maintain a `## Compact Instructions` section so the summarizer preserves completion criteria, last successful step, failed approaches (do not let them be re-attempted), and authorization questions. Apply aggressive in-session compression (REF-122: passive=6% savings, aggressive=22.7%); update the progress file every 10–15 tool calls on long tasks. Exceptions: authorization gates (per `human-authorization`), 3-attempts-failed escalation (per `anti-laziness` Rule 6), explicit user redirect, genuinely ambiguous new directive classification (per `skill-discovery` Rule 0). "Should I continue?" is never the right question.
13
- **When to apply**: Any long-running session; before context fills; after long tool outputs; when crossing iteration thresholds; when resuming after compaction; when tempted to ask the user permission to keep going
12
+ **Summary**: The answer to "should I keep working?" is always YES — until the task's measurable completion criteria are met or the user redirects.
14
13
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/auto-compact-continue.md
15
14
 
16
15
  #### cli-secondary
17
- **Summary**: AIWG is agentic-first. The agent's strict priority order for any action: (1) **local skill** already loaded in context (kernel skills, framework quickrefs, deployed agents), (2) **discovered skill** via `aiwg discover` + `aiwg show`, (3) raw CLI command, (4) manual file edits as last resort. Raw CLI commands augment skill workflows; they do not replace skills. The skill carries the priming (pre-flight checks, dry-run preview, preservation logic, gates) and owns orchestration, final formatting, presentation, synthesis, and recovery that the CLI alone lacks. Sole exception: discovery/finder commands (`aiwg discover`, `aiwg show`, `aiwg list`, `aiwg status`, `aiwg version`, `aiwg runtime-info`, status/info subcommands) stay primary — they ARE the priming entry points and the bridge from priority 2 to priority 1. For mixed commands (`aiwg index`, `aiwg packages`, `aiwg ops`, `aiwg storage`), classify per subcommand. Includes a pairing table covering use/refresh/regenerate/doctor/init/promote/scaffold-*/add-*/doc-sync/lint/cleanup-audit/sdlc-accelerate/ralph/mc/steward/index build/ops actions/storage migrate.
18
- **When to apply**: Before invoking any AIWG CLI command, before writing skill/agent docs that reference CLI commands, when updating quickrefs or routing tables, when filing pairings audits
16
+ **Summary**: AIWG is agentic-first.
19
17
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/cli-secondary.md
20
18
 
21
19
  #### no-time-estimates
22
- **Summary**: Never produce wall-clock time estimates in AI-assisted work contexts. Human+AI development velocity is unknowable and varies non-linearly with operator skill, model quality, task decomposability, and centaur configuration. Instead, express effort in agent-oriented units: scope count (atomic deliverables), agent count and roles, parallelism map (parallel vs sequential batches), and pass estimate (iterations to quality gate). Prohibited phrases include "N days/hours/weeks," "expected duration," and "this should be quick."
23
- **When to apply**: Planning, task decomposition, sprint estimation, phase planning, completion reports, responding to "how long will this take?" questions
20
+ **Summary**: Never produce wall-clock time estimates in AI-assisted work contexts.
24
21
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/no-time-estimates.md
25
22
 
26
23
  #### god-session
27
- **Summary**: A single agent that tries to do everything — research, implement, test, document, deploy — is a god session. God sessions are hard to debug, impossible to parallelize, and produce inconsistent results. Agent definitions must have a focused scope of ≤5–7 distinct responsibilities. When an agent discovers adjacent work mid-session, file issues rather than absorbing them.
28
- **When to apply**: Agent definition creation, reviewing agent scope, mid-session scope creep detection, multi-domain task planning
24
+ **Summary**: A single agent that tries to do everything — research, implement, test, document, deploy — is a god session.
29
25
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/god-session.md
30
26
 
31
27
  #### vague-discretion
32
- **Summary**: Loop termination conditions and quality gates must be concrete and measurable. Vague conditions — "good enough", "zero bugs", "comprehensive", "thorough" — cannot be evaluated consistently and cause infinite loops, premature exits, or wildly varying quality. Replace with specific thresholds, counts, or verifiable outcomes. Every loop must also have a `max-cycles` or `max-iterations` escape hatch.
33
- **When to apply**: Writing skill loop conditions, Ralph completion criteria, phase gate criteria, quality rubrics, any "done when" specification
28
+ **Summary**: Loop termination conditions and quality gates must be concrete and measurable.
34
29
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/vague-discretion.md
35
30
 
36
31
  #### subagent-scoping
37
- **Summary**: Each subagent gets ONE focused task with minimal context. Decompose complex work into parallel subagents rather than overloading one. Prompt budget <20% of context window per subagent. No delegation chains deeper than 2 levels. Spawn many focused subagents over few overloaded ones. When `AIWG_CONTEXT_WINDOW` is set, concurrent parallel count must respect the budget limit.
38
- **When to apply**: Task delegation, subagent spawning, parallel dispatch, orchestrator fan-out, context budget planning
32
+ **Summary**: Each subagent gets ONE focused task with minimal context.
39
33
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md
40
34
 
41
35
  #### instruction-comprehension
42
- **Summary**: Fully parse and confirm understanding of all user instructions before acting. Extract constraints (prohibitions first), then requirements, then preferences. Track multi-part requests to completion. Re-read original instructions on failure instead of guessing. Prevent instruction drift on long tasks by periodically re-checking against original requirements. Never override user preferences with "best practices."
43
- **When to apply**: Every user request, multi-part tasks, specification compliance, instruction drift detection, correction handling
36
+ **Summary**: Fully parse and confirm understanding of all user instructions before acting.
44
37
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/instruction-comprehension.md
45
38
 
46
39
  #### research-before-decision
47
- **Summary**: Research codebase, docs, and sources before making technical decisions. Prevents guessing APIs, blind retries, and missing context. Pattern: IDENTIFY > SEARCH > EXTRACT > REASON > ACT > VERIFY. When an action fails, research the root cause instead of retrying with variations (whack-a-mole detection). Read error messages completely — they frequently contain the answer. Check existing project patterns before creating new ones.
48
- **When to apply**: Technical decision-making, API usage, configuration changes, dependency selection, error diagnosis, import resolution
40
+ **Summary**: Research codebase, docs, and sources before making technical decisions.
49
41
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md
50
42
 
51
43
  #### escalation-discipline
52
- **Summary**: Agents must summarize before moving above their declared default model tier, confirm Tier 3 explicitly, and never auto-escalate unattended bots to premium tiers. Escalation confirmation is a human-authorization gate: state the need, target tier, and bounded next task before spending higher-tier tokens or routing to a stronger agent.
53
- **When to apply**: Model-tier routing, budget-sensitive agents, unattended bots, requests for deep/debug/thorough work, high-impact legal/financial/medical/security work, any recommendation to use a stronger or premium model
44
+ **Summary**: Agents must summarize before moving above their declared default model tier, confirm Tier 3 explicitly, and never auto-escalate unattended bots to premium tiers.
54
45
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/escalation-discipline.md
55
46
 
56
47
  #### tool-quota
57
- **Summary**: Tool-using agents must track per-session tool calls, stop repeating similar failed calls without progress, and honor `tool_quota` / `loop_detection` declarations when present. Defaults: same failing call retries <=3, similar-call window <=5, one tool <=30 calls in a focused session, high-cost external tools <=10. When a quota would be exceeded, summarize attempts, facts learned, and the narrow next action instead of continuing an unbounded loop.
58
- **When to apply**: Tool-heavy sessions, unattended bots, repeated tool failures, external fetch loops, shell retry loops, agent definitions with `tool_quota` or `loop_detection`
48
+ **Summary**: Tool-using agents must track per-session tool calls, stop repeating similar failed calls without progress, and honor `tool_quota` / `loop_detection` declarations when present.
59
49
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/tool-quota.md
60
50
 
61
51
  #### quiet-mode
62
- **Summary**: Chat and bot agents in group rooms should respond only when mentioned, replied to, or invoked by a direct command. Multi-bot rooms require yielding to the specifically addressed bot. Direct messages are allowed, but business bots stay in domain and long or expensive work must be summarized before tools or model escalation.
63
- **When to apply**: Telegram/group-chat bots, multi-bot rooms, DMs to business bots, scheduled chat agents, ambient room listeners, platforms without native behavior support
52
+ **Summary**: Chat and bot agents in group rooms should respond only when mentioned, replied to, or invoked by a direct command.
64
53
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/quiet-mode.md
65
54
 
66
55
  #### respect-repo-access-manifest
67
- **Summary**: Tool capability is not authorization. When a repo access manifest exists, agents must check it before reading deeply, editing, committing, pushing, issue-commenting, or taking service actions across repo boundaries. Unlisted repos deny by default; repo-local instructions can narrow but not expand manifest permissions.
68
- **When to apply**: Multi-repo workspaces, adjacent repo handoffs, issue comments in sibling repos, commits/pushes, service actions, any work outside the current repo root
56
+ **Summary**: Tool capability is not authorization.
69
57
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/respect-repo-access-manifest.md
70
58
 
71
59
  #### skill-discovery
72
- **Summary**: Most AIWG skills are NOT loaded into your context — only the kernel set (framework quickrefs + core utilities). The bulk lives at `<provider-dir>/.aiwg/skills/` and is reachable only through the artifact index. The **discover-first protocol** (Rule 1.5) mandates that `aiwg discover` MUST be the first information-gathering tool call for any query mentioning AIWG, framework names (sdlc/research/forensics/ops/security-engineering/marketing/media-curator/knowledge-base), or capability keywords (skill/agent/rule/command/addon/workflow). Filesystem `Grep`/`Glob`/`Read` against `.claude/`, `.factory/`, `.codex/`, `.warp/`, `.cursor/`, `.windsurf/`, `.opencode/`, `~/.hermes/`, `~/.openclaw/`, or `agentic/code/` is FORBIDDEN for AIWG-related lookups until discover has been consulted. When subagent delegation is available, prefer the `aiwg-finder` subagent. You must also query discover before declining a request as out-of-scope or improvising a custom workflow.
73
- **When to apply**: ANY query mentioning AIWG, a framework name, or a capability keyword (skill/agent/rule/command); before any filesystem search on provider artifact directories; before declining as out-of-scope; before improvising a custom workflow when an AIWG skill might exist
60
+ **Summary**: Most AIWG skills are NOT loaded into your context — only the kernel set (framework quickrefs + core utilities).
74
61
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/skill-discovery.md
75
62
 
76
63
  #### native-ux-tools
77
- **Summary**: Agents MUST prefer platform-native interaction tools (e.g., AskUserQuestion in Claude Code) over plain text output for interactive questions. Check tool availability before asking, fall back to formatted markdown if unavailable. One question per interaction turn. Includes platform capability matrix for all 8 supported platforms.
78
- **When to apply**: Interactive commands (--interactive flag), decision gates, user confirmations, intake wizards, any agent question
64
+ **Summary**: Agents MUST prefer platform-native interaction tools (e.g., AskUserQuestion in Claude Code) over plain text output for interactive questions.
79
65
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md
80
66
 
81
67
  #### human-authorization
82
- **Summary**: Agents must seek explicit human authorization before irreversible or high-stakes actions — especially when those actions are implied by findings rather than explicitly requested. A recommendation is not authorization to act. Covers: removal of artifacts, scope expansion beyond task, closing work items with implied resolution, acting on research findings. Pattern: discover → report → await authorization → act. Agents must proactively recognize scope boundaries; don't rely on system-level friction as the only gate.
83
- **When to apply**: Any action not explicitly stated in the task, removal of files/artifacts/components, scope expansion, closing issues, acting on review findings or recommendations, changes to shared resources
68
+ **Summary**: Agents must seek explicit human authorization before irreversible or high-stakes actions — especially when those actions are implied by findings rather than explicitly requested.
84
69
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/human-authorization.md
85
70
 
86
71
  #### delivery-policy
87
- **Summary**: AIWG projects declare their git workflow in `.aiwg/aiwg.config` `delivery` block (`mode`: direct / feature-branch / pr-required, `default_branch`, `require_ci_green`, `force_push_policy`, `auto_close_issues`). Agents MUST read this before recommending or executing branch/PR/commit actions. `direct` = commit straight to main with `Closes #N`; `feature-branch` = branch only; `pr-required` = branch + PR + review. Use configured `remotes.{primary,issue_tracker,ci}` rather than guessing. Don't ask the user to pick a workflow when the config already answers it.
88
- **When to apply**: Any branch creation, PR opening, push to default_branch, force-push, issue closure via commit message, interactive question about git workflow
72
+ **Summary**: AIWG projects declare their git workflow in `.aiwg/aiwg.config` `delivery` block (`mode`: direct / feature-branch / pr-required, `default_branch`, `require_ci_green`, `force_push_policy`, `auto_close_issues`).
89
73
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/delivery-policy.md
90
74
 
91
75
  #### sdlc-right-sizing
92
- **Summary**: Match SDLC artifacts to the actual scope of change. Most work doesn't need intake or full Inception — bugfixes and small/medium features warrant only an issue and maybe an ADR. Reserve intake/Inception/phase-gate flows for substantial new work meeting ≥2 trigger criteria (new deployable artifact, multi-component, stakeholders beyond requester, contract change, multi-phase span, refactor >20% of a component, or explicit user request). When unsure, ask ONE specific question — don't present multi-option menus of "intake/plan/ADR/full pipeline." ADRs are cheap and encouraged independent of intake. Issues are the default unit of work. The `sdlc-orchestration` rule layers right-sizing in as Step 0 before any flow launch.
93
- **When to apply**: Before invoking intake-wizard, intake-start, or any SDLC flow command; whenever an agent is tempted to escalate a small change into formal SDLC pipeline work; when interpreting user requests for "features" / "planning" / "what would it take to..."
76
+ **Summary**: Match SDLC artifacts to the actual scope of change.
94
77
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/sdlc-right-sizing.md
95
78
 
96
79
  ### MEDIUM
97
80
 
98
81
  #### context-bloat
99
- **Summary**: Sub-agents should receive only the context directly relevant to their task. Pass file paths (not file contents) when the agent will read files itself. Do not forward conversation history — sub-agents are clean-slate processes. Before dispatching, audit the prompt: if >50% is background rather than task-critical information, trim aggressively. Complements `subagent-scoping` with a cost-focused lens on information quantity.
100
- **When to apply**: Sub-agent prompt construction, orchestrator fan-out, multi-agent chaining, cost optimization reviews
82
+ **Summary**: Sub-agents should receive only the context directly relevant to their task.
101
83
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/context-bloat.md
102
84
 
103
85
  #### parallel-then-synthesize
104
- **Summary**: Spawning parallel agents for *related* analytical work that feeds one conclusion often produces lower quality than a single focused agent — coordination overhead and context fragmentation outweigh parallelism benefits. Parallelism is correct when tasks are genuinely independent (each agent's output stands alone). It is counterproductive when the synthesis step requires choosing between conflicting assessments rather than combining complementary outputs.
105
- **When to apply**: Designing parallel dispatch patterns, analytical workflows, deciding when to parallelize vs. single-agent, RLM divide-conquer design
86
+ **Summary**: Spawning parallel agents for *related* analytical work that feeds one conclusion often produces lower quality than a single focused agent — coordination overhead and context fragmentation outweigh parallelism benefits.
106
87
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/parallel-then-synthesize.md
107
88
 
108
89
  #### implicit-dependencies
109
- **Summary**: Sub-agents must receive all required context explicitly — they have no access to the parent session's conversation, prior agent outputs, or any context not in their prompt. Never assume a sub-agent will "remember" what was discussed earlier. Pass prior outputs explicitly when chaining agents. The inverse of context-bloat: this rule prevents giving too little context.
110
- **When to apply**: Sub-agent prompt construction, agent chaining, orchestrator fan-out, any time prior session knowledge needs to carry forward
90
+ **Summary**: Sub-agents must receive all required context explicitly — they have no access to the parent session's conversation, prior agent outputs, or any context not in their prompt.
111
91
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/implicit-dependencies.md
112
92
 
113
93
  #### context-budget
114
- **Summary**: When `AIWG_CONTEXT_WINDOW` is set in project context, agents must respect the declared context budget for parallel subagent spawning. Opt-in directive with lookup tables: max parallel count scales from 1 (32k) to 20 (512k+). Formula: `max(1, floor(context_window / 50000))`. Includes compaction guidance per tier (aggressive, moderate, standard, relaxed) and per-subagent output size targets.
115
- **When to apply**: Parallel subagent spawning, task scheduling, agent loop batching, orchestrator fan-out on constrained systems
94
+ **Summary**: When `AIWG_CONTEXT_WINDOW` is set in project context, agents must respect the declared context budget for parallel subagent spawning.
116
95
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/context-budget.md
117
96
 
118
97
  #### diagram-generation
119
- **Summary**: Diagram generation is a standard output alongside every major documentation artifact. Defines required diagram types per artifact (C4 for SAD, ER for data models, sequence for APIs, DFD for threat models). MermaidJS is default; PlantUML for C4/formal UML. Source must be committed alongside rendered output. Max 15 nodes per diagram; split into sub-diagrams if more complex.
120
- **When to apply**: Architecture documentation, threat modeling, API design, deployment planning, any artifact with visual communication needs
98
+ **Summary**: Diagram generation is a standard output alongside every major documentation artifact.
121
99
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/diagram-generation.md
122
100
 
123
101
  #### agent-deployment
124
- **Summary**: Rules for working with agent definitions and multi-provider deployment. Covers the agent ecosystem (general-purpose, SDLC, marketing), deployment commands for all 8 platforms, model override configuration, agent metadata structure (YAML frontmatter with name, model, tools, category), tool selection guidelines per task type, and parallel execution patterns with agent isolation.
125
- **When to apply**: Agent definition creation, multi-provider deployment, tool selection for agents, parallel agent execution
102
+ **Summary**: Rules for working with agent definitions and multi-provider deployment.
126
103
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/agent-deployment.md
127
104
 
128
105
  #### activity-log
129
- **Summary**: Agents must append a single-line entry to `.aiwg/activity.log` after completing any create, update, delete, ingest, deploy, archive, promote, lint, or actioned query operation on AIWG artifacts. Format: `## [YYYY-MM-DD HH:MM] <operation> | <summary>`. Entries are appended only after successful operations; log write failures are non-blocking. Produces a unified cross-framework timeline queryable via `aiwg activity-log`.
130
- **When to apply**: Any agent that writes, removes, or promotes artifacts in `.aiwg/`; post-deploy steps; lint/validation passes; archive operations
106
+ **Summary**: Agents must append a single-line entry to `.aiwg/activity.log` after completing any create, update, delete, ingest, deploy, archive, promote, lint, or actioned query operation on AIWG artifacts.
131
107
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/activity-log.md
132
108
 
133
109
  #### debug-source-not-output
134
- **Summary**: When debugging in multi-project or monorepo contexts, agents must navigate to the originating source code rather than analyze build artifacts (minified JS, compiled bundles, vendored output). The source project is the right place to investigate; output is downstream of the bug. Detect output paths (`dist/`, `build/`, `node_modules/`, `*.min.*`) and map back to the source project before reasoning.
135
- **When to apply**: Debugging in monorepos, investigating issues in installed npm/cargo packages, tracing errors that surface in compiled artifacts
110
+ **Summary**: When debugging in multi-project or monorepo contexts, agents must navigate to the originating source code rather than analyze build artifacts (minified JS, compiled bundles, vendored output).
136
111
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/debug-source-not-output.md
137
112
 
138
113
  #### post-commit-index-refresh
139
- **Summary**: After a successful git commit, check whether artifact indices are configured (`.aiwg/index/`) and rebuild any indices whose source paths were touched by the commit. Stale indices cause `aiwg index query` to return outdated results, mislead downstream agents, and silently corrupt traceability chains.
140
- **When to apply**: Any post-commit step in AIWG-managed projects; agent loops that touch artifact source paths and need fresh index reads downstream
114
+ **Summary**: After a successful git commit, check whether artifact indices are configured (`.aiwg/index/`) and rebuild any indices whose source paths were touched by the commit.
141
115
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/post-commit-index-refresh.md
142
116
 
143
117
  #### soul-enforcement
144
- **Summary**: When `SOUL.md` is present at project root, agents must read it fully and internalize the identity, worldview, and voice it defines before generating any content. The soul takes priority over generic persona defaults — it is not a style guide, it is who the agent is for the duration of the session.
145
- **When to apply**: Any content-generation task in a project with a SOUL.md file; voice/persona handoffs; multi-agent collaborations where consistent identity matters
118
+ **Summary**: When `SOUL.md` is present at project root, agents must read it fully and internalize the identity, worldview, and voice it defines before generating any content.
146
119
  **Full rule**: @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/soul-enforcement.md
147
120
 
148
121
  ---
@@ -1,3 +1,7 @@
1
+ ---
2
+ enforcement: medium
3
+ ---
4
+
1
5
  # Activity Log Rule
2
6
 
3
7
  **Enforcement Level**: MEDIUM
@@ -1,4 +1,5 @@
1
1
  ---
2
+ enforcement: high
2
3
  paths:
3
4
  - ".claude/agents/**"
4
5
  - ".factory/droids/**"
@@ -10,6 +11,7 @@ paths:
10
11
 
11
12
  # Agent Deployment Rules
12
13
 
14
+ **Enforcement Level**: HIGH
13
15
  These rules apply when working with agent definitions and multi-provider deployment.
14
16
 
15
17
  ## Agent Ecosystem