claude-dev-env 1.93.0 → 1.94.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/_shared/pr-loop/CLAUDE.md +1 -0
- package/_shared/pr-loop/audit-contract.md +1 -1
- package/_shared/pr-loop/gh-payloads.md +3 -3
- package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
- package/_shared/pr-loop/scripts/README.md +2 -2
- package/_shared/pr-loop/scripts/code_rules_gate.py +127 -13
- package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/code_rules_gate_constants.py +4 -0
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +146 -69
- package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
- package/_shared/pr-loop/state-schema.md +3 -22
- package/bin/CLAUDE.md +1 -1
- package/bin/install.mjs +2 -7
- package/bin/install.test.mjs +10 -4
- package/hooks/blocking/CLAUDE.md +2 -0
- package/hooks/blocking/pii_commit_command.py +398 -0
- package/hooks/blocking/pii_payload_scan.py +133 -0
- package/hooks/blocking/pii_prevention_blocker.py +151 -449
- package/hooks/blocking/pii_scanner.py +26 -1
- package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +2 -2
- package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
- package/hooks/blocking/test_pii_scanner.py +27 -2
- package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
- package/hooks/hooks_constants/CLAUDE.md +2 -2
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
- package/hooks/hooks_constants/local_identity.py +65 -15
- package/hooks/hooks_constants/pii_prevention_constants.py +20 -8
- package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
- package/hooks/hooks_constants/test_local_identity.py +68 -0
- package/package.json +1 -1
- package/scripts/CLAUDE.md +10 -1
- package/scripts/Get-SessionAccount.ps1 +210 -0
- package/scripts/tests/CLAUDE.md +15 -1
- package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
- package/skills/CLAUDE.md +3 -25
- package/skills/anthropic-plan/SKILL.md +1 -13
- package/skills/autoconverge/CLAUDE.md +5 -2
- package/skills/autoconverge/SKILL.md +112 -387
- package/skills/autoconverge/reference/CLAUDE.md +4 -1
- package/skills/autoconverge/reference/closing-report.md +9 -2
- package/skills/autoconverge/reference/convergence.md +26 -22
- package/skills/autoconverge/reference/headless-safety.md +44 -0
- package/skills/autoconverge/reference/multi-pr.md +88 -0
- package/skills/autoconverge/reference/self-closing-loop.md +84 -0
- package/skills/autoconverge/reference/stop-conditions.md +21 -13
- package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
- package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
- package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
- package/skills/autoconverge/workflow/converge.mjs +284 -94
- package/skills/bugteam/CLAUDE.md +1 -1
- package/skills/bugteam/CONSTRAINTS.md +3 -3
- package/skills/bugteam/PROMPTS.md +8 -19
- package/skills/bugteam/SKILL.md +13 -14
- package/skills/bugteam/reference/CLAUDE.md +1 -1
- package/skills/bugteam/reference/audit-and-teammates.md +2 -2
- package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
- package/skills/bugteam/reference/github-pr-reviews.md +56 -38
- package/skills/bugteam/reference/team-setup.md +11 -11
- package/skills/bugteam/scripts/CLAUDE.md +6 -6
- package/skills/bugteam/scripts/README.md +20 -8
- package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
- package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
- package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
- package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
- package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
- package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
- package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
- package/skills/copilot-finding-triage/SKILL.md +80 -28
- package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
- package/skills/copilot-finding-triage/templates/notification.md +8 -3
- package/skills/everything-search/SKILL.md +1 -2
- package/skills/grokify/SKILL.md +58 -0
- package/skills/grokify/templates/handoff-template.md +92 -0
- package/skills/orchestrator/SKILL.md +12 -8
- package/skills/orchestrator-refresh/SKILL.md +3 -3
- package/skills/pr-converge/SKILL.md +132 -233
- package/skills/pr-converge/reference/convergence-gates.md +102 -66
- package/skills/pr-converge/reference/examples.md +37 -25
- package/skills/pr-converge/reference/fix-protocol.md +7 -7
- package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
- package/skills/pr-converge/reference/per-tick.md +64 -41
- package/skills/pr-converge/reference/state-schema.md +27 -2
- package/skills/pr-converge/scripts/CLAUDE.md +8 -0
- package/skills/pr-converge/scripts/README.md +4 -3
- package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
- package/skills/pr-converge/scripts/check_convergence.py +189 -645
- package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
- package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
- package/skills/pr-converge/scripts/conftest.py +8 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
- package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
- package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
- package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
- package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
- package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
- package/skills/privacy-hygiene/SKILL.md +8 -7
- package/skills/reviewer-gates/SKILL.md +26 -8
- package/skills/session-log/SKILL.md +11 -12
- package/skills/session-tidy/SKILL.md +40 -30
- package/skills/skill-builder/CLAUDE.md +13 -10
- package/skills/skill-builder/SKILL.md +31 -31
- package/skills/skill-builder/references/CLAUDE.md +10 -6
- package/skills/skill-builder/references/delegation-map.md +13 -4
- package/skills/skill-builder/references/description-field.md +113 -0
- package/skills/skill-builder/references/self-audit-checklist.md +21 -4
- package/skills/skill-builder/references/skill-modularity.md +113 -0
- package/skills/skill-builder/references/skill-types.md +4 -0
- package/skills/skill-builder/templates/CLAUDE.md +4 -4
- package/skills/skill-builder/templates/gap-analysis.md +25 -1
- package/skills/skill-builder/workflows/CLAUDE.md +6 -4
- package/skills/skill-builder/workflows/improve-skill.md +17 -16
- package/skills/skill-builder/workflows/new-skill.md +34 -10
- package/skills/skill-builder/workflows/polish-skill.md +59 -43
- package/skills/usage-pause/SKILL.md +10 -14
- package/skills/bdd-protocol/CLAUDE.md +0 -26
- package/skills/bdd-protocol/SKILL.md +0 -30
- package/skills/bdd-protocol/references/CLAUDE.md +0 -10
- package/skills/bdd-protocol/references/anti-patterns.md +0 -26
- package/skills/bdd-protocol/references/example-mapping.md +0 -23
- package/skills/bg-agent/CLAUDE.md +0 -17
- package/skills/bg-agent/SKILL.md +0 -69
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
- package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
- package/skills/caveman/CLAUDE.md +0 -15
- package/skills/caveman/SKILL.md +0 -38
- package/skills/code/CLAUDE.md +0 -17
- package/skills/code/SKILL.md +0 -178
- package/skills/deep-research/CLAUDE.md +0 -17
- package/skills/deep-research/SKILL.md +0 -80
- package/skills/findbugs/CLAUDE.md +0 -20
- package/skills/findbugs/SKILL.md +0 -241
- package/skills/fixbugs/CLAUDE.md +0 -19
- package/skills/fixbugs/SKILL.md +0 -142
- package/skills/gh-paginate/CLAUDE.md +0 -18
- package/skills/gh-paginate/SKILL.md +0 -84
- package/skills/gotcha/CLAUDE.md +0 -33
- package/skills/gotcha/SKILL.md +0 -73
- package/skills/implement/CLAUDE.md +0 -27
- package/skills/implement/SKILL.md +0 -66
- package/skills/implement/scripts/CLAUDE.md +0 -22
- package/skills/implement/scripts/append_note.py +0 -133
- package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
- package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
- package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
- package/skills/implement/scripts/test_append_note.py +0 -191
- package/skills/log-audit/CLAUDE.md +0 -20
- package/skills/log-audit/SKILL.md +0 -66
- package/skills/log-audit/reference/CLAUDE.md +0 -9
- package/skills/log-audit/reference/charter.md +0 -52
- package/skills/log-audit/scripts/CLAUDE.md +0 -27
- package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
- package/skills/log-audit/scripts/collect_log_window.py +0 -199
- package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
- package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
- package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
- package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
- package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
- package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
- package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
- package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
- package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
- package/skills/logifix/CLAUDE.md +0 -36
- package/skills/logifix/SKILL.md +0 -69
- package/skills/logifix/scripts/CLAUDE.md +0 -16
- package/skills/logifix/scripts/logifix.ps1 +0 -205
- package/skills/monitor-open-prs/CLAUDE.md +0 -34
- package/skills/monitor-open-prs/SKILL.md +0 -88
- package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
- package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
- package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
- package/skills/monitor-open-prs/test_skill_contract.py +0 -27
- package/skills/post-audit-findings/SKILL.md +0 -80
- package/skills/pr-consistency-audit/CLAUDE.md +0 -34
- package/skills/pr-consistency-audit/SKILL.md +0 -116
- package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
- package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
- package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
- package/skills/pr-fix-protocol/SKILL.md +0 -65
- package/skills/pr-review-responder/CLAUDE.md +0 -35
- package/skills/pr-review-responder/EXAMPLES.md +0 -590
- package/skills/pr-review-responder/PRINCIPLES.md +0 -533
- package/skills/pr-review-responder/README.md +0 -168
- package/skills/pr-review-responder/SKILL.md +0 -203
- package/skills/pr-review-responder/TESTING.md +0 -350
- package/skills/pr-scope-resolve/SKILL.md +0 -45
- package/skills/pre-compact/CLAUDE.md +0 -24
- package/skills/pre-compact/SKILL.md +0 -134
- package/skills/qbug/CLAUDE.md +0 -40
- package/skills/qbug/SKILL.md +0 -387
- package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
- package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
- package/skills/refine/CLAUDE.md +0 -44
- package/skills/refine/SKILL.md +0 -262
- package/skills/refine/templates/CLAUDE.md +0 -17
- package/skills/refine/templates/implementation-notes-template.html +0 -56
- package/skills/refine/templates/plan-template.md +0 -60
- package/skills/research-mode/CLAUDE.md +0 -35
- package/skills/research-mode/SKILL.md +0 -53
- package/skills/structure-prompt/CLAUDE.md +0 -42
- package/skills/structure-prompt/SKILL.md +0 -44
- package/skills/structure-prompt/reference/CLAUDE.md +0 -28
- package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
- package/skills/structure-prompt/reference/block-classification.md +0 -27
- package/skills/structure-prompt/reference/canonical-case.md +0 -48
- package/skills/structure-prompt/reference/citation-depth.md +0 -70
- package/skills/structure-prompt/reference/cleanup.md +0 -33
- package/skills/structure-prompt/reference/constraints.md +0 -33
- package/skills/structure-prompt/reference/directives.md +0 -37
- package/skills/structure-prompt/reference/examples.md +0 -72
- package/skills/structure-prompt/reference/instantiation.md +0 -51
- package/skills/structure-prompt/reference/output-contract.md +0 -72
- package/skills/structure-prompt/reference/per-category.md +0 -23
- package/skills/structure-prompt/reference/persona.md +0 -38
- package/skills/structure-prompt/reference/research.md +0 -33
- package/skills/structure-prompt/reference/structure.md +0 -28
- package/skills/verified-build/CLAUDE.md +0 -33
- package/skills/verified-build/SKILL.md +0 -33
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Worked examples
|
|
2
|
-
|
|
3
|
-
Each example shows an input prompt and the rewritten output, with a note on which spokes fire.
|
|
4
|
-
|
|
5
|
-
## Example 1: Code-audit prompt with full diff
|
|
6
|
-
|
|
7
|
-
**Input shape**
|
|
8
|
-
- Mission, metadata, large 4-file diff, sub-bucket framework (A1-A7), cross-bucket questions, output spec — in that order.
|
|
9
|
-
|
|
10
|
-
**Spokes that fire**
|
|
11
|
-
- [`structure.md`](structure.md): the diff sits between metadata and framework; relocate to the end.
|
|
12
|
-
|
|
13
|
-
**Rewritten ordering**
|
|
14
|
-
1. Mission
|
|
15
|
-
2. Metadata
|
|
16
|
-
3. Framework (A1-A7)
|
|
17
|
-
4. Cross-bucket questions
|
|
18
|
-
5. Output spec
|
|
19
|
-
6. Diff (all four files contiguous at the end)
|
|
20
|
-
|
|
21
|
-
## Example 2: Persona-led generic prompt
|
|
22
|
-
|
|
23
|
-
**Input**
|
|
24
|
-
> You are a senior security engineer. Be thorough and review this code carefully. Try to find SQL injection, XSS, and auth issues.
|
|
25
|
-
>
|
|
26
|
-
> ```python
|
|
27
|
-
> # ... code block ...
|
|
28
|
-
> ```
|
|
29
|
-
|
|
30
|
-
**Spokes that fire**
|
|
31
|
-
- [`persona.md`](persona.md): "You are a senior security engineer" → mission line.
|
|
32
|
-
- [`directives.md`](directives.md): "Be thorough" → surface enumeration; "carefully" → locator requirement.
|
|
33
|
-
- [`constraints.md`](constraints.md): "Try to find" → measurable criteria.
|
|
34
|
-
- [`structure.md`](structure.md): code block present → verifies ordering, emits gap note.
|
|
35
|
-
|
|
36
|
-
**Rewritten output**
|
|
37
|
-
> Audit this code for security issues.
|
|
38
|
-
> Inspect: SQL injection, XSS, auth issues.
|
|
39
|
-
> Cite file:line for every finding.
|
|
40
|
-
> ```python
|
|
41
|
-
> # ... code block ...
|
|
42
|
-
> ```
|
|
43
|
-
>
|
|
44
|
-
> The rewritten prompt carries these `> Gap:` lines recording every spoke that fired (per the [no silent action](output-contract.md#disposition-invariants) invariant):
|
|
45
|
-
> `> Gap: Persona transformed — original "You are a senior security engineer" replaced with mission "Audit this code for security issues."`
|
|
46
|
-
> `> Gap: Directive "Be thorough" replaced with surface enumeration "Inspect: SQL injection, XSS, auth issues."`
|
|
47
|
-
> `> Gap: Directive "carefully" replaced with locator requirement "Cite file:line for every finding."`
|
|
48
|
-
> `> Gap: Narrative directive "Try to find" merged with directives output — both derived the same measurable criteria "Inspect: SQL injection, XSS, auth issues."`
|
|
49
|
-
> `> Gap: Structural ordering verified — input already in canonical sequence.`
|
|
50
|
-
|
|
51
|
-
## Example 3: Multi-category framework without disposition
|
|
52
|
-
|
|
53
|
-
**Input shape**
|
|
54
|
-
- Framework names 5 categories. No per-category requirement on emission.
|
|
55
|
-
|
|
56
|
-
**Spokes that fire**
|
|
57
|
-
- [`per-category.md`](per-category.md): insert canonical disposition line under the category list header.
|
|
58
|
-
|
|
59
|
-
**Inserted line**
|
|
60
|
-
> Each category returns either at least one finding with a locator OR exactly one proof-of-absence with at least 3 adversarial probes specific to that category. A category returning neither is a protocol gap.
|
|
61
|
-
|
|
62
|
-
## Example 4: Already-optimized prompt
|
|
63
|
-
|
|
64
|
-
**Input**
|
|
65
|
-
- Mission first, framework before data body, persona absent, multi-category disposition present, no soft directives, code block tagged.
|
|
66
|
-
|
|
67
|
-
**Spokes that fire**
|
|
68
|
-
- [`structure.md`](structure.md): code block present → verifies ordering, emits `> Gap:` note recording the check.
|
|
69
|
-
- [`per-category.md`](per-category.md): multi-category framework present → confirms disposition line exists, emits `> Gap:` note.
|
|
70
|
-
|
|
71
|
-
**Rewritten output**
|
|
72
|
-
- Identical to input save for the appended gap notes from structure and per-category.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Fill placeholders with real values
|
|
2
|
-
|
|
3
|
-
Some prompts ship as templates with placeholder tokens. The skill replaces those with concrete values pulled from the rubric, the companion artifact, or the user.
|
|
4
|
-
|
|
5
|
-
## Detection patterns
|
|
6
|
-
|
|
7
|
-
A placeholder is any bracketed token whose content reads as instructional rather than a literal name. Common shapes:
|
|
8
|
-
|
|
9
|
-
- `[REPO/ARTIFACT]`
|
|
10
|
-
- `[TARGET ID]`
|
|
11
|
-
- `[N]`
|
|
12
|
-
- `[ARTIFACT METADATA]`
|
|
13
|
-
- `[INLINE THE FULL ARTIFACT HERE — do not ask the agent to fetch.]`
|
|
14
|
-
- `[List the supported …]`
|
|
15
|
-
- `[Declared minimum …]`
|
|
16
|
-
- `[file:line / paragraph]`
|
|
17
|
-
- `[A1]–[AN]`, `[B1]–[BN]`, etc.
|
|
18
|
-
|
|
19
|
-
## Procedure
|
|
20
|
-
|
|
21
|
-
1. Find every placeholder in the prompt.
|
|
22
|
-
2. For each placeholder, look up the value via [`research.md`](research.md).
|
|
23
|
-
3. Replace the placeholder with the real value.
|
|
24
|
-
4. For placeholders matching `[INLINE THE FULL ARTIFACT HERE …]` (any placeholder that opens with `INLINE THE FULL ARTIFACT`, including the long-form `[INLINE THE FULL ARTIFACT HERE — do not ask the agent to fetch.]`), the artifact's text comes from one of the sources [`research.md`](research.md) enumerates — a local file the user named when invoking in file-path mode, a sibling artifact the rubric points at, content the user pasted alongside the prompt, or a path the user supplied via AskUserQuestion. Inline that text as fenced code blocks, using each file's path as a `###` heading above its fenced block. The skill never reaches outside those sources for retrieval; when none of them yields the artifact, the spoke leaves the placeholder in place and records a gap per [`output-contract.md`](output-contract.md).
|
|
25
|
-
|
|
26
|
-
## When the rubric points at a sibling prompt
|
|
27
|
-
|
|
28
|
-
Rubric files often say "use category-X.md as the canonical worked example." When that happens:
|
|
29
|
-
|
|
30
|
-
1. Read the sibling prompt.
|
|
31
|
-
2. Copy the sibling's data body — the inlined artifact — into this prompt's data body.
|
|
32
|
-
3. Sharpen this prompt's sub-bucket bullets so they cite the identifiers in the data body that match this category's axes.
|
|
33
|
-
4. Keep the category-specific phrasing intact. Only the data body and the per-bucket bullets that reference data-body content change.
|
|
34
|
-
|
|
35
|
-
## Sub-buckets that have nothing to find in the data body
|
|
36
|
-
|
|
37
|
-
When the data body holds nothing that fits a particular sub-bucket (e.g., a SQL sub-bucket and a diff with no SQL), that sub-bucket stays as a proof-of-absence shape. Spell out three adversarial probes the agent runs to confirm zero relevant content. Use the sub-bucket bullets to name the things the agent searches for.
|
|
38
|
-
|
|
39
|
-
## What stays put
|
|
40
|
-
|
|
41
|
-
These elements pass through untouched:
|
|
42
|
-
|
|
43
|
-
- The mission's category name (e.g., "Category B only") — derived from the file name, not the artifact
|
|
44
|
-
- The per-category disposition statement
|
|
45
|
-
- The cross-bucket question structure (Q1, Q2, Q3 by name)
|
|
46
|
-
- The output spec's lead format (`Total: N (P0=N, P1=N, P2=N)`)
|
|
47
|
-
- The adversarial-pass count and severity tier — handled by [`adversarial-tuning.md`](adversarial-tuning.md) when the noun needs sharpening; the count and tier values come from the original prompt's own adversarial phrase, not a fixed default
|
|
48
|
-
|
|
49
|
-
## Disposition reporting
|
|
50
|
-
|
|
51
|
-
Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When placeholders were filled: `> Gap: Placeholders instantiated — <N> placeholders replaced with real values.` When no placeholders exist: `> Gap: Instantiation verified — no placeholder tokens found.` When a placeholder could not be resolved: `> Gap: Placeholder "<token>" left in place — no real value found in available sources.` Silent pass is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Output contract
|
|
2
|
-
|
|
3
|
-
The skill emits exactly one artifact: the rewritten prompt. The emission shape depends on how the input arrived.
|
|
4
|
-
|
|
5
|
-
## Emission modes
|
|
6
|
-
|
|
7
|
-
**Paste mode** — input arrives as the user's message body or as a fenced block within it. Emit one fenced block containing the rewritten prompt. Choose a fence length that is strictly longer than the longest consecutive backtick run anywhere in the rewritten prompt (i.e., `max_backtick_run + 1`, with a minimum of four backticks). This ensures no inner fence in the rewritten prompt can prematurely close the outer fence — including cases where the input already used a 4+ backtick wrapper:
|
|
8
|
-
|
|
9
|
-
``````
|
|
10
|
-
`````
|
|
11
|
-
<rewritten prompt, which may itself contain 4-backtick fences>
|
|
12
|
-
`````
|
|
13
|
-
``````
|
|
14
|
-
|
|
15
|
-
**File-path mode** — input arrives as a file path argument (e.g., `/structure-prompt path/to/file.md`). File-path mode targets Markdown prompt artifacts; rewriting non-Markdown files is not supported. Rewrite the file in place. Emit a confirmation that names the file, gives the line-count delta, and lists the spokes that fired. When gaps exist, the confirmation also lists them — the output may span multiple lines.
|
|
16
|
-
|
|
17
|
-
## Disposition invariants
|
|
18
|
-
|
|
19
|
-
**No silent action** (also referenced as "no silent no-op"). Every spoke that fires MUST record its action. Two cases use the same `> Gap:` mechanism:
|
|
20
|
-
|
|
21
|
-
- **Deferred.** The spoke elected not to apply its transformation — missing source, ambiguous detection, fallback to user input, carve-out match, or any other reason. The gap note records what was deferred and why.
|
|
22
|
-
- **Applied.** The spoke successfully applied its transformation. The gap note records what changed (e.g., persona transformed, directive replaced, citation added) so the reader can detect the change.
|
|
23
|
-
|
|
24
|
-
Silent omission is never the correct disposition in either case. The reader of the output must always be able to detect which spokes fired, which deferred, and why.
|
|
25
|
-
|
|
26
|
-
## Preservation invariants
|
|
27
|
-
|
|
28
|
-
Two clauses govern what the rewritten prompt may change.
|
|
29
|
-
|
|
30
|
-
**Existing input content is preserved byte-for-byte.** The rewrite must not alter any of these values when they already appear in the input:
|
|
31
|
-
|
|
32
|
-
- Identifiers (variable names, function names, file paths)
|
|
33
|
-
- IDs and SHAs
|
|
34
|
-
- ID prefixes
|
|
35
|
-
- Proper names (people, products, services)
|
|
36
|
-
- Numeric values (line numbers, thresholds, counts)
|
|
37
|
-
- URLs
|
|
38
|
-
- Code block contents
|
|
39
|
-
|
|
40
|
-
**New numeric criteria are additive content.** When a spoke introduces a new measurable threshold (e.g., the `≥3` adversarial probes from [`per-category.md`](per-category.md), the citation-occurrence cutoffs from [`citation-depth.md`](citation-depth.md), or any new word/probe/count limit), that number is sourced per the authorized-additions list below. New numeric criteria augment the prompt; they never overwrite a numeric value the input already carries.
|
|
41
|
-
|
|
42
|
-
## Idempotency
|
|
43
|
-
|
|
44
|
-
Output stabilizes by the second invocation: the second and all subsequent invocations produce identical output (i.e., `f(f(x)) == f(f(f(x)))`). On the first invocation, content-mutating spokes (persona, cleanup, directives, constraints, adversarial-tuning, instantiation, citation-depth, canonical-case) apply their transformations and emit "applied" gap notes alongside situation-dependent spokes (structure, per-category) that re-fire because their input conditions still hold. On the second invocation, those mutating spokes no longer match their detection conditions (placeholders substituted, identifiers cited, markers present, noun sharpened, canonical sub-bucket marked), so their gap notes disappear and situation-dependent notes shift to "verified" wording. Combined with the gap-report block's deterministic replacement, the second invocation's output is stable: a third invocation produces identical output.
|
|
45
|
-
|
|
46
|
-
## Authorized additions
|
|
47
|
-
|
|
48
|
-
The skill adds content only when a spoke explicitly authorizes it. Evidence-required additions (cited values from the rubric, placeholder values from the input or user) must also pass [`research.md`](research.md) confirmation that the new content matches a real source (rubric, sibling artifact, user-pasted context, or AskUserQuestion answer). Skill-defined additions (the per-category disposition line, surface-formatting cleanup, the failure-mode noun from the adversarial-tuning built-in lookup table) are authorized by their spoke firing alone. The authorized additions are:
|
|
49
|
-
|
|
50
|
-
- The mission line, when [`persona.md`](persona.md) replaces a role assignment
|
|
51
|
-
- The per-category disposition line, when [`per-category.md`](per-category.md) detects an unenforced framework
|
|
52
|
-
- Measurable criteria, when [`directives.md`](directives.md) or [`constraints.md`](constraints.md) replaces a soft directive
|
|
53
|
-
- Real values in place of placeholders, when [`instantiation.md`](instantiation.md) fires
|
|
54
|
-
- `file:line` citations on identifier mentions, when [`citation-depth.md`](citation-depth.md) fires
|
|
55
|
-
- The ⭐ canonical-case marker on one sub-bucket, when [`canonical-case.md`](canonical-case.md) fires
|
|
56
|
-
- A category-specific failure-mode noun in the adversarial-pass phrase, when [`adversarial-tuning.md`](adversarial-tuning.md) fires
|
|
57
|
-
- Surface-formatting normalization (typo correction, single bullet style, language tags on fenced blocks, trimmed trailing whitespace, collapsed blank-line runs, sequential heading levels), when [`cleanup.md`](cleanup.md) fires
|
|
58
|
-
- `(citation unavailable: <reason>)` inline markers adjacent to unciteable identifiers, when [`citation-depth.md`](citation-depth.md) fires
|
|
59
|
-
|
|
60
|
-
Skill-defined additions (the per-category disposition line, surface-formatting cleanup, the failure-mode noun from [`adversarial-tuning.md`](adversarial-tuning.md)'s built-in lookup table) are authorized by their spoke firing alone — they do not need an external source. For evidence-required additions (cited values from the rubric, placeholder values from the input or user), [`research.md`](research.md) confirms the new content matches a real source. When evidence is missing for an evidence-required addition, the spoke leaves the prompt as-is and reports the gap. For a skill-defined addition, once the spoke's detection conditions are met the transformation fires and always emits an action note recording what changed — the spoke does not need external evidence beyond its own rubric, unlike evidence-required additions. (Skill-defined additions are still situation-dependent per the routing table; "fires" here means when the spoke is active, not on every invocation.) The "No silent action" invariant applies to both applied and deferred outcomes. The gap-report shape depends on emission mode:
|
|
61
|
-
|
|
62
|
-
- **Paste mode.** The fenced block contains exactly the rewritten prompt — no footer follows it. Record gaps inside the fenced block as a final blockquoted note prefixed `> Gap:` (one line per gap). The note sits below the rewritten prompt's last block and remains inside the fence. On a second invocation, prior-run `> Gap:` lines are deterministically replaced (not accumulated): the current run's gap notes overwrite any prior-run gap notes, ensuring idempotent output across invocations. The passthrough rule in [`block-classification.md`](block-classification.md) step 3 still treats the prior-run gap region as inert during block tagging, but the current run's gap line emission replaces rather than appends.
|
|
63
|
-
- **File-path mode.** The rewritten file on disk MUST be self-describing for gaps. Append a final HTML comment block at the bottom of the file. The block opens with `<!-- gap-report:` on its own line, contains one `> Gap:` line per gap, and closes with `-->` on its own line. The `<!-- gap-report:` block is deterministically replaced (never accumulated) to reflect the current run's gap state. When the current run has gaps, a new `<!-- gap-report:` block containing the gap lines overwrites any prior block. When the current run has no gaps, any prior block is replaced with `<!-- gap-report: none -->` — the file always carries a self-describing gap-report block so a reader can determine the latest run's gap state without external context. Example for a run with two gaps:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
<!-- gap-report:
|
|
67
|
-
> Gap: Persona transformed — original "You are an expert code reviewer" replaced with mission "Find bugs in this code."
|
|
68
|
-
> Gap: canonical-case marker skipped — framework has 5+ sub-buckets but rubric match, bullet density, and identifier density found no clear canonical case
|
|
69
|
-
-->
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
The post-edit confirmation message that names the file and the spokes that fired ALSO lists the same gaps, but the file itself is now self-describing — a reader of the file alone can detect which spokes deferred and why.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Per-category disposition
|
|
2
|
-
|
|
3
|
-
Every multi-category framework requires each category to emit exactly one disposition:
|
|
4
|
-
- At least one positive finding with a locator (file:line, section ID, line number, or equivalent) per category
|
|
5
|
-
- Exactly one explicit proof-of-absence with at least 3 adversarial probes specific to that category
|
|
6
|
-
|
|
7
|
-
## Detection
|
|
8
|
-
|
|
9
|
-
The framework names 2+ categories, surfaces, sub-buckets, items, checks, or criteria the agent processes.
|
|
10
|
-
|
|
11
|
-
## Insertion
|
|
12
|
-
|
|
13
|
-
Insert this exact line directly under the category list header, substituting `<category-noun>` with whatever the prompt calls them (sub-bucket, surface, item, category, check, criterion):
|
|
14
|
-
|
|
15
|
-
> Each `<category-noun>` returns either at least one finding with a locator OR exactly one proof-of-absence with at least 3 adversarial probes specific to that `<category-noun>`. A `<category-noun>` returning neither is a protocol gap.
|
|
16
|
-
|
|
17
|
-
## Idempotency
|
|
18
|
-
|
|
19
|
-
When the framework already states an equivalent requirement (positive finding OR proof-of-absence with ≥3 probes), leave it intact. Insert only when the requirement is absent or weaker than the canonical form.
|
|
20
|
-
|
|
21
|
-
## Disposition reporting
|
|
22
|
-
|
|
23
|
-
Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When the disposition line was inserted: `> Gap: Per-category disposition line inserted under category list header.` When the framework already carries the canonical form: `> Gap: Per-category disposition verified — canonical form already present.` Silent omission is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Persona transformation
|
|
2
|
-
|
|
3
|
-
Lead the optimized prompt with what the agent does, not who the agent is.
|
|
4
|
-
|
|
5
|
-
## Detection patterns
|
|
6
|
-
|
|
7
|
-
The persona block matches any of:
|
|
8
|
-
- "You are a/an `<role>`"
|
|
9
|
-
- "You are an expert in/at `<topic>`"
|
|
10
|
-
- "You are a helpful assistant"
|
|
11
|
-
- "Act as `<role>`"
|
|
12
|
-
- "Pretend to be `<role>`"
|
|
13
|
-
- "Imagine you are `<role>`"
|
|
14
|
-
- "As a/an `<role>`, …"
|
|
15
|
-
- "Role: `<role>`"
|
|
16
|
-
|
|
17
|
-
## Transformation
|
|
18
|
-
|
|
19
|
-
Replace the persona line with a single mission sentence stating the task in imperative form.
|
|
20
|
-
|
|
21
|
-
| Persona input | Mission output |
|
|
22
|
-
|---|---|
|
|
23
|
-
| "You are a senior security engineer. Review this PR." | "Audit this PR for security issues." |
|
|
24
|
-
| "Act as a code reviewer and find bugs in this code." | "Find bugs in this code." |
|
|
25
|
-
| "You are an expert at SQL. Write a query that…" | "Write a SQL query that…" |
|
|
26
|
-
|
|
27
|
-
## Creative-writing carve-out
|
|
28
|
-
|
|
29
|
-
The persona line stays intact when the prompt explicitly references one of these output qualities: `style`, `tone`, `voice`, `fiction`, `creative writing`, `narrative`. In that case the persona shapes the output's character and the mission line follows it.
|
|
30
|
-
|
|
31
|
-
## Disposition reporting
|
|
32
|
-
|
|
33
|
-
The persona pass MUST emit a gap note via the paste-mode or file-path-mode gap-report mechanism that [`output-contract.md`](output-contract.md) defines, recording one of two dispositions:
|
|
34
|
-
|
|
35
|
-
- `> Gap: Persona transformed — original "<persona line>" replaced with mission "<mission line>".`
|
|
36
|
-
- `> Gap: Persona preserved (creative-writing carve-out matched: "<matched keyword>").`
|
|
37
|
-
|
|
38
|
-
When none of the six carve-out keywords appears in the input, the persona line is always transformed. The detection is deterministic: a case-insensitive match against the six listed keywords only. No subjective "near-miss" or "intent" judgment applies. See the [no silent action](output-contract.md#disposition-invariants) invariant.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# When the skill needs information that isn't in the input
|
|
2
|
-
|
|
3
|
-
Some spokes need information the input prompt doesn't include — like the line number where an identifier lives, the canonical example for a category, or the real value to put where a placeholder sits. This file describes how to find that information from real sources.
|
|
4
|
-
|
|
5
|
-
## Where to look, in order
|
|
6
|
-
|
|
7
|
-
1. **The sibling rubric file.** When the calling framework provides a companion rubric (typically at `../category_rubrics/<same-name>.md` in audit-rubric layouts, but the path is framework-specific), read it first. The rubric often spells out the canonical example, the instantiation recipe, and the category-specific failure-mode noun. When no sibling rubric exists for the input prompt, skip this source and proceed to the companion artifact.
|
|
8
|
-
|
|
9
|
-
2. **The companion artifact.** When the rubric points at a sibling prompt as a worked example (e.g., "see `category-a-api-contracts.md` for the canonical diff"), read that sibling and use its diff or framework as the reference.
|
|
10
|
-
|
|
11
|
-
3. **The user-supplied context.** When the user pasted an artifact alongside the prompt — a diff, a PR URL, a file dump — use it directly.
|
|
12
|
-
|
|
13
|
-
4. **AskUserQuestion.** When the three sources above turn up nothing, ask the user via the AskUserQuestion tool. Phrase the question around the specific blocker (e.g., "Which artifact should I instantiate against?") and offer two to four concrete options.
|
|
14
|
-
|
|
15
|
-
## What counts as evidence
|
|
16
|
-
|
|
17
|
-
A change earns its place in the rewritten prompt when one of these is true:
|
|
18
|
-
- The rubric file states it
|
|
19
|
-
- The sibling artifact contains it (the line number is real, the identifier sits in the diff)
|
|
20
|
-
- The user-pasted context contains it (the value sits in the prompt body the user supplied, in a fenced block within it, or in an artifact the user pasted alongside the prompt)
|
|
21
|
-
- The user supplied it via an AskUserQuestion answer
|
|
22
|
-
|
|
23
|
-
When none of the four holds, the spoke leaves the prompt as-is and notes the gap in the location [`output-contract.md`](output-contract.md) defines for the active emission mode. The deferral itself is mandatory — see the [no silent no-op](output-contract.md#disposition-invariants) invariant.
|
|
24
|
-
|
|
25
|
-
## Tone of the AskUserQuestion
|
|
26
|
-
|
|
27
|
-
Use everyday phrasing. Tell the user what's blocked and what answers would unblock it.
|
|
28
|
-
|
|
29
|
-
| What the spoke needs | Question shape |
|
|
30
|
-
|---|---|
|
|
31
|
-
| Which PR or artifact to instantiate against | "I have placeholders in the prompt. Which artifact should I fill them with?" |
|
|
32
|
-
| Which scope of source material to inline | "Should I inline the full diff, the changed files only, or specific paths?" |
|
|
33
|
-
| Which sub-bucket is the canonical case | "The framework has six similarly-weighted sub-buckets. Which one is the canonical case for this category?" |
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Structural ordering
|
|
2
|
-
|
|
3
|
-
The optimized prompt presents blocks in this fixed sequence:
|
|
4
|
-
|
|
5
|
-
1. Mission block
|
|
6
|
-
2. Metadata block
|
|
7
|
-
3. Framework block
|
|
8
|
-
4. Questions block
|
|
9
|
-
5. Output spec block
|
|
10
|
-
6. Data body block
|
|
11
|
-
|
|
12
|
-
## Procedure
|
|
13
|
-
|
|
14
|
-
1. Extract each tagged block from the input. The gap-report region (prior-run `> Gap:` lines or `<!-- gap-report:` comment blocks) is excluded from block ordering — it is kept at the end during classification and reordering, then deterministically replaced during emission per [`output-contract.md`](output-contract.md).
|
|
15
|
-
2. Concatenate the blocks in the sequence above.
|
|
16
|
-
3. Preserve every byte of the inputs that [`output-contract.md`](output-contract.md) lists under "Preservation invariants" exactly as supplied.
|
|
17
|
-
|
|
18
|
-
## Multiple data bodies
|
|
19
|
-
|
|
20
|
-
When the input contains multiple data body blocks (e.g., several file diffs), group them as a contiguous final section in their original relative order.
|
|
21
|
-
|
|
22
|
-
## Atomicity
|
|
23
|
-
|
|
24
|
-
The framework block stays whole. The data body section sits as one contiguous region at the end.
|
|
25
|
-
|
|
26
|
-
## Disposition reporting
|
|
27
|
-
|
|
28
|
-
Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When blocks were reordered: `> Gap: Blocks reordered to canonical sequence (mission → metadata → framework → questions → output spec → data body).` When the input already follows canonical ordering and no reorder is needed: `> Gap: Structural ordering verified — input already in canonical sequence.` Silent omission is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# verified-build
|
|
2
|
-
|
|
3
|
-
Runs a code task through the two-phase verified workflow: scoped coder agents write the changes, then a fresh-context `code-verifier` agent re-derives and runs every check itself.
|
|
4
|
-
|
|
5
|
-
**Trigger:** "verified build", "run this verified", "two-phase build", "build and verify", "verified implementation".
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Ensures that `git commit`/`git push` open only after a clean, hook-minted verifier verdict bound to the live change surface. The `verified_commit_gate` hook blocks commits and pushes until a verdict covers the current branch diff.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | The complete skill — workflow checklist, gotchas. No companion files. |
|
|
16
|
-
|
|
17
|
-
## Workflow (copy-this checklist)
|
|
18
|
-
|
|
19
|
-
- [ ] Record baselines (test command + exact failure set) before coders start
|
|
20
|
-
- [ ] Scope assignments into file-disjoint tasks with named checks
|
|
21
|
-
- [ ] Spawn one `clean-coder` (or Sonnet) agent per assignment; each consults `code-advisor` on decisions it cannot resolve
|
|
22
|
-
- [ ] Settle the tree after coders finish (run formatters, stage nothing)
|
|
23
|
-
- [ ] Spawn `code-verifier` (fresh context) with task texts, diff scope, and baselines
|
|
24
|
-
- [ ] Repair only reported findings; re-spawn verifier after each repair
|
|
25
|
-
- [ ] Land in one commit + push + draft PR as soon as verdict is clean
|
|
26
|
-
|
|
27
|
-
## Conventions
|
|
28
|
-
|
|
29
|
-
- Any file change after the verifier stops re-locks the gate — run formatters before spawning the verifier.
|
|
30
|
-
- The verifier must end with a ` ```verdict ` fence; the `verifier_verdict_minter` hook mints the verdict from that fence.
|
|
31
|
-
- The minter keys on agent type string `code-verifier` — the same prompt under another agent type mints nothing.
|
|
32
|
-
- Docs/image-only diffs, docstring-only Python diffs, and pytest test files (`test_*.py`, `*_test.py`, `conftest.py`) are exempt from the gate automatically.
|
|
33
|
-
- Record the test baseline before coders start; without it, new breakage hides inside old noise.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: verified-build
|
|
3
|
-
description: >-
|
|
4
|
-
Two-phase verified workflow: scoped coder agents write the changes, then a
|
|
5
|
-
fresh-context code-verifier re-runs every check. Use for implementations,
|
|
6
|
-
refactors, and bug fixes. Triggers: 'verified build', 'run this verified',
|
|
7
|
-
'two-phase build', 'build and verify', 'verified implementation'.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Verified Build
|
|
11
|
-
|
|
12
|
-
Two phases, hook-enforced: coders write, a fresh-context verifier grades, and `git commit`/`git push` open only on a clean verdict bound to the live change surface.
|
|
13
|
-
|
|
14
|
-
## Workflow
|
|
15
|
-
|
|
16
|
-
Copy this checklist and check items off as you go:
|
|
17
|
-
|
|
18
|
-
- [ ] **Record baselines.** Before any coder runs: the test command and its exact failure set, plus any other gates the repo names. Scope the test command to the modules the task touches (their test files plus tests importing the changed modules); record a full-suite baseline only when the assignments span multiple modules or multiple coders. The verifier compares against these.
|
|
19
|
-
- [ ] **Scope assignments.** Split the task into file-disjoint assignments; write each as a task text with named checks.
|
|
20
|
-
- [ ] **Spawn coders.** One agent per assignment (`clean-coder` or Sonnet). Tell each: on a decision it can't reasonably solve, consult the tool-less `code-advisor` agent — it returns a plan, a correction, or a stop signal — then resume.
|
|
21
|
-
- [ ] **Settle the tree.** After coders finish: run formatters and any file-rewriting hooks, stage nothing, change nothing more.
|
|
22
|
-
- [ ] **Spawn the verifier last.** Agent tool, `subagent_type: "code-verifier"`, with the task texts, the diff scope, and the recorded baselines. When it stops, the SubagentStop hook mints its verdict.
|
|
23
|
-
- [ ] **Repair only reported findings.** On a failing verdict, spawn repair agents scoped to the findings, then re-spawn the verifier. Repeat until clean.
|
|
24
|
-
- [ ] **Land right away.** One commit, push, draft PR — before anything else touches a file.
|
|
25
|
-
|
|
26
|
-
## Gotchas
|
|
27
|
-
|
|
28
|
-
- Any file change after the verifier stops moves the surface hash and re-locks the gate — formatter rewrites included. Settle the tree first; land right after the clean verdict.
|
|
29
|
-
- The verdict covers the whole branch surface (merge base to work tree, untracked files included). There is no "verify just my part."
|
|
30
|
-
- The verifier must end with a ```` ```verdict ```` fence. No fence means nothing is minted and the gate stays closed.
|
|
31
|
-
- The minter keys on the agent type string `code-verifier` — spawning the same prompt under another agent type mints nothing.
|
|
32
|
-
- A surface whose every change is a docs/image file (by extension), a Python file whose docstring-stripped AST is unchanged (docstring-, comment-, or formatting-only Python edits), or a pytest test file (`test_*.py`, `*_test.py`, `conftest.py`) is exempt automatically; skip the verifier for those. Comment-only edits in non-Python files are not exempt.
|
|
33
|
-
- Record the test baseline before coders start. Without the exact pre-existing failure set, new breakage hides inside old noise.
|