@event4u/agent-config 1.19.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent-src/commands/agent-handoff.md +14 -10
- package/.agent-src/commands/agents.md +1 -1
- package/.agent-src/commands/bug-fix.md +1 -1
- package/.agent-src/commands/bug-investigate.md +2 -2
- package/.agent-src/commands/chat-history/import.md +166 -0
- package/.agent-src/commands/chat-history/learn.md +178 -0
- package/.agent-src/commands/chat-history/show.md +17 -18
- package/.agent-src/commands/chat-history.md +26 -25
- package/.agent-src/commands/compress.md +12 -0
- package/.agent-src/commands/context/create.md +2 -2
- package/.agent-src/commands/context.md +1 -1
- package/.agent-src/commands/copilot-agents.md +1 -1
- package/.agent-src/commands/council/default.md +21 -12
- package/.agent-src/commands/council.md +1 -1
- package/.agent-src/commands/create-pr.md +28 -8
- package/.agent-src/commands/e2e-heal.md +1 -1
- package/.agent-src/commands/e2e-plan.md +1 -1
- package/.agent-src/commands/feature/dev.md +3 -3
- package/.agent-src/commands/feature.md +1 -1
- package/.agent-src/commands/fix/seeder.md +2 -2
- package/.agent-src/commands/fix.md +1 -1
- package/.agent-src/commands/jira-ticket.md +1 -1
- package/.agent-src/commands/judge.md +2 -2
- package/.agent-src/commands/memory.md +1 -1
- package/.agent-src/commands/mode.md +5 -5
- package/.agent-src/commands/module.md +1 -1
- package/.agent-src/commands/onboard.md +4 -4
- package/.agent-src/commands/optimize/augmentignore.md +1 -1
- package/.agent-src/commands/optimize-prompt.md +61 -0
- package/.agent-src/commands/optimize.md +1 -1
- package/.agent-src/commands/override.md +1 -1
- package/.agent-src/commands/review-changes.md +1 -1
- package/.agent-src/commands/review-routing.md +1 -1
- package/.agent-src/commands/roadmap.md +1 -1
- package/.agent-src/commands/set-cost-profile.md +3 -3
- package/.agent-src/commands/sync-agent-settings.md +2 -2
- package/.agent-src/commands/sync-gitignore.md +1 -1
- package/.agent-src/commands/tests/create.md +2 -2
- package/.agent-src/commands/tests.md +1 -1
- package/.agent-src/commands/threat-model.md +4 -4
- package/.agent-src/contexts/authority/commit-mechanics.md +14 -1
- package/.agent-src/contexts/authority/destructive-mechanics.md +14 -1
- package/.agent-src/contexts/authority/scope-mechanics.md +5 -0
- package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +76 -0
- package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
- package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +4 -4
- package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +98 -0
- package/.agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +93 -0
- package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +125 -9
- package/.agent-src/contexts/execution/autonomy-mechanics.md +44 -0
- package/.agent-src/contexts/model-recommendations.md +2 -2
- package/.agent-src/contexts/override-system.md +1 -1
- package/.agent-src/personas/product-owner.md +2 -2
- package/.agent-src/personas/qa.md +1 -1
- package/.agent-src/rules/agent-authority.md +5 -6
- package/.agent-src/rules/agent-docs.md +11 -53
- package/.agent-src/rules/analysis-skill-routing.md +10 -40
- package/.agent-src/rules/architecture.md +6 -1
- package/.agent-src/rules/artifact-drafting-protocol.md +5 -0
- package/.agent-src/rules/artifact-engagement-recording.md +23 -59
- package/.agent-src/rules/ask-when-uncertain.md +24 -47
- package/.agent-src/rules/augment-portability.md +14 -62
- package/.agent-src/rules/augment-source-of-truth.md +10 -1
- package/.agent-src/rules/autonomous-execution.md +17 -98
- package/.agent-src/rules/capture-learnings.md +9 -80
- package/.agent-src/rules/cli-output-handling.md +12 -42
- package/.agent-src/rules/command-suggestion-policy.md +25 -73
- package/.agent-src/rules/commit-conventions.md +9 -58
- package/.agent-src/rules/commit-policy.md +16 -47
- package/.agent-src/rules/context-hygiene.md +5 -0
- package/.agent-src/rules/direct-answers.md +21 -42
- package/.agent-src/rules/docker-commands.md +11 -45
- package/.agent-src/rules/docs-sync.md +10 -56
- package/.agent-src/rules/downstream-changes.md +5 -0
- package/.agent-src/rules/e2e-testing.md +9 -44
- package/.agent-src/rules/guidelines.md +13 -75
- package/.agent-src/rules/improve-before-implement.md +10 -2
- package/.agent-src/rules/language-and-tone.md +35 -69
- package/.agent-src/rules/laravel-translations.md +11 -40
- package/.agent-src/rules/markdown-safe-codeblocks.md +4 -0
- package/.agent-src/rules/minimal-safe-diff.md +4 -0
- package/.agent-src/rules/missing-tool-handling.md +4 -0
- package/.agent-src/rules/model-recommendation.md +9 -61
- package/.agent-src/rules/no-attribution-footers.md +53 -0
- package/.agent-src/rules/no-cheap-questions.md +11 -27
- package/.agent-src/rules/no-council-references.md +76 -0
- package/.agent-src/rules/no-roadmap-references.md +8 -1
- package/.agent-src/rules/non-destructive-by-default.md +13 -43
- package/.agent-src/rules/onboarding-gate.md +9 -117
- package/.agent-src/rules/package-ci-checks.md +10 -37
- package/.agent-src/rules/php-coding.md +10 -55
- package/.agent-src/rules/preservation-guard.md +9 -0
- package/.agent-src/rules/review-routing-awareness.md +9 -97
- package/.agent-src/rules/reviewer-awareness.md +8 -83
- package/.agent-src/rules/roadmap-progress-sync.md +7 -170
- package/.agent-src/rules/role-mode-adherence.md +6 -2
- package/.agent-src/rules/rule-type-governance.md +8 -66
- package/.agent-src/rules/runtime-safety.md +5 -0
- package/.agent-src/rules/scope-control.md +17 -62
- package/.agent-src/rules/security-sensitive-stop.md +7 -1
- package/.agent-src/rules/size-enforcement.md +6 -1
- package/.agent-src/rules/skill-improvement-trigger.md +9 -49
- package/.agent-src/rules/skill-quality.md +7 -64
- package/.agent-src/rules/slash-command-routing-policy.md +11 -63
- package/.agent-src/rules/think-before-action.md +22 -87
- package/.agent-src/rules/token-efficiency.md +10 -74
- package/.agent-src/rules/token-optimizer-maintenance.md +68 -0
- package/.agent-src/rules/tool-safety.md +4 -0
- package/.agent-src/rules/ui-audit-gate.md +25 -61
- package/.agent-src/rules/upstream-proposal.md +9 -67
- package/.agent-src/rules/user-interaction.md +25 -95
- package/.agent-src/rules/verify-before-complete.md +1 -1
- package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -1
- package/.agent-src/skills/ai-council/SKILL.md +69 -5
- package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
- package/.agent-src/skills/analysis-skill-router/SKILL.md +3 -3
- package/.agent-src/skills/artisan-commands/SKILL.md +2 -2
- package/.agent-src/skills/authz-review/SKILL.md +1 -1
- package/.agent-src/skills/aws-infrastructure/SKILL.md +5 -5
- package/.agent-src/skills/blast-radius-analyzer/SKILL.md +8 -8
- package/.agent-src/skills/bug-analyzer/SKILL.md +5 -5
- package/.agent-src/skills/code-refactoring/SKILL.md +4 -4
- package/.agent-src/skills/code-review/SKILL.md +2 -2
- package/.agent-src/skills/command-writing/SKILL.md +11 -0
- package/.agent-src/skills/composer-packages/SKILL.md +2 -2
- package/.agent-src/skills/context-authoring/SKILL.md +11 -0
- package/.agent-src/skills/context-document/SKILL.md +1 -1
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +23 -0
- package/.agent-src/skills/copilot-config/SKILL.md +1 -1
- package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
- package/.agent-src/skills/dependency-upgrade/SKILL.md +2 -2
- package/.agent-src/skills/devcontainer/SKILL.md +2 -2
- package/.agent-src/skills/developer-like-execution/SKILL.md +1 -1
- package/.agent-src/skills/docker/SKILL.md +1 -1
- package/.agent-src/skills/dto-creator/SKILL.md +1 -1
- package/.agent-src/skills/estimate-ticket/SKILL.md +2 -2
- package/.agent-src/skills/fe-design/SKILL.md +4 -4
- package/.agent-src/skills/feature-planning/SKILL.md +5 -5
- package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
- package/.agent-src/skills/laravel/SKILL.md +1 -1
- package/.agent-src/skills/laravel-notifications/SKILL.md +5 -5
- package/.agent-src/skills/laravel-pennant/SKILL.md +1 -1
- package/.agent-src/skills/laravel-pulse/SKILL.md +4 -4
- package/.agent-src/skills/laravel-reverb/SKILL.md +2 -2
- package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -1
- package/.agent-src/skills/md-language-check/SKILL.md +1 -1
- package/.agent-src/skills/migration-creator/SKILL.md +7 -7
- package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
- package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
- package/.agent-src/skills/performance-analysis/SKILL.md +3 -3
- package/.agent-src/skills/pest-testing/SKILL.md +6 -6
- package/.agent-src/skills/php-service/SKILL.md +2 -2
- package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
- package/.agent-src/skills/project-analysis-react/SKILL.md +1 -1
- package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
- package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
- package/.agent-src/skills/project-analyzer/SKILL.md +4 -4
- package/.agent-src/skills/prompt-optimizer/SKILL.md +108 -0
- package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
- package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
- package/.agent-src/skills/rule-writing/SKILL.md +33 -0
- package/.agent-src/skills/sentry-integration/SKILL.md +1 -1
- package/.agent-src/skills/skill-writing/SKILL.md +14 -0
- package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
- package/.agent-src/skills/terraform/SKILL.md +2 -2
- package/.agent-src/skills/terragrunt/SKILL.md +8 -8
- package/.agent-src/skills/test-performance/SKILL.md +5 -5
- package/.agent-src/skills/threat-modeling/SKILL.md +2 -2
- package/.agent-src/skills/token-optimizer/SKILL.md +110 -0
- package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
- package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
- package/.agent-src/templates/AGENTS.md +1 -1
- package/.agent-src/templates/agent-settings.md +25 -41
- package/.agent-src/templates/contexts/tenant-boundaries.md +2 -2
- package/.agent-src/templates/contexts.md +1 -1
- package/.agent-src/templates/copilot-instructions.md +21 -0
- package/.agent-src/templates/copilot-review-instructions.md +76 -0
- package/.agent-src/templates/features.md +1 -1
- package/.agent-src/templates/rule.md +127 -0
- package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +7 -5
- package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -4
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -4
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +2 -3
- package/.agent-src/templates/skill.md +30 -1
- package/.claude-plugin/marketplace.json +11 -4
- package/AGENTS.md +71 -3
- package/CHANGELOG.md +180 -3
- package/README.md +24 -23
- package/config/agent-settings.template.yml +63 -23
- package/config/gitignore-block.txt +11 -4
- package/docs/architecture.md +84 -3
- package/docs/catalog.md +23 -11
- package/docs/contracts/adr-chat-history-split.md +10 -1
- package/docs/contracts/agent-memory-contract.md +1 -1
- package/docs/contracts/command-clusters.md +1 -1
- package/docs/contracts/context-paths.md +2 -1
- package/docs/contracts/cross-wing-handoff.md +133 -0
- package/docs/contracts/file-ownership-matrix.json +678 -609
- package/docs/contracts/hook-architecture-v1.md +8 -1
- package/docs/contracts/iron-law-overrides.txt +25 -0
- package/docs/contracts/kernel-membership.md +273 -0
- package/docs/contracts/load-context-schema.md +26 -11
- package/docs/contracts/memory-visibility-v1.md +8 -24
- package/docs/contracts/pilot/agent-authority.md +24 -0
- package/docs/contracts/pilot/direct-answers.md +70 -0
- package/docs/contracts/pilot/language-and-tone.md +63 -0
- package/docs/contracts/rule-classification.md +170 -0
- package/docs/contracts/rule-router.md +153 -0
- package/docs/customization.md +18 -7
- package/docs/decisions/ADR-001-kernel-swap-deferred.md +109 -0
- package/docs/decisions/ADR-002-kernel-bucket-overrides.md +124 -0
- package/docs/decisions/ADR-rule-kernel-and-router.md +122 -0
- package/docs/getting-started.md +19 -27
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +176 -0
- package/docs/guidelines/agent-infra/rule-type-governance.md +73 -0
- package/docs/guidelines/agent-infra/size-and-scope.md +13 -2
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +119 -0
- package/docs/guidelines/augment-portability-patterns.md +68 -0
- package/docs/guidelines/php/php-coding-patterns.md +62 -0
- package/docs/hook-payload-capture.md +221 -0
- package/docs/migrations/commands-1.15.0.md +17 -12
- package/docs/skills-catalog.md +5 -4
- package/llms.txt +4 -3
- package/package.json +1 -1
- package/scripts/_p43_bodies.py +235 -0
- package/scripts/_p43_compress.py +118 -0
- package/scripts/_p4_migrate.py +199 -0
- package/scripts/_pilot_council_question.py +57 -0
- package/scripts/_pilot_measure.py +53 -0
- package/scripts/agent-config +1 -1
- package/scripts/ai_council/_default_prices.py +4 -4
- package/scripts/ai_council/clients.py +1 -1
- package/scripts/ai_council/modes.py +3 -4
- package/scripts/ai_council/pricing.py +10 -9
- package/scripts/ai_council/session.py +107 -5
- package/scripts/build_linear_digest.py +3 -5
- package/scripts/build_rule_trigger_matrix.py +1 -9
- package/scripts/chat_history.py +952 -596
- package/scripts/check_always_budget.py +39 -6
- package/scripts/check_compressed_paths.py +213 -0
- package/scripts/check_compression.py +15 -0
- package/scripts/check_context_paths.py +1 -0
- package/scripts/check_council_layout.py +105 -0
- package/scripts/check_council_references.py +145 -0
- package/scripts/check_portability.py +2 -0
- package/scripts/check_references.py +14 -2
- package/scripts/check_token_optimizer_freshness.py +131 -0
- package/scripts/compile_router.py +148 -0
- package/scripts/compress.py +219 -11
- package/scripts/council_cli.py +63 -9
- package/scripts/council_prune.py +81 -0
- package/scripts/count_token_optimizer_usage.sh +54 -0
- package/scripts/hook_manifest.yaml +33 -0
- package/scripts/hooks/augment-chat-history.sh +10 -0
- package/scripts/hooks/cowork-dispatcher.sh +98 -0
- package/scripts/hooks/dispatch_hook.py +35 -0
- package/scripts/hooks_status.py +12 -1
- package/scripts/install-hooks.sh +2 -2
- package/scripts/install.sh +81 -2
- package/scripts/iron_law_sha.py +98 -0
- package/scripts/lint_handoffs.py +214 -0
- package/scripts/lint_hook_manifest.py +2 -1
- package/scripts/lint_load_context.py +35 -5
- package/scripts/measure_rule_budget.py +314 -0
- package/scripts/prototype_lint_contradictions.py +150 -0
- package/scripts/redact_hook_capture.py +148 -0
- package/scripts/schemas/rule.schema.json +55 -6
- package/scripts/schemas/skill.schema.json +5 -0
- package/scripts/skill_linter.py +359 -7
- package/scripts/smoke_path_resolution.py +93 -0
- package/scripts/update_prices.py +3 -3
- package/scripts/validate_frontmatter.py +41 -1
- package/.agent-src/commands/chat-history/checkpoint.md +0 -126
- package/.agent-src/commands/chat-history/clear.md +0 -103
- package/.agent-src/commands/chat-history/resume.md +0 -183
- package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +0 -72
- package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +0 -79
- package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +0 -87
- package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +0 -62
- package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +0 -78
- package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +0 -85
- package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +0 -65
- package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +0 -78
- package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +0 -53
- package/.agent-src/rules/chat-history-cadence.md +0 -143
- package/.agent-src/rules/chat-history-ownership.md +0 -124
- package/.agent-src/rules/chat-history-visibility.md +0 -97
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
- package/scripts/check_phase_coupling.py +0 -148
- /package/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
- /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
package/scripts/update_prices.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Refresh
|
|
2
|
+
"""Refresh `agents/.agent-prices.md` from the LiteLLM model-prices feed.
|
|
3
3
|
|
|
4
4
|
Source: https://raw.githubusercontent.com/BerriAI/litellm/main/
|
|
5
5
|
model_prices_and_context_window.json
|
|
@@ -9,7 +9,7 @@ Network failure or invalid response → fall back to
|
|
|
9
9
|
always written. Stdlib only; no extra dependency.
|
|
10
10
|
|
|
11
11
|
Usage:
|
|
12
|
-
python3 scripts/update_prices.py # writes
|
|
12
|
+
python3 scripts/update_prices.py # writes agents/.agent-prices.md
|
|
13
13
|
python3 scripts/update_prices.py --check # exit 1 if file is stale
|
|
14
14
|
"""
|
|
15
15
|
|
|
@@ -81,7 +81,7 @@ def _to_rows_from_litellm(payload: dict[str, dict[str, object]]) -> list[tuple[s
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
def refresh(path: Path = PRICES_FILE) -> str:
|
|
84
|
-
"""Write a fresh
|
|
84
|
+
"""Write a fresh `agents/.agent-prices.md`. Returns the source label used."""
|
|
85
85
|
payload = _fetch_litellm()
|
|
86
86
|
if payload is not None:
|
|
87
87
|
rows = _to_rows_from_litellm(payload)
|
|
@@ -157,15 +157,55 @@ def _parse_yaml_block(body: str) -> dict[str, Any]:
|
|
|
157
157
|
def _consume_block_list(lines: list[str], start: int) -> tuple[list[Any], int]:
|
|
158
158
|
items: list[Any] = []
|
|
159
159
|
i = start
|
|
160
|
+
item_indent: int | None = None
|
|
160
161
|
while i < len(lines):
|
|
161
162
|
line = lines[i]
|
|
162
163
|
if not line.strip():
|
|
163
164
|
i += 1
|
|
164
165
|
continue
|
|
165
166
|
stripped = line.lstrip()
|
|
167
|
+
leading = len(line) - len(stripped)
|
|
166
168
|
if not stripped.startswith("- "):
|
|
169
|
+
# Out of the list — caller resumes.
|
|
167
170
|
break
|
|
168
|
-
|
|
171
|
+
if item_indent is None:
|
|
172
|
+
item_indent = leading
|
|
173
|
+
elif leading != item_indent:
|
|
174
|
+
break
|
|
175
|
+
item_body = stripped[2:].strip()
|
|
176
|
+
# Inline mapping inside the list: `- key: value`
|
|
177
|
+
m = re.match(r"^([\w-]+):\s*(.*)$", item_body)
|
|
178
|
+
if m:
|
|
179
|
+
mapping: dict[str, Any] = {}
|
|
180
|
+
key = m.group(1)
|
|
181
|
+
raw = m.group(2).strip()
|
|
182
|
+
mapping[key] = _coerce(raw) if raw != "" else ""
|
|
183
|
+
# Consume continuation lines that are indented past the dash —
|
|
184
|
+
# they belong to the same mapping item (`pattern: …`, `reason: …`).
|
|
185
|
+
cont_indent = item_indent + 2 # `- ` is two chars
|
|
186
|
+
i += 1
|
|
187
|
+
while i < len(lines):
|
|
188
|
+
cont = lines[i]
|
|
189
|
+
if not cont.strip():
|
|
190
|
+
i += 1
|
|
191
|
+
continue
|
|
192
|
+
cont_stripped = cont.lstrip()
|
|
193
|
+
cont_leading = len(cont) - len(cont_stripped)
|
|
194
|
+
if cont_stripped.startswith("- "):
|
|
195
|
+
break
|
|
196
|
+
if cont_leading <= item_indent:
|
|
197
|
+
break
|
|
198
|
+
cm = re.match(r"^([\w-]+):\s*(.*)$", cont_stripped)
|
|
199
|
+
if cm and cont_leading >= cont_indent:
|
|
200
|
+
ckey = cm.group(1)
|
|
201
|
+
cval = cm.group(2).strip()
|
|
202
|
+
mapping[ckey] = _coerce(cval) if cval != "" else ""
|
|
203
|
+
i += 1
|
|
204
|
+
else:
|
|
205
|
+
break
|
|
206
|
+
items.append(mapping)
|
|
207
|
+
continue
|
|
208
|
+
items.append(_coerce(item_body))
|
|
169
209
|
i += 1
|
|
170
210
|
return items, i - start
|
|
171
211
|
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: chat-history:checkpoint
|
|
3
|
-
cluster: chat-history
|
|
4
|
-
sub: checkpoint
|
|
5
|
-
description: Append a phase-boundary entry to .agent-chat-history — CHECKPOINT fallback for platforms without a native hook (Augment IDE, Cursor pre-1.7, Cline non-Mac/Linux). ~1s.
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
suggestion:
|
|
8
|
-
eligible: true
|
|
9
|
-
trigger_description: "User wants to flush a chat-history phase boundary on a CHECKPOINT-class platform (Augment IDE, Cursor < 1.7, Cline on Windows) — phrases like 'checkpoint chat history', 'log a phase boundary', 'manual chat-history append'."
|
|
10
|
-
trigger_context: "chat_history.path == checkpoint AND a phase-shaped boundary just completed (decision recorded, multi-tool sequence finished, task-list item closed)."
|
|
11
|
-
---
|
|
12
|
-
<!-- cloud_safe: noop -->
|
|
13
|
-
|
|
14
|
-
# /chat-history checkpoint
|
|
15
|
-
Force-append a `phase`-typed entry to `.agent-chat-history`. CHECKPOINT
|
|
16
|
-
fallback for platforms without native hooks — see
|
|
17
|
-
[`agents/contexts/chat-history-platform-hooks.md`](../../../agents/contexts/chat-history-platform-hooks.md)
|
|
18
|
-
for the per-platform classification.
|
|
19
|
-
|
|
20
|
-
Use this at decision points, end of phase, or after a meaningful tool
|
|
21
|
-
sequence on a CHECKPOINT/MANUAL platform. On HOOK platforms (Claude
|
|
22
|
-
Code, Augment CLI, Cursor 1.7+, Cline non-Windows, Windsurf, Gemini
|
|
23
|
-
CLI), the platform fires hooks automatically — manual use is allowed
|
|
24
|
-
but rarely needed.
|
|
25
|
-
|
|
26
|
-
## When to use
|
|
27
|
-
|
|
28
|
-
- IDE plugin without hooks (Augment Code IDE plugin as of 2026-04-30).
|
|
29
|
-
- Long-running tool sequence on any platform that did not flush.
|
|
30
|
-
- Explicit phase-boundary marker after a multi-tool refactor.
|
|
31
|
-
- Crash-recovery rehearsal — verifies the append path works before a
|
|
32
|
-
real outage.
|
|
33
|
-
|
|
34
|
-
## When NOT to use
|
|
35
|
-
|
|
36
|
-
- HOOK platform mid-session — the platform already records turn-level
|
|
37
|
-
cadence; an extra checkpoint just adds noise.
|
|
38
|
-
- After every line of agent output — that's `per_turn` cadence and is
|
|
39
|
-
configured in `.agent-settings.yml`, not via this command.
|
|
40
|
-
- To inspect the log → [`/chat-history`](chat-history.md).
|
|
41
|
-
- To wipe the log → [`/chat-history-clear`](chat-history-clear.md).
|
|
42
|
-
- To reload the log into context → [`/chat-history-resume`](chat-history-resume.md).
|
|
43
|
-
|
|
44
|
-
## Steps
|
|
45
|
-
|
|
46
|
-
### 1. Check if enabled
|
|
47
|
-
|
|
48
|
-
Read `chat_history.enabled` from `.agent-settings.yml`. If `false` or
|
|
49
|
-
the section is missing, say so and stop:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
> 📒 chat-history is disabled (chat_history.enabled = false).
|
|
53
|
-
> Nothing to checkpoint. Enable in .agent-settings.yml first.
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 2. Determine the phase label
|
|
57
|
-
|
|
58
|
-
Pick a short label (2–6 words) that names what just happened:
|
|
59
|
-
|
|
60
|
-
- "phase-1-done", "refactor-extracted", "tests-green",
|
|
61
|
-
"review-comments-fixed", "merge-ready".
|
|
62
|
-
|
|
63
|
-
If the user invoked the command without context, ask once with
|
|
64
|
-
numbered options per [`user-interaction`](../rules/user-interaction.md):
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
> 1. Use a free-text label — type 2–6 words for the checkpoint
|
|
68
|
-
> 2. Use a generic "manual-checkpoint" label
|
|
69
|
-
> 3. Skip — close without writing
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 3. Append the checkpoint
|
|
73
|
-
|
|
74
|
-
Invoke the master CLI:
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
./agent-config chat-history:checkpoint \
|
|
78
|
-
--first-user-msg "<the conversation's first user message>" \
|
|
79
|
-
--payload '{"phase": "<label>"}'
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The wrapper delegates to `scripts/chat_history.py hook-append --event phase`,
|
|
83
|
-
which performs cadence filtering and ownership checks. Cadence is read
|
|
84
|
-
from `chat_history.frequency` in `.agent-settings.yml` — `per_turn` /
|
|
85
|
-
`per_phase` / `per_tool`. `per_tool` cadence drops the `phase` event;
|
|
86
|
-
say so explicitly if that is the active mode.
|
|
87
|
-
|
|
88
|
-
### 4. Confirm
|
|
89
|
-
|
|
90
|
-
Render a one-line confirmation, mirroring the user's language:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
> 📒 Checkpoint logged: <label> (entries: N → N+1)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
If the helper returned `skipped_cadence`, surface it:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
> 📒 Checkpoint skipped — current cadence is per_tool, phase events are dropped.
|
|
100
|
-
> Switch chat_history.frequency to per_phase or per_turn to capture phase boundaries.
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Gotchas
|
|
104
|
-
|
|
105
|
-
- The command writes through the same ownership-state machine as
|
|
106
|
-
hooks — a `foreign` log triggers the
|
|
107
|
-
[`chat-history`](../rules/chat-history-ownership.md) Foreign-Prompt before any
|
|
108
|
-
append. This is intentional; the checkpoint must not silently
|
|
109
|
-
hijack another session's log.
|
|
110
|
-
- The `phase` payload key is required. Other keys are accepted but
|
|
111
|
-
ignored by the JSONL schema (forward-compat — they may be promoted
|
|
112
|
-
to first-class fields later).
|
|
113
|
-
- On HOOK platforms, hook entries and checkpoint entries coexist
|
|
114
|
-
cleanly. The schema does not deduplicate; if you checkpoint
|
|
115
|
-
immediately after a hook fires, expect two adjacent entries with
|
|
116
|
-
different `source` values.
|
|
117
|
-
|
|
118
|
-
## See also
|
|
119
|
-
|
|
120
|
-
- [`chat-history`](../rules/chat-history-ownership.md) — the rule defining the
|
|
121
|
-
conditional Iron Law (HOOK platforms vs CHECKPOINT/MANUAL platforms)
|
|
122
|
-
- [`/chat-history`](chat-history.md) — read-only status display
|
|
123
|
-
- [`/chat-history-resume`](chat-history-resume.md) — adopt + load
|
|
124
|
-
- [`/chat-history-clear`](chat-history-clear.md) — wipe
|
|
125
|
-
- [`agents/contexts/chat-history-platform-hooks.md`](../../../agents/contexts/chat-history-platform-hooks.md) — per-platform strategy table
|
|
126
|
-
- [`scripts/chat_history.py`](../../../scripts/chat_history.py) — `hook-append` API
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: chat-history:clear
|
|
3
|
-
cluster: chat-history
|
|
4
|
-
sub: clear
|
|
5
|
-
description: Manually delete the persistent chat-history log — asks for confirmation, optionally archives to a timestamped backup before wiping
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
suggestion:
|
|
8
|
-
eligible: false
|
|
9
|
-
rationale: "Destructive log wipe — must be deliberate."
|
|
10
|
-
---
|
|
11
|
-
<!-- cloud_safe: noop -->
|
|
12
|
-
|
|
13
|
-
# /chat-history clear
|
|
14
|
-
Wipes `.agent-chat-history`. Use when the log is stale (wrong session),
|
|
15
|
-
bloated beyond usefulness, or contains information you do not want
|
|
16
|
-
persisted on disk.
|
|
17
|
-
|
|
18
|
-
This command is **destructive** — always asks for confirmation before
|
|
19
|
-
touching the file, unless the file does not exist in the first place.
|
|
20
|
-
|
|
21
|
-
## When NOT to use
|
|
22
|
-
|
|
23
|
-
- Inspect before deleting → [`/chat-history`](chat-history.md).
|
|
24
|
-
- Keep the entries but re-point the header → [`/chat-history-resume`](chat-history-resume.md).
|
|
25
|
-
- Disable logging entirely → set `chat_history.enabled: false` in
|
|
26
|
-
`.agent-settings.yml`; see
|
|
27
|
-
[`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules).
|
|
28
|
-
Disabling does not delete the existing file; run this command
|
|
29
|
-
afterwards if you also want it gone.
|
|
30
|
-
|
|
31
|
-
## Steps
|
|
32
|
-
|
|
33
|
-
### 1. Check current state
|
|
34
|
-
|
|
35
|
-
Run `scripts/chat_history.py status`. If `exists: false`, tell the user
|
|
36
|
-
and stop:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
> 📒 No .agent-chat-history to clear.
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 2. Show what is about to be deleted
|
|
43
|
-
|
|
44
|
-
Render a short preview so the user sees what they are wiping:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
> 📒 About to clear .agent-chat-history
|
|
48
|
-
>
|
|
49
|
-
> Size: {size_kb} KB
|
|
50
|
-
> Entries: {entries}
|
|
51
|
-
> Session: {short_fp} (started {created_at_relative})
|
|
52
|
-
>
|
|
53
|
-
> 1. Archive — rename to .agent-chat-history.{YYYYMMDD-HHMMSS}.bak, then start fresh
|
|
54
|
-
> 2. Delete — permanent, no backup
|
|
55
|
-
> 3. Cancel — keep the file as-is
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### 3. Act on the choice
|
|
59
|
-
|
|
60
|
-
- `1` (Archive) → `mv .agent-chat-history
|
|
61
|
-
.agent-chat-history.{timestamp}.bak`. The rule will create a fresh
|
|
62
|
-
file on the next append.
|
|
63
|
-
- `2` (Delete) → run `scripts/chat_history.py clear`. Permanent.
|
|
64
|
-
- `3` (Cancel) → stop. Make no changes.
|
|
65
|
-
|
|
66
|
-
Free-text replies ("abbrechen", "keep it", "nevermind") count as `3`.
|
|
67
|
-
An unrecognized reply also counts as `3` — never delete on ambiguous
|
|
68
|
-
input.
|
|
69
|
-
|
|
70
|
-
### 4. Confirm
|
|
71
|
-
|
|
72
|
-
After a successful archive or delete, print a one-line confirmation:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
> 📒 Archived to .agent-chat-history.{timestamp}.bak
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
or
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
> 📒 .agent-chat-history deleted.
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Do **not** re-enable logging or change `.agent-settings.yml` as a side
|
|
85
|
-
effect — this command is scoped to the file on disk only.
|
|
86
|
-
|
|
87
|
-
## Gotchas
|
|
88
|
-
|
|
89
|
-
- `.agent-chat-history.*.bak` files are also git-ignored by the
|
|
90
|
-
installer's `.gitignore` block. They accumulate if archived often —
|
|
91
|
-
users can delete them manually.
|
|
92
|
-
- If `chat_history.enabled: false`, the file will **not** be recreated
|
|
93
|
-
after clearing. That is usually fine, but mention it so the user
|
|
94
|
-
knows the log is now silent.
|
|
95
|
-
- Deletion cannot be undone. When in doubt, prefer option `1` (Archive).
|
|
96
|
-
|
|
97
|
-
## See also
|
|
98
|
-
|
|
99
|
-
- [`chat-history`](../rules/chat-history-ownership.md) — the rule that writes the file
|
|
100
|
-
- [`/chat-history`](chat-history.md) — status inspection
|
|
101
|
-
- [`/chat-history-resume`](chat-history-resume.md) — load + adopt instead of wipe
|
|
102
|
-
- [`agent-settings` template](../templates/agent-settings.md) — `chat_history.*` reference
|
|
103
|
-
- [`scripts/chat_history.py`](../../../scripts/chat_history.py) — helper API
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: chat-history:resume
|
|
3
|
-
cluster: chat-history
|
|
4
|
-
sub: resume
|
|
5
|
-
description: Load the persistent chat-history log into the current conversation — picks match/returning/foreign flow and supports resume, merge, replace, or continue
|
|
6
|
-
disable-model-invocation: true
|
|
7
|
-
suggestion:
|
|
8
|
-
eligible: false
|
|
9
|
-
rationale: "Explicit resume mechanic with foreign/returning state machine."
|
|
10
|
-
---
|
|
11
|
-
<!-- cloud_safe: noop -->
|
|
12
|
-
|
|
13
|
-
# /chat-history resume
|
|
14
|
-
Reconnects the current conversation with an existing `.agent-chat-history`
|
|
15
|
-
file. Depending on the 4-state ownership check, it routes to the right
|
|
16
|
-
flow: silent summarize, adopt, merge, or replace.
|
|
17
|
-
|
|
18
|
-
Use after a crashed chat, after switching tools (Augment → Claude Code),
|
|
19
|
-
or when the agent showed the foreign- or returning-session prompt from
|
|
20
|
-
the [`chat-history`](../rules/chat-history-ownership.md) rule and the user picked
|
|
21
|
-
"resume".
|
|
22
|
-
|
|
23
|
-
## When NOT to use
|
|
24
|
-
|
|
25
|
-
- Just inspect metadata → [`/chat-history`](chat-history.md).
|
|
26
|
-
- Start fresh instead of resuming → [`/chat-history-clear`](chat-history-clear.md)
|
|
27
|
-
or pick "New start" in the foreign prompt.
|
|
28
|
-
- Logging is disabled (`chat_history.enabled: false`) → enable it in
|
|
29
|
-
`.agent-settings.yml` first; this command refuses to run otherwise.
|
|
30
|
-
|
|
31
|
-
## Preconditions
|
|
32
|
-
|
|
33
|
-
- `.agent-settings.yml` exists and `chat_history.enabled: true`.
|
|
34
|
-
- `.agent-chat-history` exists at the project root.
|
|
35
|
-
|
|
36
|
-
If either is missing, tell the user and stop — do not create files here.
|
|
37
|
-
|
|
38
|
-
## Steps
|
|
39
|
-
|
|
40
|
-
### 1. Load status
|
|
41
|
-
|
|
42
|
-
Run `scripts/chat_history.py status`. If `exists: false` or
|
|
43
|
-
`entries: 0`, tell the user there is nothing to resume and stop.
|
|
44
|
-
|
|
45
|
-
### 2. Determine ownership state
|
|
46
|
-
|
|
47
|
-
Run `scripts/chat_history.py state --first-user-msg "<current first user
|
|
48
|
-
message>"`. Branch on the result:
|
|
49
|
-
|
|
50
|
-
- `match` → step 3a (already owner)
|
|
51
|
-
- `returning` → step 3b (pick Merge / Replace / Continue)
|
|
52
|
-
- `foreign` → step 3c (pick Resume / New start / Ignore)
|
|
53
|
-
- `missing` → header corrupt; tell the user and suggest
|
|
54
|
-
`/chat-history-clear` to start fresh. Stop.
|
|
55
|
-
|
|
56
|
-
### 3a. `match` — already owner
|
|
57
|
-
|
|
58
|
-
Nothing to adopt. Skip to step 4 (summarize) for the user's benefit.
|
|
59
|
-
|
|
60
|
-
### 3b. `returning` — this chat once owned the file
|
|
61
|
-
|
|
62
|
-
Another session took over. Present the Returning-Prompt from the rule
|
|
63
|
-
and wait for a number:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
> 📒 Welcome back. This chat once owned the history file; another
|
|
67
|
-
> session has written to it since.
|
|
68
|
-
>
|
|
69
|
-
> On-file entries: {N} Size: {X} KB
|
|
70
|
-
>
|
|
71
|
-
> 1. Merge — my in-memory history first, the foreign entries after
|
|
72
|
-
> 2. Replace — wipe the foreign entries, keep only my history
|
|
73
|
-
> 3. Continue — leave the file as-is; only new entries from now on
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- **1 (Merge)** — build the in-memory entries list (see below), then:
|
|
77
|
-
```bash
|
|
78
|
-
scripts/chat_history.py prepend --entries-json '<list>'
|
|
79
|
-
scripts/chat_history.py adopt --first-user-msg "<msg>"
|
|
80
|
-
```
|
|
81
|
-
- **2 (Replace)** — build the in-memory entries list, then:
|
|
82
|
-
```bash
|
|
83
|
-
scripts/chat_history.py reset --first-user-msg "<msg>" \
|
|
84
|
-
--freq <frequency> --entries-json '<list>'
|
|
85
|
-
```
|
|
86
|
-
- **3 (Continue)** —
|
|
87
|
-
```bash
|
|
88
|
-
scripts/chat_history.py adopt --first-user-msg "<msg>"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### 3c. `foreign` — new chat finds an unknown session's file
|
|
92
|
-
|
|
93
|
-
Present the Foreign-Prompt from the rule and wait for a number:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
> 📒 Found chat history from an unknown session.
|
|
97
|
-
>
|
|
98
|
-
> Entries on file: {N} Size: {X} KB
|
|
99
|
-
>
|
|
100
|
-
> 1. Resume — adopt this file, load entries as context, keep appending
|
|
101
|
-
> 2. New start — archive to .agent-chat-history.bak, init fresh
|
|
102
|
-
> 3. Ignore — leave the file untouched, disable logging for this session
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
- **1 (Resume)** — `adopt --first-user-msg "<msg>"`.
|
|
106
|
-
- **2 (New start)** — rename file to `.agent-chat-history.bak`, run
|
|
107
|
-
`init --first-user-msg "<msg>" --freq <frequency>`. Skip summary.
|
|
108
|
-
- **3 (Ignore)** — do nothing. Report that logging is off for this
|
|
109
|
-
conversation. Stop.
|
|
110
|
-
|
|
111
|
-
### 3d. Building the in-memory entries list (Merge / Replace)
|
|
112
|
-
|
|
113
|
-
Reconstruct the agent's prior turns as a JSON array:
|
|
114
|
-
|
|
115
|
-
- one `{"t":"user","text":"<preview>","ts":"<iso>"}` per user message
|
|
116
|
-
- one `{"t":"agent","text":"<preview>","ts":"<iso>"}` per agent reply
|
|
117
|
-
- `text` previews capped at ~200 chars (whitespace flattened)
|
|
118
|
-
- timestamps in ISO-8601 UTC (current time is acceptable if exact times
|
|
119
|
-
are unknown; order is what matters)
|
|
120
|
-
- no tool-call payloads, no file contents, no secrets
|
|
121
|
-
|
|
122
|
-
If the list is large (>30 KB), stream it via stdin:
|
|
123
|
-
`prepend --entries-stdin` or `reset --entries-stdin`.
|
|
124
|
-
|
|
125
|
-
### 4. Overflow check
|
|
126
|
-
|
|
127
|
-
After any Merge or Replace, run
|
|
128
|
-
`scripts/chat_history.py rotate --max-kb <max_size_kb>
|
|
129
|
-
--mode <on_overflow>` so the combined body stays within the user's
|
|
130
|
-
budget.
|
|
131
|
-
|
|
132
|
-
### 5. Summarize into conversation context
|
|
133
|
-
|
|
134
|
-
Read the entries via the helper (`read --all` or `read --last N` for
|
|
135
|
-
bounded). Produce a short, structured summary — **not** a verbatim dump:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
> 📒 Resumed chat-history ({entries} entries, {age})
|
|
139
|
-
>
|
|
140
|
-
> ## What was done
|
|
141
|
-
> - {1–3 bullets from agent/decision entries}
|
|
142
|
-
>
|
|
143
|
-
> ## Open threads
|
|
144
|
-
> - {1–3 bullets from the most recent entries and any pending questions}
|
|
145
|
-
>
|
|
146
|
-
> ## Key decisions
|
|
147
|
-
> - {decisions captured during the prior session}
|
|
148
|
-
>
|
|
149
|
-
> Ready to continue. What would you like to do?
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Keep the summary under ~25 lines. Rationale: this is input into the new
|
|
153
|
-
turn, not a display artifact (see
|
|
154
|
-
[`token-efficiency`](../rules/token-efficiency.md)).
|
|
155
|
-
|
|
156
|
-
### 6. Hand control back to the user
|
|
157
|
-
|
|
158
|
-
After presenting the summary, stop and wait. Do not auto-resume work —
|
|
159
|
-
the user decides what to do next.
|
|
160
|
-
|
|
161
|
-
## Gotchas
|
|
162
|
-
|
|
163
|
-
- **Iron law — one question at a time.** Even if the log contains
|
|
164
|
-
several open threads, ask about one at a time after the summary
|
|
165
|
-
(see [`ask-when-uncertain`](../rules/ask-when-uncertain.md)).
|
|
166
|
-
- `adopt` rewrites the header in place and pushes the previous fp into
|
|
167
|
-
`former_fps` (capped at 10). No backup is created — use
|
|
168
|
-
`/chat-history-clear` first if you want a clean slate.
|
|
169
|
-
- `reset` discards whatever was on disk. Only use it when the user
|
|
170
|
-
explicitly picks "Replace".
|
|
171
|
-
- The summary is derived from the agent's reading of the JSONL. Old
|
|
172
|
-
entries may be incomplete (especially under `per_turn` with
|
|
173
|
-
previews only). Flag gaps explicitly.
|
|
174
|
-
|
|
175
|
-
## See also
|
|
176
|
-
|
|
177
|
-
- [`chat-history`](../rules/chat-history-ownership.md) — the rule that triggers
|
|
178
|
-
this command via the foreign- and returning-session prompts
|
|
179
|
-
- [`/chat-history`](chat-history.md) — status inspection without adopting
|
|
180
|
-
- [`/chat-history-clear`](chat-history-clear.md) — wipe instead of adopt
|
|
181
|
-
- [`/agent-handoff`](agent-handoff.md) — complementary: generates a
|
|
182
|
-
paste-into-new-chat prompt (no disk file)
|
|
183
|
-
- [`scripts/chat_history.py`](../../../scripts/chat_history.py) — helper API
|
package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Artifact Engagement Recording — mechanics
|
|
2
|
-
|
|
3
|
-
CLI invocation, privacy contract, failure-mode handling, and "what
|
|
4
|
-
this rule does NOT do" catalog for the
|
|
5
|
-
[`artifact-engagement-recording`](../../../rules/artifact-engagement-recording.md)
|
|
6
|
-
rule. The activation gate, cadence table, and consulted-vs-applied
|
|
7
|
-
definitions live in the rule; this file is the lookup material for
|
|
8
|
-
the actual `telemetry:record` call and the privacy floor.
|
|
9
|
-
|
|
10
|
-
## What to record — id-only, no payload
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
./agent-config telemetry:record \
|
|
14
|
-
--task-id "$TASK_ID" \
|
|
15
|
-
--boundary task \
|
|
16
|
-
--consulted skills:php-coder \
|
|
17
|
-
--consulted skills:eloquent \
|
|
18
|
-
--consulted rules:scope-control \
|
|
19
|
-
--applied skills:php-coder \
|
|
20
|
-
--applied rules:scope-control
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
- `--task-id` — the ticket key (`PROJ-123`) for `/implement-ticket`, or a
|
|
24
|
-
short opaque slug derived from the prompt for `/work`. **Never** a
|
|
25
|
-
branch name, a file path, or a free-text title.
|
|
26
|
-
- `--boundary` — `task` or `phase-step`, matching the cadence in the rule.
|
|
27
|
-
- `--consulted <kind>:<id>` — repeat per artefact. `<kind>` is one of
|
|
28
|
-
`skills`, `rules`, `commands`, `guidelines`, `personas`.
|
|
29
|
-
- `--applied <kind>:<id>` — repeat per artefact actually applied.
|
|
30
|
-
- Exit `0` always when disabled (silent). Exit `1` on schema validation
|
|
31
|
-
failure (rule must NOT swallow this — surface to the user). Exit `2`
|
|
32
|
-
on IO failure.
|
|
33
|
-
|
|
34
|
-
## Privacy contract — what NEVER goes into a record
|
|
35
|
-
|
|
36
|
-
The CLI rejects most violations on the input boundary, but the agent must
|
|
37
|
-
not even attempt these:
|
|
38
|
-
|
|
39
|
-
- ❌ File paths (`src/Foo.php`, `tests/...`) — id fields are
|
|
40
|
-
artefact identifiers only.
|
|
41
|
-
- ❌ Source code, prompt text, ticket body, AC text.
|
|
42
|
-
- ❌ Branch names, commit shas, PR numbers, URLs.
|
|
43
|
-
- ❌ Secrets, env vars, credentials, customer data.
|
|
44
|
-
- ❌ Free-text strings longer than 200 chars (CLI enforces; agent must
|
|
45
|
-
not generate).
|
|
46
|
-
|
|
47
|
-
When in doubt → **don't record**. A missing event is cheap; a leaked
|
|
48
|
-
prompt is not.
|
|
49
|
-
|
|
50
|
-
## Failure modes — DO NOT block the user's task
|
|
51
|
-
|
|
52
|
-
- Schema rejection (CLI exit `1`) → log the message internally, continue
|
|
53
|
-
the user's task. Do **not** halt the dispatch loop.
|
|
54
|
-
- IO failure (CLI exit `2`) → same. The telemetry is **observation**, not
|
|
55
|
-
a delivery requirement.
|
|
56
|
-
- Settings malformed → already handled by the CLI: it falls back to
|
|
57
|
-
disabled and exits `0`. Agent treats it as "disabled this task".
|
|
58
|
-
|
|
59
|
-
The only error the agent surfaces is when the user explicitly asked for
|
|
60
|
-
recording (`telemetry:status` confirms enabled) but no event reached the
|
|
61
|
-
log — that is a real bug, not a swallowed error.
|
|
62
|
-
|
|
63
|
-
## What this rule does NOT do
|
|
64
|
-
|
|
65
|
-
- Run when `enabled: false` (cost floor is zero — see
|
|
66
|
-
[`tests/telemetry/test_cost_floor.py`](../../../../tests/telemetry/test_cost_floor.py)).
|
|
67
|
-
- Track the agent's tool calls, file reads, or token spend — that is
|
|
68
|
-
out of scope, see the roadmap's "out-of-scope" section.
|
|
69
|
-
- Decide retirement. Phase 4's aggregator + report renderer are the only
|
|
70
|
-
consumers that may interpret the JSONL.
|
|
71
|
-
- Run on cloud surfaces (Claude.ai Web, Skills API). The
|
|
72
|
-
`cloud_safe: noop` marker keeps it inert there.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Augment portability — mechanics
|
|
2
|
-
|
|
3
|
-
`task`-to-script translation table, the `./agent-config` consumer-CLI
|
|
4
|
-
table, and the rationale behind both for the
|
|
5
|
-
[`augment-portability`](../../../rules/augment-portability.md) rule.
|
|
6
|
-
The portability obligation, the agnostic-content rules, and the
|
|
7
|
-
enforcement script reference live in the rule; this file is the
|
|
8
|
-
lookup material when an agent is about to write or edit an artefact
|
|
9
|
-
that mentions a runtime invocation.
|
|
10
|
-
|
|
11
|
-
## Why no `task` commands inside artefacts
|
|
12
|
-
|
|
13
|
-
Skills, rules, commands, guidelines, personas, and context docs
|
|
14
|
-
shipped by this package run in **consumer projects**. Consumer
|
|
15
|
-
projects may not have [Task](https://taskfile.dev) installed —
|
|
16
|
-
they might use npm scripts, Composer scripts, Make, or nothing at
|
|
17
|
-
all. A skill that instructs an agent to run `task <something>`
|
|
18
|
-
silently breaks in every project without a `Taskfile.yml`.
|
|
19
|
-
|
|
20
|
-
Task remains a convenience shortcut for maintainers working on the
|
|
21
|
-
package repo itself — `task ci` is the recommended local gate before
|
|
22
|
-
a PR and lives in `Taskfile.yml`, `AGENTS.md`, and the package README.
|
|
23
|
-
Those maintainer-facing surfaces are outside the scope of this rule.
|
|
24
|
-
Artefact files must assume Task is absent.
|
|
25
|
-
|
|
26
|
-
The detection pattern *"if the consumer has a `Makefile` / build
|
|
27
|
-
script, prefer its targets over raw commands"* is still allowed when
|
|
28
|
-
the skill adapts to the **consumer's own** tooling (e.g.
|
|
29
|
-
`tests-execute` detecting `php artisan test` vs `vendor/bin/pest`).
|
|
30
|
-
It is not allowed to reference `task <name>` as the detected target —
|
|
31
|
-
every direct invocation must resolve to a real script path.
|
|
32
|
-
|
|
33
|
-
## Translation table — `task` → script
|
|
34
|
-
|
|
35
|
-
| ❌ Forbidden | ✅ Portable |
|
|
36
|
-
|---|---|
|
|
37
|
-
| `task sync` | `bash scripts/compress.sh --sync` |
|
|
38
|
-
| `task sync-check` | `bash scripts/compress.sh --check` |
|
|
39
|
-
| `task sync-check-hashes` | `bash scripts/compress.sh --check-hashes` |
|
|
40
|
-
| `task sync-changed` | `bash scripts/compress.sh --changed` |
|
|
41
|
-
| `task sync-mark-done -- X` | `bash scripts/compress.sh --mark-done X` |
|
|
42
|
-
| `task generate-tools` | `python3 scripts/compress.py --generate-tools` |
|
|
43
|
-
| `task lint-skills` | `python3 scripts/skill_linter.py --all` |
|
|
44
|
-
| `task check-refs` | `python3 scripts/check_references.py` |
|
|
45
|
-
| `task check-portability` | `python3 scripts/check_portability.py` |
|
|
46
|
-
| `task check-compression` | `python3 scripts/check_compression.py` |
|
|
47
|
-
| `task validate-schema` | `python3 scripts/validate_frontmatter.py` |
|
|
48
|
-
| `task counts-check` | `python3 scripts/update_counts.py --check` |
|
|
49
|
-
| `task roadmap-progress` | `./agent-config roadmap:progress` |
|
|
50
|
-
| `task ci` | run each underlying script directly (no single portable equivalent) |
|
|
51
|
-
|
|
52
|
-
## Consumer CLI — `./agent-config`
|
|
53
|
-
|
|
54
|
-
A subset of package scripts is exposed through a project-local CLI
|
|
55
|
-
wrapper `./agent-config` (written into the project root by the
|
|
56
|
-
installer, gitignored). Artefacts MUST prefer the CLI over raw
|
|
57
|
-
`python3 scripts/…` paths for every command the CLI already covers,
|
|
58
|
-
because the raw paths only resolve inside the package repo — in a
|
|
59
|
-
consumer project the scripts live under `node_modules/` or `vendor/`.
|
|
60
|
-
|
|
61
|
-
| ❌ Forbidden in artefacts | ✅ Portable |
|
|
62
|
-
|---|---|
|
|
63
|
-
| `python3 scripts/mcp_render.py` | `./agent-config mcp:render` |
|
|
64
|
-
| `python3 scripts/mcp_render.py --check` | `./agent-config mcp:check` |
|
|
65
|
-
| `python3 .augment/scripts/update_roadmap_progress.py` | `./agent-config roadmap:progress` |
|
|
66
|
-
| `python3 .augment/scripts/update_roadmap_progress.py --check` | `./agent-config roadmap:progress-check` |
|
|
67
|
-
| `bash scripts/first-run.sh` | `./agent-config first-run` |
|
|
68
|
-
| `PYTHONPATH=… python3 -m implement_ticket` | `./agent-config implement-ticket` |
|
|
69
|
-
| `python3 scripts/memory_lookup.py` | `./agent-config memory:lookup` |
|
|
70
|
-
| `python3 scripts/memory_signal.py` | `./agent-config memory:signal` |
|
|
71
|
-
| `python3 scripts/memory_hash.py` | `./agent-config memory:hash` |
|
|
72
|
-
| `python3 scripts/check_memory.py` | `./agent-config memory:check` |
|
|
73
|
-
| `python3 scripts/check_memory_proposal.py` | `./agent-config memory:check-proposal` |
|
|
74
|
-
| `python3 scripts/check_proposal.py` | `./agent-config proposal:check` |
|
|
75
|
-
| `python3 scripts/refine_ticket_detect.py` | `./agent-config refine-ticket:detect` |
|
|
76
|
-
|
|
77
|
-
Commands not covered by the CLI stay as direct script invocations
|
|
78
|
-
(e.g. `bash scripts/compress.sh --sync`) — those are maintainer-only
|
|
79
|
-
and not reachable from a consumer project anyway.
|