@codedrifters/configulator 0.0.260 → 0.0.261
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/lib/index.d.mts +7 -6
- package/lib/index.d.ts +7 -6
- package/lib/index.js +284 -52
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +284 -52
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -4445,7 +4445,7 @@ var jestBundle = {
|
|
|
4445
4445
|
// src/agent/bundles/maintenance-audit.ts
|
|
4446
4446
|
var maintenanceAuditSubAgent = {
|
|
4447
4447
|
name: "maintenance-audit",
|
|
4448
|
-
description: "Audits documentation registries and cross-references for integrity (broken links, registry drift, stale indexes)
|
|
4448
|
+
description: "Audits documentation registries and cross-references for integrity (broken links, registry drift, stale indexes), applies idempotent fixes, then re-runs the checks to confirm the fixes cleared the reported findings. One phase per session, tracked by maint:* GitHub issue labels with filesystem-based durability between phases.",
|
|
4449
4449
|
model: AGENT_MODEL.POWERFUL,
|
|
4450
4450
|
maxTurns: 80,
|
|
4451
4451
|
platforms: { cursor: { exclude: true } },
|
|
@@ -4503,18 +4503,18 @@ var maintenanceAuditSubAgent = {
|
|
|
4503
4503
|
"",
|
|
4504
4504
|
"## State Machine Overview",
|
|
4505
4505
|
"",
|
|
4506
|
-
"Maintenance audits flow through **
|
|
4506
|
+
"Maintenance audits flow through **3 phases**:",
|
|
4507
4507
|
"",
|
|
4508
4508
|
"```",
|
|
4509
|
-
"\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
|
|
4510
|
-
"\u2502 1. SCAN \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. FIX \u2502",
|
|
4511
|
-
"\u2502 Walk doc \u2502 \u2502 Read audit \u2502",
|
|
4512
|
-
"\u2502 tree, check \u2502 \u2502 report, \u2502",
|
|
4513
|
-
"\u2502 xrefs and \u2502 \u2502 apply safe \u2502",
|
|
4514
|
-
"\u2502 indexes, \u2502 \u2502 idempotent \u2502",
|
|
4515
|
-
"\u2502 write audit \u2502 \u2502 fixes,
|
|
4516
|
-
"\u2502 report \u2502 \u2502
|
|
4517
|
-
"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
|
|
4509
|
+
"\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
|
|
4510
|
+
"\u2502 1. SCAN \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. FIX \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 3. VERIFY \u2502",
|
|
4511
|
+
"\u2502 Walk doc \u2502 \u2502 Read audit \u2502 \u2502 Re-run the \u2502",
|
|
4512
|
+
"\u2502 tree, check \u2502 \u2502 report, \u2502 \u2502 scan checks \u2502",
|
|
4513
|
+
"\u2502 xrefs and \u2502 \u2502 apply safe \u2502 \u2502 scoped to \u2502",
|
|
4514
|
+
"\u2502 indexes, \u2502 \u2502 idempotent \u2502 \u2502 fixed paths,\u2502",
|
|
4515
|
+
"\u2502 write audit \u2502 \u2502 fixes, write\u2502 \u2502 compare pre \u2502",
|
|
4516
|
+
"\u2502 report \u2502 \u2502 fix report \u2502 \u2502 and post \u2502",
|
|
4517
|
+
"\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
|
|
4518
4518
|
"```",
|
|
4519
4519
|
"",
|
|
4520
4520
|
"**Issue labels encode the phase:**",
|
|
@@ -4522,18 +4522,22 @@ var maintenanceAuditSubAgent = {
|
|
|
4522
4522
|
"| Label | Phase | Session work |",
|
|
4523
4523
|
"|-------|-------|-------------|",
|
|
4524
4524
|
"| `maint:scan` | 1. Scan | Walk the configured doc tree, check cross-references and registry indexes, write a durable audit report. |",
|
|
4525
|
-
"| `maint:fix` | 2. Fix | Read the audit report, apply idempotent fixes,
|
|
4525
|
+
"| `maint:fix` | 2. Fix | Read the audit report, apply idempotent fixes, write a durable fix report. |",
|
|
4526
|
+
"| `maint:verify` | 3. Verify | Re-run the same checks from the parent `maint:scan` issue scoped to the paths and registries the fix phase touched, compare pre and post findings, close the parent scan issue when clean, and file a follow-up `maint:scan` for any residual findings. |",
|
|
4526
4527
|
"",
|
|
4527
4528
|
"All issues also carry `type:maintenance` and a `status:*` label.",
|
|
4528
4529
|
"",
|
|
4529
|
-
"**Issue count per audit cycle:** 1 scan + 1 fix = **
|
|
4530
|
+
"**Issue count per audit cycle:** 1 scan + 1 fix + 1 verify = **3 sessions**.",
|
|
4530
4531
|
"",
|
|
4531
4532
|
"**Shortened paths:**",
|
|
4532
4533
|
"- Scan finds no issues \u2192 close scan issue with a justification,",
|
|
4533
|
-
" do not create a fix issue \u2192 **1 session**.",
|
|
4534
|
+
" do not create a fix or verify issue \u2192 **1 session**.",
|
|
4534
4535
|
"- Every reported finding requires a human judgment call \u2192 close",
|
|
4535
4536
|
" scan with the report, open a `status:needs-attention` flag,",
|
|
4536
|
-
" do not auto-create a fix issue \u2192 **1 session**.",
|
|
4537
|
+
" do not auto-create a fix or verify issue \u2192 **1 session**.",
|
|
4538
|
+
"- Fix phase applied only `flag-for-human` decisions (no auto-",
|
|
4539
|
+
" fixable findings landed) \u2192 close the fix issue with the",
|
|
4540
|
+
" skipped list and do not create a verify issue \u2192 **2 sessions**.",
|
|
4537
4541
|
"",
|
|
4538
4542
|
"---",
|
|
4539
4543
|
"",
|
|
@@ -4563,7 +4567,9 @@ var maintenanceAuditSubAgent = {
|
|
|
4563
4567
|
"Run this loop exactly once per session. Never start a second issue.",
|
|
4564
4568
|
"",
|
|
4565
4569
|
"1. Claim one open `type:maintenance` issue using phase priority:",
|
|
4566
|
-
" `maint:
|
|
4570
|
+
" `maint:verify` > `maint:fix` > `maint:scan`. Verify ahead of fix",
|
|
4571
|
+
" and scan so the oldest in-flight audit cycle finishes closing",
|
|
4572
|
+
" the loop before a new cycle starts.",
|
|
4567
4573
|
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
4568
4574
|
" branch per your project's branch-naming convention.",
|
|
4569
4575
|
"3. Execute the phase handler that matches the issue's `maint:*`",
|
|
@@ -4675,24 +4681,30 @@ var maintenanceAuditSubAgent = {
|
|
|
4675
4681
|
" - **All findings need human judgment** \u2192 commit the report,",
|
|
4676
4682
|
" comment on the scan issue summarizing the findings, apply",
|
|
4677
4683
|
" `status:needs-attention`, and close the issue. Do not create",
|
|
4678
|
-
" a `maint:fix` issue.",
|
|
4684
|
+
" a `maint:fix` or `maint:verify` issue.",
|
|
4679
4685
|
" - **At least one auto-fixable finding** \u2192 create a `maint:fix`",
|
|
4680
4686
|
" issue (blocked on this scan issue via `Depends on: #N`). The",
|
|
4681
|
-
" fix issue body must reference the audit report path
|
|
4682
|
-
"
|
|
4687
|
+
" fix issue body must reference the audit report path, enumerate",
|
|
4688
|
+
" the auto-fix categories to apply, and record the parent scan",
|
|
4689
|
+
" issue number so Phase 3 (Verify) can close the loop.",
|
|
4683
4690
|
"",
|
|
4684
|
-
"6. **Commit and push.**",
|
|
4691
|
+
"6. **Commit and push.** Leave the scan issue open so the downstream",
|
|
4692
|
+
" `maint:verify` phase can close it (or file a follow-up scan)",
|
|
4693
|
+
" after Phase 2 runs.",
|
|
4685
4694
|
"",
|
|
4686
4695
|
"---",
|
|
4687
4696
|
"",
|
|
4688
4697
|
"## Phase 2: Fix (`maint:fix`)",
|
|
4689
4698
|
"",
|
|
4690
|
-
"**Goal:** Read the audit report, apply idempotent fixes,
|
|
4691
|
-
"
|
|
4699
|
+
"**Goal:** Read the audit report, apply idempotent fixes, write a",
|
|
4700
|
+
"fix report, and enqueue the verify phase so the audit cycle",
|
|
4701
|
+
"actually closes its loop.",
|
|
4692
4702
|
"",
|
|
4693
|
-
"**Budget:** Bounded edits to files under `<DOCS_ROOT>`
|
|
4694
|
-
"
|
|
4695
|
-
"
|
|
4703
|
+
"**Budget:** Bounded edits to files under `<DOCS_ROOT>` and one fix",
|
|
4704
|
+
"report file. No new audit categories. No fixes that require",
|
|
4705
|
+
"authoring new content. The formal re-scan lives in Phase 3 \u2014",
|
|
4706
|
+
"Phase 2 confirms only that it did not regress the files it touched",
|
|
4707
|
+
"(a smoke check, not the full pre/post comparison).",
|
|
4696
4708
|
"",
|
|
4697
4709
|
"### Fix Categories",
|
|
4698
4710
|
"",
|
|
@@ -4726,11 +4738,13 @@ var maintenanceAuditSubAgent = {
|
|
|
4726
4738
|
" mark it `flag-for-human` and skip. Authoring new docs belongs",
|
|
4727
4739
|
" to the writer agent for that doc type, not this agent.",
|
|
4728
4740
|
"",
|
|
4729
|
-
"5. **
|
|
4730
|
-
"
|
|
4731
|
-
"
|
|
4732
|
-
"
|
|
4733
|
-
"
|
|
4741
|
+
"5. **Smoke check the touched files.** Before writing the fix",
|
|
4742
|
+
" report, spot-check that the specific findings the fix phase",
|
|
4743
|
+
" claimed to resolve are at least no longer present in the edited",
|
|
4744
|
+
" file(s). This is a narrow local check \u2014 not the full re-scan,",
|
|
4745
|
+
" which is Phase 3's job. If a finding the fix phase targeted",
|
|
4746
|
+
" still reproduces in the edited file, revert that edit and mark",
|
|
4747
|
+
" the finding `flag-for-human` in the fix report instead.",
|
|
4734
4748
|
"",
|
|
4735
4749
|
"6. **Write the fix report** to:",
|
|
4736
4750
|
" ```",
|
|
@@ -4761,18 +4775,141 @@ var maintenanceAuditSubAgent = {
|
|
|
4761
4775
|
"",
|
|
4762
4776
|
" ## Skipped",
|
|
4763
4777
|
" <findings that were stale, flagged for human, or reverted",
|
|
4764
|
-
" during
|
|
4778
|
+
" during the smoke check \u2014 one entry each, with the reason>",
|
|
4765
4779
|
"",
|
|
4766
|
-
" ##
|
|
4767
|
-
"
|
|
4768
|
-
"
|
|
4769
|
-
"
|
|
4780
|
+
" ## Paths Touched",
|
|
4781
|
+
" <ordered list of files edited, plus any index files those edits",
|
|
4782
|
+
" affect. This is the Phase 3 re-scan scope \u2014 the verify phase",
|
|
4783
|
+
" reads this section to decide which paths to re-check.>",
|
|
4770
4784
|
" ```",
|
|
4771
4785
|
"",
|
|
4772
4786
|
"7. **Comment on the scan issue** with a summary of what was fixed,",
|
|
4773
|
-
" what was skipped, and
|
|
4787
|
+
" what was skipped, and that Phase 3 (Verify) will close the loop.",
|
|
4788
|
+
"",
|
|
4789
|
+
"8. **Create the `maint:verify` issue.** Block it on this fix issue",
|
|
4790
|
+
" via `Depends on: #N` so it only runs after the fix PR lands.",
|
|
4791
|
+
" The verify issue body must reference:",
|
|
4792
|
+
" - The parent `maint:scan` issue number",
|
|
4793
|
+
" - The Phase 1 audit report path",
|
|
4794
|
+
" - The Phase 2 fix report path",
|
|
4795
|
+
" - The `Paths Touched` list (so Phase 3 scopes the re-scan",
|
|
4796
|
+
" correctly)",
|
|
4797
|
+
" - The same check catalog the scan phase used",
|
|
4798
|
+
"",
|
|
4799
|
+
" If the fix phase applied **zero** auto-fixes (every finding was",
|
|
4800
|
+
" `stale-finding` or `flag-for-human`), skip the verify issue \u2014",
|
|
4801
|
+
" there is nothing to verify. Close the fix issue with a summary,",
|
|
4802
|
+
" comment on the scan issue, and let a human decide whether to",
|
|
4803
|
+
" re-scan.",
|
|
4804
|
+
"",
|
|
4805
|
+
"9. **Commit and push.**",
|
|
4774
4806
|
"",
|
|
4775
|
-
"
|
|
4807
|
+
"---",
|
|
4808
|
+
"",
|
|
4809
|
+
"## Phase 3: Verify (`maint:verify`)",
|
|
4810
|
+
"",
|
|
4811
|
+
"**Goal:** Close the loop on the audit cycle. Re-run the same checks",
|
|
4812
|
+
"the scan phase ran, scoped to the paths and registries the fix",
|
|
4813
|
+
"phase actually touched, compare pre and post findings, and record",
|
|
4814
|
+
"the result in a durable verify report.",
|
|
4815
|
+
"",
|
|
4816
|
+
"**Budget:** Filesystem reads + registry parsing, just like Phase 1,",
|
|
4817
|
+
"but bounded to the paths enumerated in the fix report's",
|
|
4818
|
+
"`Paths Touched` section (plus any index files those paths transit).",
|
|
4819
|
+
"No edits to source docs in this phase \u2014 if the re-scan surfaces a",
|
|
4820
|
+
"regression, record it and file a follow-up `maint:scan` issue,",
|
|
4821
|
+
"but do not attempt to re-fix in-session.",
|
|
4822
|
+
"",
|
|
4823
|
+
"### Steps",
|
|
4824
|
+
"",
|
|
4825
|
+
"1. **Read the verify scope** from the issue body. Confirm the parent",
|
|
4826
|
+
" scan issue number, the audit report path, the fix report path,",
|
|
4827
|
+
" and the `Paths Touched` list. If any of these are missing or",
|
|
4828
|
+
" the files they reference do not exist, close the verify issue",
|
|
4829
|
+
" with `status:needs-attention` and stop.",
|
|
4830
|
+
"",
|
|
4831
|
+
"2. **Re-run the same checks the scan phase ran**, scoped to the",
|
|
4832
|
+
" paths the fix phase touched plus any index or registry files",
|
|
4833
|
+
" those paths transit. Use the identical check catalog that the",
|
|
4834
|
+
" parent scan issue declared \u2014 do not add or remove checks",
|
|
4835
|
+
" between scan and verify.",
|
|
4836
|
+
"",
|
|
4837
|
+
"3. **Compare pre and post findings.** For each finding in the Phase 1",
|
|
4838
|
+
" audit report that fell within the re-scan scope, classify it as:",
|
|
4839
|
+
" - **resolved** \u2014 absent from the re-scan; the fix worked.",
|
|
4840
|
+
" - **still-failing** \u2014 still present in the re-scan; the fix did",
|
|
4841
|
+
" not clear it.",
|
|
4842
|
+
" - **regressed** \u2014 was not in the Phase 1 audit report but appears",
|
|
4843
|
+
" now; the fix introduced it.",
|
|
4844
|
+
" - **out-of-scope** \u2014 was in the Phase 1 audit report but its",
|
|
4845
|
+
" path was not in the fix phase's `Paths Touched` list, so this",
|
|
4846
|
+
" verify pass cannot speak to it.",
|
|
4847
|
+
"",
|
|
4848
|
+
"4. **Write the verify report** to:",
|
|
4849
|
+
" ```",
|
|
4850
|
+
" <AUDIT_ROOT>/maint-verify-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
|
|
4851
|
+
" ```",
|
|
4852
|
+
"",
|
|
4853
|
+
" Format:",
|
|
4854
|
+
" ```markdown",
|
|
4855
|
+
" ---",
|
|
4856
|
+
' title: "Maintenance Verify: <AUDIT_SLUG>"',
|
|
4857
|
+
" date: YYYY-MM-DD",
|
|
4858
|
+
" parent_issue: <N>",
|
|
4859
|
+
" scan_issue: <N>",
|
|
4860
|
+
" fix_issue: <N>",
|
|
4861
|
+
" audit_report: <path to Phase 1 scan report>",
|
|
4862
|
+
" fix_report: <path to Phase 2 fix report>",
|
|
4863
|
+
" status: complete",
|
|
4864
|
+
" ---",
|
|
4865
|
+
"",
|
|
4866
|
+
" # Maintenance Verify: <AUDIT_SLUG>",
|
|
4867
|
+
"",
|
|
4868
|
+
" ## Source Reports",
|
|
4869
|
+
" - Scan report: <link>",
|
|
4870
|
+
" - Fix report: <link>",
|
|
4871
|
+
"",
|
|
4872
|
+
" ## Re-scan Scope",
|
|
4873
|
+
" - **Paths re-checked:** <list \u2014 from the fix report's",
|
|
4874
|
+
" `Paths Touched` section>",
|
|
4875
|
+
" - **Checks re-run:** <same catalog the scan phase used>",
|
|
4876
|
+
"",
|
|
4877
|
+
" ## Pre/Post Comparison",
|
|
4878
|
+
" | Status | Count | Findings |",
|
|
4879
|
+
" |--------|-------|----------|",
|
|
4880
|
+
" | resolved | N | <one line per finding: category + file:line> |",
|
|
4881
|
+
" | still-failing | N | <one line per finding> |",
|
|
4882
|
+
" | regressed | N | <one line per finding> |",
|
|
4883
|
+
" | out-of-scope | N | <one line per finding> |",
|
|
4884
|
+
"",
|
|
4885
|
+
" ## Verdict",
|
|
4886
|
+
" - **clean** \u2014 every in-scope finding resolved and no regressions;",
|
|
4887
|
+
" the parent scan issue will be closed.",
|
|
4888
|
+
" - **residual** \u2014 one or more still-failing or regressed findings;",
|
|
4889
|
+
" a follow-up `maint:scan` issue is filed and the parent scan",
|
|
4890
|
+
" issue is closed with a reference to the follow-up.",
|
|
4891
|
+
" ```",
|
|
4892
|
+
"",
|
|
4893
|
+
"5. **Decide the next step:**",
|
|
4894
|
+
" - **Clean verdict** (every in-scope finding resolved, no",
|
|
4895
|
+
" regressions, no still-failing entries) \u2192 comment on the parent",
|
|
4896
|
+
" `maint:scan` issue summarizing the result and **close it**.",
|
|
4897
|
+
" Do not file a follow-up scan.",
|
|
4898
|
+
" - **Residual verdict** (one or more `still-failing` or",
|
|
4899
|
+
" `regressed` entries) \u2192 file a new `maint:scan` issue for the",
|
|
4900
|
+
" residual scope, blocked on nothing (it is ready to run on its",
|
|
4901
|
+
" own schedule), and link the verify report from its body. Then",
|
|
4902
|
+
" comment on the parent scan issue with the residual summary and",
|
|
4903
|
+
" **close it**.",
|
|
4904
|
+
" - **Out-of-scope-only verdict** (every finding fell outside the",
|
|
4905
|
+
" fix phase's `Paths Touched`) \u2192 comment on the parent scan",
|
|
4906
|
+
" issue explaining that the fix phase did not cover those paths",
|
|
4907
|
+
" and leave it open with `status:needs-attention` so a human can",
|
|
4908
|
+
" re-scope the cycle. Do not auto-close the parent scan issue",
|
|
4909
|
+
" in this case.",
|
|
4910
|
+
"",
|
|
4911
|
+
"6. **Commit and push.** Close the verify issue with a one-line",
|
|
4912
|
+
" summary of the verdict.",
|
|
4776
4913
|
"",
|
|
4777
4914
|
"---",
|
|
4778
4915
|
"",
|
|
@@ -4782,11 +4919,13 @@ var maintenanceAuditSubAgent = {
|
|
|
4782
4919
|
"|-----------|-------|------|",
|
|
4783
4920
|
"| Downstream (last resort) | Writer agent for the audited doc type | When the audit surfaces findings that require authoring new content (missing target, partial coverage that can only be resolved by writing a new doc), the fix phase flags them for human \u2014 the human may then dispatch the appropriate writer agent. This agent never opens writer-agent issues itself. |",
|
|
4784
4921
|
"",
|
|
4785
|
-
"**File boundaries:** Writes audit and
|
|
4922
|
+
"**File boundaries:** Writes audit, fix, and verify reports to",
|
|
4786
4923
|
"`<AUDIT_ROOT>/`. Applies bounded, idempotent edits under",
|
|
4787
|
-
"`<DOCS_ROOT>/` per the fix-policy declared
|
|
4788
|
-
"
|
|
4789
|
-
"
|
|
4924
|
+
"`<DOCS_ROOT>/` only in Phase 2 (Fix), per the fix-policy declared",
|
|
4925
|
+
"in the fix issue body. Phase 3 (Verify) never edits doc files \u2014",
|
|
4926
|
+
"it only reads and re-scans. Never writes to source code, never",
|
|
4927
|
+
"writes to doc trees outside `<DOCS_ROOT>`, never authors new",
|
|
4928
|
+
"document files to close a gap.",
|
|
4790
4929
|
"",
|
|
4791
4930
|
"---",
|
|
4792
4931
|
"",
|
|
@@ -4798,6 +4937,10 @@ var maintenanceAuditSubAgent = {
|
|
|
4798
4937
|
"- All findings are `flag-for-human` and the fix issue has nothing",
|
|
4799
4938
|
" to auto-apply \u2014 resolve by closing the fix issue with a summary",
|
|
4800
4939
|
" instead",
|
|
4940
|
+
"- A `maint:verify` issue references a fix report whose",
|
|
4941
|
+
" `Paths Touched` list is empty \u2014 there is nothing to re-scan, so",
|
|
4942
|
+
" close the verify issue with a summary and let a human decide",
|
|
4943
|
+
" whether to re-run the scan",
|
|
4801
4944
|
"",
|
|
4802
4945
|
"---",
|
|
4803
4946
|
"",
|
|
@@ -4812,13 +4955,24 @@ var maintenanceAuditSubAgent = {
|
|
|
4812
4955
|
" Record out-of-scope observations in the report for human review.",
|
|
4813
4956
|
"- **No authoring.** Do not invent new document content to close a",
|
|
4814
4957
|
" finding. That work belongs to the writer agent for the doc type.",
|
|
4815
|
-
"- **Verify
|
|
4816
|
-
"
|
|
4958
|
+
"- **Verify closes the loop.** Every fix-phase run that lands at",
|
|
4959
|
+
" least one auto-fix must enqueue a `maint:verify` issue. Phase 3",
|
|
4960
|
+
" is the only phase that closes the parent `maint:scan` issue.",
|
|
4961
|
+
" Phase 2 never closes the scan issue itself.",
|
|
4962
|
+
"- **Pre/post comparison is required.** The verify report must",
|
|
4963
|
+
" classify every in-scope finding from the scan report as",
|
|
4964
|
+
" `resolved`, `still-failing`, `regressed`, or `out-of-scope`.",
|
|
4965
|
+
" An unclassified finding means the re-scan was incomplete \u2014 re-",
|
|
4966
|
+
" run the missing checks before writing the verdict.",
|
|
4967
|
+
"- **Residual findings get their own cycle.** When the verify phase",
|
|
4968
|
+
" finds `still-failing` or `regressed` entries, file a follow-up",
|
|
4969
|
+
" `maint:scan` issue rather than attempting to re-fix in-session.",
|
|
4970
|
+
" The new scan starts its own audit cycle with a fresh report."
|
|
4817
4971
|
].join("\n")
|
|
4818
4972
|
};
|
|
4819
4973
|
var maintenanceAuditSkill = {
|
|
4820
4974
|
name: "audit-docs",
|
|
4821
|
-
description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
|
|
4975
|
+
description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix \u2192 verify). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
|
|
4822
4976
|
disableModelInvocation: true,
|
|
4823
4977
|
userInvocable: true,
|
|
4824
4978
|
context: "fork",
|
|
@@ -4830,7 +4984,8 @@ var maintenanceAuditSkill = {
|
|
|
4830
4984
|
"Kick off a maintenance-audit cycle against a configurable doc",
|
|
4831
4985
|
"tree. Creates a `maint:scan` issue targeted at the requested",
|
|
4832
4986
|
"scope and dispatches Phase 1 (Scan) in the maintenance-audit",
|
|
4833
|
-
"agent.",
|
|
4987
|
+
"agent. Subsequent phases (`maint:fix`, `maint:verify`) are",
|
|
4988
|
+
"created automatically as the cycle progresses.",
|
|
4834
4989
|
"",
|
|
4835
4990
|
"## Usage",
|
|
4836
4991
|
"",
|
|
@@ -4857,30 +5012,102 @@ var maintenanceAuditSkill = {
|
|
|
4857
5012
|
"2. Execute Phase 1 (Scan) of the maintenance-audit agent.",
|
|
4858
5013
|
"3. If auto-fixable findings exist, a `maint:fix` issue is created",
|
|
4859
5014
|
" automatically.",
|
|
5015
|
+
"4. When the fix phase lands, a `maint:verify` issue is created",
|
|
5016
|
+
" automatically so Phase 3 can re-run the checks and close the",
|
|
5017
|
+
" parent scan issue.",
|
|
4860
5018
|
"",
|
|
4861
5019
|
"## Output",
|
|
4862
5020
|
"",
|
|
4863
5021
|
"- A `maint-audit-<slug>-<YYYY-MM-DD>.md` report under",
|
|
4864
5022
|
" `<AUDIT_ROOT>`.",
|
|
4865
|
-
"- A `maint:fix` issue if auto-fixable findings were found."
|
|
5023
|
+
"- A `maint:fix` issue if auto-fixable findings were found.",
|
|
5024
|
+
"- A `maint:verify` issue after the fix phase lands (Phase 3",
|
|
5025
|
+
" produces a `maint-verify-<slug>-<YYYY-MM-DD>.md` report)."
|
|
5026
|
+
].join("\n")
|
|
5027
|
+
};
|
|
5028
|
+
var maintenanceVerifySkill = {
|
|
5029
|
+
name: "verify-audit",
|
|
5030
|
+
description: "Kick off the verify phase of a documentation-maintenance audit cycle. Creates a maint:verify issue that re-runs the scan checks scoped to the paths a fix phase touched, compares pre/post findings, and closes the parent maint:scan issue when clean or files a follow-up maint:scan for residual findings.",
|
|
5031
|
+
disableModelInvocation: true,
|
|
5032
|
+
userInvocable: true,
|
|
5033
|
+
context: "fork",
|
|
5034
|
+
agent: "maintenance-audit",
|
|
5035
|
+
platforms: { cursor: { exclude: true } },
|
|
5036
|
+
instructions: [
|
|
5037
|
+
"# Verify Audit",
|
|
5038
|
+
"",
|
|
5039
|
+
"Close the loop on a maintenance-audit cycle. Creates a",
|
|
5040
|
+
"`maint:verify` issue and dispatches Phase 3 (Verify) in the",
|
|
5041
|
+
"maintenance-audit agent.",
|
|
5042
|
+
"",
|
|
5043
|
+
"Phase 3 re-runs the same checks the scan phase ran, scoped to the",
|
|
5044
|
+
"paths the fix phase actually touched, compares pre and post",
|
|
5045
|
+
"findings, and writes a verify report. Based on the verdict the",
|
|
5046
|
+
"phase either closes the parent `maint:scan` issue or files a",
|
|
5047
|
+
"follow-up `maint:scan` for residual findings.",
|
|
5048
|
+
"",
|
|
5049
|
+
"## Usage",
|
|
5050
|
+
"",
|
|
5051
|
+
"/verify-audit <scan-issue-number>",
|
|
5052
|
+
"",
|
|
5053
|
+
"Where `<scan-issue-number>` is the `maint:scan` issue that kicked",
|
|
5054
|
+
"off the audit cycle. The skill resolves the scan report, the",
|
|
5055
|
+
"Phase 2 fix report, and the `Paths Touched` list from that scan",
|
|
5056
|
+
"issue's downstream `maint:fix` issue.",
|
|
5057
|
+
"",
|
|
5058
|
+
"Most cycles do not need this skill \u2014 Phase 2 (Fix) creates the",
|
|
5059
|
+
"verify issue automatically. Use this skill when:",
|
|
5060
|
+
"- Phase 2 ran on an older audit cycle that predates the verify",
|
|
5061
|
+
" phase and never enqueued a verify issue, or",
|
|
5062
|
+
"- A human wants to re-run the verify phase after a manual fix",
|
|
5063
|
+
" applied on top of the Phase 2 PR.",
|
|
5064
|
+
"",
|
|
5065
|
+
"## Steps",
|
|
5066
|
+
"",
|
|
5067
|
+
"1. Create a `maint:verify` issue with `type:maintenance`,",
|
|
5068
|
+
" `priority:medium`, and `status:ready`. Body must list:",
|
|
5069
|
+
" - The parent `maint:scan` issue number",
|
|
5070
|
+
" - The Phase 1 audit report path",
|
|
5071
|
+
" - The Phase 2 fix report path (if one exists)",
|
|
5072
|
+
" - The `Paths Touched` list (copied from the fix report)",
|
|
5073
|
+
" - The audit check catalog (copied from the scan issue)",
|
|
5074
|
+
"2. Execute Phase 3 (Verify) of the maintenance-audit agent.",
|
|
5075
|
+
"",
|
|
5076
|
+
"## Output",
|
|
5077
|
+
"",
|
|
5078
|
+
"- A `maint-verify-<slug>-<YYYY-MM-DD>.md` report under",
|
|
5079
|
+
" `<AUDIT_ROOT>` containing the pre/post comparison.",
|
|
5080
|
+
"- The parent `maint:scan` issue is closed (clean verdict) or a",
|
|
5081
|
+
" follow-up `maint:scan` issue is filed (residual verdict)."
|
|
4866
5082
|
].join("\n")
|
|
4867
5083
|
};
|
|
4868
5084
|
var maintenanceAuditBundle = {
|
|
4869
5085
|
name: "maintenance-audit",
|
|
4870
|
-
description: "Documentation-maintenance agent bundle.
|
|
5086
|
+
description: "Documentation-maintenance agent bundle. 3-phase pipeline (scan, fix, verify) with maint:* phase labels for auditing registries and cross-references, applying idempotent fixes, and confirming the fixes cleared the originally-flagged findings. Enabled by default.",
|
|
4871
5087
|
appliesWhen: () => true,
|
|
4872
5088
|
rules: [
|
|
4873
5089
|
{
|
|
4874
5090
|
name: "maintenance-audit-workflow",
|
|
4875
|
-
description: "Describes the
|
|
5091
|
+
description: "Describes the 3-phase documentation-maintenance pipeline, the maint:* label taxonomy, the audit-before-fix boundary, and the verify-closes-the-loop rule.",
|
|
4876
5092
|
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
4877
5093
|
content: [
|
|
4878
5094
|
"# Maintenance Audit Workflow",
|
|
4879
5095
|
"",
|
|
4880
5096
|
"Use `/audit-docs <scope>` to kick off a documentation-maintenance",
|
|
4881
|
-
"audit cycle. The pipeline runs in
|
|
4882
|
-
"tracked by its own GitHub issue labeled
|
|
4883
|
-
"`maint:fix`. All issues carry
|
|
5097
|
+
"audit cycle. The pipeline runs in 3 phases \u2014 scan, fix, and",
|
|
5098
|
+
"verify \u2014 each tracked by its own GitHub issue labeled",
|
|
5099
|
+
"`maint:scan`, `maint:fix`, or `maint:verify`. All issues carry",
|
|
5100
|
+
"`type:maintenance`.",
|
|
5101
|
+
"",
|
|
5102
|
+
"One additional user-invocable skill drives the verify phase",
|
|
5103
|
+
"on demand:",
|
|
5104
|
+
"",
|
|
5105
|
+
"- `/verify-audit <scan-issue-number>` \u2014 re-run the scan checks",
|
|
5106
|
+
" scoped to the paths the fix phase touched, compare pre/post",
|
|
5107
|
+
" findings, and close the parent `maint:scan` issue (or file a",
|
|
5108
|
+
" follow-up for residual findings). Phase 2 (Fix) normally",
|
|
5109
|
+
" enqueues the verify issue automatically \u2014 this skill is the",
|
|
5110
|
+
" explicit entry point for re-running the phase on demand.",
|
|
4884
5111
|
"",
|
|
4885
5112
|
"The maintenance-audit agent *audits doc registries and applies",
|
|
4886
5113
|
"idempotent fixes*; it does **not** author new document content.",
|
|
@@ -4896,7 +5123,7 @@ var maintenanceAuditBundle = {
|
|
|
4896
5123
|
tags: ["workflow"]
|
|
4897
5124
|
}
|
|
4898
5125
|
],
|
|
4899
|
-
skills: [maintenanceAuditSkill],
|
|
5126
|
+
skills: [maintenanceAuditSkill, maintenanceVerifySkill],
|
|
4900
5127
|
subAgents: [maintenanceAuditSubAgent],
|
|
4901
5128
|
labels: [
|
|
4902
5129
|
{
|
|
@@ -4913,6 +5140,11 @@ var maintenanceAuditBundle = {
|
|
|
4913
5140
|
name: "maint:fix",
|
|
4914
5141
|
color: "BFDADC",
|
|
4915
5142
|
description: "Phase 2: apply idempotent fixes from a maintenance audit report"
|
|
5143
|
+
},
|
|
5144
|
+
{
|
|
5145
|
+
name: "maint:verify",
|
|
5146
|
+
color: "D4C5F9",
|
|
5147
|
+
description: "Phase 3: re-run the scan checks scoped to the paths the fix phase touched, compare pre/post findings, and close or re-queue the parent scan"
|
|
4916
5148
|
}
|
|
4917
5149
|
]
|
|
4918
5150
|
};
|