dsh-compound-engineering 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +160 -2
- package/README.zh.md +161 -0
- package/cordis.patch.yml +6 -0
- package/lib/frontmatter.js +167 -0
- package/lib/index.js +46 -0
- package/lib/provider.js +201 -0
- package/package.json +62 -4
- package/skills/CODING_STANDARDS.md +68 -0
- package/skills/ce-babysit-pr/SKILL.md +59 -0
- package/skills/ce-babysit-pr/references/branch-currency.md +22 -0
- package/skills/ce-babysit-pr/references/envelope.md +44 -0
- package/skills/ce-babysit-pr/references/pipeline.md +15 -0
- package/skills/ce-babysit-pr/references/report.md +20 -0
- package/skills/ce-babysit-pr/references/settle.md +37 -0
- package/skills/ce-babysit-pr/references/setup.md +33 -0
- package/skills/ce-babysit-pr/references/stack-commands.md +39 -0
- package/skills/ce-babysit-pr/references/stack.md +43 -0
- package/skills/ce-babysit-pr/references/tick.md +102 -0
- package/skills/ce-babysit-pr/references/watch-loop.md +222 -0
- package/skills/ce-babysit-pr/scripts/pr-snapshot +3656 -0
- package/skills/ce-bakeoff/SKILL.md +48 -0
- package/skills/ce-bakeoff/references/candidates.md +37 -0
- package/skills/ce-bakeoff/references/judging.md +19 -0
- package/skills/ce-bakeoff/references/output.md +11 -0
- package/skills/ce-bakeoff/references/verification.md +15 -0
- package/skills/ce-brainstorm/SKILL.md +69 -0
- package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/skills/ce-brainstorm/references/approaches.md +57 -0
- package/skills/ce-brainstorm/references/bakeoff.md +9 -0
- package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
- package/skills/ce-brainstorm/references/brainstorm-sections.md +458 -0
- package/skills/ce-brainstorm/references/dialogue.md +89 -0
- package/skills/ce-brainstorm/references/handoff.md +187 -0
- package/skills/ce-brainstorm/references/html-rendering.md +638 -0
- package/skills/ce-brainstorm/references/interaction-rules.md +33 -0
- package/skills/ce-brainstorm/references/markdown-rendering.md +242 -0
- package/skills/ce-brainstorm/references/model-tiers.md +13 -0
- package/skills/ce-brainstorm/references/output-mode.md +26 -0
- package/skills/ce-brainstorm/references/phase-0.md +104 -0
- package/skills/ce-brainstorm/references/plan-write.md +32 -0
- package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
- package/skills/ce-brainstorm/references/reasoning-elevation.md +124 -0
- package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
- package/skills/ce-brainstorm/references/synthesis-summary.md +149 -0
- package/skills/ce-brainstorm/references/universal-brainstorming.md +72 -0
- package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
- package/skills/ce-brainstorm/references/visual-probes.md +164 -0
- package/skills/ce-brainstorm/scripts/elevation-dispatch.sh +288 -0
- package/skills/ce-brainstorm/scripts/light-webserver.js +1275 -0
- package/skills/ce-brainstorm/scripts/packs-resolve.py +737 -0
- package/skills/ce-brainstorm/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-code-review/SKILL.md +40 -0
- package/skills/ce-code-review/references/action-class-rubric.md +67 -0
- package/skills/ce-code-review/references/cross-model-recovery.md +38 -0
- package/skills/ce-code-review/references/cross-model-review.md +191 -0
- package/skills/ce-code-review/references/depth-paths.md +32 -0
- package/skills/ce-code-review/references/diff-scope.md +59 -0
- package/skills/ce-code-review/references/dispatch-reviewers.md +135 -0
- package/skills/ce-code-review/references/findings-schema.json +125 -0
- package/skills/ce-code-review/references/finish-input.md +118 -0
- package/skills/ce-code-review/references/finish-review.md +202 -0
- package/skills/ce-code-review/references/intent-and-plan.md +73 -0
- package/skills/ce-code-review/references/modes-and-output.md +156 -0
- package/skills/ce-code-review/references/persona-catalog.md +66 -0
- package/skills/ce-code-review/references/personas/adversarial-reviewer.md +111 -0
- package/skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
- package/skills/ce-code-review/references/personas/api-contract-reviewer.md +44 -0
- package/skills/ce-code-review/references/personas/correctness-reviewer.md +48 -0
- package/skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
- package/skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
- package/skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +45 -0
- package/skills/ce-code-review/references/personas/learnings-researcher.md +260 -0
- package/skills/ce-code-review/references/personas/maintainability-reviewer.md +85 -0
- package/skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
- package/skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
- package/skills/ce-code-review/references/personas/project-standards-reviewer.md +77 -0
- package/skills/ce-code-review/references/personas/reliability-reviewer.md +49 -0
- package/skills/ce-code-review/references/personas/security-reviewer.md +50 -0
- package/skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
- package/skills/ce-code-review/references/personas/testing-reviewer.md +51 -0
- package/skills/ce-code-review/references/review-output-template.md +172 -0
- package/skills/ce-code-review/references/scope.md +176 -0
- package/skills/ce-code-review/references/select-and-route.md +93 -0
- package/skills/ce-code-review/references/subagent-template.md +206 -0
- package/skills/ce-code-review/references/validator-batch-template.md +67 -0
- package/skills/ce-code-review/scripts/cross-model-adversarial-review.sh +1275 -0
- package/skills/ce-code-review/scripts/findings-mechanics.py +274 -0
- package/skills/ce-code-review/scripts/packs-resolve.py +737 -0
- package/skills/ce-code-review/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-code-review/scripts/review-scope.py +419 -0
- package/skills/ce-code-review/scripts/run-log.py +280 -0
- package/skills/ce-commit/SKILL.md +60 -0
- package/skills/ce-commit-push-pr/SKILL.md +69 -0
- package/skills/ce-commit-push-pr/references/apply-and-handoff.md +79 -0
- package/skills/ce-commit-push-pr/references/branch-creation.md +47 -0
- package/skills/ce-commit-push-pr/references/commit-and-push.md +26 -0
- package/skills/ce-commit-push-pr/references/compose.md +29 -0
- package/skills/ce-commit-push-pr/references/context.md +42 -0
- package/skills/ce-commit-push-pr/references/gh-stack-cli.md +83 -0
- package/skills/ce-commit-push-pr/references/pr-description-writing.md +208 -0
- package/skills/ce-commit-push-pr/references/stack-submit.md +81 -0
- package/skills/ce-compound/SKILL.md +79 -0
- package/skills/ce-compound/assets/resolution-template.md +96 -0
- package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/skills/ce-compound/references/agents/session-historian.md +82 -0
- package/skills/ce-compound/references/assembly.md +127 -0
- package/skills/ce-compound/references/concepts-vocabulary.md +98 -0
- package/skills/ce-compound/references/enhancement.md +42 -0
- package/skills/ce-compound/references/grounding-validation.md +89 -0
- package/skills/ce-compound/references/lightweight.md +56 -0
- package/skills/ce-compound/references/modes.md +13 -0
- package/skills/ce-compound/references/refresh-and-discoverability.md +96 -0
- package/skills/ce-compound/references/report.md +115 -0
- package/skills/ce-compound/references/research.md +144 -0
- package/skills/ce-compound/references/schema.yaml +236 -0
- package/skills/ce-compound/references/session-history.md +73 -0
- package/skills/ce-compound/references/yaml-schema.md +130 -0
- package/skills/ce-compound/scripts/packs-resolve.py +737 -0
- package/skills/ce-compound/scripts/session-history/__pycache__/dsh_session.cpython-314.pyc +0 -0
- package/skills/ce-compound/scripts/session-history/discover-sessions.sh +290 -0
- package/skills/ce-compound/scripts/session-history/discover_dsh.py +123 -0
- package/skills/ce-compound/scripts/session-history/dsh_session.py +225 -0
- package/skills/ce-compound/scripts/session-history/extract-errors.py +178 -0
- package/skills/ce-compound/scripts/session-history/extract-metadata.py +301 -0
- package/skills/ce-compound/scripts/session-history/extract-skeleton.py +346 -0
- package/skills/ce-compound/scripts/validate-doc-claims.py +497 -0
- package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-compound-refresh/SKILL.md +88 -0
- package/skills/ce-compound-refresh/assets/resolution-template.md +96 -0
- package/skills/ce-compound-refresh/references/classify.md +42 -0
- package/skills/ce-compound-refresh/references/commit.md +7 -0
- package/skills/ce-compound-refresh/references/concepts-vocabulary.md +116 -0
- package/skills/ce-compound-refresh/references/discoverability.md +15 -0
- package/skills/ce-compound-refresh/references/investigate.md +23 -0
- package/skills/ce-compound-refresh/references/modes.md +27 -0
- package/skills/ce-compound-refresh/references/per-action-flows.md +142 -0
- package/skills/ce-compound-refresh/references/report.md +23 -0
- package/skills/ce-compound-refresh/references/schema.yaml +236 -0
- package/skills/ce-compound-refresh/references/scope.md +18 -0
- package/skills/ce-compound-refresh/references/worth-audit.md +35 -0
- package/skills/ce-compound-refresh/references/yaml-schema.md +130 -0
- package/skills/ce-compound-refresh/scripts/validate-doc-claims.py +497 -0
- package/skills/ce-compound-refresh/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-debug/SKILL.md +122 -0
- package/skills/ce-debug/references/anti-patterns.md +91 -0
- package/skills/ce-debug/references/defense-in-depth.md +39 -0
- package/skills/ce-debug/references/fix.md +21 -0
- package/skills/ce-debug/references/investigate.md +114 -0
- package/skills/ce-debug/references/investigation-techniques.md +384 -0
- package/skills/ce-debug/references/pipeline-mode.md +78 -0
- package/skills/ce-debug/references/post-fix-handoff.md +60 -0
- package/skills/ce-debug/references/return-to-caller.md +57 -0
- package/skills/ce-doc-review/SKILL.md +75 -0
- package/skills/ce-doc-review/references/bulk-preview.md +146 -0
- package/skills/ce-doc-review/references/cross-model-review.md +207 -0
- package/skills/ce-doc-review/references/decision-primer.md +47 -0
- package/skills/ce-doc-review/references/dispatch.md +56 -0
- package/skills/ce-doc-review/references/document-intake.md +44 -0
- package/skills/ce-doc-review/references/findings-schema.json +85 -0
- package/skills/ce-doc-review/references/modes.md +20 -0
- package/skills/ce-doc-review/references/open-questions-defer.md +158 -0
- package/skills/ce-doc-review/references/persona-selection.md +41 -0
- package/skills/ce-doc-review/references/personas/adversarial-document-reviewer.md +109 -0
- package/skills/ce-doc-review/references/personas/coherence-reviewer.md +69 -0
- package/skills/ce-doc-review/references/personas/design-lens-reviewer.md +48 -0
- package/skills/ce-doc-review/references/personas/feasibility-reviewer.md +50 -0
- package/skills/ce-doc-review/references/personas/product-lens-reviewer.md +85 -0
- package/skills/ce-doc-review/references/personas/scope-guardian-reviewer.md +83 -0
- package/skills/ce-doc-review/references/personas/security-lens-reviewer.md +41 -0
- package/skills/ce-doc-review/references/personas/whole-doc-reviewer.md +25 -0
- package/skills/ce-doc-review/references/rendering-floor.md +175 -0
- package/skills/ce-doc-review/references/review-output-template.md +123 -0
- package/skills/ce-doc-review/references/subagent-template.md +188 -0
- package/skills/ce-doc-review/references/synthesis-and-presentation.md +350 -0
- package/skills/ce-doc-review/references/walkthrough.md +347 -0
- package/skills/ce-doc-review/scripts/cross-model-doc-review.sh +1270 -0
- package/skills/ce-doc-review/scripts/packs-resolve.py +737 -0
- package/skills/ce-doc-review/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-dogfood/SKILL.md +66 -0
- package/skills/ce-dogfood/agents/openai.yaml +2 -0
- package/skills/ce-dogfood/references/dogfood-report-template.md +97 -0
- package/skills/ce-dogfood/references/phases.md +167 -0
- package/skills/ce-dogfood/references/test-matrix-taxonomy.md +62 -0
- package/skills/ce-dogfood/scripts/packs-resolve.py +737 -0
- package/skills/ce-explain/SKILL.md +81 -0
- package/skills/ce-explain/references/agents/behavior-trace-scout.md +19 -0
- package/skills/ce-explain/references/agents/work-recap-scout.md +23 -0
- package/skills/ce-explain/references/check-in.md +18 -0
- package/skills/ce-explain/references/destinations.md +35 -0
- package/skills/ce-explain/references/explainer-html.md +29 -0
- package/skills/ce-explain/references/explainer-markdown.md +24 -0
- package/skills/ce-explain/references/intake.md +50 -0
- package/skills/ce-explain/references/orchestration.md +46 -0
- package/skills/ce-handoff/SKILL.md +54 -0
- package/skills/ce-handoff/references/create.md +88 -0
- package/skills/ce-handoff/references/resume.md +46 -0
- package/skills/ce-ideate/SKILL.md +75 -0
- package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +166 -0
- package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/skills/ce-ideate/references/decomposition.md +39 -0
- package/skills/ce-ideate/references/divergent-ideation.md +112 -0
- package/skills/ce-ideate/references/grounding.md +138 -0
- package/skills/ce-ideate/references/html-rendering.md +638 -0
- package/skills/ce-ideate/references/ideation-sections.md +191 -0
- package/skills/ce-ideate/references/issue-intelligence.md +44 -0
- package/skills/ce-ideate/references/markdown-rendering.md +242 -0
- package/skills/ce-ideate/references/output-mode.md +34 -0
- package/skills/ce-ideate/references/post-ideation-workflow.md +169 -0
- package/skills/ce-ideate/references/scope-gates.md +148 -0
- package/skills/ce-ideate/references/universal-ideation.md +119 -0
- package/skills/ce-ideate/references/user-research-artifacts.md +28 -0
- package/skills/ce-ideate/references/web-research-cache.md +56 -0
- package/skills/ce-noslop/SKILL.md +45 -0
- package/skills/ce-noslop/references/patterns.md +61 -0
- package/skills/ce-noslop/references/terminology.md +3 -0
- package/skills/ce-optimize/SKILL.md +64 -0
- package/skills/ce-optimize/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-optimize/references/agents/repo-research-analyst.md +258 -0
- package/skills/ce-optimize/references/example-expensive-benchmark-spec.yaml +88 -0
- package/skills/ce-optimize/references/example-hard-spec.yaml +64 -0
- package/skills/ce-optimize/references/example-judge-spec.yaml +83 -0
- package/skills/ce-optimize/references/example-text-target-spec.yaml +80 -0
- package/skills/ce-optimize/references/experiment-log-schema.yaml +563 -0
- package/skills/ce-optimize/references/experiment-prompt-template.md +143 -0
- package/skills/ce-optimize/references/judge-prompt-template.md +117 -0
- package/skills/ce-optimize/references/loop.md +286 -0
- package/skills/ce-optimize/references/measurement.md +168 -0
- package/skills/ce-optimize/references/optimize-spec-schema.yaml +570 -0
- package/skills/ce-optimize/references/persistence.md +93 -0
- package/skills/ce-optimize/references/spec.md +107 -0
- package/skills/ce-optimize/references/text-targets.md +51 -0
- package/skills/ce-optimize/references/usage-guide.md +147 -0
- package/skills/ce-optimize/references/wrap-up.md +54 -0
- package/skills/ce-optimize/scripts/decide.mjs +676 -0
- package/skills/ce-optimize/scripts/experiment-worktree.sh +330 -0
- package/skills/ce-optimize/scripts/measure.sh +140 -0
- package/skills/ce-optimize/scripts/parallel-probe.sh +134 -0
- package/skills/ce-plan/SKILL.md +60 -0
- package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +66 -0
- package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/skills/ce-plan/references/agents/best-practices-researcher.md +118 -0
- package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-plan/references/agents/framework-docs-researcher.md +97 -0
- package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/skills/ce-plan/references/agents/learnings-researcher.md +268 -0
- package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/skills/ce-plan/references/agents/repo-research-analyst.md +262 -0
- package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/skills/ce-plan/references/agents/slack-researcher.md +131 -0
- package/skills/ce-plan/references/agents/spec-flow-analyzer.md +84 -0
- package/skills/ce-plan/references/agents/web-researcher.md +125 -0
- package/skills/ce-plan/references/approach-altitude.md +55 -0
- package/skills/ce-plan/references/bakeoff.md +9 -0
- package/skills/ce-plan/references/deepening-workflow.md +263 -0
- package/skills/ce-plan/references/final-review.md +134 -0
- package/skills/ce-plan/references/html-rendering.md +638 -0
- package/skills/ce-plan/references/intake.md +158 -0
- package/skills/ce-plan/references/markdown-rendering.md +242 -0
- package/skills/ce-plan/references/output-contracts.md +29 -0
- package/skills/ce-plan/references/output-mode.md +45 -0
- package/skills/ce-plan/references/plan-handoff.md +116 -0
- package/skills/ce-plan/references/plan-sections.md +489 -0
- package/skills/ce-plan/references/reasoning-elevation.md +124 -0
- package/skills/ce-plan/references/research.md +211 -0
- package/skills/ce-plan/references/resume.md +61 -0
- package/skills/ce-plan/references/settled-decisions.md +45 -0
- package/skills/ce-plan/references/structure.md +207 -0
- package/skills/ce-plan/references/synthesis-summary.md +260 -0
- package/skills/ce-plan/references/universal-planning.md +170 -0
- package/skills/ce-plan/scripts/elevation-dispatch.sh +288 -0
- package/skills/ce-plan/scripts/packs-resolve.py +737 -0
- package/skills/ce-plan/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-polish/SKILL.md +22 -0
- package/skills/ce-polish/agents/openai.yaml +2 -0
- package/skills/ce-polish/references/dev-server-astro.md +58 -0
- package/skills/ce-polish/references/dev-server-detection.md +40 -0
- package/skills/ce-polish/references/dev-server-next.md +61 -0
- package/skills/ce-polish/references/dev-server-nuxt.md +58 -0
- package/skills/ce-polish/references/dev-server-procfile.md +59 -0
- package/skills/ce-polish/references/dev-server-rails.md +50 -0
- package/skills/ce-polish/references/dev-server-remix.md +58 -0
- package/skills/ce-polish/references/dev-server-sveltekit.md +58 -0
- package/skills/ce-polish/references/dev-server-vite.md +48 -0
- package/skills/ce-polish/references/install-riffrec.md +35 -0
- package/skills/ce-polish/references/launch-json-schema.md +177 -0
- package/skills/ce-polish/references/live-loop.md +98 -0
- package/skills/ce-polish/references/live-remote.md +35 -0
- package/skills/ce-polish/references/live-start.md +93 -0
- package/skills/ce-polish/references/live-stream-contract.md +253 -0
- package/skills/ce-polish/references/run.md +67 -0
- package/skills/ce-polish/scripts/detect-project-type.sh +277 -0
- package/skills/ce-polish/scripts/detect-riffrec.sh +225 -0
- package/skills/ce-polish/scripts/live-endpoint.js +2841 -0
- package/skills/ce-polish/scripts/read-launch-json.sh +117 -0
- package/skills/ce-polish/scripts/resolve-package-manager.sh +95 -0
- package/skills/ce-polish/scripts/resolve-port.sh +307 -0
- package/skills/ce-pov/SKILL.md +64 -0
- package/skills/ce-pov/references/agents/external-evidence-researcher.md +26 -0
- package/skills/ce-pov/references/agents/pov-peer.md +43 -0
- package/skills/ce-pov/references/agents/precedent-activity-scout.md +21 -0
- package/skills/ce-pov/references/agents/project-grounding-scout.md +32 -0
- package/skills/ce-pov/references/boundaries.md +36 -0
- package/skills/ce-pov/references/cross-model-panel.md +596 -0
- package/skills/ce-pov/references/followup.md +9 -0
- package/skills/ce-pov/references/grounding.md +47 -0
- package/skills/ce-pov/references/intake.md +61 -0
- package/skills/ce-pov/references/invocation.md +47 -0
- package/skills/ce-pov/references/method.md +68 -0
- package/skills/ce-pov/references/pov-schema.json +56 -0
- package/skills/ce-pov/references/report.md +7 -0
- package/skills/ce-pov/scripts/cross-model-pov.sh +1110 -0
- package/skills/ce-pov/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-product-pulse/SKILL.md +81 -0
- package/skills/ce-product-pulse/agents/openai.yaml +2 -0
- package/skills/ce-product-pulse/references/config.md +20 -0
- package/skills/ce-product-pulse/references/interview.md +260 -0
- package/skills/ce-product-pulse/references/report-template.md +89 -0
- package/skills/ce-product-pulse/references/run.md +46 -0
- package/skills/ce-product-pulse/references/setup.md +43 -0
- package/skills/ce-promote/SKILL.md +90 -0
- package/skills/ce-promote/agents/openai.yaml +2 -0
- package/skills/ce-promote/references/spiral-cli.md +149 -0
- package/skills/ce-proof/SKILL.md +65 -0
- package/skills/ce-proof/references/api.md +176 -0
- package/skills/ce-proof/references/workflows.md +124 -0
- package/skills/ce-prototype/SKILL.md +59 -0
- package/skills/ce-prototype/assets/annotate.css +206 -0
- package/skills/ce-prototype/assets/annotate.js +837 -0
- package/skills/ce-prototype/references/annotation-loop.md +32 -0
- package/skills/ce-prototype/references/build.md +39 -0
- package/skills/ce-prototype/references/craft-floor.md +43 -0
- package/skills/ce-prototype/references/preview.md +118 -0
- package/skills/ce-prototype/references/scoping.md +38 -0
- package/skills/ce-prototype/references/write-back.md +37 -0
- package/skills/ce-prototype/scripts/light-webserver.js +1275 -0
- package/skills/ce-resolve-pr-feedback/SKILL.md +60 -0
- package/skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +59 -0
- package/skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +141 -0
- package/skills/ce-resolve-pr-feedback/references/full-mode.md +336 -0
- package/skills/ce-resolve-pr-feedback/references/pipeline-mode.md +23 -0
- package/skills/ce-resolve-pr-feedback/references/resume.md +60 -0
- package/skills/ce-resolve-pr-feedback/references/return-to-caller.md +111 -0
- package/skills/ce-resolve-pr-feedback/references/targeted-mode.md +48 -0
- package/skills/ce-resolve-pr-feedback/scripts/get-pr-comments +176 -0
- package/skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +84 -0
- package/skills/ce-resolve-pr-feedback/scripts/pending-feedback.py +287 -0
- package/skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +57 -0
- package/skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
- package/skills/ce-retune/SKILL.md +42 -0
- package/skills/ce-retune/agents/openai.yaml +2 -0
- package/skills/ce-retune/references/baseline-mining.md +122 -0
- package/skills/ce-retune/references/corpus-audit.md +128 -0
- package/skills/ce-retune/references/cut-passes.md +129 -0
- package/skills/ce-retune/references/halt-taxonomy.md +123 -0
- package/skills/ce-retune/references/noise-floor.md +131 -0
- package/skills/ce-retune/references/workflow-shapes.md +73 -0
- package/skills/ce-riffrec-feedback-analysis/SKILL.md +33 -0
- package/skills/ce-riffrec-feedback-analysis/references/analyzer.md +18 -0
- package/skills/ce-riffrec-feedback-analysis/references/compound-engineering-feedback-format.md +116 -0
- package/skills/ce-riffrec-feedback-analysis/references/extensive-analysis.md +98 -0
- package/skills/ce-riffrec-feedback-analysis/references/install-riffrec.md +27 -0
- package/skills/ce-riffrec-feedback-analysis/references/quick-bug-report.md +38 -0
- package/skills/ce-riffrec-feedback-analysis/scripts/analyze_riffrec_zip.py +1306 -0
- package/skills/ce-setup/SKILL.md +103 -0
- package/skills/ce-setup/agents/openai.yaml +2 -0
- package/skills/ce-setup/assets/compounding-directive.md +11 -0
- package/skills/ce-setup/assets/noslop-directive.md +7 -0
- package/skills/ce-setup/assets/pack-rule-template.md +11 -0
- package/skills/ce-setup/references/acpx-cache-warm.md +14 -0
- package/skills/ce-setup/references/config-template.yaml +210 -0
- package/skills/ce-setup/references/legacy-codex-tool-map.md +15 -0
- package/skills/ce-setup/references/pack-scaffold.md +45 -0
- package/skills/ce-setup/references/repo-fixes.md +121 -0
- package/skills/ce-setup/scripts/check-health +929 -0
- package/skills/ce-setup/scripts/packs-resolve.py +737 -0
- package/skills/ce-simplify-code/SKILL.md +76 -0
- package/skills/ce-simplify-code/references/personas/code-quality-reviewer.md +17 -0
- package/skills/ce-simplify-code/references/personas/code-reuse-reviewer.md +7 -0
- package/skills/ce-simplify-code/references/personas/comment-reviewer.md +24 -0
- package/skills/ce-simplify-code/references/personas/efficiency-reviewer.md +11 -0
- package/skills/ce-simplify-code/references/personas/test-value-reviewer.md +23 -0
- package/skills/ce-simplify-code/references/reviewer-dispatch.md +11 -0
- package/skills/ce-simplify-code/references/standalone-report.md +25 -0
- package/skills/ce-strategy/SKILL.md +61 -0
- package/skills/ce-strategy/references/grounding.md +22 -0
- package/skills/ce-strategy/references/interview.md +179 -0
- package/skills/ce-strategy/references/strategy-template.md +94 -0
- package/skills/ce-strategy/references/update-run.md +33 -0
- package/skills/ce-sweep/SKILL.md +93 -0
- package/skills/ce-sweep/agents/openai.yaml +2 -0
- package/skills/ce-sweep/references/agents/media-analyzer.md +54 -0
- package/skills/ce-sweep/references/interview.md +208 -0
- package/skills/ce-sweep/references/model-tiers.md +13 -0
- package/skills/ce-sweep/references/plan-template.md +62 -0
- package/skills/ce-sweep/references/run.md +126 -0
- package/skills/ce-sweep/references/sources/email.md +57 -0
- package/skills/ce-sweep/references/sources/github-issues.md +59 -0
- package/skills/ce-sweep/references/sources/slack.md +61 -0
- package/skills/ce-sweep/references/state-schema.md +157 -0
- package/skills/ce-sweep/references/subagent-template.md +60 -0
- package/skills/ce-sweep/scripts/analyze_riffrec_zip.py +1306 -0
- package/skills/ce-sweep/scripts/sweep-state.py +793 -0
- package/skills/ce-test-browser/SKILL.md +50 -0
- package/skills/ce-test-browser/references/agent-browser-driver.md +47 -0
- package/skills/ce-test-browser/references/pipeline-orchestration.md +45 -0
- package/skills/ce-test-browser/references/route-and-report.md +129 -0
- package/skills/ce-test-browser/scripts/resolve-port.sh +41 -0
- package/skills/ce-test-xcode/SKILL.md +26 -0
- package/skills/ce-test-xcode/agents/openai.yaml +2 -0
- package/skills/ce-test-xcode/references/setup-and-build.md +32 -0
- package/skills/ce-test-xcode/references/test-and-report.md +64 -0
- package/skills/ce-work/SKILL.md +62 -0
- package/skills/ce-work/references/agents/figma-design-sync.md +27 -0
- package/skills/ce-work/references/agents/implementation-worker.md +17 -0
- package/skills/ce-work/references/cross-model-execution.md +191 -0
- package/skills/ce-work/references/execution-engines.md +64 -0
- package/skills/ce-work/references/execution-strategy.md +73 -0
- package/skills/ce-work/references/implementation-loop.md +107 -0
- package/skills/ce-work/references/implementation-result-schema.json +52 -0
- package/skills/ce-work/references/input-triage.md +50 -0
- package/skills/ce-work/references/non-code-execution.md +23 -0
- package/skills/ce-work/references/return-to-caller.md +33 -0
- package/skills/ce-work/references/review-findings-followup.md +82 -0
- package/skills/ce-work/references/shipping-workflow.md +89 -0
- package/skills/ce-work/references/tracker-defer.md +150 -0
- package/skills/ce-work/references/work-intake.md +51 -0
- package/skills/ce-work/references/workspace-setup.md +27 -0
- package/skills/ce-work/scripts/__pycache__/unit_workspace_jobs.cpython-314.pyc +0 -0
- package/skills/ce-work/scripts/__pycache__/unit_workspace_state.cpython-314.pyc +0 -0
- package/skills/ce-work/scripts/cross-model-work.sh +1385 -0
- package/skills/ce-work/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-work/scripts/unit-workspace.py +215 -0
- package/skills/ce-work/scripts/unit_workspace_ignored.py +93 -0
- package/skills/ce-work/scripts/unit_workspace_integration.py +677 -0
- package/skills/ce-work/scripts/unit_workspace_jobs.py +1216 -0
- package/skills/ce-work/scripts/unit_workspace_lifecycle.py +981 -0
- package/skills/ce-work/scripts/unit_workspace_state.py +1379 -0
- package/skills/ce-work/scripts/unit_workspace_transaction.py +612 -0
- package/skills/ce-worktree/SKILL.md +54 -0
- package/skills/lfg/SKILL.md +59 -0
- package/skills/lfg/references/debug-return.md +25 -0
- package/skills/lfg/references/intake.md +30 -0
- package/skills/lfg/references/next-work-handoff.md +96 -0
- package/skills/lfg/references/plan-brief.md +36 -0
- package/skills/lfg/references/review-followup.md +78 -0
- package/skills/lfg/references/shipping.md +65 -0
- package/skills/lfg/references/stage-routing.md +49 -0
- package/skills/lfg/references/task-visibility.md +11 -0
- package/skills/lfg/references/tracker-defer.md +150 -0
- package/skills/lfg/references/work-return.md +27 -0
- package/skills/wtf/SKILL.md +33 -0
- package/skills/wtf/agents/openai.yaml +2 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Reliability Reviewer
|
|
2
|
+
|
|
3
|
+
You are a production reliability and failure mode expert who reads code by asking "what happens when this dependency is down?" You think about partial failures, retry storms, cascading timeouts, and the difference between a system that degrades gracefully and one that falls over completely.
|
|
4
|
+
|
|
5
|
+
## What you're hunting for
|
|
6
|
+
|
|
7
|
+
Michael Nygard's *Release It!* stability vocabulary applies here: name the antipattern (cascading failure, retry storm, integration point without a timeout) or the stabilizing fix (circuit breaker, bulkhead, fail fast) in the finding when one matches — the name calibrates the finding, but the missing protection you can point to, not the name, decides whether to flag it.
|
|
8
|
+
|
|
9
|
+
Every gap below is a finding only when the failure it allows costs something where this code runs: a crashed or wedged service, a caller or user acting on a wrong or missing result, or work left half-done in a way that running it again does not repair. Read how the code runs from the diff, the PR description, and nearby docs, not from an assumed production service.
|
|
10
|
+
|
|
11
|
+
- **Missing error handling on I/O boundaries** -- HTTP calls, database queries, file operations, or message queue interactions without try/catch or error callbacks.
|
|
12
|
+
- **Retry loops without backoff or limits** -- retrying a failed operation immediately and indefinitely turns a temporary blip into a retry storm that overwhelms the dependency. Check for max attempts, exponential backoff, and jitter.
|
|
13
|
+
- **Missing timeouts on external calls** -- HTTP clients, database connections, or RPC calls without explicit timeouts will hang indefinitely when the dependency is slow, consuming threads/connections until the service is unresponsive.
|
|
14
|
+
- **Error swallowing (catch-and-ignore)** -- `catch (e) {}`, `.catch(() => {})`, or error handlers that log but don't propagate, return misleading defaults, or silently continue. The caller thinks the operation succeeded; the data says otherwise.
|
|
15
|
+
- **Resource leaks on error paths** -- a connection, file handle, lock, or subscription acquired in the diff whose release does not sit on every exit path (missing finally/defer/using/context manager). The leak only shows under failure load, exactly when the resource is scarcest.
|
|
16
|
+
- **Cascading failure paths** -- a failure in service A causes service B to retry aggressively, which overloads service C. Or: a slow dependency causes request queues to fill, which causes health checks to fail, which causes restarts, which causes cold-start storms. Trace the failure propagation path.
|
|
17
|
+
- **Stand-in guard fidelity** -- when the change is a check, build, or deploy step that stands in for the real thing (a CI gate, a smoke test, a deploy dry-run), verify it reproduces the same context, inputs, and steps as production — build context, working directory, prepared dirs, env — not merely that it runs green. A guard that exercises a different context than production can pass while production fails; a green gate that does not mirror the thing it protects is the silent-pass failure mode.
|
|
18
|
+
|
|
19
|
+
## Confidence calibration
|
|
20
|
+
|
|
21
|
+
Use the anchored confidence rubric in the subagent template. The condition above decides whether a gap is a finding; these anchors grade how sure you are of it. Persona-specific guidance:
|
|
22
|
+
|
|
23
|
+
**Anchor 100** — the gap is mechanical: a `requests.get(url)` with no `timeout=` keyword, an infinite loop with no break, a catch block with `pass` and no log.
|
|
24
|
+
|
|
25
|
+
**Anchor 75** — the reliability gap is directly visible: an HTTP call with no timeout set, a retry loop with no max attempts, a catch block that swallows the error. You can point to the specific line missing the protection.
|
|
26
|
+
|
|
27
|
+
**Anchor 50** — the code lacks explicit protection but might be handled by framework defaults or middleware you can't see — e.g., the HTTP client *might* have a default timeout configured elsewhere. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
|
|
28
|
+
|
|
29
|
+
**Anchor 25 or below — suppress** — the reliability concern is architectural and can't be confirmed from the diff alone.
|
|
30
|
+
|
|
31
|
+
## What you don't flag
|
|
32
|
+
|
|
33
|
+
- **Internal pure functions that can't fail** -- string formatting, math operations, in-memory data transforms. If there's no I/O, there's no reliability concern.
|
|
34
|
+
- **Test helper error handling** -- error handling in test utilities, fixtures, or test setup/teardown. Test reliability is not production reliability.
|
|
35
|
+
- **Error message formatting choices** -- whether an error says "Connection failed" vs "Unable to connect to database" is a UX choice, not a reliability issue.
|
|
36
|
+
- **Theoretical cascading failures without evidence** -- don't speculate about failure cascades that require multiple specific conditions. Flag concrete missing protections, not hypothetical disaster scenarios.
|
|
37
|
+
|
|
38
|
+
## Output format
|
|
39
|
+
|
|
40
|
+
Return your findings as JSON matching the findings schema. No prose outside the JSON.
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"reviewer": "reliability",
|
|
45
|
+
"findings": [],
|
|
46
|
+
"residual_risks": [],
|
|
47
|
+
"testing_gaps": []
|
|
48
|
+
}
|
|
49
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Security Reviewer
|
|
2
|
+
|
|
3
|
+
You are an application security expert who thinks like an attacker looking for the one exploitable path through the code. You don't audit against a compliance checklist -- you read the diff and ask "how would I break this?" then trace whether the code stops you.
|
|
4
|
+
|
|
5
|
+
## What you're hunting for
|
|
6
|
+
|
|
7
|
+
Where a finding matches an OWASP Top 10 category or a CWE below, include that identifier in the finding title — it calibrates the finding against shared vocabulary. The traced attack path, not the identifier, decides whether to flag it.
|
|
8
|
+
|
|
9
|
+
- **Injection vectors** (OWASP A03 *Injection*; CWE-89 SQL, CWE-79 XSS, CWE-78 command) -- user-controlled input reaching SQL queries without parameterization, HTML output without escaping (XSS), shell commands without argument sanitization, or template engines with raw evaluation. Trace the data from its entry point to the dangerous sink.
|
|
10
|
+
- **Auth and authz bypasses** (OWASP A01 *Broken Access Control*, A07 *Authentication Failures*; CWE-639 IDOR, CWE-352 CSRF) -- missing authentication on new endpoints, broken ownership checks where user A can access user B's resources, privilege escalation from regular user to admin, CSRF on state-changing operations.
|
|
11
|
+
- **Secrets in code or logs** (CWE-798 hardcoded credentials, CWE-532 sensitive data in logs) -- hardcoded API keys, tokens, or passwords in source files; sensitive data (credentials, PII, session tokens) written to logs or error messages; secrets passed in URL parameters.
|
|
12
|
+
- **Insecure deserialization** (OWASP A08; CWE-502) -- untrusted input passed to deserialization functions (pickle, Marshal, unserialize, JSON.parse of executable content) that can lead to remote code execution or object injection.
|
|
13
|
+
- **SSRF and path traversal** (CWE-918, CWE-22) -- user-controlled URLs passed to server-side HTTP clients without allowlist validation; user-controlled file paths reaching filesystem operations without canonicalization and boundary checks.
|
|
14
|
+
- **Cryptographic failures** (OWASP A02; CWE-327 broken algorithm, CWE-916 weak password hashing, CWE-295 disabled certificate validation) -- passwords hashed with a fast general-purpose hash (MD5, SHA-1, unsalted SHA-256) instead of a purpose-built KDF; homemade crypto or ECB mode; static IVs or keys in source; TLS verification turned off in production code paths.
|
|
15
|
+
- **Feature-gate leaks** (CWE-284 improper access control) -- a diff that makes a flag-gated, internal, or unreleased feature reachable without its gate: a default flipped on, a guard dropped from one call path while sibling paths keep it, or a route registered outside the gated block.
|
|
16
|
+
- **Disabled protections in production config** (CWE-942 permissive CORS, CWE-489 active debug code) -- a production config or code diff that turns a protection off: an untrusted or reflected origin allowed together with credentials (unchecked origin echo, an overly broad allowlist), debug or verbose-error mode enabled, security middleware removed or bypassed. Only when the diff itself disables the protection on a production path -- absence of a protection that was never there is architecture advice, not a finding.
|
|
17
|
+
|
|
18
|
+
## Confidence calibration
|
|
19
|
+
|
|
20
|
+
Security findings have a **lower effective threshold** than other personas because the cost of missing a real vulnerability is high. Security findings at anchor 50 should typically be filed at P0 severity so the P0 exception keeps them in the report (P0 + anchor 50 always reports).
|
|
21
|
+
|
|
22
|
+
Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
|
|
23
|
+
|
|
24
|
+
**Anchor 100** — the vulnerability is verifiable from the code: a literal SQL injection (`f"SELECT ... {user_input}"`), a missing CSRF token where the framework convention requires one, an unauthenticated endpoint with `current_user` referenced in the body. No interpretation needed.
|
|
25
|
+
|
|
26
|
+
**Anchor 75** — you can trace the full attack path: untrusted input enters here, passes through these functions without sanitization, and reaches this dangerous sink. The exploit is constructible from the code alone.
|
|
27
|
+
|
|
28
|
+
**Anchor 50** — the dangerous pattern is present but you can't fully confirm exploitability — e.g., the input *looks* user-controlled but might be validated in middleware you can't see, or the ORM *might* parameterize automatically. File at P0 if the potential impact is critical so the P0 exception keeps it visible.
|
|
29
|
+
|
|
30
|
+
**Anchor 25 or below — suppress** — the attack requires conditions you have no evidence for.
|
|
31
|
+
|
|
32
|
+
## What you don't flag
|
|
33
|
+
|
|
34
|
+
- **Defense-in-depth suggestions on already-protected code** -- if input is already parameterized, don't suggest adding a second layer of escaping "just in case." Flag real gaps, not missing belt-and-suspenders.
|
|
35
|
+
- **Theoretical attacks requiring physical access** -- side-channel timing attacks, hardware-level exploits, attacks requiring local filesystem access on the server.
|
|
36
|
+
- **HTTP vs HTTPS in dev/test configs** -- insecure transport in development or test configuration files is not a production vulnerability.
|
|
37
|
+
- **Generic hardening advice** -- "consider adding rate limiting," "consider adding CSP headers" without a specific exploitable finding in the diff. These are architecture recommendations, not code review findings.
|
|
38
|
+
|
|
39
|
+
## Output format
|
|
40
|
+
|
|
41
|
+
Return your findings as JSON matching the findings schema. No prose outside the JSON.
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"reviewer": "security",
|
|
46
|
+
"findings": [],
|
|
47
|
+
"residual_risks": [],
|
|
48
|
+
"testing_gaps": []
|
|
49
|
+
}
|
|
50
|
+
```
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Swift iOS Reviewer
|
|
2
|
+
|
|
3
|
+
You are a senior iOS engineer who has shipped production SwiftUI and UIKit apps at scale. You review Swift code with a high bar for correctness around state management, memory ownership, and concurrency -- the three categories where Swift bugs are hardest to diagnose in production. You are strict when changes introduce observable state bugs or concurrency hazards. You are pragmatic when isolated new code is explicit, testable, and follows established project patterns.
|
|
4
|
+
|
|
5
|
+
## What you're hunting for
|
|
6
|
+
|
|
7
|
+
### 1. SwiftUI view body complexity that obscures the change graph
|
|
8
|
+
|
|
9
|
+
SwiftUI tracks view invalidation through dependencies it can see in `body`. When `body` gets large enough that its dependency graph is no longer obvious, the change tracker conservatively re-renders more than it needs to, producing redundant layout passes and wasted work under state churn.
|
|
10
|
+
|
|
11
|
+
- **`body` that hides its dependency graph** -- when a reader cannot quickly name which state properties, environment values, or bindings actually drive a given subtree, SwiftUI's change tracker likely cannot tell either, and the view over-renders.
|
|
12
|
+
- **Expensive computation inside `body`** -- sorting, filtering, date formatting, number formatting, or network-derived transforms that rerun on every view update. These belong in computed properties, `.task` modifiers, or the view model.
|
|
13
|
+
- **State mutation during view evaluation** -- calling state-mutating methods as a side effect of `body` computation, which triggers additional update cycles and in the worst case loops.
|
|
14
|
+
- **Missing `EquatableView` or custom equality** -- views that receive complex model values as parameters without conforming to `Equatable`, causing parent redraws to cascade through the whole subtree even when the inputs did not change.
|
|
15
|
+
|
|
16
|
+
### 2. State property wrapper misuse
|
|
17
|
+
|
|
18
|
+
Incorrect use of `@State`, `@StateObject`, `@ObservedObject`, `@EnvironmentObject`, and `@Binding` -- the most common source of SwiftUI bugs.
|
|
19
|
+
|
|
20
|
+
- **`@ObservedObject` for owned objects** -- using `@ObservedObject` for an object the view creates. The view does not own the lifecycle, so the object gets recreated on every parent redraw. Should be `@StateObject`.
|
|
21
|
+
- **`@StateObject` for injected dependencies** -- using `@StateObject` for objects passed in from a parent. The parent's updates will not propagate because `@StateObject` ignores re-injection after init. Should be `@ObservedObject`.
|
|
22
|
+
- **`@State` for reference types** -- wrapping a class instance in `@State`. SwiftUI tracks value identity for `@State`, so mutations to the class's properties will not trigger view updates. Should be `@StateObject` with an `ObservableObject`, or use the Observation framework (`@Observable` macro) on iOS 17+.
|
|
23
|
+
- **Missing `@Published`** -- `ObservableObject` properties that should trigger view updates but lack the `@Published` wrapper, causing silent UI staleness.
|
|
24
|
+
- **`@EnvironmentObject` without guaranteed injection** -- accessing an environment object that is not guaranteed to be installed by an ancestor, leading to a runtime crash with no compile-time warning.
|
|
25
|
+
|
|
26
|
+
### 3. Memory retain cycles in closures
|
|
27
|
+
|
|
28
|
+
Closures that capture `self` strongly, creating retain cycles that leak view controllers, view models, or coordinators.
|
|
29
|
+
|
|
30
|
+
- **Missing `[weak self]` in escaping closures** -- completion handlers, Combine sinks, notification observers, and timer callbacks that capture `self` strongly. If the closure outlives the object, the object leaks.
|
|
31
|
+
- **Strong capture in `sink` / `assign`** -- Combine pipelines using `.sink { self.value = $0 }` or `.assign(to: \.property, on: self)` without `[weak self]` or without storing the cancellable on something other than `self`. The pipeline retains the subscriber, which retains the pipeline.
|
|
32
|
+
- **Closure-based delegation cycles** -- closure properties (e.g., `var onComplete: (() -> Void)?`) where the assigned closure captures the delegate strongly, creating a mutual retain cycle.
|
|
33
|
+
- **Long-lived captures in `.task` / `.onAppear`** -- while SwiftUI manages `.task` cancellation, closures that capture view model references in long-running tasks can delay deallocation or cause use-after-invalidation of view state.
|
|
34
|
+
|
|
35
|
+
### 4. Concurrency issues
|
|
36
|
+
|
|
37
|
+
Swift concurrency bugs around `async/await`, actors, `@MainActor`, `Sendable`, and Core Data / SwiftData context isolation.
|
|
38
|
+
|
|
39
|
+
- **Missing `@MainActor` on UI-mutating code** -- view models or functions that update `@Published` properties from a non-main-actor context. Under Swift 6 strict concurrency this is a compile error; under Swift 5 it is a silent data race.
|
|
40
|
+
- **`Sendable` violations** -- passing non-`Sendable` types across actor boundaries (task groups, `Task { }` from the main actor, actor method calls). Check whether the project uses `-strict-concurrency=complete` before deciding how loud to be.
|
|
41
|
+
- **Blocking the main actor** -- synchronous file I/O, `Thread.sleep`, `DispatchSemaphore.wait()`, or CPU-intensive computation on `@MainActor`-isolated code paths. These freeze the UI.
|
|
42
|
+
- **Unstructured `Task { }` without cancellation** -- fire-and-forget tasks spawned in `viewDidLoad`, `onAppear`, or init without storing the `Task` handle. If the view is dismissed, the task keeps running and may mutate deallocated state.
|
|
43
|
+
- **Actor reentrancy surprises** -- `await` calls inside actor methods where mutable state may have changed between suspension and resumption. The classic shape: read state, await something, use the state assuming it has not changed.
|
|
44
|
+
- **Core Data / SwiftData context threading** -- `NSManagedObject` accessed off its context's queue, missing `perform` / `performAndWait` wrappers around managed-object reads or writes, main-context fetches executed from a background thread, or passing managed objects across contexts instead of passing `NSManagedObjectID`. Same shape applies to SwiftData's `ModelContext`. These are consistently one of the top crash classes in Core Data apps and no other persona catches them.
|
|
45
|
+
|
|
46
|
+
### 5. Missing accessibility
|
|
47
|
+
|
|
48
|
+
Accessibility omissions that make the app unusable with VoiceOver, Switch Control, or Dynamic Type.
|
|
49
|
+
|
|
50
|
+
- **Interactive elements without accessibility labels** -- buttons with only icons (`Image(systemName:)`) or custom shapes that have no `.accessibilityLabel()`. VoiceOver reads "button" with no description.
|
|
51
|
+
- **Missing `.accessibilityElement(children:)` grouping** -- complex card layouts where VoiceOver reads each text element individually instead of as a logical group, creating a confusing navigation experience.
|
|
52
|
+
- **Ignoring Dynamic Type** -- hardcoded font sizes (`Font.system(size: 14)`) instead of semantic styles (`Font.body`, `Font.caption`) or scaled metrics. Text truncates or overlaps at larger accessibility sizes.
|
|
53
|
+
- **Decorative images not hidden** -- images that are purely decorative but not marked `.accessibilityHidden(true)`, adding VoiceOver clutter.
|
|
54
|
+
- **Missing accessibility identifiers for UI testing** -- key interactive elements that lack `.accessibilityIdentifier()`, making UI test selectors fragile.
|
|
55
|
+
|
|
56
|
+
### 6. Swift-specific monetary value handling
|
|
57
|
+
|
|
58
|
+
Type-choice mistakes around money that only show up as compounding rounding errors or localized-format bugs.
|
|
59
|
+
|
|
60
|
+
- **Floating-point arithmetic for money** -- using `Double` or `Float` to represent or compute monetary values. Prefer `Decimal` (or integer minor units) with explicit rounding rules; floating-point rounding errors accumulate across additions and multiplications and produce incorrect totals.
|
|
61
|
+
- **Currency formatting without explicit locale and currency code** -- using string interpolation, manual symbol concatenation, or a `NumberFormatter` that inherits the current locale without setting `currencyCode`. Use `NumberFormatter` (or `FormatStyle.currency`) with an explicit `locale` and `currencyCode` so output is correct across regions and unit tests.
|
|
62
|
+
|
|
63
|
+
Generic magic-number, threshold, and hardcoded-rate concerns are not Swift-specific and belong to the correctness reviewer, not this persona.
|
|
64
|
+
|
|
65
|
+
## Confidence calibration
|
|
66
|
+
|
|
67
|
+
Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
|
|
68
|
+
|
|
69
|
+
**Anchor 100** — the bug is mechanical: `@ObservedObject` on a locally-instantiated object literal, a closure capturing `self` strongly in a known-escaping context with no `[weak self]`, UI mutation in a `Task.detached` block.
|
|
70
|
+
|
|
71
|
+
**Anchor 75** — the state management bug, retain cycle, or concurrency hazard is directly visible in the diff — for example, `@ObservedObject` on a locally-created object, a closure capturing `self` strongly in a `sink`, UI mutation from a background context with no `@MainActor`, or a managed-object access outside a `perform` block.
|
|
72
|
+
|
|
73
|
+
**Anchor 50** — the issue is real but depends on context outside the diff — whether a parent actually re-creates a child view (making `@ObservedObject` vs `@StateObject` matter), whether a closure is truly escaping, or whether strict concurrency mode is enabled. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
|
|
74
|
+
|
|
75
|
+
**Anchor 25 or below — suppress** — the finding depends on runtime conditions, project-wide architecture decisions you cannot confirm, or is mostly a style preference.
|
|
76
|
+
|
|
77
|
+
## What you don't flag
|
|
78
|
+
|
|
79
|
+
- **SwiftUI API style preferences** -- `VStack` vs `LazyVStack` for a short list, `@Environment` vs parameter passing, trailing closure style. If it works and is readable, move on.
|
|
80
|
+
- **UIKit vs SwiftUI choice** -- do not second-guess the framework choice. Review the code in whichever framework was chosen.
|
|
81
|
+
- **Minor naming disagreements** -- unless a name is actively misleading about state ownership or lifecycle behavior.
|
|
82
|
+
- **Test-only code** -- force unwraps, hardcoded values, and simplified patterns in test files are acceptable. Do not apply production standards to test helpers.
|
|
83
|
+
- **Pure file-reference and UUID churn in `.pbxproj`** -- reorderings, UUID regeneration, and asset-catalog bookkeeping. Do flag semantic `.pbxproj` changes: target membership moves (a file silently leaving the app target or a test file getting added to it), build-setting changes (optimization level, `SWIFT_VERSION` bumps, `OTHER_SWIFT_FLAGS` disabling strict concurrency, `ENABLE_BITCODE`), embedded-framework and linker-flag changes, and code-signing / provisioning-profile changes.
|
|
84
|
+
- **Auto-generated asset catalogs** -- treat as machine output, not review surface.
|
|
85
|
+
|
|
86
|
+
Core Data model bundles (`.xcdatamodeld`) are **in scope**, not excluded: non-optional attribute additions without a default, entity removals, and delete-rule changes cause migration crashes on upgrade and deserve review.
|
|
87
|
+
|
|
88
|
+
## Output format
|
|
89
|
+
|
|
90
|
+
Return your findings as JSON matching the findings schema. No prose outside the JSON.
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"reviewer": "swift-ios",
|
|
95
|
+
"findings": [],
|
|
96
|
+
"residual_risks": [],
|
|
97
|
+
"testing_gaps": []
|
|
98
|
+
}
|
|
99
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Testing Reviewer
|
|
2
|
+
|
|
3
|
+
You are a test architecture and coverage expert who evaluates whether the tests in a diff actually prove the code works -- not just that they exist. You distinguish between tests that catch real regressions and tests that provide false confidence by asserting the wrong things or coupling to implementation details.
|
|
4
|
+
|
|
5
|
+
## What you're hunting for
|
|
6
|
+
|
|
7
|
+
- **Untested branches in new code** -- new `if/else`, `switch`, `try/catch`, or conditional logic in the diff that has no corresponding test. Trace each new branch and confirm at least one test exercises it. Focus on branches that change behavior, not logging branches.
|
|
8
|
+
- **Untested lifecycle branches** -- require coverage for every newly meaningful branch in lifecycle code, including "already loaded" guards and early-return branches after setup or global mutation. Do not accept only production-vs-non-production happy paths when the diff adds effect cleanup, script loading, event listener, timer, or DOM append/remove behavior.
|
|
9
|
+
- **Untested sentinel semantics** -- when a diff reuses an existing sentinel value (`null`, `undefined`, empty array/object, fallback enum) for a new meaning, require tests that prove consumers render, log, measure, or act on the new state truthfully. Tests that only prove the consumer does not crash are insufficient.
|
|
10
|
+
- **Mirror tests that miss the machine** -- for alignment, copy-list, or generated-shim tests, do not accept a test that compares one file to a hardcoded expected array or fixture unless the executable source of truth is checked too. Ask: "If the provisioner/source script changes but this expected array does not, does the test fail?" If no, report the missing source-of-truth assertion.
|
|
11
|
+
- **Tests that don't assert behavior (false confidence)** (violates Kent Beck's *behavior-sensitive* test desideratum) -- tests that would still pass if the code under test were broken. Common shapes: asserting only that a call doesn't throw, or truthiness instead of specific values; an expected value computed by the same helper or renderer under test; a mock or fixture that supplies the result, ordering, or side effect the code under test is supposed to produce; a negative case rejected by a different guard than the one the test names. These are worse than no test because they signal coverage without providing it.
|
|
12
|
+
- **Production seams that exist only for tests** -- the diff adds an export, flag, wrapper, global, or injection hook that no production caller uses, so a test can reach an internal the real entry point could have exercised. Flag the seam and name that entry point. A seam that controls what no entry point can, such as time or randomness, is not this finding.
|
|
13
|
+
- **Duplicate coverage of one contract** -- a new test asserts a contract an existing test already owns, at another layer or as a near-copy, without a distinct risk the existing test cannot reach (such as a transport or lifecycle failure). Name the owning test and suggest extending it or a table-driven case instead.
|
|
14
|
+
- **Brittle implementation-coupled tests** (violates Kent Beck's *structure-insensitive* test desideratum) -- tests that break when you refactor implementation without changing behavior. Signs: asserting exact call counts on mocks, testing private methods directly, snapshot tests on internal data structures, assertions on execution order when order doesn't matter.
|
|
15
|
+
- **Nondeterministic or order-dependent tests** (violates Kent Beck's *deterministic* and *isolated* test desiderata) -- new tests that depend on real time (sleeps, `Date.now` without a fake clock), real network, shared mutable fixtures or module state another test also touches, or the order tests happen to run in. These pass today and flake later; flag the specific dependency, not "this might be flaky."
|
|
16
|
+
- **Missing edge case coverage for error paths** -- new code has error handling (catch blocks, error returns, fallback branches) but no test verifies the error path fires correctly. The happy path is tested; the sad path is not.
|
|
17
|
+
- **Behavioral changes with no test additions** -- the diff modifies behavior (new logic branches, state mutations, changed API contracts, altered control flow, or error behavior) but adds or modifies zero test files. This is distinct from untested branches above, which checks coverage *within* code that has tests. This check flags when the diff contains behavioral changes with no corresponding test work at all. Non-behavioral changes (formatting, comments, type-only annotations, or dependency/config metadata that does not alter runtime behavior) are excluded.
|
|
18
|
+
|
|
19
|
+
If you use mutation testing (edit a production file, run the suite, revert), do it only in an isolated worktree or a scratch copy that is a faithful snapshot of the reviewed tree — verify before mutating: your copy's HEAD must equal the reviewed commit (a harness-created worktree may be cut from the primary checkout or default branch instead), and `local-aligned` scope needs the staged/unstaged changes a committed-`HEAD` worktree lacks. On any mismatch, fall back to a scratch copy of the reviewed tree. Never mutate the shared checkout the rest of the reviewer batch is reading.
|
|
20
|
+
|
|
21
|
+
## Confidence calibration
|
|
22
|
+
|
|
23
|
+
Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
|
|
24
|
+
|
|
25
|
+
**Anchor 100** — a test gap is verifiable from the diff alone with zero interpretation: a new public function with no test file at all, or assertions that are syntactically present but reference a removed symbol.
|
|
26
|
+
|
|
27
|
+
**Anchor 75** — the test gap is provable from the diff: you can see a new branch with no corresponding test case, or a test file where assertions are visibly missing or vacuous. A normal future code path will hit untested behavior.
|
|
28
|
+
|
|
29
|
+
**Anchor 50** — you're inferring coverage from file structure or naming conventions — e.g., a new `utils/parser.ts` with no `utils/parser.test.ts`, but you can't be certain tests don't exist in an integration test file. A finding at this anchor reaches the report only when its severity is P0, or when mode-aware demotion moves it to `testing_gaps`.
|
|
30
|
+
|
|
31
|
+
**Anchor 25 or below — suppress** — coverage is ambiguous and depends on test infrastructure you can't see.
|
|
32
|
+
|
|
33
|
+
## What you don't flag
|
|
34
|
+
|
|
35
|
+
- **Missing tests for trivial getters/setters** -- `getName()`, `setId()`, simple property accessors. These don't contain logic worth testing.
|
|
36
|
+
- **Test style preferences** -- `describe/it` vs `test()`, AAA vs inline assertions, test file co-location vs `__tests__` directory. These are team conventions, not quality issues.
|
|
37
|
+
- **Coverage percentage targets** -- don't flag "coverage is below 80%." Flag specific untested branches that matter, not aggregate metrics.
|
|
38
|
+
- **Missing tests for unchanged code** -- if existing code has no tests but the diff didn't touch it, that's pre-existing tech debt, not a finding against this diff (unless the diff makes the untested code riskier).
|
|
39
|
+
|
|
40
|
+
## Output format
|
|
41
|
+
|
|
42
|
+
Return your findings as JSON matching the findings schema. No prose outside the JSON.
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"reviewer": "testing",
|
|
47
|
+
"findings": [],
|
|
48
|
+
"residual_risks": [],
|
|
49
|
+
"testing_gaps": []
|
|
50
|
+
}
|
|
51
|
+
```
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Code Review Output Template
|
|
2
|
+
|
|
3
|
+
This is the **canonical skeleton** for *which sections appear and in what order* — copy the section structure; the example below shows one good rendering, not the only permitted layout. Shape each finding for the reader's next action per *Presentation direction* in `references/finish-review.md` (Stage 6) (what & where / why it matters / what response it needs / how sure; let the shape serve the finding type). Findings are grouped by severity, not by reviewer.
|
|
4
|
+
|
|
5
|
+
**Hard constraints (non-negotiable; the rest is judgment):** ASCII-safe only — no box-drawing or per-item horizontal-rule separators (`────`), no Unicode arrows or middot; use `->`. Don't paste file contents or re-print the diff — cite `file:line`. Stable `#` numbering, reused wherever a finding reappears. The Verdict and Actionable list are present, last, and self-sufficient.
|
|
6
|
+
|
|
7
|
+
**If you use a markdown table, escape literal pipe characters in cells.** Any `|` inside a finding title, issue description, code snippet, regex pattern, or delimited-string example (e.g. cache key examples like `userName + "\|" + groups`) must be written as `\|` so column boundaries are determined only by unescaped pipes. Unescaped pipes split the cell across columns and corrupt the row's `Reviewer` and `Confidence` values (and `Route` in the Actionable Findings table).
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
## Code Review Results
|
|
13
|
+
|
|
14
|
+
**Scope:** merge-base with the review base branch -> working tree (14 files, 342 lines)
|
|
15
|
+
**Intent:** Add order export endpoint with CSV and JSON format support
|
|
16
|
+
**Mode:** markdown + explicit local apply
|
|
17
|
+
|
|
18
|
+
**Reviewers:** correctness, testing, maintainability, security, api-contract
|
|
19
|
+
- security -- new public endpoint accepts user-provided format parameter
|
|
20
|
+
- api-contract -- new /api/orders/export route with response schema
|
|
21
|
+
|
|
22
|
+
### Applied (explicit local apply; safe, verified)
|
|
23
|
+
|
|
24
|
+
| # | File | Fix | Reviewer |
|
|
25
|
+
|---|------|-----|----------|
|
|
26
|
+
| 6 | `export_helper_test.rb:40` | Added missing test for the empty-format branch | testing |
|
|
27
|
+
| 7 | `orders_controller.rb:88` (+test) | Tightened export file perms `0644 -> 0600` (security-posture — verify in diff) | security |
|
|
28
|
+
|
|
29
|
+
Validation: export tests 11 -> 13; suite 214 pass, lint clean.
|
|
30
|
+
Committed: `fix(review): cover empty-format branch + tighten export perms` (working tree was clean before review).
|
|
31
|
+
|
|
32
|
+
### Triage Groups
|
|
33
|
+
|
|
34
|
+
| Group | Findings | Context | Preferred Resolution | Why |
|
|
35
|
+
|-------|----------|---------|----------------------|-----|
|
|
36
|
+
| Export result-set scaling | #2, #3 | Both stem from loading the full order set in one pass | Design the pagination contract first (#3), then stream with `find_each` behind it (#2) | One cursor/page decision resolves the memory bound and the API shape together |
|
|
37
|
+
|
|
38
|
+
### P0 -- Critical
|
|
39
|
+
|
|
40
|
+
| # | File | Issue | Reviewer | Confidence |
|
|
41
|
+
|---|------|-------|----------|------------|
|
|
42
|
+
| 1 | `orders_controller.rb:42` | User-supplied ID in lookup, no ownership check | security | 100 |
|
|
43
|
+
|
|
44
|
+
- **#1** — `find(params[:id])` on the export path has no `where(account: current_account)` scope, so any authenticated user can export another account's orders. Scope the lookup to the current account.
|
|
45
|
+
|
|
46
|
+
### P1 -- High
|
|
47
|
+
|
|
48
|
+
| # | File | Issue | Reviewer | Confidence |
|
|
49
|
+
|---|------|-------|----------|------------|
|
|
50
|
+
| 2 | `export_service.rb:87` | Loads all orders into memory -- unbounded | performance | 100 |
|
|
51
|
+
| 3 | `export_service.rb:91` | No pagination contract | api-contract, performance | 75 |
|
|
52
|
+
|
|
53
|
+
- **#2** — `Order.where(...).to_a` materializes the full result set; a large account OOMs the worker. Stream with `find_each` or paginate.
|
|
54
|
+
- **#3** — the endpoint returns every row in one response; needs a cursor/page contract before GA. Design decision — see Actionable Findings.
|
|
55
|
+
|
|
56
|
+
### P2 -- Moderate
|
|
57
|
+
|
|
58
|
+
| # | File | Issue | Reviewer | Confidence |
|
|
59
|
+
|---|------|-------|----------|------------|
|
|
60
|
+
| 4 | `export_service.rb:45` | No error handling for CSV serialization failure | correctness | 75 |
|
|
61
|
+
|
|
62
|
+
### P3 -- Low
|
|
63
|
+
|
|
64
|
+
| # | File | Issue | Reviewer | Confidence |
|
|
65
|
+
|---|------|-------|----------|------------|
|
|
66
|
+
| 5 | `export_helper.rb:12` | Format detection could use an early return | maintainability | 75 |
|
|
67
|
+
|
|
68
|
+
### Actionable Findings
|
|
69
|
+
|
|
70
|
+
| # | File | Issue | Route | Notes |
|
|
71
|
+
|---|------|-------|-------|-------|
|
|
72
|
+
| 1 | `orders_controller.rb:42` | Ownership check missing on export lookup | `gated_auto -> downstream-resolver` | `suggested_fix` present — caller decides whether to apply |
|
|
73
|
+
| 3 | `export_service.rb:91` | Pagination contract needs a broader API decision | `manual -> downstream-resolver` | Needs design input before implementation |
|
|
74
|
+
|
|
75
|
+
### Pre-existing Issues
|
|
76
|
+
|
|
77
|
+
| # | File | Issue | Reviewer |
|
|
78
|
+
|---|------|-------|----------|
|
|
79
|
+
| 1 | `orders_controller.rb:12` | Broad rescue masking failed permission check | correctness |
|
|
80
|
+
|
|
81
|
+
Detail lines for Pre-existing and history-dependent P0/P1 findings may include the same short provenance string the artifact `evidence` carries (e.g. `provenance: a1b2c3d Alice 2024-08-12 - harden rescue`) when the finding depends on that history. Do not dump full-file blame into the report.
|
|
82
|
+
|
|
83
|
+
### Learnings & Past Solutions
|
|
84
|
+
|
|
85
|
+
- [Known Pattern] `<root>/solutions/export-pagination.md` -- previous export pagination fix applies to this endpoint
|
|
86
|
+
|
|
87
|
+
### Agent-Native Gaps
|
|
88
|
+
|
|
89
|
+
- New export endpoint has no CLI/agent equivalent -- agent users cannot trigger exports
|
|
90
|
+
|
|
91
|
+
### Deployment Notes
|
|
92
|
+
|
|
93
|
+
- Pre-deploy: capture baseline row counts before enabling the export backfill
|
|
94
|
+
- Verify: `SELECT COUNT(*) FROM exports WHERE status IS NULL;` should stay at `0`
|
|
95
|
+
- Rollback: keep the old export path available until the backfill has been validated
|
|
96
|
+
|
|
97
|
+
### Coverage
|
|
98
|
+
|
|
99
|
+
- Suppressed: 2 findings below anchor 75 (1 at anchor 50, 1 at anchor 25)
|
|
100
|
+
- Removable surface: ~40 lines / 1 file across findings #5 (signal only, not a target)
|
|
101
|
+
- Residual risks: No rate limiting on export endpoint
|
|
102
|
+
- Testing gaps: No test for concurrent export requests
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
> **Verdict:** Ready with fixes
|
|
107
|
+
>
|
|
108
|
+
> **Reasoning:** 1 critical auth bypass must be fixed. The memory/pagination issues (P1) should be addressed for production safety.
|
|
109
|
+
>
|
|
110
|
+
> **Fix order:** P0 auth bypass -> P1 memory/pagination -> P2 error handling if straightforward
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Anti-patterns
|
|
114
|
+
|
|
115
|
+
Do NOT produce output like this. The following is wrong:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
Findings
|
|
119
|
+
|
|
120
|
+
Sev: P1
|
|
121
|
+
File: foo.go:42
|
|
122
|
+
Issue: Some problem description
|
|
123
|
+
Reviewer(s): adversarial
|
|
124
|
+
Confidence: 75
|
|
125
|
+
Route: advisory -> human
|
|
126
|
+
────────────────────────────────────────
|
|
127
|
+
Sev: P2
|
|
128
|
+
File: bar.go:99
|
|
129
|
+
Issue: Another problem
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This fails because of the **box-drawing `────` separators between items**, no stable finding numbers, no severity-grouped `###` headers, no `## Code Review Results` title, and a verdict not set apart. The `────` rules and missing structure are the problem — `Field:`-prefixed lines are not themselves banned, but here they carry no stable numbers and bury depth. Prefer a terse table or a keyed list; put depth in a per-finding detail line (`- **#N** — …`), not in box-drawn blocks.
|
|
133
|
+
|
|
134
|
+
## Formatting Rules
|
|
135
|
+
|
|
136
|
+
- **ASCII-safe only** -- never box-drawing characters or per-item horizontal-rule separators (`────`) between entries (the report-level `---` before the verdict is still required), no Unicode arrows or middot; use `->`. Tables are a good default but not mandatory -- let the shape serve the finding type (`references/finish-review.md`, Stage 6); stay consistent within a section
|
|
137
|
+
- **Escape literal `|` in table cells** -- any `|` inside a finding title, issue description, code snippet, regex pattern, or delimited-string example must be written as `\|`. Unescaped pipes are parsed as column separators and corrupt the row's `Reviewer` and `Confidence` columns (and `Route` in the Actionable Findings table). Applies especially to cache-key delimiter examples, regex alternations, and logical-OR operators quoted inside findings.
|
|
138
|
+
- **Severity-grouped sections** -- `### P0 -- Critical`, `### P1 -- High`, `### P2 -- Moderate`, `### P3 -- Low`. Omit empty severity levels.
|
|
139
|
+
- **Stable sequential finding numbers** -- assign finding numbers once after sorting, continue them across severity sections, and reuse those same numbers when findings are repeated in Actionable Findings. Do not restart at `1` for each severity or route bucket.
|
|
140
|
+
- **Always include file:line location** for code review issues
|
|
141
|
+
- **Reviewer column** shows which persona(s) flagged the issue. Multiple reviewers = cross-reviewer agreement.
|
|
142
|
+
- **Confidence column** shows the finding's anchor as an integer (`50`, `75`, or `100`). Never render as a float.
|
|
143
|
+
- **No `Route` column in the per-severity tables** -- the synthesized route (``<autofix_class> -> <owner>``) appears only in the Actionable Findings table and the `mode:agent` JSON. The scannable severity tables are 5 columns: `# | File | Issue | Reviewer | Confidence`.
|
|
144
|
+
- **Detail line (per finding, as needed)** -- keep the scannable line short (the symptom + `file:line`, not the mechanism); put the why-it-matters + fix/options in a per-finding detail line keyed by stable `#`: `- **#N** — <why it matters + what response it needs>`. Add it whenever the one-liner isn't self-sufficient -- usually P0/P1; P2/P3 are often terse-only. This keyed detail is the home for depth -- don't paste code or restate the diff, and match weight to weight.
|
|
145
|
+
- **Header includes** scope, intent, and reviewer team with per-conditional justifications
|
|
146
|
+
- **Mode line** -- include `markdown report-only`, `markdown local-apply`, or `agent report-only`
|
|
147
|
+
- **Triage Groups section (when groups exist)** -- pipe table `| Group | Findings | Context | Preferred Resolution | Why |` rendered after Applied and before the severity tables. The `Findings` cell lists stable `#`s (e.g. `#2, #3`); every referenced `#` must appear in a severity table below. Groups are a triage lens over the findings -- they never replace the severity tables, merge findings, or renumber them. Omit when `grouping:off` is active or no groups survived Stage 5b/5c pruning.
|
|
148
|
+
- **Applied section (explicit local apply only)** -- when Stage 5c was authorized and applied fixes, list them first, before the severity tables, as `# | File | Fix | Reviewer` followed by a one-line validation outcome (e.g. "suite 214 pass, lint clean") and the **commit status** — committed as an isolated review-labeled fix commit (`fix(review): …`, or the repo's nearest convention when `review` isn't an allowed scope) when the working tree was clean before the review, or left uncommitted (for the user's commit) when it was already dirty. A fix spanning multiple files is **one row with one `#`** (e.g. `controller.rb:88 (+test)`) -- never duplicate the number across rows. Flag green-but-unverifiable edits (auth/contract/concurrency) inline in the `Fix` cell, e.g. `(security-posture — verify in diff)`. Applied findings keep their stable `#` and appear only here, not in the severity tables. Omit when local apply was not authorized or nothing was applied
|
|
149
|
+
- **Actionable Findings section** -- include when the actionable queue is non-empty (findings for the caller to handle)
|
|
150
|
+
- **Pre-existing section** -- separate table, no confidence column (these are informational)
|
|
151
|
+
- **Learnings & Past Solutions section** -- results from the `learnings-researcher` local prompt asset, with links to <root>/solutions/ files
|
|
152
|
+
- **Agent-Native Gaps section** -- results from the `agent-native-reviewer` local prompt asset. Omit if no gaps found.
|
|
153
|
+
- **Deployment Notes section** -- key checklist items from the `deployment-verification-agent` local prompt asset. Omit if the prompt did not run. Schema drift surfaces as `data-migration` findings — no separate section.
|
|
154
|
+
- **Coverage section** -- suppressed count, validation outcome counts when Stage 5b ran (confirmed, rejected, unresolved, malformed, failed, shortcut-skipped) with the reason for each non-confirmed outcome, removable surface (only when deletion-oriented maintainability findings exist; approximate net lines/files removable if applied -- a dead-weight signal, never a reduction target, omit otherwise), residual risks, testing gaps, failed reviewers
|
|
155
|
+
- **Summary uses blockquotes** for verdict, reasoning, and fix order
|
|
156
|
+
- **Horizontal rule** (`---`) separates findings from verdict
|
|
157
|
+
- **`###` headers** for each section -- never plain text headers
|
|
158
|
+
|
|
159
|
+
## Agent mode (JSON)
|
|
160
|
+
|
|
161
|
+
When `mode:agent` is active, **do not** emit the markdown table report above. Emit **one parseable JSON object** as the primary response and write the same payload to `review.json` under the resolved `<run-dir>`.
|
|
162
|
+
|
|
163
|
+
The contract is defined in `references/modes-and-output.md` under **`## JSON output format (`mode:agent` only)`**. Minimum fields: `status`, `verdict`, `scope`, `intent`, `reviewers`, `findings`, `actionable_findings`, `artifact_path`, `run_id`.
|
|
164
|
+
|
|
165
|
+
Key differences from the human-facing markdown format:
|
|
166
|
+
|
|
167
|
+
- **No pipe-delimited tables** — findings are JSON arrays with merged fields (`#`, `title`, `severity`, `file`, `line`, `confidence`, `autofix_class`, `owner`, `suggested_fix`, `why_it_matters`, `evidence`, `reviewers`, etc.).
|
|
168
|
+
- **`actionable_findings`** — subset for caller apply workflows (`gated_auto` / `manual` with `downstream-resolver`).
|
|
169
|
+
- **`triage_groups`** — the markdown Triage Groups section serialized as `{title, findings: [<stable #s>], context, preferred_resolution, why}` objects, so callers can batch related fixes by theme. Groups span the full finding set — a triage lens, not an apply queue — so a caller must intersect each group's `findings` with `actionable_findings` before applying; the apply handoff stays `actionable_findings`. Empty when `grouping:off` or no groups.
|
|
170
|
+
- **No `applied_fixes` and no Applied section** — `mode:agent` does not apply fixes; the caller does. Applied work surfaces only in explicitly authorized local-apply markdown (Stage 5c/6). The handoff is `actionable_findings`.
|
|
171
|
+
- **Failure/degraded paths** — `{"status":"failed","reason":"..."}` or `"status":"degraded"` with reason; never mix markdown tables into the JSON response.
|
|
172
|
+
- **Stable `#`** — same numbering as Stage 5 synthesis, carried in JSON finding objects for downstream apply/residual tracking.
|