opencodekit 0.21.9 → 0.22.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/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +116 -499
- package/dist/template/.opencode/README.md +1 -1
- package/dist/template/.opencode/agent/build.md +56 -396
- package/dist/template/.opencode/agent/explore.md +15 -16
- package/dist/template/.opencode/agent/general.md +2 -2
- package/dist/template/.opencode/agent/plan.md +3 -3
- package/dist/template/.opencode/agent/review.md +2 -3
- package/dist/template/.opencode/agent/scout.md +34 -16
- package/dist/template/.opencode/agent/vision.md +0 -1
- package/dist/template/.opencode/command/clarify.md +48 -0
- package/dist/template/.opencode/command/commit.md +53 -0
- package/dist/template/.opencode/command/design.md +4 -4
- package/dist/template/.opencode/command/fix.md +56 -0
- package/dist/template/.opencode/command/improve-architecture.md +55 -0
- package/dist/template/.opencode/command/init.md +88 -68
- package/dist/template/.opencode/command/refactor.md +66 -0
- package/dist/template/.opencode/command/review-codebase.md +1 -1
- package/dist/template/.opencode/command/ship.md +1 -1
- package/dist/template/.opencode/command/test.md +66 -0
- package/dist/template/.opencode/dcp.jsonc +29 -46
- package/dist/template/.opencode/memory/README.md +3 -5
- package/dist/template/.opencode/memory/_templates/adr.md +45 -0
- package/dist/template/.opencode/memory/project/gotchas.md +1 -1
- package/dist/template/.opencode/memory/project/user.md +1 -2
- package/dist/template/.opencode/memory/session-context.md +1 -1
- package/dist/template/.opencode/opencode.json +10 -332
- package/dist/template/.opencode/plugin/README.md +1 -1
- package/dist/template/.opencode/plugin/guard.ts +62 -0
- package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
- package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
- package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
- package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
- package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
- package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
- package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
- package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
- package/dist/template/.opencode/plugin/memory.ts +7 -17
- package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
- package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
- package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
- package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
- package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
- package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
- package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
- package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
- package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
- package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
- package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
- package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
- package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
- package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
- package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
- package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
- package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
- package/dist/template/.opencode/tool/context7.ts +1 -1
- package/dist/template/.opencode/tool/grepsearch.ts +1 -1
- package/package.json +1 -1
- package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
- package/dist/template/.opencode/agent/painter.md +0 -83
- package/dist/template/.opencode/command/compound.md +0 -240
- package/dist/template/.opencode/command/curate.md +0 -299
- package/dist/template/.opencode/command/handoff.md +0 -149
- package/dist/template/.opencode/command/health.md +0 -356
- package/dist/template/.opencode/command/init-context.md +0 -297
- package/dist/template/.opencode/command/init-user.md +0 -125
- package/dist/template/.opencode/command/iterate.md +0 -200
- package/dist/template/.opencode/command/lfg.md +0 -173
- package/dist/template/.opencode/command/resume.md +0 -78
- package/dist/template/.opencode/command/status.md +0 -126
- package/dist/template/.opencode/command/ui-slop-check.md +0 -169
- package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
- package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
- package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
- package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
- package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
- package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
- package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -253
- package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
- package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
- package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
- package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
- package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
- package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
- package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
- package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
- package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
- package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
- package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
- package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
- package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
- package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
- package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
- package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
- package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
- package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
- package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
- package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
- package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
- package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
- package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
- package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
- package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
- package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
- package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
- package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
- package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
- package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
- package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
- package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
- package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
- package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
- package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
- package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
- package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
- package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
- package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
- package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
- package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
- package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
- package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
- package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
- package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
- package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
- package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
- package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
- package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
- package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
- package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
- package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
- package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
- package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
- package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
- package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
- package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
- package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
- package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
- package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
- package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
- package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
- package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
- /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-code-quality-gate
|
|
3
|
+
description: Use before a coding agent claims implementation work is complete, especially after bugfixes, feature edits, refactors, or subagent changes - converts code quality into an operational gate for scope, duplication, behavior tests, verification evidence, and regressions.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Code Quality Gate
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Code quality for an agent is not "clean-looking code." It is a small, reviewable, verified change that improves or preserves system health while solving the requested problem.
|
|
12
|
+
|
|
13
|
+
Core rule: **do not claim completion until the diff is scoped, integrated, tested for behavior, and freshly verified.**
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
Use before saying work is complete, fixed, passing, ready, or high quality after:
|
|
18
|
+
|
|
19
|
+
- implementing a feature or bugfix;
|
|
20
|
+
- editing production code or tests;
|
|
21
|
+
- receiving subagent/worker changes;
|
|
22
|
+
- refactoring, optimizing, or migrating code;
|
|
23
|
+
- touching security, auth, data, concurrency, payments, accessibility, performance, or public APIs.
|
|
24
|
+
|
|
25
|
+
Do not use as a substitute for specialist review. For final merge/security/API review, also load the relevant review/security/API skill.
|
|
26
|
+
|
|
27
|
+
## Quality Gate
|
|
28
|
+
|
|
29
|
+
Answer every item. If any answer is "no" or "unknown," either fix it, verify it, or report the remaining risk explicitly.
|
|
30
|
+
|
|
31
|
+
| Gate | Pass condition | Reject if |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| Goal | The change satisfies the user's actual request and acceptance criteria. | It solves a nearby or imagined problem. |
|
|
34
|
+
| Scope | Every changed line traces to the current request. | Drive-by cleanup, broad formatting, or speculative refactor is mixed in. |
|
|
35
|
+
| Design fit | The change belongs in the touched layer and follows existing architecture. | It adds a parallel pattern, hidden business logic, or misplaced abstraction. |
|
|
36
|
+
| Simplicity | The solution is the smallest clear working change. | It adds flexibility for hypothetical future needs. |
|
|
37
|
+
| Duplication | Existing helpers/components/patterns were searched and reused. | A second home for the same concept was created. |
|
|
38
|
+
| Behavior | Relevant happy path, edge cases, and failure path were considered. | Only the obvious path works. |
|
|
39
|
+
| Tests | Tests are meaningful for behavior and would fail if the behavior broke. | Tests only assert mocks, snapshots, implementation details, or coverage numbers. |
|
|
40
|
+
| Verification | Fresh relevant lint/typecheck/test/build/manual check evidence exists. | Success is inferred from code appearance or a subagent report. |
|
|
41
|
+
| Regressions | Security, reliability, performance, accessibility, compatibility, and developer workflow are not worsened. | Any regression is unexamined or hand-waved. |
|
|
42
|
+
| Reviewability | Diff is coherent and easy to review. | Reviewer must reverse-engineer why unrelated changes exist. |
|
|
43
|
+
|
|
44
|
+
## Agent-Specific Failure Modes
|
|
45
|
+
|
|
46
|
+
Brutally check for these before completion:
|
|
47
|
+
|
|
48
|
+
- **Hallucinated API:** Did you verify signatures/options against local types, source, or official docs?
|
|
49
|
+
- **Fake confidence:** Are you saying "should work" instead of citing command output or runtime evidence?
|
|
50
|
+
- **Subagent trust:** Did you read changed files and verify independently instead of trusting a summary?
|
|
51
|
+
- **Mock theater:** Do tests prove production behavior, or just that mocks were called?
|
|
52
|
+
- **Coverage worship:** Coverage can reveal untested code; it does not prove test quality.
|
|
53
|
+
- **Speculative abstraction:** Did you add generic hooks/options/classes before the actual need exists?
|
|
54
|
+
- **Duplicate utility:** Did you search before creating a helper/component/schema wrapper?
|
|
55
|
+
- **Generated-file edit:** Did you modify generated output instead of the canonical schema/generator/input?
|
|
56
|
+
- **Silent behavior change:** Did any external behavior, API shape, data format, or command contract change without explicit approval?
|
|
57
|
+
- **Unreviewable diff:** Did formatting churn or cleanup obscure the real behavior change?
|
|
58
|
+
|
|
59
|
+
## Minimal Completion Procedure
|
|
60
|
+
|
|
61
|
+
1. Re-read the user request and acceptance criteria.
|
|
62
|
+
2. Inspect the diff, not just the files.
|
|
63
|
+
3. Remove unrelated or speculative changes.
|
|
64
|
+
4. Search for existing concepts before keeping new helpers/components.
|
|
65
|
+
5. Check behavioral edges: invalid input, empty state, permission failure, error path, concurrency/race risk where relevant.
|
|
66
|
+
6. Run the smallest relevant verification first; expand only if risk requires it.
|
|
67
|
+
7. If tests were added or changed, run those tests directly and confirm they fail for the right reason when practical.
|
|
68
|
+
8. Record exact evidence in the final response: command/check + result + remaining risk.
|
|
69
|
+
|
|
70
|
+
## Source-Backed Principles
|
|
71
|
+
|
|
72
|
+
- Google Engineering Practices: approve changes that improve overall code health; reject changes that worsen it even if they appear functional. Review design, functionality, complexity, tests, names, comments, style, consistency, docs, and every relevant line.
|
|
73
|
+
- Martin Fowler on test coverage: coverage is useful for finding untested code, but high coverage is not proof of good tests.
|
|
74
|
+
- OWASP Secure Coding Practices: quality includes input validation, output encoding, auth/session/access control, cryptography, error handling/logging, data protection, database/file/memory safety, and general secure coding.
|
|
75
|
+
|
|
76
|
+
## Final Response Evidence Pattern
|
|
77
|
+
|
|
78
|
+
Use this shape when reporting completion:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Changed <what> in <file:line> to satisfy <requirement>.
|
|
82
|
+
Verification: <command/check> passed/failed with <specific result>.
|
|
83
|
+
Risk: <none known | untested area and why>.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Never say "done," "fixed," "passes," or "high quality" without fresh evidence.
|
|
87
|
+
|
|
88
|
+
## Skill Result Contract
|
|
89
|
+
|
|
90
|
+
```xml
|
|
91
|
+
<skill_result>
|
|
92
|
+
<skill>agent-code-quality-gate</skill>
|
|
93
|
+
<status>success|partial|blocked|failure</status>
|
|
94
|
+
<evidence>Diff reviewed, scope checked, tests/verification run, sources checked if APIs used</evidence>
|
|
95
|
+
<artifacts>Files reviewed or commands run</artifacts>
|
|
96
|
+
<risks>Remaining unverified paths or none</risks>
|
|
97
|
+
</skill_result>
|
|
98
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: behavioral-kernel
|
|
3
|
+
description: Use when work starts drifting into silent assumptions, overengineering, drive-by refactors, or vague completion claims. Re-centers the agent on a compact Pi-native execution kernel with concrete anti-pattern examples.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [workflow, behavior, anti-slop]
|
|
6
|
+
dependencies: []
|
|
7
|
+
agent_types: [planner, worker, reviewer]
|
|
8
|
+
tools: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Behavioral Kernel
|
|
12
|
+
|
|
13
|
+
A short reset skill for non-trivial work when the larger prompt is getting noisy.
|
|
14
|
+
|
|
15
|
+
## Kernel
|
|
16
|
+
|
|
17
|
+
1. **Clarify before committing** — surface assumptions or ask instead of silently choosing.
|
|
18
|
+
2. **Choose the smallest working change** — solve today's problem directly before inventing flexibility.
|
|
19
|
+
3. **Keep diffs surgical** — change only what the request requires; log unrelated issues and keep moving.
|
|
20
|
+
4. **Define proof before acting** — say how success will be verified before implementation, then run that proof after.
|
|
21
|
+
|
|
22
|
+
## Apply the Kernel
|
|
23
|
+
|
|
24
|
+
Before coding, write down:
|
|
25
|
+
|
|
26
|
+
- the ambiguity or assumptions in 1-3 bullets
|
|
27
|
+
- the smallest acceptable diff
|
|
28
|
+
- what you are explicitly not touching
|
|
29
|
+
- the verification command, test path, or evidence you will use
|
|
30
|
+
|
|
31
|
+
## Drift Signals
|
|
32
|
+
|
|
33
|
+
Stop and reload this kernel if you catch yourself:
|
|
34
|
+
|
|
35
|
+
- adding abstraction for a single use case
|
|
36
|
+
- changing adjacent code "while you're here"
|
|
37
|
+
- postponing verification until the end
|
|
38
|
+
- claiming completion without a named proof path
|
|
39
|
+
- silently picking one interpretation from multiple valid readings
|
|
40
|
+
|
|
41
|
+
## Recovery Move
|
|
42
|
+
|
|
43
|
+
When drift is detected:
|
|
44
|
+
|
|
45
|
+
1. Re-state the request in one sentence.
|
|
46
|
+
2. Re-state the smallest working change.
|
|
47
|
+
3. Re-state the proof path.
|
|
48
|
+
4. Delete or avoid anything outside that boundary.
|
|
49
|
+
|
|
50
|
+
## References
|
|
51
|
+
|
|
52
|
+
- See [references/examples.md](references/examples.md) for Pi-native bad-vs-good examples.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: browser-testing-with-devtools
|
|
3
|
+
description: "Use when verifying or debugging browser behavior with live runtime evidence: DOM state, console errors, network requests, screenshots, performance traces, or end-to-end user flows. Routes between Chrome DevTools and Playwright."
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [browser, testing, debugging, verification]
|
|
6
|
+
dependencies: [chrome-devtools, playwright]
|
|
7
|
+
agent_types: [planner, worker, reviewer]
|
|
8
|
+
tools: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Browser Testing with DevTools
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Browser testing proves what users actually experience. Use runtime evidence instead of assuming UI code works from static inspection.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Building, debugging, or reviewing anything that runs in a browser.
|
|
20
|
+
- Validating forms, navigation, responsive layout, accessibility-visible state, or screenshots.
|
|
21
|
+
- Investigating console errors, network failures, hydration issues, or performance regressions.
|
|
22
|
+
- Reproducing bugs that only appear in a real browser runtime.
|
|
23
|
+
|
|
24
|
+
## When NOT to Use
|
|
25
|
+
|
|
26
|
+
- Pure backend or CLI-only changes.
|
|
27
|
+
- Unit-level logic that is faster and clearer to test without a browser.
|
|
28
|
+
|
|
29
|
+
## Tool Routing
|
|
30
|
+
|
|
31
|
+
| Need | Use |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| Cross-browser automation, screenshots, repeatable flows | `playwright` |
|
|
34
|
+
| Live Chrome inspection, console/network/runtime state | `chrome-devtools` |
|
|
35
|
+
| Bot-protected docs or static page extraction | `webclaw` |
|
|
36
|
+
| UI implementation guidance | `frontend-design` |
|
|
37
|
+
|
|
38
|
+
## Process
|
|
39
|
+
|
|
40
|
+
1. Define the user-visible behavior to prove.
|
|
41
|
+
2. Start the app or identify the target URL.
|
|
42
|
+
3. Choose the lightest browser tool that can produce evidence.
|
|
43
|
+
4. Capture initial state: page URL, screenshot or DOM snapshot, console/network baseline if relevant.
|
|
44
|
+
5. Exercise the user flow with stable selectors or accessible labels.
|
|
45
|
+
6. Capture final evidence: screenshot, DOM state, response status, console output, or trace.
|
|
46
|
+
7. If a bug appears, hand off to `debugging-and-error-recovery` with reproduction steps.
|
|
47
|
+
8. Record exact commands/tool actions and observed result.
|
|
48
|
+
|
|
49
|
+
## Common Rationalizations
|
|
50
|
+
|
|
51
|
+
| Rationalization | Rebuttal |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| "The component compiles, so the browser is fine." | Runtime integration, CSS, hydration, and network behavior fail outside compilation. |
|
|
54
|
+
| "A screenshot is enough." | Screenshots miss console errors, failed requests, and inaccessible states. |
|
|
55
|
+
| "Manual clicking is faster." | Repeatable scripted flows create evidence and prevent regression. |
|
|
56
|
+
| "The test is flaky, just wait longer." | Use condition-based waiting and prove the actual state changed. |
|
|
57
|
+
|
|
58
|
+
## Red Flags
|
|
59
|
+
|
|
60
|
+
- No browser evidence for UI behavior changes.
|
|
61
|
+
- Ignored console errors or failed network requests.
|
|
62
|
+
- Arbitrary sleeps instead of waiting for conditions.
|
|
63
|
+
- Screenshots captured before animations/data loading settle.
|
|
64
|
+
- Selectors coupled to fragile layout instead of accessible names or stable IDs.
|
|
65
|
+
|
|
66
|
+
## Verification
|
|
67
|
+
|
|
68
|
+
Before declaring browser work complete, provide:
|
|
69
|
+
|
|
70
|
+
- URL or local command used.
|
|
71
|
+
- Browser tool used and why.
|
|
72
|
+
- Screenshots, traces, console/network output, or test result.
|
|
73
|
+
- Any untested browsers/devices and residual risk.
|
|
74
|
+
|
|
75
|
+
## Skill Result Contract
|
|
76
|
+
|
|
77
|
+
```xml
|
|
78
|
+
<skill_result>
|
|
79
|
+
<skill>browser-testing-with-devtools</skill>
|
|
80
|
+
<status>completed|blocked|skipped</status>
|
|
81
|
+
<artifacts>Screenshot, trace, test file, console/network log, or none</artifacts>
|
|
82
|
+
<evidence>Commands/tool actions and observed browser result</evidence>
|
|
83
|
+
<risks>Untested browsers, flaky state, missing app server, or none</risks>
|
|
84
|
+
</skill_result>
|
|
85
|
+
```
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-cleanup
|
|
3
|
+
description: Use after behavior is working but the diff is noisy, repetitive, over-complicated, or obviously AI-shaped - lock behavior first, then simplify the changed code and re-verify without expanding scope
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [refactor, code-quality, workflow]
|
|
6
|
+
dependencies: [verification-before-completion]
|
|
7
|
+
agent_types: [planner, worker, reviewer]
|
|
8
|
+
tools: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Code Cleanup
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Tests/build/typecheck already pass, but the changed code is clumsy
|
|
16
|
+
- A feature works, but the diff contains duplication, over-nesting, dead code, or awkward naming
|
|
17
|
+
- You want a final simplification pass before review or merge
|
|
18
|
+
- You encountered a "broken window" (messy code, bad pattern, dead comment) that needs boarding up
|
|
19
|
+
|
|
20
|
+
## When NOT to Use
|
|
21
|
+
|
|
22
|
+
- Behavior is still broken or unverified
|
|
23
|
+
- You are tempted to redesign architecture under the cover of "cleanup"
|
|
24
|
+
- The cleanup would spread into unrelated files
|
|
25
|
+
- You have not yet established how to prove nothing broke
|
|
26
|
+
|
|
27
|
+
## Core Principle
|
|
28
|
+
|
|
29
|
+
**Lock behavior first. Then simplify. Then re-verify.**
|
|
30
|
+
|
|
31
|
+
No cleanup claim counts unless the same verification still passes after the cleanup edits.
|
|
32
|
+
|
|
33
|
+
## Why Cleanup Matters: Software Entropy
|
|
34
|
+
|
|
35
|
+
Left unrepaired, every messy piece of code gives permission for the next one. This is the "broken windows" theory from *The Pragmatic Programmer*: a bad design, wrong decision, or poor code left in place signals that quality doesn't matter — and more broken windows follow.
|
|
36
|
+
|
|
37
|
+
AI agents accelerate this. A messy module invites the next AI to add more mess. A clean module with clear patterns invites the next AI to follow those patterns. Cleanup is not cosmetic — it's **entropy containment**. It's the difference between a codebase that decays with each AI pass and one that stabilizes.
|
|
38
|
+
|
|
39
|
+
**When full cleanup is impossible, board it up.** Add a comment marking the issue, stub out the dead path, isolate the bad code behind a clear boundary. The goal is to contain the damage so it doesn't spread, even if you can't fix it right now.
|
|
40
|
+
|
|
41
|
+
## Cleanup Targets
|
|
42
|
+
|
|
43
|
+
Prefer cleanup that removes friction without changing behavior:
|
|
44
|
+
|
|
45
|
+
- delete dead branches, unused variables, stale comments
|
|
46
|
+
- collapse repeated logic when the abstraction is already obvious
|
|
47
|
+
- simplify conditionals and nesting
|
|
48
|
+
- improve names where the blast radius is small and verified
|
|
49
|
+
- remove AI-ish filler comments, duplicated guards, or ceremony
|
|
50
|
+
- **fix broken windows**: inconsistent patterns, dead TODOs, misnamed functions, formatting rot
|
|
51
|
+
|
|
52
|
+
Avoid:
|
|
53
|
+
|
|
54
|
+
- cross-system rewrites
|
|
55
|
+
- new abstractions with speculative value
|
|
56
|
+
- changing public APIs unless explicitly requested
|
|
57
|
+
- moving many files just because structure feels imperfect
|
|
58
|
+
|
|
59
|
+
## Process
|
|
60
|
+
|
|
61
|
+
### Phase 1: Lock Behavior
|
|
62
|
+
|
|
63
|
+
1. Identify the verification commands that prove the current behavior
|
|
64
|
+
2. Run them and save the baseline result
|
|
65
|
+
3. List the exact files that are eligible for cleanup
|
|
66
|
+
|
|
67
|
+
### Phase 2: Create a Cleanup Plan
|
|
68
|
+
|
|
69
|
+
Use a small table before editing:
|
|
70
|
+
|
|
71
|
+
| File | Smell | Planned simplification | Risk |
|
|
72
|
+
| ---- | ----- | ---------------------- | ---- |
|
|
73
|
+
| ... | ... | ... | ... |
|
|
74
|
+
|
|
75
|
+
Rules:
|
|
76
|
+
- Prefer deletion over abstraction
|
|
77
|
+
- Prefer local simplification over shared utilities
|
|
78
|
+
- If risk is medium or higher, make smaller passes
|
|
79
|
+
|
|
80
|
+
### Phase 3: Simplify
|
|
81
|
+
|
|
82
|
+
Apply cleanup in small, reviewable edits:
|
|
83
|
+
|
|
84
|
+
1. Make one simplification
|
|
85
|
+
2. Re-run the relevant verification
|
|
86
|
+
3. Continue only if behavior remains locked
|
|
87
|
+
|
|
88
|
+
### Phase 4: Re-verify
|
|
89
|
+
|
|
90
|
+
Re-run the same commands used to lock behavior.
|
|
91
|
+
|
|
92
|
+
Minimum acceptable output:
|
|
93
|
+
- what was simplified
|
|
94
|
+
- what was deleted
|
|
95
|
+
- what verification was rerun
|
|
96
|
+
- any remaining ugly areas intentionally left alone
|
|
97
|
+
|
|
98
|
+
## Output Checklist
|
|
99
|
+
|
|
100
|
+
- [ ] Baseline verification captured before cleanup
|
|
101
|
+
- [ ] Only changed files or directly adjacent support files touched
|
|
102
|
+
- [ ] Same verification rerun after cleanup
|
|
103
|
+
- [ ] Simplifications reported concretely
|
|
104
|
+
- [ ] No hidden architecture drift
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Consolidated Simplification Workflow
|
|
108
|
+
|
|
109
|
+
This is the canonical active simplification skill. It absorbs code-simplification. Only simplify after behavior is protected by tests or explicit verification. Avoid broad refactors bundled with feature work.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## Agent-Skills Compatibility
|
|
113
|
+
|
|
114
|
+
This skill is Pi's canonical equivalent of `code-simplification`: simplify working code while preserving exact behavior, respecting Chesterton's Fence, and re-verifying after cleanup.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-navigation
|
|
3
|
+
description: Use when navigating unfamiliar code, tracing cross-file dependencies, or before editing — efficient code reading patterns that minimize tool calls and token waste
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [workflow, code-quality, context]
|
|
6
|
+
dependencies: []
|
|
7
|
+
agent_types: [planner, worker, reviewer]
|
|
8
|
+
tools: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Code Navigation Skill
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Exploring an unfamiliar codebase or module
|
|
16
|
+
- Tracing a function call across multiple files
|
|
17
|
+
- Understanding blast radius before a breaking change
|
|
18
|
+
- Planning edits that touch multiple files
|
|
19
|
+
|
|
20
|
+
## When NOT to Use
|
|
21
|
+
|
|
22
|
+
- Simple single-file edits where you already know the location
|
|
23
|
+
- Reading config or documentation files
|
|
24
|
+
|
|
25
|
+
## Core Principle
|
|
26
|
+
|
|
27
|
+
> Collapse multiple tool calls into fewer, smarter ones. Every unnecessary read or search wastes tokens and turns.
|
|
28
|
+
|
|
29
|
+
## Choose The Right Navigation Tool
|
|
30
|
+
|
|
31
|
+
- Use `srcwalk_search`, `srcwalk_read`, `srcwalk_files`, `srcwalk_deps` for symbol search, file reading, glob finds, and blast-radius checks
|
|
32
|
+
- Use `srcwalk_callers`, `srcwalk_callees`, `srcwalk_flow`, `srcwalk_impact`, `srcwalk_map` for call graphs, orientation slices, impact triage, and repo maps — these are first-class Pi tools, no separate skill load needed
|
|
33
|
+
- All tools are backed by the installed `srcwalk` binary via the `srcwalk.ts` extension
|
|
34
|
+
|
|
35
|
+
## Navigation Patterns
|
|
36
|
+
|
|
37
|
+
### Pattern 1: Search First, Read Second
|
|
38
|
+
|
|
39
|
+
**Wrong** (3-6 tool calls):
|
|
40
|
+
```
|
|
41
|
+
glob("*.ts") → read(file1) → "too big" → grep("functionName") → read(file2) → read(file3, section)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Right** (1-2 tool calls):
|
|
45
|
+
```
|
|
46
|
+
grep("functionName", path: "src/") → read(exact_file, offset: line-10, limit: 30)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Start with search (`srcwalk_search` or grep fallback) to locate, then read only what you need.
|
|
50
|
+
|
|
51
|
+
### Pattern 2: Multi-Symbol Search
|
|
52
|
+
|
|
53
|
+
When tracing a call chain (A calls B calls C), search for all symbols together:
|
|
54
|
+
```
|
|
55
|
+
grep({ pattern: "functionA|functionB|functionC", path: "src/" })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or use `srcwalk_callers` for structural caller detection, or `srcwalk_flow` for a combined callers+callees+resolves slice.
|
|
59
|
+
|
|
60
|
+
### Pattern 3: Don't Re-Read What You've Already Seen
|
|
61
|
+
|
|
62
|
+
**Anti-pattern**: Search returns full function body, then agent reads the same file again.
|
|
63
|
+
|
|
64
|
+
If search results already show the code you need, work from that output. Only re-read when:
|
|
65
|
+
- You need surrounding context (lines above/below the match)
|
|
66
|
+
- You need the exact content for editing (verify before edit)
|
|
67
|
+
- The search result was truncated
|
|
68
|
+
|
|
69
|
+
### Pattern 4: Blast Radius Check (Before Breaking Changes)
|
|
70
|
+
|
|
71
|
+
**WHEN**: Before renaming, removing, or changing the signature of an export.
|
|
72
|
+
**SKIP**: When adding new code, fixing internal bugs, or reading.
|
|
73
|
+
|
|
74
|
+
Steps:
|
|
75
|
+
1. `srcwalk_deps(path: "src/file.ts")` — find importers and downstream users
|
|
76
|
+
2. `srcwalk_callers({ symbol: "symbolName", scope: "src" })` — find call sites with optional depth/filter
|
|
77
|
+
3. Review each caller to assess impact
|
|
78
|
+
4. Plan edits from leaf callers inward (furthest dependencies first)
|
|
79
|
+
|
|
80
|
+
### Pattern 5: Context Locality
|
|
81
|
+
|
|
82
|
+
When editing a file, search results from the same directory/package are more likely relevant. Pass context when available:
|
|
83
|
+
- In grep: use `path: "src/same-module/"` to scope
|
|
84
|
+
- In srcwalk_search: pass `context` param to boost nearby results
|
|
85
|
+
|
|
86
|
+
### Pattern 6: Outline Before Deep Read
|
|
87
|
+
|
|
88
|
+
For large files (>200 lines), get the structure first:
|
|
89
|
+
```
|
|
90
|
+
srcwalk_read(path: "src/large-file.ts")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This gives you structure and line ranges. Then read only the section you need.
|
|
94
|
+
|
|
95
|
+
### Pattern 7: Follow the Call Chain (Not the File Tree)
|
|
96
|
+
|
|
97
|
+
**Wrong**: Read files top-to-bottom hoping to understand the flow.
|
|
98
|
+
**Right**: Start from the entry point, follow function calls:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
1. `srcwalk_search(query: "entryPoint")` → find where it is defined
|
|
102
|
+
2. `srcwalk_callees({ symbol: "entryPoint", scope: "src" })` or `srcwalk_flow` for call graph orientation
|
|
103
|
+
3. `srcwalk_read(section: "line-range")` → drill into the interesting callee
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## With Srcwalk Backend
|
|
107
|
+
|
|
108
|
+
All navigation tools are native srcwalk_* tools. Available tools:
|
|
109
|
+
|
|
110
|
+
| Task | Tool | Notes |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| `grep` + `read` | `srcwalk_search(expand: 2)` | Returns definitions with inline source — no second read needed |
|
|
113
|
+
| `glob` | `srcwalk_files` | Adds token estimates per file |
|
|
114
|
+
| Large file read | `srcwalk_read` | Auto-outlines, shows structure |
|
|
115
|
+
| Direct callers | `srcwalk_callers` | Structural call-site evidence |
|
|
116
|
+
| Transitive callers | `srcwalk_callers(depth: N)` | Multi-hop BFS up to 5 |
|
|
117
|
+
| Forward call graph | `srcwalk_callees(detailed: true)` | Ordered sites with arg slots |
|
|
118
|
+
| Function orientation | `srcwalk_flow` | Callers + callees + resolves |
|
|
119
|
+
| Import + dependents | `srcwalk_deps` | File-scoped import evidence + heuristic |
|
|
120
|
+
| Heuristic triage | `srcwalk_impact` | Follow up with callers for proof |
|
|
121
|
+
| Repo shape | `srcwalk_map` | Token budgets + directory skeleton |
|
|
122
|
+
|
|
123
|
+
**IMPORTANT**: Prefer `srcwalk_*` tools over built-in grep/glob/read for code navigation. Their expanded search results often include full source — do NOT re-read files already shown in search output.
|
|
124
|
+
|
|
125
|
+
## Cost Awareness
|
|
126
|
+
|
|
127
|
+
Every tool call has a token cost. Efficient navigation means:
|
|
128
|
+
- Fewer tool calls per task
|
|
129
|
+
- Less context consumed by redundant reads
|
|
130
|
+
- More budget available for actual implementation
|
|
131
|
+
|
|
132
|
+
**Target**: Find and understand any symbol in ≤3 tool calls, not 6+.
|
|
133
|
+
|
|
134
|
+
## Common Mistakes
|
|
135
|
+
|
|
136
|
+
| Mistake | Fix |
|
|
137
|
+
|---|---|
|
|
138
|
+
| Read entire large file | Use outline first, then section read |
|
|
139
|
+
| Search → read same code again | Work from search results directly |
|
|
140
|
+
| Trace calls one-by-one | `srcwalk_callers` / `srcwalk_callees` or multi-symbol `srcwalk_search` |
|
|
141
|
+
| Explore randomly | Start from entry point, follow calls |
|
|
142
|
+
| Forget to check blast radius | Always check before signature changes |
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-and-quality
|
|
3
|
+
description: Reviews code for correctness, regressions, security, maintainability, and goal completion. Use before merge, after subagent work, or when asked for a review.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: [review, code-quality, verification]
|
|
6
|
+
dependencies: [verification-before-completion]
|
|
7
|
+
agent_types: [reviewer]
|
|
8
|
+
tools: [srcwalk_search, srcwalk_deps, bash]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Code Review & Quality
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Review is a bug-finding activity, not a compliment sandwich. The reviewer verifies that the goal is actually achieved and that the change does not introduce unacceptable risk.
|
|
16
|
+
|
|
17
|
+
Core principle: findings first, with file:line evidence and impact.
|
|
18
|
+
|
|
19
|
+
**Complexity is a correctness issue.** A change that works but adds structural complexity introduces risk: it makes future changes harder, slower, and more error-prone. The reviewer must assess structural quality alongside behavioral correctness.
|
|
20
|
+
|
|
21
|
+
Use the **three complexity symptoms** as review lenses:
|
|
22
|
+
- **Change amplification**: does a small future change require touching many places?
|
|
23
|
+
- **Cognitive load**: does the reviewer (or AI agent) need to understand too much of the system to assess one change?
|
|
24
|
+
- **Unknown unknowns**: is it obvious what needs to change for a new requirement, or are there hidden dependencies?
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- User asks for review.
|
|
29
|
+
- Before merge/ship.
|
|
30
|
+
- After a worker or subagent reports completion.
|
|
31
|
+
- Refactors, security-sensitive changes, API changes, migrations, concurrency, or auth.
|
|
32
|
+
- Any change where complexity may have been introduced (always suspect).
|
|
33
|
+
|
|
34
|
+
## When NOT to Use
|
|
35
|
+
|
|
36
|
+
- Planning decisions before code exists; use `planning-and-task-breakdown`.
|
|
37
|
+
- Implementation; reviewer must stay read-only.
|
|
38
|
+
- Style-only commentary unless it hides a real bug.
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
1. Identify base and changed files.
|
|
43
|
+
2. Read the diff and nearby context.
|
|
44
|
+
3. Verify goal completion: exists, substantive, wired.
|
|
45
|
+
4. Check key links: UI -> API, API -> database, form -> handler, state -> render, command -> effect.
|
|
46
|
+
5. **Assess for complexity symptoms**:
|
|
47
|
+
- Is the interface of each new module as complex as its implementation? (shallow module — Ousterhout)
|
|
48
|
+
- Does a change leak information between unrelated modules?
|
|
49
|
+
- Would a future developer (or AI agent) know where to make the next change?
|
|
50
|
+
6. Look for correctness, security, performance, compatibility, and maintainability issues.
|
|
51
|
+
7. Run or inspect relevant verification when allowed.
|
|
52
|
+
8. **Scan for broken windows** — does the change introduce or fix code that normalizes decay? Messy imports, inconsistent patterns, TODO rot, dead code?
|
|
53
|
+
9. Report only actionable findings that the author should fix.
|
|
54
|
+
10. If no findings, say so and list residual testing gaps.
|
|
55
|
+
|
|
56
|
+
## Severity
|
|
57
|
+
|
|
58
|
+
| Priority | Meaning |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| P0 | Critical: data loss, security break, crash on common path, release blocker. |
|
|
61
|
+
| P1 | High: likely user-visible bug or serious regression. |
|
|
62
|
+
| P2 | Medium: edge-case bug, maintainability hazard with concrete impact. |
|
|
63
|
+
| P3 | Low: minor issue worth fixing but not blocking. |
|
|
64
|
+
|
|
65
|
+
## Finding Template
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
[P1] Title — path/to/file.ts:42
|
|
69
|
+
Impact: What breaks and when.
|
|
70
|
+
Evidence: Concrete code behavior.
|
|
71
|
+
Confidence: 0.0-1.0
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Common Rationalizations
|
|
75
|
+
|
|
76
|
+
| Rationalization | Rebuttal |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| "The implementation looks reasonable" | Review behavior and wiring, not aesthetics. |
|
|
79
|
+
| "The worker said tests pass" | Verify independently or mark as unverified. |
|
|
80
|
+
| "This is probably pre-existing" | Only skip if evidence shows it was not introduced or worsened. |
|
|
81
|
+
| "I should mention style too" | Style-only noise hides real findings. |
|
|
82
|
+
|
|
83
|
+
## Red Flags
|
|
84
|
+
|
|
85
|
+
- No file:line evidence for a finding.
|
|
86
|
+
- Findings describe preferences rather than bugs/risks.
|
|
87
|
+
- Review ignores acceptance criteria.
|
|
88
|
+
- Created files are not imported or invoked anywhere.
|
|
89
|
+
- Static placeholder responses or no-op handlers satisfy superficial tests.
|
|
90
|
+
- Reviewer modifies files.
|
|
91
|
+
|
|
92
|
+
## Complexity Red Flags
|
|
93
|
+
|
|
94
|
+
- **New module with shallow interface**: lots of public methods/props for small implementation — it's not hiding complexity, it's exposing it.
|
|
95
|
+
- **Information leakage**: one module exposes internal implementation details another module depends on.
|
|
96
|
+
- **Change amplification signal**: a simple conceptual change would touch many files — the structure is fighting the domain.
|
|
97
|
+
- **Cognitive load spike**: the diff requires understanding 5+ unrelated files to verify one change.
|
|
98
|
+
- **Pass-through methods**: methods that do nothing but delegate with the same signature — a sign the abstraction boundary is wrong.
|
|
99
|
+
- **Broken windows introduced**: messy formatting, dead imports, TODOs without tickets, inconsistent conventions within the same file.
|
|
100
|
+
|
|
101
|
+
## Verification
|
|
102
|
+
|
|
103
|
+
- Changed artifacts exist.
|
|
104
|
+
- Implementations are substantive, not stubs/placeholders.
|
|
105
|
+
- Key links are wired and exercised.
|
|
106
|
+
- Findings are ordered by severity.
|
|
107
|
+
- Verdict is explicit: correct or incorrect.
|
|
108
|
+
|
|
109
|
+
## Skill Result Contract
|
|
110
|
+
|
|
111
|
+
```xml
|
|
112
|
+
<skill_result>
|
|
113
|
+
<skill>code-review-and-quality</skill>
|
|
114
|
+
<status>success|partial|blocked|failure</status>
|
|
115
|
+
<evidence>Files reviewed, commands/checks run, findings with file:line evidence</evidence>
|
|
116
|
+
<artifacts>Reviewed files or diff range</artifacts>
|
|
117
|
+
<risks>Untested areas, unavailable base, or none</risks>
|
|
118
|
+
</skill_result>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## Consolidated Review Workflow
|
|
123
|
+
|
|
124
|
+
This is the canonical active review skill. It absorbs requesting-code-review, receiving-code-review, sprint-review, and reconcile responsibilities.
|
|
125
|
+
|
|
126
|
+
Use it for:
|
|
127
|
+
- self-review before claiming completion;
|
|
128
|
+
- subagent or peer review routing;
|
|
129
|
+
- skeptical treatment of received review comments;
|
|
130
|
+
- severity-ranked findings with file/line evidence;
|
|
131
|
+
- reconciliation between user intent, implementation, tests, and remaining risk.
|