claude-dev-env 4.3.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/pr-description-writer.md +2 -2
- package/.agents/agents/test_agent_frontmatter.py +2 -2
- package/.agents/agents/test_pr_description_writer_style.py +1 -3
- package/.agents/skills/e-code-review/SKILL.md +12 -12
- package/.agents/skills/e-code-review/preflight-proposal.contract.test.mjs +20 -0
- package/.agents/skills/e-code-review/reference/fix.md +15 -17
- package/.agents/skills/e-code-review/reference/loop.md +35 -39
- package/.agents/skills/e-code-review/reference/mode-contract.test.mjs +2 -1
- package/.agents/skills/e-code-review/reference/preflight-proposal.md +44 -9
- package/.agents/skills/e-code-review/reference/runner-selection.md +13 -14
- package/.agents/skills/issue-tracker/SKILL.md +5 -4
- package/.agents/skills/pull-request/SKILL.md +11 -13
- package/.agents/skills/pull-request/reference/publication-tasks.md +3 -3
- package/.agents/skills/pull-request/scripts/github_pr_command_constants/config/constants.py +9 -1
- package/.agents/skills/pull-request/scripts/pull_request.py +33 -44
- package/.agents/skills/pull-request/scripts/test_github_pr_command_constants.py +9 -0
- package/.agents/skills/pull-request/scripts/test_pull_request.py +1 -3
- package/.agents/skills/skill-builder/SKILL.md +3 -196
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/terminology_sweep_constants.py +6 -0
- package/_shared/pr-loop/scripts/terminology_sweep.py +64 -19
- package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +59 -0
- package/bin/install.agents-home.test.mjs +15 -13
- package/bin/install.mjs +28 -0
- package/bin/install.policy-lint.test.mjs +78 -0
- package/bin/install.prune.test.mjs +59 -20
- package/bin/install.pstack-plugin.test.mjs +114 -0
- package/bin/install.test.mjs +37 -0
- package/bin/refresh-pstack-plugin-skills.test.mjs +211 -0
- package/hooks/advisory/pr_done_reminder.py +342 -0
- package/hooks/advisory/test_pr_done_reminder.py +249 -0
- package/hooks/blocking/bash_post_call_dispatcher.py +53 -6
- package/hooks/blocking/code_rules_paired_test.py +22 -15
- package/hooks/blocking/test_bash_post_call_dispatcher.py +65 -4
- package/hooks/blocking/test_code_rules_enforcer_paired_test.py +36 -29
- package/hooks/blocking/test_code_rules_js_resume_task_enumeration.py +4 -4
- package/hooks/blocking/test_code_rules_js_returns_object_schemaless.py +5 -5
- package/hooks/blocking/test_pre_tool_use_dispatcher.py +68 -133
- package/hooks/blocking/test_pre_tool_use_dispatcher_native.py +20 -51
- package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +18 -18
- package/hooks/git-hooks/git_hooks_constants/staged_policy_lint.py +12 -0
- package/hooks/git-hooks/pre_commit.py +52 -11
- package/hooks/git-hooks/test_installed_policy_lint.py +159 -0
- package/hooks/git-hooks/test_native_policy_commit.py +87 -0
- package/hooks/git-hooks/test_pre_commit.py +246 -0
- package/hooks/hooks.json +1 -1
- package/hooks/hooks_constants/bash_post_call_dispatcher_constants.py +14 -1
- package/hooks/hooks_constants/pr_done_reminder_constants.py +98 -0
- package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +10 -43
- package/hooks/hooks_constants/test_bash_post_call_dispatcher_constants.py +19 -2
- package/hooks/hooks_constants/test_pr_done_reminder_constants.py +40 -0
- package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +20 -32
- package/package.json +2 -2
- package/rules/durable-post-artifacts.md +2 -1
- package/rules/git-workflow.md +6 -6
- package/scripts/check.ps1 +0 -1
- package/{.agents/skills/run-claude-dev-env/driver.mjs → scripts/ci/installer-lifecycle.mjs} +3 -28
- package/scripts/ci/installer-lifecycle.test.mjs +26 -0
- package/scripts/ci/windows-installer-lifecycle.ps1 +1 -11
- package/scripts/dev_env_scripts_constants/shared_tree_constants.py +4 -5
- package/{.agents/skills/_shared/pr-loop/scripts → scripts}/durable_post_lint.py +5 -41
- package/{.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/durable_post_lint_constants.py → scripts/durable_post_lint_config/config/constants.py} +0 -10
- package/{.agents/skills/_shared/pr-loop/scripts/test_durable_post_lint_constants.py → scripts/durable_post_lint_config/config/test_constants.py} +1 -1
- package/scripts/policy_lint/adapter_detectors.py +13 -6
- package/scripts/policy_lint/adapters.py +7 -4
- package/scripts/policy_lint/config/constants.py +5 -0
- package/scripts/policy_lint/engine.py +48 -4
- package/scripts/policy_lint/model.py +1 -0
- package/scripts/policy_lint/registry.py +1 -1
- package/scripts/policy_lint/selection.py +2 -1
- package/scripts/policy_lint/selection_git.py +2 -0
- package/scripts/refresh_pstack_plugin_skills.mjs +200 -0
- package/scripts/shared_tree_paths.py +32 -3
- package/scripts/test_shared_tree_paths.py +33 -0
- package/scripts/tests/test_policy_lint_rules_archive.py +120 -0
- package/scripts/tests/test_policy_lint_rules_engine.py +25 -4
- package/scripts/tests/test_policy_lint_rules_installed_loader.py +29 -0
- package/scripts/tests/test_policy_lint_rules_registry.py +227 -13
- package/scripts/tests/test_policy_lint_selection.py +25 -2
- package/scripts/tests/test_policy_lint_selection_native_index.py +30 -0
- package/scripts/tests/test_rules.py +3 -7
- package/.agents/skills/_shared/pr-loop/.claude/CLAUDE.md +0 -1
- package/.agents/skills/_shared/pr-loop/AGENTS.md +0 -1
- package/.agents/skills/_shared/pr-loop/audit-contract.md +0 -5
- package/.agents/skills/_shared/pr-loop/audit-reply-template.md +0 -5
- package/.agents/skills/_shared/pr-loop/code-rules-gate.md +0 -5
- package/.agents/skills/_shared/pr-loop/fix-protocol.md +0 -5
- package/.agents/skills/_shared/pr-loop/gh-payloads.md +0 -5
- package/.agents/skills/_shared/pr-loop/portable-driver.md +0 -149
- package/.agents/skills/_shared/pr-loop/post-audit-thread-contract.md +0 -5
- package/.agents/skills/_shared/pr-loop/precatch-rubric.md +0 -5
- package/.agents/skills/_shared/pr-loop/preflight-proposal.contract.test.mjs +0 -119
- package/.agents/skills/_shared/pr-loop/preflight-proposal.md +0 -5
- package/.agents/skills/_shared/pr-loop/prompts/.claude/CLAUDE.md +0 -1
- package/.agents/skills/_shared/pr-loop/prompts/AGENTS.md +0 -1
- package/.agents/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +0 -324
- package/.agents/skills/_shared/pr-loop/scripts/.claude/CLAUDE.md +0 -1
- package/.agents/skills/_shared/pr-loop/scripts/AGENTS.md +0 -1
- package/.agents/skills/_shared/pr-loop/scripts/RUNTIME_SCRIPTS.md +0 -29
- package/.agents/skills/_shared/pr-loop/scripts/_cli_utils.py +0 -22
- package/.agents/skills/_shared/pr-loop/scripts/_path_resolver.py +0 -186
- package/.agents/skills/_shared/pr-loop/scripts/_xml_utils.py +0 -20
- package/.agents/skills/_shared/pr-loop/scripts/audit_category_schema.py +0 -355
- package/.agents/skills/_shared/pr-loop/scripts/build_audit_prompt.py +0 -289
- package/.agents/skills/_shared/pr-loop/scripts/build_converge_task_list.py +0 -310
- package/.agents/skills/_shared/pr-loop/scripts/build_fix_prompt.py +0 -292
- package/.agents/skills/_shared/pr-loop/scripts/init_loop_state.py +0 -134
- package/.agents/skills/_shared/pr-loop/scripts/portable_converge_driver.py +0 -1646
- package/.agents/skills/_shared/pr-loop/scripts/preflight_worktree.py +0 -392
- package/.agents/skills/_shared/pr-loop/scripts/select_converge_pacer.py +0 -215
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/.claude/CLAUDE.md +0 -1
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +0 -1
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/__init__.py +0 -0
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/audit_category_schema_constants.py +0 -37
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/converge_task_list_constants.py +0 -56
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/handoff_constants.py +0 -45
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/pacer_constants.py +0 -47
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/path_resolver_constants.py +0 -157
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/portable_driver_constants.py +0 -177
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/preflight_constants.py +0 -70
- package/.agents/skills/_shared/pr-loop/scripts/teardown_worktrees.py +0 -172
- package/.agents/skills/_shared/pr-loop/scripts/test__path_resolver.py +0 -106
- package/.agents/skills/_shared/pr-loop/scripts/test_audit_category_schema.py +0 -94
- package/.agents/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +0 -499
- package/.agents/skills/_shared/pr-loop/scripts/test_build_converge_task_list.py +0 -140
- package/.agents/skills/_shared/pr-loop/scripts/test_build_fix_prompt.py +0 -262
- package/.agents/skills/_shared/pr-loop/scripts/test_init_loop_state.py +0 -71
- package/.agents/skills/_shared/pr-loop/scripts/test_portable_converge_driver.py +0 -1119
- package/.agents/skills/_shared/pr-loop/scripts/test_preflight_worktree.py +0 -287
- package/.agents/skills/_shared/pr-loop/scripts/test_select_converge_pacer.py +0 -207
- package/.agents/skills/_shared/pr-loop/scripts/test_teardown_worktrees.py +0 -59
- package/.agents/skills/_shared/pr-loop/scripts/test_write_handoff.py +0 -201
- package/.agents/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +0 -182
- package/.agents/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +0 -206
- package/.agents/skills/_shared/pr-loop/scripts/write_handoff.py +0 -309
- package/.agents/skills/_shared/pr-loop/state-schema.md +0 -5
- package/.agents/skills/_shared/pr-loop/worker-spawn.md +0 -5
- package/.agents/skills/autoconverge/.claude/CLAUDE.md +0 -1
- package/.agents/skills/autoconverge/AGENTS.md +0 -1
- package/.agents/skills/autoconverge/SKILL.md +0 -431
- package/.agents/skills/autoconverge/reference/.claude/CLAUDE.md +0 -1
- package/.agents/skills/autoconverge/reference/AGENTS.md +0 -1
- package/.agents/skills/autoconverge/reference/closing-report.md +0 -93
- package/.agents/skills/autoconverge/reference/convergence-gates.md +0 -31
- package/.agents/skills/autoconverge/reference/convergence.md +0 -219
- package/.agents/skills/autoconverge/reference/copilot-findings.md +0 -51
- package/.agents/skills/autoconverge/reference/gotchas.md +0 -66
- package/.agents/skills/autoconverge/reference/headless-safety.md +0 -44
- package/.agents/skills/autoconverge/reference/multi-pr.md +0 -128
- package/.agents/skills/autoconverge/reference/self-closing-loop.md +0 -84
- package/.agents/skills/autoconverge/reference/stop-conditions.md +0 -127
- package/.agents/skills/autoconverge/test_portable_pacer_gate.py +0 -54
- package/.agents/skills/autoconverge/workflow/.claude/CLAUDE.md +0 -1
- package/.agents/skills/autoconverge/workflow/AGENTS.md +0 -1
- package/.agents/skills/autoconverge/workflow/aggregate_runs.py +0 -371
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/.claude/CLAUDE.md +0 -1
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +0 -1
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/__init__.py +0 -0
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/render_report_constants.py +0 -250
- package/.agents/skills/autoconverge/workflow/converge.clean-audit.test.mjs +0 -665
- package/.agents/skills/autoconverge/workflow/converge.codex-gate.test.mjs +0 -472
- package/.agents/skills/autoconverge/workflow/converge.contract.test.mjs +0 -64
- package/.agents/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +0 -1009
- package/.agents/skills/autoconverge/workflow/converge.fix-progress.test.mjs +0 -107
- package/.agents/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +0 -33
- package/.agents/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +0 -15
- package/.agents/skills/autoconverge/workflow/converge.mjs +0 -3132
- package/.agents/skills/autoconverge/workflow/converge.p2-advance.test.mjs +0 -202
- package/.agents/skills/autoconverge/workflow/converge.path-aware.test.mjs +0 -47
- package/.agents/skills/autoconverge/workflow/converge.precatch.test.mjs +0 -152
- package/.agents/skills/autoconverge/workflow/converge.run-input.test.mjs +0 -116
- package/.agents/skills/autoconverge/workflow/converge_multi.mjs +0 -169
- package/.agents/skills/autoconverge/workflow/converge_multi.run-input.test.mjs +0 -173
- package/.agents/skills/autoconverge/workflow/convergence_summary.py +0 -110
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a11d903476b803493.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a26213978adeef6fb.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a3def0d15ed9d9110.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a41f41b1b708ee3b7.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a758b880abecc3ff7.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a8897b89656b1bd16.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ab1c2d3e4f5a6b7c8.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-abd463d744a1437bc.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ad19d027ae8ee1816.jsonl +0 -2
- package/.agents/skills/autoconverge/workflow/fixtures/wf_run/workflows/wf_881252e6-700.json +0 -266
- package/.agents/skills/autoconverge/workflow/render_report.py +0 -1024
- package/.agents/skills/autoconverge/workflow/test_aggregate_runs.py +0 -134
- package/.agents/skills/autoconverge/workflow/test_convergence_summary.py +0 -149
- package/.agents/skills/autoconverge/workflow/test_render_report.py +0 -812
- package/.agents/skills/hitl/SKILL.md +0 -45
- package/.agents/skills/pr-cleanup/SKILL.md +0 -140
- package/.agents/skills/pr-cleanup/reference/process-inventory.md +0 -17
- package/.agents/skills/pr-cleanup/reference/task-seeds.md +0 -22
- package/.agents/skills/pr-name-by-capability/SKILL.md +0 -73
- package/.agents/skills/pr-name-by-capability/reference/fetch-commands.md +0 -29
- package/.agents/skills/pr-name-by-capability/reference/offense-examples.md +0 -32
- package/.agents/skills/pr-name-by-capability/reference/report-template.md +0 -29
- package/.agents/skills/pr-name-by-capability/reference/rule-checklist.md +0 -38
- package/.agents/skills/pr-name-by-capability/reference/task-seeds.md +0 -10
- package/.agents/skills/pr-plain-language-cleanup/SKILL.md +0 -93
- package/.agents/skills/pr-refinement/SKILL.md +0 -31
- package/.agents/skills/pr-shared-extraction/SKILL.md +0 -177
- package/.agents/skills/pr-shared-extraction/reference/examples.md +0 -46
- package/.agents/skills/pr-shared-extraction/reference/offense-taxonomy.md +0 -100
- package/.agents/skills/pr-small-cl/SKILL.md +0 -52
- package/.agents/skills/pr-title-description/SKILL.md +0 -96
- package/.agents/skills/prototype/SKILL.md +0 -85
- package/.agents/skills/prototype/reference/honest-limitations.md +0 -23
- package/.agents/skills/prototype/reference/promotion-tasks.md +0 -23
- package/.agents/skills/prototype/scripts/build_sandbox_settings.py +0 -249
- package/.agents/skills/prototype/scripts/conftest.py +0 -15
- package/.agents/skills/prototype/scripts/launch_sandbox.py +0 -205
- package/.agents/skills/prototype/scripts/probe_sandbox_safety.py +0 -311
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/__init__.py +0 -1
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/__init__.py +0 -0
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/build_sandbox_settings_constants.py +0 -41
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/launch_sandbox_constants.py +0 -23
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/probe_sandbox_safety_constants.py +0 -45
- package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/prototype_common_constants.py +0 -10
- package/.agents/skills/prototype/scripts/test_build_sandbox_settings.py +0 -275
- package/.agents/skills/prototype/scripts/test_launch_sandbox.py +0 -303
- package/.agents/skills/prototype/scripts/test_probe_sandbox_safety.py +0 -312
- package/.agents/skills/prototype/workflows/promotion.md +0 -25
- package/.agents/skills/prototype/workflows/sandbox.md +0 -35
- package/.agents/skills/rebase/.claude/CLAUDE.md +0 -1
- package/.agents/skills/rebase/AGENTS.md +0 -1
- package/.agents/skills/rebase/SKILL.md +0 -178
- package/.agents/skills/review-router/SKILL.md +0 -51
- package/.agents/skills/review-router/reference/route-policy.json +0 -7
- package/.agents/skills/review-router/reference/task-seeds.md +0 -1
- package/.agents/skills/review-router/scripts/conftest.py +0 -4
- package/.agents/skills/review-router/scripts/review_router.py +0 -50
- package/.agents/skills/review-router/scripts/review_router_cli.py +0 -211
- package/.agents/skills/review-router/scripts/review_router_constants/__init__.py +0 -1
- package/.agents/skills/review-router/scripts/review_router_constants/config/__init__.py +0 -0
- package/.agents/skills/review-router/scripts/review_router_constants/config/constants.py +0 -13
- package/.agents/skills/review-router/scripts/test_review_router.py +0 -23
- package/.agents/skills/review-router/scripts/test_review_router_cli.py +0 -47
- package/.agents/skills/review-tier/SKILL.md +0 -56
- package/.agents/skills/review-tier/reference/task-seeds.md +0 -1
- package/.agents/skills/review-tier/reference/tier-policy.json +0 -9
- package/.agents/skills/review-tier/scripts/conftest.py +0 -4
- package/.agents/skills/review-tier/scripts/review_tier.py +0 -359
- package/.agents/skills/review-tier/scripts/review_tier_constants/__init__.py +0 -1
- package/.agents/skills/review-tier/scripts/review_tier_constants/config/__init__.py +0 -0
- package/.agents/skills/review-tier/scripts/review_tier_constants/config/constants.py +0 -29
- package/.agents/skills/review-tier/scripts/test_generation.py +0 -159
- package/.agents/skills/review-tier/scripts/test_review_tier.py +0 -33
- package/.agents/skills/run-claude-dev-env/SKILL.md +0 -84
- package/.agents/skills/session-log/.claude/CLAUDE.md +0 -1
- package/.agents/skills/session-log/AGENTS.md +0 -1
- package/.agents/skills/session-log/SKILL.md +0 -170
- package/.agents/skills/session-log/templates/frontmatter.md +0 -40
- package/.agents/skills/session-tidy/.claude/CLAUDE.md +0 -1
- package/.agents/skills/session-tidy/AGENTS.md +0 -1
- package/.agents/skills/session-tidy/SKILL.md +0 -191
- package/.agents/skills/skill-builder/references/.claude/CLAUDE.md +0 -1
- package/.agents/skills/skill-builder/references/AGENTS.md +0 -1
- package/.agents/skills/skill-builder/references/delegation-map.md +0 -130
- package/.agents/skills/skill-builder/references/description-field.md +0 -111
- package/.agents/skills/skill-builder/references/deterministic-elements.md +0 -218
- package/.agents/skills/skill-builder/references/progressive-disclosure.md +0 -122
- package/.agents/skills/skill-builder/references/self-audit-checklist.md +0 -126
- package/.agents/skills/skill-builder/references/skill-modularity.md +0 -111
- package/.agents/skills/skill-builder/references/skill-types.md +0 -232
- package/.agents/skills/skill-builder/references/thariq-x-post-skills.json +0 -33
- package/.agents/skills/skill-builder/templates/.claude/CLAUDE.md +0 -1
- package/.agents/skills/skill-builder/templates/AGENTS.md +0 -1
- package/.agents/skills/skill-builder/templates/gap-analysis.md +0 -87
- package/.agents/skills/skill-builder/workflows/.claude/CLAUDE.md +0 -1
- package/.agents/skills/skill-builder/workflows/AGENTS.md +0 -1
- package/.agents/skills/skill-builder/workflows/improve-skill.md +0 -136
- package/.agents/skills/skill-builder/workflows/new-skill.md +0 -179
- package/.agents/skills/skill-builder/workflows/polish-skill.md +0 -139
- package/.agents/skills/source-command-sr-loop/SKILL.md +0 -82
- package/.agents/skills/update/.claude/CLAUDE.md +0 -1
- package/.agents/skills/update/AGENTS.md +0 -1
- package/.agents/skills/update/SKILL.md +0 -190
- package/_shared/pr-loop/AGENTS.md +0 -1
- package/_shared/pr-loop/CLAUDE.md +0 -1
- package/_shared/pr-loop/audit-contract.md +0 -183
- package/_shared/pr-loop/audit-reply-template.md +0 -151
- package/_shared/pr-loop/code-rules-gate.md +0 -65
- package/_shared/pr-loop/fix-protocol.md +0 -60
- package/_shared/pr-loop/gh-payloads.md +0 -75
- package/_shared/pr-loop/post-audit-thread-contract.md +0 -51
- package/_shared/pr-loop/precatch-rubric.md +0 -66
- package/_shared/pr-loop/preflight-proposal.md +0 -56
- package/_shared/pr-loop/scripts/post_audit_thread.py +0 -1242
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/post_audit_thread_constants.py +0 -199
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +0 -1115
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +0 -129
- package/_shared/pr-loop/state-schema.md +0 -45
- package/_shared/pr-loop/worker-spawn.md +0 -189
- /package/{.agents/skills/_shared/pr-loop/scripts → scripts}/test_durable_post_lint.py +0 -0
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Description field (trigger catalog)
|
|
2
|
-
|
|
3
|
-
Source: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) (Writing effective descriptions; metadata pre-load), [Claude Code Skills](https://docs.anthropic.com/en/docs/claude-code/skills), Thariq lessons (`thariq-x-post-skills.json`).
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
At session start, **only** each skill’s `name` and `description` load into context. The body loads after selection.
|
|
8
|
-
|
|
9
|
-
The description is **selection metadata**, not a summary of the skill and not process documentation. It answers: *should Claude load this skill for this user turn?*
|
|
10
|
-
|
|
11
|
-
> "The description field is not a summary — it’s a description of when to trigger."
|
|
12
|
-
|
|
13
|
-
> "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
|
|
14
|
-
|
|
15
|
-
## Hard limits
|
|
16
|
-
|
|
17
|
-
| Rule | Value |
|
|
18
|
-
|---|---|
|
|
19
|
-
| Voice | Third person only (no I/you) |
|
|
20
|
-
| Max length | 1024 characters |
|
|
21
|
-
| XML | Forbidden |
|
|
22
|
-
| Empty | Forbidden |
|
|
23
|
-
|
|
24
|
-
## Required shape: trigger catalog
|
|
25
|
-
|
|
26
|
-
Two parts, dense, no story prose:
|
|
27
|
-
|
|
28
|
-
1. **Capability stem** (what) — 5–20 words of capability tokens. Fragments or semicolon-separated verbs. No motivation, no audience address, no “helps you”.
|
|
29
|
-
2. **Triggers** (when) — concrete phrases, slash-commands, file types, and domain nouns the user or model might emit. Prefer a labeled `Triggers:` segment.
|
|
30
|
-
|
|
31
|
-
### Canonical template
|
|
32
|
-
|
|
33
|
-
```yaml
|
|
34
|
-
description: >-
|
|
35
|
-
<capability tokens>. Triggers: <phrase>, <phrase>, <slash>, <filetype>, <near-miss exclusion if needed>.
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Good
|
|
39
|
-
|
|
40
|
-
```yaml
|
|
41
|
-
description: >-
|
|
42
|
-
Extract PDF text/tables; fill forms; merge docs. Triggers: PDF, .pdf, forms, document extraction, fill this form, merge PDFs.
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
```yaml
|
|
46
|
-
description: >-
|
|
47
|
-
Skill lifecycle: classify, scaffold, write via the skill-writer-agent, self-audit, compose sub-skills, polish description triggers. Triggers: build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity.
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
```yaml
|
|
51
|
-
description: >-
|
|
52
|
-
Generate commit messages from git diffs. Triggers: commit message, write a commit, staged changes, git commit help.
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Bad (story / waste)
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
# Narrative — burns always-on tokens, weak for matching
|
|
59
|
-
description: >-
|
|
60
|
-
This skill helps you work with PDF files by guiding Claude through a careful
|
|
61
|
-
process of extraction and form filling so you get reliable results every time.
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
# Vague — no match surface
|
|
66
|
-
description: Helps with documents
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
```yaml
|
|
70
|
-
# Implementation dump — body material, not metadata
|
|
71
|
-
description: >-
|
|
72
|
-
Uses pdfplumber and a five-step validate loop. See scripts/ for helpers.
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
```yaml
|
|
76
|
-
# First/second person
|
|
77
|
-
description: I can help you process Excel files
|
|
78
|
-
description: You can use this to process Excel files
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Authoring steps
|
|
82
|
-
|
|
83
|
-
1. List **capability tokens** (what the skill owns in one breath).
|
|
84
|
-
2. List **10+ user phrasings** that should select this skill (formal, casual, slash, file-type).
|
|
85
|
-
3. List **near-misses** that must *not* select it (sibling skills). Fold only the shortest distinguishing tokens into Triggers if needed.
|
|
86
|
-
4. Assemble stem + `Triggers:` list. Strip adjectives, benefits, and process narrative.
|
|
87
|
-
5. Count characters (≤1024). Prefer under ~400 when possible — every skill’s description is always loaded.
|
|
88
|
-
6. Register the task seeds below on the session task list (`TaskCreate` / `TodoWrite`); complete each with evidence. Do not use markdown checkboxes as the tracker.
|
|
89
|
-
|
|
90
|
-
## Description task seeds
|
|
91
|
-
|
|
92
|
-
- Third person; no I/you
|
|
93
|
-
- Capability stem present (what), ≤20 words of tokens
|
|
94
|
-
- Triggers: segment (or equivalent dense when-list) with concrete phrases
|
|
95
|
-
- No story prose, benefits language, or implementation steps
|
|
96
|
-
- No XML; length ≤1024
|
|
97
|
-
- Distinguishable from sibling skills in the same domain
|
|
98
|
-
- Body holds process detail — not the description
|
|
99
|
-
|
|
100
|
-
## Where process lives
|
|
101
|
-
|
|
102
|
-
| Content | Location |
|
|
103
|
-
|---|---|
|
|
104
|
-
| When to select the skill | `description` frontmatter |
|
|
105
|
-
| How to run the skill | SKILL.md body + companions |
|
|
106
|
-
| Refusal / boundary narrative | When-this-applies section in body |
|
|
107
|
-
| Sub-skill invocation | Body Sub-skills table (`skill-modularity.md`) |
|
|
108
|
-
|
|
109
|
-
## Polish workflow
|
|
110
|
-
|
|
111
|
-
`workflows/polish-skill.md` Step 1 is the dedicated description pass: rewrite any story description into a trigger catalog and re-check discovery against phrase lists.
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# Deterministic skill elements
|
|
2
|
-
|
|
3
|
-
Source: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) (scripts, progressive disclosure), [Lessons from Building Claude Code](thariq-x-post-skills.json), repo skill conventions (`skills/.claude/CLAUDE.md`), `docs/CODE_RULES.md`, host task tools (`TaskCreate`, `TodoWrite`, and equivalents).
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
- [Rule](#rule)
|
|
8
|
-
- [What counts as deterministic](#what-counts-as-deterministic)
|
|
9
|
-
- [Placement](#placement)
|
|
10
|
-
- [Task-tool tracking (not markdown checklists)](#task-tool-tracking-not-markdown-checklists)
|
|
11
|
-
- [CODE_RULES bar (every code file in the skill)](#code_rules-bar-every-code-file-in-the-skill)
|
|
12
|
-
- [Inventory (required before Write)](#inventory-required-before-write)
|
|
13
|
-
- [Required task seeds (Gather / gates)](#required-task-seeds-gather--gates)
|
|
14
|
-
- [Anti-patterns (fail self-audit)](#anti-patterns-fail-self-audit)
|
|
15
|
-
- [How the body should look](#how-the-body-should-look)
|
|
16
|
-
- [Relation to other skill-builder specs](#relation-to-other-skill-builder-specs)
|
|
17
|
-
|
|
18
|
-
## Rule
|
|
19
|
-
|
|
20
|
-
Any skill element that is **deterministic** ships as **code**, a **fixed artifact**, or a **session task** — never as prose-only work tracking.
|
|
21
|
-
|
|
22
|
-
| Deterministic shape | Required home |
|
|
23
|
-
|---|---|
|
|
24
|
-
| Validators, transforms, detection, mechanical sequences | `scripts/` or `workflow/*.mjs` (+ tests, `*_constants/`) |
|
|
25
|
-
| Verbatim templates | `templates/` |
|
|
26
|
-
| Long fixed tables / catalogs Claude must not paraphrase | `reference/` |
|
|
27
|
-
| Ordered work the agent must complete without skipping | Host **task tool** (`TaskCreate`, `TodoWrite`, or equivalent) |
|
|
28
|
-
|
|
29
|
-
> "One of the most powerful tools you can give Claude is code — letting Claude spend its turns on composition rather than reconstructing boilerplate."
|
|
30
|
-
|
|
31
|
-
> "These can include deterministic scripts or tools for maximum robustness."
|
|
32
|
-
|
|
33
|
-
Judgment, routing, and refusal stay in markdown. Fixed procedures and transforms stay in scripts. Required step lists stay on the task list — not as markdown `[ ]` boxes.
|
|
34
|
-
|
|
35
|
-
## What counts as deterministic
|
|
36
|
-
|
|
37
|
-
A process step is deterministic when **all** of these hold:
|
|
38
|
-
|
|
39
|
-
1. Same inputs → same outputs (no open-ended taste or design judgment).
|
|
40
|
-
2. Success or failure is machine-checkable (exit code, schema, path exists, token present, task marked complete with evidence).
|
|
41
|
-
3. A human could write the step as a pure function, a fixed command sequence, or a fixed task list.
|
|
42
|
-
|
|
43
|
-
### Deterministic (must leave prose-only tracking)
|
|
44
|
-
|
|
45
|
-
| Shape | Home |
|
|
46
|
-
|---|---|
|
|
47
|
-
| Validators, linters, schema/packet checks | `scripts/` (or `workflow/*.mjs`) |
|
|
48
|
-
| Multi-step mechanical sequences (compile, collect, gate, scan) | `scripts/` |
|
|
49
|
-
| Detection logic (regex sets, path rules, pattern catalogs) | `scripts/` + `*_constants/` |
|
|
50
|
-
| Sorting, ranking, ID assignment, path resolution | `scripts/` |
|
|
51
|
-
| Verbatim prompt or output templates | `templates/` (skill body points to the path) |
|
|
52
|
-
| Long fixed tables / catalogs | `reference/` or a script that prints the list |
|
|
53
|
-
| Inline Python / JS fences meant to run | Extract to `scripts/` or `workflow/` |
|
|
54
|
-
| Ordered gates, audits, author checks the agent must finish | **Task tool** — seed each item; mark complete with evidence |
|
|
55
|
-
|
|
56
|
-
### Judgment (markdown is correct)
|
|
57
|
-
|
|
58
|
-
| Shape | Home |
|
|
59
|
-
|---|---|
|
|
60
|
-
| When to invoke the skill; refusal lines | `SKILL.md` |
|
|
61
|
-
| How to weigh trade-offs or pick among valid approaches | `SKILL.md` / `reference/` |
|
|
62
|
-
| Gotchas and failure modes | `SKILL.md` |
|
|
63
|
-
| Sub-skill routing and composition | `SKILL.md` |
|
|
64
|
-
| Degree-of-freedom guidance | `SKILL.md` |
|
|
65
|
-
|
|
66
|
-
### Borderline
|
|
67
|
-
|
|
68
|
-
- A one-liner that only launches a tool with no branching → may stay in body; the moment it grows patterns, branches, or magic strings → `scripts/`.
|
|
69
|
-
- A short narrative process outline (Step 1 / Step 2 headings) may stay in body **if** every required work item is also registered on the task list. Headings are orientation; the task list is the completion surface.
|
|
70
|
-
- Markdown `[ ]` as the only place an agent is expected to track progress → **always fail** when a task tool is available.
|
|
71
|
-
|
|
72
|
-
## Placement
|
|
73
|
-
|
|
74
|
-
| Artifact | Directory / surface | Role |
|
|
75
|
-
|---|---|---|
|
|
76
|
-
| Python helpers | `scripts/` | Run, do not load into context as source |
|
|
77
|
-
| Workflow scripts | `workflow/` (`*.mjs`) | Host `Workflow` tool entrypoints |
|
|
78
|
-
| Named constants | `*_constants/` next to the scripts that import them | CODE_RULES config surface for skill code |
|
|
79
|
-
| Fixed templates | `templates/` | Copy/fill or pass to a script |
|
|
80
|
-
| Domain tables, long fixed lists | `reference/` | Load on demand |
|
|
81
|
-
| Required work items | Host task tool | Create at skill start; complete with evidence |
|
|
82
|
-
| Process skeleton + pointers | `SKILL.md` | "Run `scripts/foo.py` …" / "Register tasks from …" |
|
|
83
|
-
|
|
84
|
-
`SKILL.md` names the script, when to run it, what it prints, and how to treat non-zero exit. It does not restate the algorithm. It names which task-seed lists to load and when to register them.
|
|
85
|
-
|
|
86
|
-
## Task-tool tracking (not markdown checklists)
|
|
87
|
-
|
|
88
|
-
Harnesses expose task tools so agents cannot silently skip steps. A skill that expects the agent to finish an ordered set of work **must**:
|
|
89
|
-
|
|
90
|
-
1. Publish the items as a **task seed list** (plain bullets or numbered lines in a reference file — **no** `- [ ]` syntax).
|
|
91
|
-
2. Instruct the agent, at the start of that phase, to **create one session task per item** via the host tool:
|
|
92
|
-
- Prefer `TaskCreate` (or host `Task` / tasks MCP) when present.
|
|
93
|
-
- Else `TodoWrite` / equivalent.
|
|
94
|
-
- Fail closed: if no task tool exists, say so and stop — do not fall back to markdown checkboxes as the tracking plan.
|
|
95
|
-
3. Require each task to be marked complete only with evidence (PASS / FAIL+file:line / N/A+reason / exit code / path).
|
|
96
|
-
4. Ban "copy this checklist into your response and check it off" as the primary tracking method.
|
|
97
|
-
|
|
98
|
-
Reference files may still **catalog** the required items so authors and agents know what to seed. Catalogs are data for `TaskCreate`; they are not the live work board.
|
|
99
|
-
|
|
100
|
-
### Skills that ship multi-step process
|
|
101
|
-
|
|
102
|
-
Any skill whose process has two or more required steps must include a short **Task seeding** instruction in `SKILL.md` or the active workflow:
|
|
103
|
-
|
|
104
|
-
```markdown
|
|
105
|
-
## Task seeding
|
|
106
|
-
|
|
107
|
-
Before Step N, register every item under [reference/…-tasks.md] as a session task
|
|
108
|
-
(TaskCreate / TodoWrite). Work only from the task list. Mark complete with evidence.
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
The seed list file lives under `reference/` (or is a named section of an existing reference). Do not use `- [ ]` in that file.
|
|
112
|
-
|
|
113
|
-
## CODE_RULES bar (every code file in the skill)
|
|
114
|
-
|
|
115
|
-
Skill scripts are production code. They obey the same rules as the rest of the repo (`docs/CODE_RULES.md`), including:
|
|
116
|
-
|
|
117
|
-
- **Named constants** — no bare magic numbers/strings in function bodies; skill-local values live in a `*_constants/` package the script imports.
|
|
118
|
-
- **Types** — parameters and returns annotated; no bare `Any` / untyped escape hatches.
|
|
119
|
-
- **Naming** — full words; `is_`/`has_` booleans; `all_` collections; `each_` multi-letter loops; banned prefixes (`handle_`, `process_`, `manage_`, `do_`).
|
|
120
|
-
- **Errors** — catch specific exceptions; exit with a clear code and message; do not punt raw traces to Claude as the recovery plan.
|
|
121
|
-
- **Tests** — every new production path ships a paired test in the same change (`test_*.py` beside the script, or `*.test.mjs` for workflow helpers).
|
|
122
|
-
- **Execute intent** — body says `Run scripts/…` (execute), not "see the script for the algorithm," unless the script is deliberately reference-only.
|
|
123
|
-
|
|
124
|
-
JS/TS skill helpers follow the same spirit: named constants, no silent stubs, paired tests.
|
|
125
|
-
|
|
126
|
-
## Inventory (required before Write)
|
|
127
|
-
|
|
128
|
-
Every new skill and every improve pass that touches process steps records a **deterministic elements inventory** in the gap analysis:
|
|
129
|
-
|
|
130
|
-
| Column | Content |
|
|
131
|
-
|---|---|
|
|
132
|
-
| Step | Short name |
|
|
133
|
-
| Class | `deterministic` \| `judgment` \| `borderline` |
|
|
134
|
-
| Home | Path (`scripts/…`, `workflow/…`, `templates/…`, `reference/…`, `task-seed:…`, or `SKILL.md`) |
|
|
135
|
-
| Evidence | Why this class (one line) |
|
|
136
|
-
| Paired test | Path if code; `task-tool` if work list; N/A + reason if pure judgment |
|
|
137
|
-
|
|
138
|
-
Rules:
|
|
139
|
-
|
|
140
|
-
- Every `deterministic` row has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or a `task-seed:` pointer — not prose-only.
|
|
141
|
-
- Every code path under `scripts/` or `workflow/` has a paired test path (or a one-line pure-data reason).
|
|
142
|
-
- Every required multi-step work list has a `task-seed:` home and a body instruction to register those tasks.
|
|
143
|
-
- A `borderline` row kept in prose has a one-line why it is not worth extracting.
|
|
144
|
-
|
|
145
|
-
## Required task seeds (Gather / gates)
|
|
146
|
-
|
|
147
|
-
At the **deterministic-elements gate** (and again at self-audit), register **each** line below as its own session task, then complete it with evidence. Do not track these as markdown checkboxes.
|
|
148
|
-
|
|
149
|
-
1. Every process step is classified (deterministic / judgment / borderline).
|
|
150
|
-
2. Every deterministic step has a script, workflow, template, reference, or task-seed path — not prose-only.
|
|
151
|
-
3. No fenced executable source lives only inside `SKILL.md` when it is meant to run.
|
|
152
|
-
4. No multi-branch detection/validation logic lives only as an `rg`/`grep` one-liner in the body.
|
|
153
|
-
5. Each script states execute vs read intent from the body.
|
|
154
|
-
6. Each script uses a `*_constants/` (or equivalent) package for non-obvious literals.
|
|
155
|
-
7. Each new script path has a paired test in the same delivery.
|
|
156
|
-
8. `SKILL.md` process steps point at paths; they do not re-implement the script in markdown.
|
|
157
|
-
9. Every required multi-step work list in the skill is a task-seed catalog plus a seed instruction — not a markdown `- [ ]` board.
|
|
158
|
-
|
|
159
|
-
## Anti-patterns (fail self-audit)
|
|
160
|
-
|
|
161
|
-
- Full Python/JS program in a markdown code fence as the skill's real implementation.
|
|
162
|
-
- Giant shell one-liner with many alternations as the only form of a detector.
|
|
163
|
-
- 10+ step mechanical verification sequence written only as numbered markdown with no script.
|
|
164
|
-
- "Deterministic" claim in prose with no executable path Claude can run.
|
|
165
|
-
- Script that dumps unhandled exceptions for Claude to interpret.
|
|
166
|
-
- Magic literals and unnamed thresholds inside skill scripts.
|
|
167
|
-
- New script with no paired test.
|
|
168
|
-
- Markdown `- [ ]` checklist as the agent's progress tracker when a task tool is available.
|
|
169
|
-
- "Copy this checklist into your response and check off items" as the skill's completion protocol.
|
|
170
|
-
- Task-seed list written with checkbox syntax (`- [ ]`) so agents tick markdown instead of creating tasks.
|
|
171
|
-
|
|
172
|
-
## How the body should look
|
|
173
|
-
|
|
174
|
-
**Good (script):**
|
|
175
|
-
|
|
176
|
-
```markdown
|
|
177
|
-
## Step 3: Validate packet
|
|
178
|
-
|
|
179
|
-
Run `scripts/validate_packet.py --packet <path>`.
|
|
180
|
-
- Exit 0 → continue.
|
|
181
|
-
- Exit 2 → fix listed paths, re-run (do not invent missing sections).
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Good (required work list):**
|
|
185
|
-
|
|
186
|
-
```markdown
|
|
187
|
-
## Task seeding
|
|
188
|
-
|
|
189
|
-
Before self-audit, register every item in `reference/self-audit-tasks.md`
|
|
190
|
-
as a session task (TaskCreate). Complete each with PASS / FAIL+evidence / N/A+reason.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
**Bad:**
|
|
194
|
-
|
|
195
|
-
```markdown
|
|
196
|
-
## Step 3: Validate packet
|
|
197
|
-
|
|
198
|
-
Check that README.md, packet.json, context/source-map.md, …
|
|
199
|
-
Also run compileall, then pytest --collect-only, then scan for …
|
|
200
|
-
(and three more mechanical steps only in prose)
|
|
201
|
-
|
|
202
|
-
## Self-audit
|
|
203
|
-
|
|
204
|
-
Copy this checklist into your response and check every box:
|
|
205
|
-
- [ ] Item one
|
|
206
|
-
- [ ] Item two
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## Relation to other skill-builder specs
|
|
210
|
-
|
|
211
|
-
| Spec | Concern |
|
|
212
|
-
|---|---|
|
|
213
|
-
| `progressive-disclosure.md` | Where files live and how the hub points to them |
|
|
214
|
-
| `skill-modularity.md` | One capability; compose peer skills by name |
|
|
215
|
-
| `description-field.md` | Frontmatter trigger catalog |
|
|
216
|
-
| **This file** | Which elements must be code, task-tool lists, or fixed artifacts |
|
|
217
|
-
|
|
218
|
-
Progressive disclosure alone does not satisfy this file: moving a mechanical sequence into `reference/` as prose still fails when the sequence is deterministic — it belongs in `scripts/` or on the task list.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Progressive Disclosure
|
|
2
|
-
|
|
3
|
-
Source A: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
4
|
-
Source B: [Lessons from Building Claude Code](thariq-x-post-skills.json)
|
|
5
|
-
|
|
6
|
-
## Core concept
|
|
7
|
-
|
|
8
|
-
> Source A: "SKILL.md serves as an overview that points Claude to detailed materials as needed, like a table of contents in an onboarding guide."
|
|
9
|
-
|
|
10
|
-
> Source A: "At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads SKILL.md only when the Skill becomes relevant, and reads additional files only as needed."
|
|
11
|
-
|
|
12
|
-
> Source B: "You should think of the entire file system as a form of context engineering and progressive disclosure."
|
|
13
|
-
|
|
14
|
-
## Standard folder conventions
|
|
15
|
-
|
|
16
|
-
Every skill is a folder. These are the standard subdirectories, each with a specific role:
|
|
17
|
-
|
|
18
|
-
| Directory | Purpose | When to use |
|
|
19
|
-
|---|---|---|
|
|
20
|
-
| `SKILL.md` | Hub — overview, gotchas, process, file index | Always |
|
|
21
|
-
| `reference/` | Deep-dive reference material loaded on demand | Domain knowledge, API surfaces, schemas |
|
|
22
|
-
| `scripts/` | Executable scripts (executed, not read into context) | Deterministic operations, validators, helpers |
|
|
23
|
-
| `workflows/` | Multi-step sub-workflows for different scenarios | Complex branching processes |
|
|
24
|
-
| `templates/` | Output templates or file scaffolds to copy and fill | Structured output formats |
|
|
25
|
-
| `assets/` | Static data files, images, config templates | Reference data, configuration |
|
|
26
|
-
| `examples/` | Copy-pasteable examples and usage patterns | Library/API reference skills |
|
|
27
|
-
|
|
28
|
-
> Source A: "As your Skill grows, you can bundle additional content that Claude loads only when needed."
|
|
29
|
-
|
|
30
|
-
> Source B: "The simplest form of progressive disclosure is to point to other markdown files for Claude to use."
|
|
31
|
-
|
|
32
|
-
## The hub pattern
|
|
33
|
-
|
|
34
|
-
SKILL.md is an index, not a textbook. It tells Claude what exists and when to read it.
|
|
35
|
-
|
|
36
|
-
Observed in model skills (bugteam, pr-converge), the proven layout:
|
|
37
|
-
|
|
38
|
-
1. Core principle (one sentence)
|
|
39
|
-
2. Gotchas (highest-signal content)
|
|
40
|
-
3. When this skill applies (trigger + refusal)
|
|
41
|
-
4. The Process (checklist)
|
|
42
|
-
5. Skill type routing (if applicable)
|
|
43
|
-
6. Principles / constraints
|
|
44
|
-
7. File index (what every file does)
|
|
45
|
-
8. Folder map (end of file)
|
|
46
|
-
|
|
47
|
-
> Source B: "Tell Claude what files are in your skill, and it will read them at appropriate times."
|
|
48
|
-
|
|
49
|
-
## Three progressive disclosure patterns
|
|
50
|
-
|
|
51
|
-
### Pattern 1: High-level guide with references
|
|
52
|
-
|
|
53
|
-
> Source A: "Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed."
|
|
54
|
-
|
|
55
|
-
```markdown
|
|
56
|
-
## Quick start
|
|
57
|
-
[essential content inline]
|
|
58
|
-
|
|
59
|
-
## Advanced features
|
|
60
|
-
**Form filling**: See [FORMS.md](FORMS.md)
|
|
61
|
-
**API reference**: See [REFERENCE.md](REFERENCE.md)
|
|
62
|
-
**Examples**: See [EXAMPLES.md](EXAMPLES.md)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Pattern 2: Domain-specific organization
|
|
66
|
-
|
|
67
|
-
> Source A: "When a user asks about sales metrics, Claude only needs to read sales-related schemas, not finance or marketing data."
|
|
68
|
-
|
|
69
|
-
```markdown
|
|
70
|
-
**Finance**: Revenue, ARR → See [reference/finance.md](reference/finance.md)
|
|
71
|
-
**Sales**: Pipeline, accounts → See [reference/sales.md](reference/sales.md)
|
|
72
|
-
**Product**: API usage, features → See [reference/product.md](reference/product.md)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Pattern 3: Conditional details
|
|
76
|
-
|
|
77
|
-
> Source A: "Show basic content, link to advanced content."
|
|
78
|
-
|
|
79
|
-
```markdown
|
|
80
|
-
For simple edits, modify the XML directly.
|
|
81
|
-
|
|
82
|
-
**For tracked changes**: See [REDLINING.md](REDLINING.md)
|
|
83
|
-
**For OOXML details**: See [OOXML.md](OOXML.md)
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Hard rules
|
|
87
|
-
|
|
88
|
-
### 500-line cap on SKILL.md body
|
|
89
|
-
|
|
90
|
-
> Source A: "Keep SKILL.md body under 500 lines for optimal performance. If your content exceeds this, split it into separate files."
|
|
91
|
-
|
|
92
|
-
### One level deep
|
|
93
|
-
|
|
94
|
-
> Source A: "Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md."
|
|
95
|
-
|
|
96
|
-
> Source A: "Claude may partially read files when they're referenced from other referenced files. When encountering nested references, Claude might use commands like `head -100` to preview content rather than reading entire files, resulting in incomplete information."
|
|
97
|
-
|
|
98
|
-
**Bad:** `SKILL.md → advanced.md → details.md`
|
|
99
|
-
**Good:** `SKILL.md → advanced.md`, `SKILL.md → details.md`
|
|
100
|
-
|
|
101
|
-
### TOC for files over 100 lines
|
|
102
|
-
|
|
103
|
-
> Source A: "For reference files longer than 100 lines, include a table of contents at the top. This ensures Claude can see the full scope of available information even when previewing with partial reads."
|
|
104
|
-
|
|
105
|
-
### Forward slashes only
|
|
106
|
-
|
|
107
|
-
> Source A: "Always use forward slashes in file paths, even on Windows. Unix-style paths work across all platforms."
|
|
108
|
-
|
|
109
|
-
## File naming conventions
|
|
110
|
-
|
|
111
|
-
> Source A: "Name files descriptively: Use names that indicate content: `form_validation_rules.md`, not `doc2.md`."
|
|
112
|
-
|
|
113
|
-
> Source A: "Organize for discovery: Structure directories by domain or feature. Good: `reference/finance.md`, `reference/sales.md`. Bad: `docs/file1.md`, `docs/file2.md`."
|
|
114
|
-
|
|
115
|
-
## Scripts: execute vs read
|
|
116
|
-
|
|
117
|
-
> Source A: "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
118
|
-
|
|
119
|
-
- **Execute:** "Run `analyze_form.py` to extract fields"
|
|
120
|
-
- **Read as reference:** "See `analyze_form.py` for the extraction algorithm"
|
|
121
|
-
|
|
122
|
-
> Source A: "For most utility scripts, execution is preferred because it's more reliable and efficient."
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
# Self-Audit Task Seeds
|
|
2
|
-
|
|
3
|
-
Mandatory post-build verification. Every item must pass before a skill is delivered. Run after writing a new skill, improving an existing one, or polishing.
|
|
4
|
-
|
|
5
|
-
**How to run:** Register **each** bullet below as a session task (`TaskCreate`, `TodoWrite`, or host equivalent). Complete tasks only with evidence (PASS / FAIL+file:line / N/A+reason). Do not track progress as markdown `- [ ]` boxes in chat.
|
|
6
|
-
|
|
7
|
-
Source synthesis: [Anthropic best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices), [Lessons from Building Claude Code](thariq-x-post-skills.json), model skills (bugteam, pr-converge), host task tools.
|
|
8
|
-
|
|
9
|
-
## Core quality
|
|
10
|
-
|
|
11
|
-
- **Conciseness** — Only context Claude doesn't already have. Every line justifies its token cost.
|
|
12
|
-
> "Default assumption: Claude is already very smart."
|
|
13
|
-
- **Degree of freedom** — Matches task fragility. Low for narrow bridges, high for open fields.
|
|
14
|
-
> "Match the level of specificity to the task's fragility and variability."
|
|
15
|
-
- **Naming convention** — Name uses gerund form (verb-ing) unless it's a well-known acronym or proper name. Lowercase, numbers, hyphens only. Max 64 chars. No reserved words.
|
|
16
|
-
> "Use consistent naming patterns to make Skills easier to reference."
|
|
17
|
-
- **Description is a trigger catalog** — Capability stem (what tokens) + concrete Triggers list (when). Third person. Max 1024 chars. No XML. Spec: `description-field.md`.
|
|
18
|
-
> "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
|
|
19
|
-
- **Description is not a story** — No narrative prose, benefits language ("helps you"), first/second person, or process/implementation dump in frontmatter.
|
|
20
|
-
> "The description field is not a summary — it's a description of when to trigger."
|
|
21
|
-
- **Description match surface** — Includes specific phrases, slash forms, and file types a user would say; distinguishable from sibling skills.
|
|
22
|
-
> "Be specific and include key terms."
|
|
23
|
-
- **SKILL.md body under 500 lines**
|
|
24
|
-
> "Keep SKILL.md body under 500 lines for optimal performance."
|
|
25
|
-
- **One level deep** — All reference files link directly from SKILL.md. No nested references.
|
|
26
|
-
> "Claude may partially read files when they're referenced from other referenced files."
|
|
27
|
-
- **TOC on files over 100 lines** — Every reference file >100 lines has a table of contents.
|
|
28
|
-
> "This ensures Claude can see the full scope of available information even when previewing with partial reads."
|
|
29
|
-
- **No time-sensitive claims** — Or isolated in "old patterns" section.
|
|
30
|
-
> "Don't include information that will become outdated."
|
|
31
|
-
- **Consistent terminology** — One term per concept throughout.
|
|
32
|
-
> "Consistency helps Claude understand and follow instructions."
|
|
33
|
-
- **Forward slashes only** — File paths use `/`, not `\`.
|
|
34
|
-
> "Unix-style paths work across all platforms."
|
|
35
|
-
- **Default provided, not options menu** — One recommended approach, escape hatch for special cases.
|
|
36
|
-
> "Don't present multiple approaches unless necessary. Provide a default with escape hatch."
|
|
37
|
-
- **Gotchas section present** — Highest-signal content. Built from real failure observations.
|
|
38
|
-
> "The highest-signal content in any skill is the Gotchas section."
|
|
39
|
-
- **Doesn't state the obvious** — Pushes Claude out of defaults, doesn't re-teach what Claude knows.
|
|
40
|
-
> "Focus on information that pushes Claude out of its normal way of thinking."
|
|
41
|
-
- **Not railroading** — Gives information and flexibility, not rigid scripts.
|
|
42
|
-
> "Give Claude the information it needs, but give it the flexibility to adapt to the situation."
|
|
43
|
-
- **When-this-applies section** — Trigger conditions clear. Refusal cases with exact response text.
|
|
44
|
-
> bugteam pattern — "Refusals — first match wins; respond with the quoted line exactly and stop."
|
|
45
|
-
- **File index present** — Every file in the package listed with its purpose.
|
|
46
|
-
> "Tell Claude what files are in your skill, and it will read them at appropriate times."
|
|
47
|
-
- **Concrete examples** — Input/output pairs or exit scenarios, not abstract descriptions.
|
|
48
|
-
> "Examples help Claude understand the desired style and level of detail more clearly than descriptions alone."
|
|
49
|
-
- **Workflows seed tasks** — Multi-step processes ship a task-seed list and instruct the agent to register each item on the host task tool (`TaskCreate` / `TodoWrite`). No markdown `- [ ]` as the progress board when a task tool is available.
|
|
50
|
-
> Spec: `deterministic-elements.md` — Task-tool tracking.
|
|
51
|
-
- **Feedback loops where quality-critical** — Run validator → fix → repeat pattern.
|
|
52
|
-
> "This pattern greatly improves output quality."
|
|
53
|
-
- **Constraints separated** — Non-negotiables in CONSTRAINTS.md or equivalent section.
|
|
54
|
-
> bugteam pattern — constraints file with design rationale.
|
|
55
|
-
- **Folder map at bottom** — Lists directories and their purposes.
|
|
56
|
-
> pr-converge pattern — "Folder map" section.
|
|
57
|
-
|
|
58
|
-
## Skill-type-specific
|
|
59
|
-
|
|
60
|
-
- **Skill type classified** — Fits one of 9 types. Folder structure matches type recommendation.
|
|
61
|
-
> "The best skills fit cleanly into one; the more confusing ones straddle several."
|
|
62
|
-
- **Domain layout appropriate** — If multiple domains, organized by domain (reference/finance.md, reference/sales.md).
|
|
63
|
-
> Pattern 2 — domain-specific organization.
|
|
64
|
-
|
|
65
|
-
## Deterministic elements
|
|
66
|
-
|
|
67
|
-
Mandatory for every skill. Spec: `deterministic-elements.md`. Progressive disclosure alone does not satisfy these items.
|
|
68
|
-
|
|
69
|
-
- **Process steps classified** — Every process step is marked deterministic, judgment, or borderline (inventory in gap analysis or equivalent).
|
|
70
|
-
> "One of the most powerful tools you can give Claude is code."
|
|
71
|
-
- **Deterministic steps are not prose-only** — Each deterministic step has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or a task-seed list — not only markdown steps, fenced source, markdown checkboxes, or a giant shell one-liner in the body.
|
|
72
|
-
> "These can include deterministic scripts or tools for maximum robustness."
|
|
73
|
-
- **Body points at code** — SKILL.md names when to run each script, what it prints, and how to treat non-zero exit; it does not restate the algorithm.
|
|
74
|
-
> "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
75
|
-
- **No executable-only fences** — Full programs meant to run do not live only inside `SKILL.md` code fences.
|
|
76
|
-
- **CODE_RULES on skill scripts** — Any `scripts/` or `workflow/` code uses named constants (`*_constants/` or equivalent), type annotations where the language supports them, specific error handling, and no banned identifier/prefix patterns from CODE_RULES.
|
|
77
|
-
- **Paired tests for new scripts** — Each new production script path ships a paired test in the same delivery (N/A only when the package has zero code files).
|
|
78
|
-
- **Task seeds for required work lists** — Every ordered gate/audit/process list the agent must finish is a plain task-seed catalog plus a seed instruction; no markdown checkbox board.
|
|
79
|
-
- **Scripts solve, don't punt** — Error handling explicit, no raw exceptions for Claude to figure out.
|
|
80
|
-
> "Handle error conditions rather than punting to Claude."
|
|
81
|
-
- **Execute vs read intent clear** — "Run script.py" (execute) vs "See script.py for algorithm" (read).
|
|
82
|
-
> "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
83
|
-
- **Dependencies listed** — Required packages stated, verified as available (N/A when no scripts).
|
|
84
|
-
> "List required packages in your SKILL.md and verify they're available."
|
|
85
|
-
- **MCP tools fully qualified** — `ServerName:tool_name` format when MCP tools appear.
|
|
86
|
-
> "Always use fully qualified tool names to avoid 'tool not found' errors."
|
|
87
|
-
- **Plan-validate-execute for high-stakes ops** — Verifiable intermediate outputs before destructive actions (N/A when no high-stakes ops).
|
|
88
|
-
> "Catches errors early: validation finds problems before changes are applied."
|
|
89
|
-
|
|
90
|
-
## Setup and memory (if applicable)
|
|
91
|
-
|
|
92
|
-
- **Setup instructions clear** — config.json pattern or AskUserQuestion for initial context.
|
|
93
|
-
> "If the config is not set up, the agent can then ask the user for information."
|
|
94
|
-
- **Persistent data uses `${CLAUDE_PLUGIN_DATA}`** — Not stored in skill directory itself.
|
|
95
|
-
> "Data stored in the skill directory may be deleted when you upgrade the skill."
|
|
96
|
-
|
|
97
|
-
## Modularity and composition
|
|
98
|
-
|
|
99
|
-
Mandatory for every skill. Spec: `skill-modularity.md`. Progressive disclosure (file split) does not satisfy these items.
|
|
100
|
-
|
|
101
|
-
- **Single capability boundary** — One clear job in one sentence. Unrelated jobs are separate skills or an orchestrator that only routes to named sub-skills.
|
|
102
|
-
> "The best skills fit cleanly into one; the more confusing ones straddle several."
|
|
103
|
-
- **Compose before reimplement** — Steps an existing skill already owns are invoked by name, not pasted into this package. Local reimplementation has a one-line why in the gap analysis or gotchas.
|
|
104
|
-
> "You can just reference other skills by name, and the model will invoke them if they are installed."
|
|
105
|
-
- **Sub-skills table (when composing)** — Each invoked skill lists when to call it, what it produces, and missing-install behavior. N/A only when the skill is a pure leaf (invokes no peers).
|
|
106
|
-
> "You may want to have skills that depend on each other."
|
|
107
|
-
- **Sibling boundary clear** — Description and when-this-applies distinguish this skill from related skills in the same domain. No silent overlap.
|
|
108
|
-
> "The description field is not a summary — it's a description of when to trigger."
|
|
109
|
-
- **No monolith packing** — Multi-capability content is not stuffed under one description. Either split packages or thin orchestrator + peer sub-skills (not nested fake skills under `workflows/`).
|
|
110
|
-
> skill-modularity.md — anti-patterns: monolith, silent reimplementation, folder nesting as composition.
|
|
111
|
-
|
|
112
|
-
## Hooks (if applicable)
|
|
113
|
-
|
|
114
|
-
- **Hooks declared** — If skill registers hooks, their purpose and scope is stated.
|
|
115
|
-
> "Skills can include hooks that are only activated when the skill is called."
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Usage
|
|
120
|
-
|
|
121
|
-
1. Register every bullet in this file as a session task (batch create is fine).
|
|
122
|
-
2. Work only from the task list. Mark complete with PASS, FAIL+file:line+fix, or N/A+one-line reason.
|
|
123
|
-
3. Any FAIL must be fixed before delivery; re-open a task if the fix needs re-check.
|
|
124
|
-
4. Sub-skills table may be N/A for pure leaf skills; single capability boundary and no-monolith never are. Process-step classification and "deterministic steps are not prose-only" never are N/A — pure-judgment skills still inventory steps and mark each as judgment.
|
|
125
|
-
5. Deliver a short audit summary (counts of PASS / N/A / FAIL fixed) — not a markdown checkbox dump.
|
|
126
|
-
|