@laitszkin/apollo-toolkit 3.12.0 → 3.13.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.md +6 -6
- package/CHANGELOG.md +18 -1
- package/README.md +9 -10
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/archive-specs/SKILL.md +0 -6
- package/commit-and-push/SKILL.md +4 -12
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/enhance-existing-features/SKILL.md +21 -37
- package/generate-spec/SKILL.md +32 -17
- package/generate-spec/references/definition.md +12 -0
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +19 -25
- package/init-project-html/references/definition.md +12 -0
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +13 -25
- package/merge-changes-from-local-branches/SKILL.md +13 -37
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/open-source-pr-workflow/SKILL.md +4 -7
- package/optimise-skill/SKILL.md +8 -8
- package/optimise-skill/references/definition.md +1 -0
- package/optimise-skill/references/example_skill.md +8 -8
- package/package.json +1 -1
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/review-spec-related-changes/SKILL.md +30 -38
- package/ship-github-issue-fix/SKILL.md +2 -2
- package/solve-issues-found-during-review/SKILL.md +8 -43
- package/systematic-debug/SKILL.md +12 -39
- package/test-case-strategy/SKILL.md +10 -37
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/update-project-html/SKILL.md +19 -24
- package/update-project-html/references/definition.md +12 -0
- package/version-release/SKILL.md +16 -37
- package/discover-edge-cases/CHANGELOG.md +0 -19
- package/discover-edge-cases/LICENSE +0 -21
- package/discover-edge-cases/README.md +0 -87
- package/discover-edge-cases/SKILL.md +0 -32
- package/discover-edge-cases/agents/openai.yaml +0 -4
- package/discover-edge-cases/references/architecture-edge-cases.md +0 -41
- package/discover-edge-cases/references/code-edge-cases.md +0 -46
- package/discover-security-issues/CHANGELOG.md +0 -32
- package/discover-security-issues/LICENSE +0 -21
- package/discover-security-issues/README.md +0 -35
- package/discover-security-issues/SKILL.md +0 -54
- package/discover-security-issues/agents/openai.yaml +0 -4
- package/discover-security-issues/references/agent-attack-catalog.md +0 -117
- package/discover-security-issues/references/common-software-attack-catalog.md +0 -168
- package/discover-security-issues/references/red-team-extreme-scenarios.md +0 -81
- package/discover-security-issues/references/risk-checklist.md +0 -78
- package/discover-security-issues/references/security-test-patterns-agent.md +0 -101
- package/discover-security-issues/references/security-test-patterns-finance.md +0 -88
- package/discover-security-issues/references/test-snippets.md +0 -73
- package/iterative-code-performance/LICENSE +0 -21
- package/iterative-code-performance/README.md +0 -34
- package/iterative-code-performance/SKILL.md +0 -116
- package/iterative-code-performance/agents/openai.yaml +0 -4
- package/iterative-code-performance/references/algorithmic-complexity.md +0 -58
- package/iterative-code-performance/references/allocation-and-hot-loops.md +0 -53
- package/iterative-code-performance/references/caching-and-memoization.md +0 -64
- package/iterative-code-performance/references/concurrency-and-pipelines.md +0 -61
- package/iterative-code-performance/references/coupled-hot-path-strategy.md +0 -78
- package/iterative-code-performance/references/io-batching-and-queries.md +0 -55
- package/iterative-code-performance/references/iteration-gates.md +0 -133
- package/iterative-code-performance/references/job-selection.md +0 -92
- package/iterative-code-performance/references/measurement-and-benchmarking.md +0 -78
- package/iterative-code-performance/references/module-coverage.md +0 -133
- package/iterative-code-performance/references/repository-scan.md +0 -69
- package/iterative-code-quality/LICENSE +0 -21
- package/iterative-code-quality/README.md +0 -45
- package/iterative-code-quality/SKILL.md +0 -112
- package/iterative-code-quality/agents/openai.yaml +0 -4
- package/iterative-code-quality/references/coupled-core-file-strategy.md +0 -73
- package/iterative-code-quality/references/iteration-gates.md +0 -127
- package/iterative-code-quality/references/job-selection.md +0 -78
- package/iterative-code-quality/references/logging-alignment.md +0 -67
- package/iterative-code-quality/references/module-boundaries.md +0 -83
- package/iterative-code-quality/references/module-coverage.md +0 -126
- package/iterative-code-quality/references/naming-and-simplification.md +0 -73
- package/iterative-code-quality/references/repository-scan.md +0 -65
- package/iterative-code-quality/references/testing-strategy.md +0 -95
- package/merge-conflict-resolver/SKILL.md +0 -46
- package/merge-conflict-resolver/agents/openai.yaml +0 -5
- package/recover-missing-plan/SKILL.md +0 -85
- package/recover-missing-plan/agents/openai.yaml +0 -4
- package/review-change-set/LICENSE +0 -21
- package/review-change-set/README.md +0 -55
- package/review-change-set/SKILL.md +0 -46
- package/review-change-set/agents/openai.yaml +0 -4
- package/review-codebases/LICENSE +0 -21
- package/review-codebases/README.md +0 -69
- package/review-codebases/SKILL.md +0 -46
- package/review-codebases/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/LICENSE +0 -21
- package/scheduled-runtime-health-check/README.md +0 -107
- package/scheduled-runtime-health-check/SKILL.md +0 -135
- package/scheduled-runtime-health-check/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/references/output-format.md +0 -20
- package/spec-to-project-html/SKILL.md +0 -42
- package/spec-to-project-html/agents/openai.yaml +0 -11
- package/spec-to-project-html/references/TEMPLATE_SPEC.md +0 -113
- package/submission-readiness-check/SKILL.md +0 -55
- package/submission-readiness-check/agents/openai.yaml +0 -4
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# Module Coverage And Performance Deep-Read Iterations
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Prevent the agent from repeatedly optimizing only familiar hot paths while untouched modules remain unexamined.
|
|
6
|
-
|
|
7
|
-
Use this reference in Step 1 to build the module inventory and in Step 2 to choose which module or module cluster receives the next performance deep-read iteration.
|
|
8
|
-
|
|
9
|
-
Deep-read here does not mean generic reading. It means scanning the module through each available performance job lens so the agent can identify whether measurement, algorithmic complexity, repeated-work removal, IO batching, caching, allocation cleanup, concurrency work, or staged unlock work is justified.
|
|
10
|
-
|
|
11
|
-
## Module inventory
|
|
12
|
-
|
|
13
|
-
List every meaningful in-scope module before completion. A module may be:
|
|
14
|
-
|
|
15
|
-
- a package, app, service, route group, command group, worker, or library,
|
|
16
|
-
- a domain folder with a clear responsibility,
|
|
17
|
-
- a runtime entrypoint plus its owned helpers,
|
|
18
|
-
- a persistence/query, external-integration, queue, cache, or reporting subsystem,
|
|
19
|
-
- a testable subsystem with stable callers and contracts.
|
|
20
|
-
|
|
21
|
-
Record each module with:
|
|
22
|
-
|
|
23
|
-
- module name and path roots,
|
|
24
|
-
- primary responsibility,
|
|
25
|
-
- entrypoints and public interfaces,
|
|
26
|
-
- key callers and callees,
|
|
27
|
-
- expected workload shape and frequency,
|
|
28
|
-
- tests, benchmarks, and performance guardrails,
|
|
29
|
-
- logs, metrics, traces, or profiling surfaces,
|
|
30
|
-
- persistence, network, filesystem, or external API contracts,
|
|
31
|
-
- risk level and estimated ease,
|
|
32
|
-
- current coverage status.
|
|
33
|
-
|
|
34
|
-
Exclude generated, vendored, lock, build-output, snapshot, fixture-only, or explicitly out-of-scope areas only with evidence.
|
|
35
|
-
|
|
36
|
-
## Coverage ledger statuses
|
|
37
|
-
|
|
38
|
-
Use simple statuses so stopping conditions are auditable:
|
|
39
|
-
|
|
40
|
-
- `unvisited`: inventoried but not deeply read yet.
|
|
41
|
-
- `deep-read`: callers, callees, tests, logs, benchmarks, contracts, workload shape, core files, and all available performance job lenses were inspected with enough context to judge performance.
|
|
42
|
-
- `optimized`: at least one behavior-safe performance improvement landed for this module.
|
|
43
|
-
- `validated-clear`: deep read found no actionable in-scope performance issue worth changing now.
|
|
44
|
-
- `deferred`: an issue exists but is blocked, unsafe, speculative, approval-dependent, production-measurement-only, or requires macro-architecture/product scope.
|
|
45
|
-
- `excluded`: not human-maintained source or outside the user's requested scope.
|
|
46
|
-
|
|
47
|
-
Completion is not allowed while any in-scope module remains `unvisited`.
|
|
48
|
-
|
|
49
|
-
## Easy-first and evidence-first ordering
|
|
50
|
-
|
|
51
|
-
Start with the easiest useful modules when that reduces risk:
|
|
52
|
-
|
|
53
|
-
- small surface area,
|
|
54
|
-
- clear ownership,
|
|
55
|
-
- local tests, cheap benchmarks, or profiling hooks,
|
|
56
|
-
- limited side effects,
|
|
57
|
-
- low public API or persistence risk,
|
|
58
|
-
- likely to clarify workload shape, tests, benchmarks, caching seams, batching seams, or data structures used by harder modules.
|
|
59
|
-
|
|
60
|
-
Prefer measured high-impact bottlenecks when they exist, even if they are not the easiest module.
|
|
61
|
-
|
|
62
|
-
Do not confuse easy-first with low-value micro-optimization. The chosen module should either resolve real performance issues or create context/guardrails that make later hot paths safer.
|
|
63
|
-
|
|
64
|
-
## Deep-read requirements
|
|
65
|
-
|
|
66
|
-
A module iteration is not deep-read until the agent inspects:
|
|
67
|
-
|
|
68
|
-
- module entrypoints and public interfaces,
|
|
69
|
-
- internal core files and responsibility boundaries,
|
|
70
|
-
- key callers and downstream callees,
|
|
71
|
-
- workload size, frequency, and data-shape assumptions,
|
|
72
|
-
- tests, fixtures, mocks, benchmark commands, and validation commands,
|
|
73
|
-
- logs, metrics, tracing, profiler hooks, and error messages,
|
|
74
|
-
- configuration, persistence, query, cache, concurrency, and external-service contracts when relevant,
|
|
75
|
-
- known TODOs, comments, or docs that describe performance behavior.
|
|
76
|
-
|
|
77
|
-
It also must inspect the module through each available performance job lens:
|
|
78
|
-
|
|
79
|
-
- `measurement / benchmarking`: is there enough baseline evidence, or is measurement the next unlock?
|
|
80
|
-
- `algorithmic complexity / repeated work`: are there avoidable scans, sorts, conversions, or duplicated computations?
|
|
81
|
-
- `IO batching / queries`: are there N+1 calls, excessive round trips, poor query shapes, or serial external work?
|
|
82
|
-
- `caching / memoization`: would caching help, and are ownership plus invalidation safe?
|
|
83
|
-
- `allocation / hot loops`: are tight loops creating avoidable objects, strings, parsing, or serialization?
|
|
84
|
-
- `concurrency / pipelines`: is work too serial, too parallel, unbounded, or missing backpressure?
|
|
85
|
-
- `staged unlock work`: if the module is too coupled for direct optimization, what is the next smaller unlock step?
|
|
86
|
-
|
|
87
|
-
Do not mark a module `validated-clear` from a shallow file skim.
|
|
88
|
-
Do not mark a module `validated-clear` until every available performance job lens has been checked and classified as one of: actionable now, measure-first, unlock-first, deferred, excluded, or no meaningful issue found.
|
|
89
|
-
|
|
90
|
-
## Choosing the next module
|
|
91
|
-
|
|
92
|
-
After every iteration:
|
|
93
|
-
|
|
94
|
-
1. Re-scan the module ledger.
|
|
95
|
-
2. Prefer an `unvisited` module unless a just-touched module must be stabilized before moving on.
|
|
96
|
-
3. Choose the highest-evidence hot module, or the easiest useful `unvisited` module that can be deeply read and improved or validated now.
|
|
97
|
-
4. Scan that module through every available performance job lens before deciding what "this round" means.
|
|
98
|
-
5. If the next module is high-risk and under-guarded, choose benchmark or characterization guardrails first.
|
|
99
|
-
6. If the next module is too coupled for direct optimization, choose staged unlock work rather than skipping it.
|
|
100
|
-
7. Return to the full-codebase scan after validation and update the ledger.
|
|
101
|
-
|
|
102
|
-
Revisiting a familiar module is valid only when:
|
|
103
|
-
|
|
104
|
-
- it blocks safe deep reading of an unvisited module,
|
|
105
|
-
- a previous optimization created follow-up risk that must be stabilized,
|
|
106
|
-
- validation exposed a real defect, stale benchmark, or stale contract,
|
|
107
|
-
- cross-module optimization requires touching it together with the next module.
|
|
108
|
-
|
|
109
|
-
## Module cluster iterations
|
|
110
|
-
|
|
111
|
-
One iteration may cover a small cluster of modules when they share one hot path or invariant, such as:
|
|
112
|
-
|
|
113
|
-
- a command and its parser,
|
|
114
|
-
- a route and its service,
|
|
115
|
-
- a domain module and its query adapter,
|
|
116
|
-
- an integration wrapper and its retry or batching helper,
|
|
117
|
-
- a worker and its queue processor.
|
|
118
|
-
|
|
119
|
-
Keep clusters bounded. Do not use clustering to claim full-repository coverage without deep context.
|
|
120
|
-
|
|
121
|
-
## Stage-gate questions
|
|
122
|
-
|
|
123
|
-
At the end of each iteration, answer:
|
|
124
|
-
|
|
125
|
-
- Which module or module cluster was deeply read?
|
|
126
|
-
- Which performance job lenses were checked, and which jobs were selected and why?
|
|
127
|
-
- What bottleneck was fixed, or why is the module validated-clear?
|
|
128
|
-
- Which guardrails prove behavior was preserved?
|
|
129
|
-
- What baseline and after evidence exists?
|
|
130
|
-
- Which modules remain `unvisited`?
|
|
131
|
-
- Which module is the next highest-evidence or easiest useful target?
|
|
132
|
-
|
|
133
|
-
If any in-scope module remains `unvisited`, the correct action is to return to Step 1, not to finish.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Repository Performance Scan And Backlog Selection
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Build a factual performance map before changing code, then choose the highest-value optimizations while tracking module-by-module performance deep-read coverage.
|
|
6
|
-
|
|
7
|
-
## Required scan
|
|
8
|
-
|
|
9
|
-
- Read `AGENTS.md/CLAUDE.md`, `README*`, project docs, manifests, task runners, CI configs, benchmark setup, profiler setup, and test setup.
|
|
10
|
-
- List entrypoints: CLI commands, servers, workers, jobs, frontend routes, scripts, libraries, public packages, and scheduled tasks.
|
|
11
|
-
- Identify core domain modules, persistence/query boundaries, external integrations, serialization/parsing paths, logging utilities, queues, caches, and test helpers.
|
|
12
|
-
- Create a module inventory and coverage ledger using `references/module-coverage.md`.
|
|
13
|
-
- For each module, scan through the available performance job lenses instead of treating scan as generic code reading.
|
|
14
|
-
- Inspect current git state before editing so unrelated user changes are not overwritten.
|
|
15
|
-
- Identify generated, vendored, lock, snapshot, build-output, fixture, compiled, and minified files; exclude them unless they are human-maintained source.
|
|
16
|
-
|
|
17
|
-
## Performance backlog signals
|
|
18
|
-
|
|
19
|
-
Prioritize files or functions with:
|
|
20
|
-
|
|
21
|
-
- measured slow requests, commands, jobs, tests, startup, builds, or user-visible interactions,
|
|
22
|
-
- high fan-in, high loop counts, high request frequency, or repeated invocation in long-running workers,
|
|
23
|
-
- avoidable nested loops, repeated scans, repeated sorting, repeated parsing, or repeated conversions,
|
|
24
|
-
- N+1 database, network, filesystem, or external API calls,
|
|
25
|
-
- unbounded concurrency, serial work that can be safely batched, or pipelines without backpressure,
|
|
26
|
-
- repeated serialization/deserialization or large intermediate objects,
|
|
27
|
-
- allocation churn, excessive cloning/copying, or memory-pressure paths,
|
|
28
|
-
- caches with missing invalidation, excessive retention, or low hit value,
|
|
29
|
-
- logs, metrics, traces, or benchmarks that hide where time is spent.
|
|
30
|
-
|
|
31
|
-
## Evidence to capture
|
|
32
|
-
|
|
33
|
-
For each candidate record:
|
|
34
|
-
|
|
35
|
-
- file path and symbol name,
|
|
36
|
-
- owning module or module cluster,
|
|
37
|
-
- job lens that exposed the issue,
|
|
38
|
-
- performance evidence: benchmark, trace, profiler output, log timing, production symptom, or complexity analysis,
|
|
39
|
-
- expected speed, throughput, allocation, IO, or complexity improvement,
|
|
40
|
-
- correctness risks and behavior invariants,
|
|
41
|
-
- tests, benchmarks, or validations needed to prove safety,
|
|
42
|
-
- reason to defer if the candidate requires product, architecture, operational, or production-data approval.
|
|
43
|
-
|
|
44
|
-
## Exclusion rules
|
|
45
|
-
|
|
46
|
-
Do not optimize:
|
|
47
|
-
|
|
48
|
-
- third-party, generated, compiled, or minified artifacts,
|
|
49
|
-
- snapshots where churn would hide signal,
|
|
50
|
-
- code the user marked as actively edited elsewhere,
|
|
51
|
-
- public schema/API names or data contracts that require migration planning,
|
|
52
|
-
- cold paths where the optimization makes code harder to maintain without evidence of value,
|
|
53
|
-
- areas that cannot be validated and are not causing a clear performance risk.
|
|
54
|
-
|
|
55
|
-
## Backlog scoring
|
|
56
|
-
|
|
57
|
-
Prefer a small set of high-confidence improvements over an exhaustive sweep.
|
|
58
|
-
|
|
59
|
-
Score each candidate by:
|
|
60
|
-
|
|
61
|
-
1. **Impact**: latency, throughput, CPU, memory, IO, user criticality, and call frequency.
|
|
62
|
-
2. **Evidence**: measurement quality or clear complexity proof.
|
|
63
|
-
3. **Correctness confidence**: ability to preserve business behavior.
|
|
64
|
-
4. **Validation**: ability to benchmark, test, or otherwise prove equivalence.
|
|
65
|
-
5. **Blast radius**: number of modules, public contracts, persistence paths, and operational assumptions affected.
|
|
66
|
-
|
|
67
|
-
Start with high-impact, high-evidence, low-blast-radius items. Escalate broad changes only when smaller passes cannot resolve the root performance problem.
|
|
68
|
-
|
|
69
|
-
Do not finish from backlog scoring alone. Completion also requires the module coverage ledger to show that every in-scope module has been deeply read and either improved, validated-clear, deferred, or excluded with evidence.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 LaiTszKin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# iterative-code-quality
|
|
2
|
-
|
|
3
|
-
Improve an existing repository through a strict three-step loop of full-codebase scan, job-based refactor, and final documentation/constraint sync while preserving intended business behavior and the system's top-level macro architecture.
|
|
4
|
-
|
|
5
|
-
## Core capabilities
|
|
6
|
-
|
|
7
|
-
- Runs a repository-wide scan before every refactor round and refreshes a concrete quality backlog.
|
|
8
|
-
- Uses a strict three-step loop: scan the codebase, choose this round's jobs and refactor, then update docs/constraints only when no actionable gap remains.
|
|
9
|
-
- Keeps job execution guidance in focused reference documents instead of embedding every job as a workflow step in the main skill.
|
|
10
|
-
- Builds a module inventory and coverage ledger so every in-scope module receives a deep-read iteration before completion.
|
|
11
|
-
- Defines deep-read as a job-oriented scan across naming, simplification, module boundaries, logging, testing, and staged unlock opportunities instead of generic reading.
|
|
12
|
-
- Starts from the easiest useful modules first, while preserving the rule that unvisited modules cannot be skipped before completion.
|
|
13
|
-
- Clarifies ambiguous variable, parameter, field, helper, and test-data names.
|
|
14
|
-
- Simplifies complex functions and extracts reusable helpers only when they centralize real behavior.
|
|
15
|
-
- Splits mixed-responsibility code into narrower modules without changing macro architecture.
|
|
16
|
-
- Repairs stale or missing logs and adds tests for important observability contracts.
|
|
17
|
-
- Adds high-value unit, property-based, integration, or E2E tests based on risk.
|
|
18
|
-
- Does not require pre-existing tests before every refactor; for high-risk under-guarded areas, it treats test addition as the next unlock direction.
|
|
19
|
-
- Requires confidence decisions to combine the agent's self-assessed ability, task complexity, guardrail strength, rollback or repair paths, and whether a strong test suite can safely drive broken refactors back to green.
|
|
20
|
-
- Uses those tests and other guardrails to justify more aggressive refactors, instead of leaving known issues in place for subjective confidence reasons.
|
|
21
|
-
- Re-scans the full repository after every iteration and picks the next highest-confidence, highest-leverage directions.
|
|
22
|
-
- Uses small safe refactors to prepare the ground for larger later refactors, progressing gradually from outside to inside.
|
|
23
|
-
- Treats large coupled or apparently core files as staged unlock problems, not as automatic stop signals.
|
|
24
|
-
- Uses explicit next-job selection conditions from references so the agent can decide more concretely whether naming, simplification, modularization, logging, testing, or unlock work should happen next.
|
|
25
|
-
- Runs a stage-gate full-codebase decision after every iteration to decide whether more rounds are still required.
|
|
26
|
-
- Repeats the pass cycle while any known in-scope actionable quality issue remains, and forbids a completion report until the latest scan is clear or remaining items are explicitly deferred with a valid reason.
|
|
27
|
-
- Forbids completion while any in-scope module remains unvisited, even if already-read modules look clean.
|
|
28
|
-
- Targets as many inherited repository quality problems as can be solved safely, and expects the guarded test surface to remain green after the refactor.
|
|
29
|
-
- Synchronizes project docs and `AGENTS.md/CLAUDE.md` through `align-project-documents` and `maintain-project-constraints` after implementation.
|
|
30
|
-
|
|
31
|
-
## Repository structure
|
|
32
|
-
|
|
33
|
-
- `SKILL.md`: Main three-step loop, dependencies, guardrails, and output contract.
|
|
34
|
-
- `agents/openai.yaml`: Agent interface metadata and default prompt.
|
|
35
|
-
- `references/`: Focused guides for scanning, module coverage, job selection, naming, simplification, module boundaries, logging, testing, unlock work, and iteration gates.
|
|
36
|
-
|
|
37
|
-
## Typical usage
|
|
38
|
-
|
|
39
|
-
```text
|
|
40
|
-
Use $iterative-code-quality to improve this repository's code quality end to end without changing business behavior or macro architecture.
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## License
|
|
44
|
-
|
|
45
|
-
MIT. See `LICENSE`.
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: iterative-code-quality
|
|
3
|
-
description: >-
|
|
4
|
-
Improve an existing codebase through repeated evidence-based repository-wide
|
|
5
|
-
scans, module-by-module deep-read coverage, and behavior-safe refactors until
|
|
6
|
-
no known in-scope actionable quality issue or unvisited in-scope module
|
|
7
|
-
remains: clarify poor names, simplify or extract reusable functions, split
|
|
8
|
-
mixed-responsibility code, repair stale or missing logs, and add high-value
|
|
9
|
-
tests where guardrails are missing, while preserving intended business
|
|
10
|
-
behavior and the system's macro architecture. Use when users ask for
|
|
11
|
-
comprehensive refactoring, code cleanup, maintainability hardening, naming
|
|
12
|
-
cleanup, log alignment, or test coverage improvement across a repository.
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Iterative Code Quality
|
|
16
|
-
|
|
17
|
-
## Dependencies
|
|
18
|
-
|
|
19
|
-
- Required: `align-project-documents` and `maintain-project-constraints` after the repository is truly iteration-complete.
|
|
20
|
-
- Conditional: `systematic-debug` when a newly added or existing test exposes a real business-logic defect that must be fixed at the true owner.
|
|
21
|
-
- Optional: `discover-edge-cases` for high-risk boundary exploration before adding tests; `improve-observability` for non-trivial telemetry design.
|
|
22
|
-
- Fallback: If required completion dependencies are unavailable, finish code and validation first, then report exactly which documentation or constraint-sync action could not run.
|
|
23
|
-
|
|
24
|
-
## Standards
|
|
25
|
-
|
|
26
|
-
- Evidence: Read repository docs, project constraints, source, tests, logs, build scripts, entrypoints, and nearby abstractions before editing; every refactor and every new test must be justified by code context.
|
|
27
|
-
- Execution: Run a continuous three-step loop of full-codebase scan → choose this round's jobs and refactor → if and only if the latest full-codebase scan is clear, update docs and constraints; otherwise return to scanning immediately. Maintain a module inventory and coverage ledger so every in-scope module receives a job-oriented deep-read iteration before completion. Do not treat jobs as workflow steps. Do not produce a completion report while any known in-scope actionable issue or unvisited in-scope module remains, unless the remaining surface is explicitly classified with evidence as blocked, unsafe, user-owned active work, speculative, low-value, or approval-dependent.
|
|
28
|
-
- Quality: Resolve as many inherited quality problems as safely possible without changing intended behavior or the system's macro architecture. Do not require pre-existing tests before every safe refactor; if an area is high-risk and weakly guarded, add the missing guardrails as part of the work instead of treating the area as untouchable.
|
|
29
|
-
- Output: Return iteration-by-iteration decisions, selected jobs, module coverage status, changed files, behavior-preservation evidence, tests and guardrails added, validation results, and docs/constraint sync status only after the latest scan shows no remaining known actionable in-scope issue and no unvisited in-scope module.
|
|
30
|
-
|
|
31
|
-
## Mission
|
|
32
|
-
|
|
33
|
-
Leave the repository materially cleaner by continuously scanning the whole codebase, landing the highest-value safe refactors available at each moment, and repeating until there is no known in-scope actionable quality gap left to fix.
|
|
34
|
-
|
|
35
|
-
For this skill, `macro architecture` means the system's top-level runtime shape and overall operating logic: major subsystems, top-level execution model, deployment/runtime boundaries, persistence model, service boundaries, and the end-to-end way the whole system works. Ordinary module interactions, helper extraction, local responsibility moves, internal call-boundary cleanup, and local module splits do not count as macro-architecture changes by themselves.
|
|
36
|
-
|
|
37
|
-
## Three-Step Loop
|
|
38
|
-
|
|
39
|
-
### 1) Scan the repository
|
|
40
|
-
|
|
41
|
-
- Read root guidance first: `AGENTS.md/CLAUDE.md`, `README*`, package manifests, task runners, CI/test config, and major project docs.
|
|
42
|
-
- Map runtime entrypoints, domain modules, external integrations, logging utilities, and current test surfaces.
|
|
43
|
-
- Exclude generated, vendored, lock, build-output, fixture, or snapshot files unless evidence shows they are human-maintained source.
|
|
44
|
-
- Build or refresh a concrete repository-wide backlog of known actionable quality issues.
|
|
45
|
-
- Build or refresh a module inventory and coverage ledger; every in-scope module starts as unvisited until it has received a job-oriented deep-read iteration with callers, callees, tests, logs, relevant contracts, and each available job lens inspected.
|
|
46
|
-
- Re-scan the full codebase after every landed iteration, not only the files just changed.
|
|
47
|
-
- Load `references/repository-scan.md` for the scan checklist and backlog shaping rules.
|
|
48
|
-
- Load `references/module-coverage.md` for module inventory, job-oriented deep-read coverage, easy-first ordering, and completion rules.
|
|
49
|
-
|
|
50
|
-
### 2) Choose this round's jobs and refactor
|
|
51
|
-
|
|
52
|
-
- Choose jobs only after the latest full-codebase scan. Jobs are optional execution directions, not ordered workflow steps.
|
|
53
|
-
- Treat module scanning and job choice as one linked activity: inspect the selected module through every available job lens before deciding which jobs actually land in this round.
|
|
54
|
-
- Select the smallest set of jobs that can safely improve the currently selected module or module cluster under current guardrails.
|
|
55
|
-
- If the user has clearly indicated that a touched area is their active in-progress change, treat that area as blocked for this skill, record the evidence, and continue with other in-scope modules instead of modifying or debugging it.
|
|
56
|
-
- Before choosing or deferring a refactor, explicitly assess refactor confidence as a combination of the agent's own ability to understand and complete the task, the objective safety net from tests and other guardrails, the clarity of rollback or repair paths, and the task's inherent difficulty. Do not treat difficulty alone as low confidence; when strong tests guard the behavior, use them to support bolder changes because failures can be driven back to green.
|
|
57
|
-
- Prefer easy-first module ordering: start from low-risk, high-confidence modules when doing so builds context, tests, naming clarity, or seams that make harder modules safer later.
|
|
58
|
-
- Do not keep revisiting familiar modules while other in-scope modules remain unvisited unless the familiar module blocks the next unvisited module's safe deep read.
|
|
59
|
-
- Prefer smaller, high-confidence refactors that reduce risk and prepare the ground for deeper later cleanup.
|
|
60
|
-
- If a desired refactor is high-risk and weakly guarded, make guardrail-building part of this round instead of stopping.
|
|
61
|
-
- If a file feels too coupled, too central, or too risky for a direct rewrite, do staged unlock work rather than declaring the area blocked.
|
|
62
|
-
- Read all directly affected callers, tests, interfaces, and logs before editing.
|
|
63
|
-
- Validate from narrow to broad after each bounded round, then perform a full-codebase stage-gate decision:
|
|
64
|
-
- if any known in-scope actionable issue still remains or any in-scope module has not received a deep-read iteration, return to Step 1;
|
|
65
|
-
- only continue to Step 3 when the latest scan is clear.
|
|
66
|
-
|
|
67
|
-
Load references for this step only as needed:
|
|
68
|
-
|
|
69
|
-
- `references/module-coverage.md` for choosing the next module and proving every in-scope module has been deeply read through the available-job lenses.
|
|
70
|
-
- `references/job-selection.md` for next-job choice conditions and tie-breakers.
|
|
71
|
-
- `references/naming-and-simplification.md` for naming cleanup and function simplification/extraction.
|
|
72
|
-
- `references/module-boundaries.md` for single-responsibility module cleanup.
|
|
73
|
-
- `references/logging-alignment.md` for stale or missing log repair.
|
|
74
|
-
- `references/testing-strategy.md` for unit, property, integration, and E2E test strategy.
|
|
75
|
-
- `references/coupled-core-file-strategy.md` for staged unlock work on large coupled or apparently core files.
|
|
76
|
-
- `references/iteration-gates.md` for validation cadence, stage-gate rules, and stop criteria.
|
|
77
|
-
|
|
78
|
-
### 3) Update project documents and constraints
|
|
79
|
-
|
|
80
|
-
Only enter this step when the latest full-codebase scan confirms there is no remaining known actionable in-scope quality issue and every in-scope module has received a deep-read iteration, except items explicitly classified as blocked, unsafe, speculative, low-value, excluded, or approval-dependent.
|
|
81
|
-
|
|
82
|
-
- Run `align-project-documents` when README, architecture notes, setup docs, debugging docs, or test guidance may have drifted.
|
|
83
|
-
- Run `maintain-project-constraints` to verify `AGENTS.md/CLAUDE.md` still matches the repository's real architecture, business flow, commands, and conventions.
|
|
84
|
-
- Update only the documentation and constraints that changed in reality because of the refactor.
|
|
85
|
-
|
|
86
|
-
## Hard Guardrails
|
|
87
|
-
|
|
88
|
-
- Do not change intended business logic while refactoring, except to fix a real defect exposed by tests and verified at the true owner.
|
|
89
|
-
- Do not change the system's macro architecture unless the user explicitly expands scope.
|
|
90
|
-
- Do not use one-off scripts to rewrite product code.
|
|
91
|
-
- Do not stop early just because a file is large, central, or historically fragile; if a safe unlock step exists, that is the next job.
|
|
92
|
-
- Do not stop before every in-scope module has been inventoried, deeply read, and either improved, validated as clear, or explicitly deferred/excluded with evidence.
|
|
93
|
-
- Do not touch user-owned active edits; classify them as blocked with evidence and continue elsewhere.
|
|
94
|
-
- Do not weaken tests to make a refactor pass; fix the real defect or update stale expectations to stable invariants.
|
|
95
|
-
- Do not add style-only churn that does not improve naming, modularity, observability, reuse, or guardrail strength.
|
|
96
|
-
- Do not add unreliable E2E coverage when a controlled integration or characterization test can prove the same risk more safely.
|
|
97
|
-
|
|
98
|
-
## Completion Report
|
|
99
|
-
|
|
100
|
-
Only report completion after Step 3 is done, the latest Step 1 scan is clear, and the module coverage ledger has no unvisited in-scope module.
|
|
101
|
-
|
|
102
|
-
Return:
|
|
103
|
-
|
|
104
|
-
1. Iterations completed and the jobs selected in each iteration.
|
|
105
|
-
2. Stage-gate verdict after each full-codebase re-scan.
|
|
106
|
-
3. Module coverage ledger summary: modules deep-read, improved, validated-clear, deferred, or excluded.
|
|
107
|
-
4. Key files changed and the quality issue each change resolved.
|
|
108
|
-
5. Business behavior preservation evidence.
|
|
109
|
-
6. Tests or other guardrails added or updated, including property/integration/E2E `N/A` reasons where relevant.
|
|
110
|
-
7. Validation commands and results.
|
|
111
|
-
8. Documentation and `AGENTS.md/CLAUDE.md` synchronization status.
|
|
112
|
-
9. Remaining blocked or approval-dependent items, if any.
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Iterative Code Quality"
|
|
3
|
-
short_description: "Refactor names, functions, modules, logs, and tests in repeated behavior-safe passes"
|
|
4
|
-
default_prompt: "Use $iterative-code-quality as a strict three-step loop. Step 1: scan the full repository, refresh the actionable quality backlog, and maintain a module inventory plus coverage ledger. Step 2: choose this round's module or bounded module cluster, scan it through every available job lens, and only then decide which jobs actually land now; start from the easiest useful unvisited modules, jobs are selectable directions rather than workflow steps, and assess refactor confidence from your own ability to understand and complete the change, task complexity, guardrail strength, rollback or repair paths, and whether tests can drive accidental breakage back to green. If a high-risk area is weakly guarded add the missing tests or other guardrails instead of stopping; if strong tests guard the behavior, use them to justify bolder safe refactors rather than avoiding the work. If a file is too coupled or too central for direct cleanup, switch to staged unlock work and keep progressing. After validation, run a full-codebase stage-gate; if any known in-scope actionable issue remains or any in-scope module has not received a job-oriented deep-read iteration, go back to Step 1 immediately. Step 3: only when the latest full-codebase scan is clear and every in-scope module is deeply read through the available-job lenses, run $align-project-documents and $maintain-project-constraints to synchronize docs and AGENTS.md/CLAUDE.md. Preserve intended business behavior and the system's macro architecture, keep the guarded test surface green, and do not write a completion report while actionable gaps or unvisited modules still exist."
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Staged Strategy For Large Coupled Or Apparently Core Files
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Teach the agent how to keep making progress when a file feels too central, too coupled, or too risky to refactor directly.
|
|
6
|
-
|
|
7
|
-
The correct response is usually not "stop". The correct response is "find the next unlock step".
|
|
8
|
-
|
|
9
|
-
## Core rule
|
|
10
|
-
|
|
11
|
-
A large coupled file is a **decomposition signal**, not a **completion blocker**.
|
|
12
|
-
|
|
13
|
-
If a safe, behavior-preserving unlock step exists under current guardrails, take that step now instead of deferring the whole area.
|
|
14
|
-
|
|
15
|
-
If guardrails are too weak for direct cleanup, strengthening them is itself the next unlock step.
|
|
16
|
-
|
|
17
|
-
## First questions to ask
|
|
18
|
-
|
|
19
|
-
When a file feels untouchable, ask:
|
|
20
|
-
|
|
21
|
-
- Which parts are pure logic and which parts are side effects?
|
|
22
|
-
- Which names or local concepts are blocking understanding?
|
|
23
|
-
- Which behavior can be locked down with characterization tests?
|
|
24
|
-
- Which dependency seams can be introduced without changing behavior?
|
|
25
|
-
- Which caller groups or workflow slices can be isolated first?
|
|
26
|
-
- Which refactor would most reduce the cost of the next refactor?
|
|
27
|
-
|
|
28
|
-
## Typical unlock sequence
|
|
29
|
-
|
|
30
|
-
Pick one or more of these, in the order justified by current evidence:
|
|
31
|
-
|
|
32
|
-
1. Add characterization or regression tests around current behavior.
|
|
33
|
-
2. Rename confusing variables, flags, intermediate states, and helper names.
|
|
34
|
-
3. Extract constants, schemas, types, and small pure transformations.
|
|
35
|
-
4. Separate read path from write path, or decision logic from side effects.
|
|
36
|
-
5. Isolate external calls, persistence, and logging behind clearer seams.
|
|
37
|
-
6. Group callers by responsibility and split one slice at a time.
|
|
38
|
-
7. Move one coherent responsibility into a new internal module.
|
|
39
|
-
8. Re-scan and decide whether a deeper split is now safer.
|
|
40
|
-
|
|
41
|
-
## What not to do
|
|
42
|
-
|
|
43
|
-
Avoid these anti-patterns:
|
|
44
|
-
|
|
45
|
-
- declaring the area blocked just because it is important,
|
|
46
|
-
- attempting a full rewrite before guardrails exist,
|
|
47
|
-
- preserving obvious local design debt only because the file is central,
|
|
48
|
-
- escalating ordinary internal decomposition into a fake macro-architecture concern,
|
|
49
|
-
- mixing unlock work with unrelated style churn.
|
|
50
|
-
|
|
51
|
-
## Choosing the next step
|
|
52
|
-
|
|
53
|
-
Prefer the next step that maximizes:
|
|
54
|
-
|
|
55
|
-
1. combined confidence from the agent's own ability, code understanding, existing tests, or quickly addable tests,
|
|
56
|
-
2. leverage for future deeper cleanup,
|
|
57
|
-
3. reduction in coupling or cognitive load,
|
|
58
|
-
4. low risk to current business behavior.
|
|
59
|
-
|
|
60
|
-
If two steps are both safe, choose the one that makes the next iteration easier.
|
|
61
|
-
|
|
62
|
-
If the file is high-risk and under-tested, prefer adding the smallest useful characterization tests before attempting deeper structural edits. If the file is high-risk but well-guarded, do not stop only because the change is difficult; use the guardrails to validate the agent's work and repair any accidental breakage.
|
|
63
|
-
|
|
64
|
-
## Completion rule for coupled files
|
|
65
|
-
|
|
66
|
-
Do not ask "Can I solve the whole file now?"
|
|
67
|
-
|
|
68
|
-
Ask:
|
|
69
|
-
|
|
70
|
-
- "Can I make this file meaningfully easier to change in the next iteration?"
|
|
71
|
-
- "Can I reduce coupling, clarify ownership, or improve guardrails right now?"
|
|
72
|
-
|
|
73
|
-
If the answer is yes, continue iterating.
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
# Iteration Gates And Stopping Criteria
|
|
2
|
-
|
|
3
|
-
## Pass discipline
|
|
4
|
-
|
|
5
|
-
Each iteration must have:
|
|
6
|
-
|
|
7
|
-
- a selected module or bounded module cluster,
|
|
8
|
-
- a concrete quality target,
|
|
9
|
-
- an explicit record of which job lenses were checked during the deep read,
|
|
10
|
-
- a bounded file/symbol scope,
|
|
11
|
-
- one or more selected execution directions,
|
|
12
|
-
- a confidence assessment covering the agent's own ability to complete the refactor, the task's inherent difficulty, objective guardrail strength, and rollback or repair paths,
|
|
13
|
-
- expected behavior-neutral outcome,
|
|
14
|
-
- validation plan,
|
|
15
|
-
- rollback point if evidence contradicts the change.
|
|
16
|
-
|
|
17
|
-
An iteration is not "one work type", and it also does not need to include every direction every time. Within the selected scope, choose the subset of directions that has the best current confidence and leverage: naming, simplification, module boundaries, logging, and/or tests.
|
|
18
|
-
|
|
19
|
-
Confidence is not a synonym for "easy". Assess whether the agent has enough understanding, skill, local context, tests, validation commands, and recovery path to complete the refactor safely. A hard task can still be high-confidence when strong tests, characterization coverage, and clear rollback let the agent repair mistakes by making the guarded behavior green again.
|
|
20
|
-
|
|
21
|
-
Avoid starting a broad second iteration before validating the first, but do not stop after a validated iteration if known actionable quality issues remain anywhere in the in-scope codebase.
|
|
22
|
-
|
|
23
|
-
Do not stop after a validated iteration if any in-scope module remains unvisited in the module coverage ledger.
|
|
24
|
-
|
|
25
|
-
## Validation cadence
|
|
26
|
-
|
|
27
|
-
Run validation from narrow to broad:
|
|
28
|
-
|
|
29
|
-
1. Formatter or type check for touched files when available.
|
|
30
|
-
2. Unit tests for touched helpers and modules.
|
|
31
|
-
3. Integration tests for affected chains.
|
|
32
|
-
4. Broader suite or build once multiple passes interact.
|
|
33
|
-
|
|
34
|
-
If validation fails:
|
|
35
|
-
|
|
36
|
-
- determine whether the failure is pre-existing, stale test expectation, test isolation issue, or real product bug,
|
|
37
|
-
- fix the true owner,
|
|
38
|
-
- keep regression coverage for real defects,
|
|
39
|
-
- do not mask failures by weakening assertions.
|
|
40
|
-
|
|
41
|
-
If validation passes and the guardrails meaningfully cover the changed behavior, do not keep a known quality issue in place purely because of subjective confidence concerns. Reassess whether the agent has enough capability and objective support to proceed; if yes, continue, and if no, choose the smallest guardrail or unlock step that would make the next refactor credible.
|
|
42
|
-
|
|
43
|
-
The final stopping condition also requires the relevant guarded test surface to be green; a partially red repository is not a completed refactor outcome.
|
|
44
|
-
|
|
45
|
-
## Re-scan after each iteration
|
|
46
|
-
|
|
47
|
-
Inspect the full known quality backlog for:
|
|
48
|
-
|
|
49
|
-
- modules that are still unvisited or only shallowly read,
|
|
50
|
-
- modules that were read but not yet checked against every available job lens,
|
|
51
|
-
- new naming drift from moved or extracted concepts,
|
|
52
|
-
- duplicated logic that remains after extraction,
|
|
53
|
-
- module boundaries that are still mixed,
|
|
54
|
-
- logs that now use stale names,
|
|
55
|
-
- tests that cover only the happy path,
|
|
56
|
-
- documentation or `AGENTS.md/CLAUDE.md` drift.
|
|
57
|
-
|
|
58
|
-
Then choose the next execution directions with these priorities:
|
|
59
|
-
|
|
60
|
-
1. highest combined confidence from agent capability, code understanding, guardrails, and recovery path,
|
|
61
|
-
2. strongest leverage for later deeper cleanup,
|
|
62
|
-
3. lowest business-risk path toward broader system improvement.
|
|
63
|
-
|
|
64
|
-
Use `references/job-selection.md` to convert those priorities into a concrete next-job choice.
|
|
65
|
-
|
|
66
|
-
## Stage-gate after each iteration
|
|
67
|
-
|
|
68
|
-
After every validated iteration, run a deliberate full-codebase decision pass:
|
|
69
|
-
|
|
70
|
-
1. Re-scan the repository and refresh the known quality backlog.
|
|
71
|
-
2. Refresh the module coverage ledger and identify unvisited in-scope modules.
|
|
72
|
-
3. Ask whether any known in-scope actionable issue still remains.
|
|
73
|
-
4. If yes, decide whether it should be addressed in the very next iteration or whether first-step unlock work is needed.
|
|
74
|
-
5. If the obstacle is a large, coupled, or central file, do not stop there; switch to staged unlock work and continue.
|
|
75
|
-
6. Only declare the repository iteration-complete when the re-scan shows no remaining actionable in-scope issue and no unvisited in-scope module except items that are explicitly deferred or excluded under the allowed stop categories.
|
|
76
|
-
|
|
77
|
-
This stage-gate is mandatory. A validated local change does not by itself mean the repository is done.
|
|
78
|
-
|
|
79
|
-
## Continue when
|
|
80
|
-
|
|
81
|
-
Repeat the cycle when:
|
|
82
|
-
|
|
83
|
-
- any known in-scope actionable quality issue remains unresolved,
|
|
84
|
-
- any in-scope module remains unvisited,
|
|
85
|
-
- high-impact unclear names remain,
|
|
86
|
-
- duplicated or hard-coded workflows still have safe extraction paths,
|
|
87
|
-
- a module still mixes distinct responsibilities and can be split locally,
|
|
88
|
-
- logs are still misleading or missing at critical decisions,
|
|
89
|
-
- high-value business logic remains untested and is testable.
|
|
90
|
-
|
|
91
|
-
Do not produce a final completion report while any item in this section is true. Continue with the next bounded iteration instead.
|
|
92
|
-
|
|
93
|
-
Prefer gradual outside-in progress: boundary cleanup, naming clarity, and guardrail strengthening should often come before deeper internal rewrites because they make the deeper work safer later.
|
|
94
|
-
|
|
95
|
-
## Stop when
|
|
96
|
-
|
|
97
|
-
Stop only when there are no unresolved known in-scope actionable issues. Any remaining candidates must be explicitly classified as one of:
|
|
98
|
-
|
|
99
|
-
- low-value style preference,
|
|
100
|
-
- speculative without concrete evidence,
|
|
101
|
-
- public contract migrations,
|
|
102
|
-
- macro-architecture changes,
|
|
103
|
-
- product behavior changes needing user approval,
|
|
104
|
-
- blocked by unavailable credentials, unstable external systems, or missing documentation,
|
|
105
|
-
- untestable with the current repository tooling and too risky to change safely.
|
|
106
|
-
|
|
107
|
-
If a remaining candidate cannot be placed in one of these categories, it is still an actionable gap and the agent must continue iterating rather than complete the task.
|
|
108
|
-
|
|
109
|
-
If an in-scope module has not received a deep-read iteration, it is still an actionable coverage gap even when the already-read modules look clean.
|
|
110
|
-
|
|
111
|
-
## Completion evidence
|
|
112
|
-
|
|
113
|
-
The final report should make the stopping point auditable:
|
|
114
|
-
|
|
115
|
-
- passes completed,
|
|
116
|
-
- execution directions selected per iteration,
|
|
117
|
-
- module or module cluster covered per iteration,
|
|
118
|
-
- job lenses checked per iteration,
|
|
119
|
-
- final module coverage ledger,
|
|
120
|
-
- stage-gate verdict after each full-codebase re-scan,
|
|
121
|
-
- validation commands and outcomes,
|
|
122
|
-
- confirmation that the guarded test surface is green after the refactor,
|
|
123
|
-
- tests added by risk category,
|
|
124
|
-
- behavior-preservation evidence,
|
|
125
|
-
- docs and constraints sync status,
|
|
126
|
-
- proof that the latest scan found no known actionable in-scope quality issues,
|
|
127
|
-
- deferred items with reason and required approval, dependency, or safety constraint.
|