@winspan/claude-forge 9.2.0 → 9.12.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/DEVELOPMENT.md +80 -19
- package/README.md +13 -6
- package/dist/catalogs/agents.json +19 -24
- package/dist/catalogs/skills.json +139 -27
- package/dist/claudemd/templates/swarm-protocol.md +1 -1
- package/dist/cli/commands/agent.d.ts +169 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +690 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/codegraph.d.ts +17 -0
- package/dist/cli/commands/codegraph.d.ts.map +1 -0
- package/dist/cli/commands/codegraph.js +263 -0
- package/dist/cli/commands/codegraph.js.map +1 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -1
- package/dist/cli/commands/decisions.js +46 -9
- package/dist/cli/commands/decisions.js.map +1 -1
- package/dist/cli/commands/executions.d.ts.map +1 -1
- package/dist/cli/commands/executions.js +2 -1
- package/dist/cli/commands/executions.js.map +1 -1
- package/dist/cli/commands/insights-goal-check.d.ts +5 -1
- package/dist/cli/commands/insights-goal-check.d.ts.map +1 -1
- package/dist/cli/commands/insights-goal-check.js +15 -15
- package/dist/cli/commands/insights-goal-check.js.map +1 -1
- package/dist/cli/commands/knowledge.d.ts +51 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -1
- package/dist/cli/commands/knowledge.js +202 -29
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/loop.d.ts +95 -0
- package/dist/cli/commands/loop.d.ts.map +1 -0
- package/dist/cli/commands/loop.js +408 -0
- package/dist/cli/commands/loop.js.map +1 -0
- package/dist/cli/commands/maintenance.d.ts +33 -0
- package/dist/cli/commands/maintenance.d.ts.map +1 -0
- package/dist/cli/commands/maintenance.js +75 -0
- package/dist/cli/commands/maintenance.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +23 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +82 -0
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/skills.d.ts +131 -0
- package/dist/cli/commands/skills.d.ts.map +1 -1
- package/dist/cli/commands/skills.js +409 -9
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +9 -2
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/constants.d.ts +37 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +43 -0
- package/dist/core/constants.js.map +1 -1
- package/dist/core/diagnostics/checks.d.ts.map +1 -1
- package/dist/core/diagnostics/checks.js +2 -1
- package/dist/core/diagnostics/checks.js.map +1 -1
- package/dist/core/diagnostics/daemon-status.d.ts +1 -1
- package/dist/core/diagnostics/daemon-status.d.ts.map +1 -1
- package/dist/core/diagnostics/daemon-status.js +1 -1
- package/dist/core/diagnostics/daemon-status.js.map +1 -1
- package/dist/core/diagnostics/entropy-checks.d.ts +3 -2
- package/dist/core/diagnostics/entropy-checks.d.ts.map +1 -1
- package/dist/core/diagnostics/entropy-checks.js +10 -5
- package/dist/core/diagnostics/entropy-checks.js.map +1 -1
- package/dist/core/diagnostics/heartbeat-reader.d.ts +28 -0
- package/dist/core/diagnostics/heartbeat-reader.d.ts.map +1 -0
- package/dist/core/diagnostics/heartbeat-reader.js +50 -0
- package/dist/core/diagnostics/heartbeat-reader.js.map +1 -0
- package/dist/core/event-fields.d.ts +27 -0
- package/dist/core/event-fields.d.ts.map +1 -1
- package/dist/core/event-fields.js +43 -0
- package/dist/core/event-fields.js.map +1 -1
- package/dist/core/governance/global-inject.d.ts +34 -4
- package/dist/core/governance/global-inject.d.ts.map +1 -1
- package/dist/core/governance/global-inject.js +80 -25
- package/dist/core/governance/global-inject.js.map +1 -1
- package/dist/core/insights/agent-anchor-guard.d.ts +77 -0
- package/dist/core/insights/agent-anchor-guard.d.ts.map +1 -0
- package/dist/core/insights/agent-anchor-guard.js +119 -0
- package/dist/core/insights/agent-anchor-guard.js.map +1 -0
- package/dist/core/insights/agent-distill-context.d.ts +55 -0
- package/dist/core/insights/agent-distill-context.d.ts.map +1 -0
- package/dist/core/insights/agent-distill-context.js +146 -0
- package/dist/core/insights/agent-distill-context.js.map +1 -0
- package/dist/core/insights/agent-distill-spawn.d.ts +56 -0
- package/dist/core/insights/agent-distill-spawn.d.ts.map +1 -0
- package/dist/core/insights/agent-distill-spawn.js +179 -0
- package/dist/core/insights/agent-distill-spawn.js.map +1 -0
- package/dist/core/insights/agent-drift.d.ts +66 -0
- package/dist/core/insights/agent-drift.d.ts.map +1 -0
- package/dist/core/insights/agent-drift.js +109 -0
- package/dist/core/insights/agent-drift.js.map +1 -0
- package/dist/core/insights/agent-evolution-sources.d.ts +21 -0
- package/dist/core/insights/agent-evolution-sources.d.ts.map +1 -0
- package/dist/core/insights/agent-evolution-sources.js +36 -0
- package/dist/core/insights/agent-evolution-sources.js.map +1 -0
- package/dist/core/insights/agent-health.d.ts +142 -0
- package/dist/core/insights/agent-health.d.ts.map +1 -0
- package/dist/core/insights/agent-health.js +296 -0
- package/dist/core/insights/agent-health.js.map +1 -0
- package/dist/core/insights/agent-patch-apply.d.ts +45 -0
- package/dist/core/insights/agent-patch-apply.d.ts.map +1 -0
- package/dist/core/insights/agent-patch-apply.js +165 -0
- package/dist/core/insights/agent-patch-apply.js.map +1 -0
- package/dist/core/insights/agent-suggest.d.ts +128 -0
- package/dist/core/insights/agent-suggest.d.ts.map +1 -0
- package/dist/core/insights/agent-suggest.js +284 -0
- package/dist/core/insights/agent-suggest.js.map +1 -0
- package/dist/core/insights/coverage-tiers.d.ts +46 -0
- package/dist/core/insights/coverage-tiers.d.ts.map +1 -0
- package/dist/core/insights/coverage-tiers.js +95 -0
- package/dist/core/insights/coverage-tiers.js.map +1 -0
- package/dist/{daemon/services → core/insights}/experience-extractor.d.ts +0 -7
- package/dist/core/insights/experience-extractor.d.ts.map +1 -0
- package/dist/{daemon/services → core/insights}/experience-extractor.js +5 -9
- package/dist/core/insights/experience-extractor.js.map +1 -0
- package/dist/{daemon/services → core/insights}/violation-reporter.d.ts +20 -1
- package/dist/core/insights/violation-reporter.d.ts.map +1 -0
- package/dist/{daemon/services → core/insights}/violation-reporter.js +56 -4
- package/dist/core/insights/violation-reporter.js.map +1 -0
- package/dist/core/loop/loop-engine.d.ts +140 -0
- package/dist/core/loop/loop-engine.d.ts.map +1 -0
- package/dist/core/loop/loop-engine.js +266 -0
- package/dist/core/loop/loop-engine.js.map +1 -0
- package/dist/core/queue/index.d.ts.map +1 -1
- package/dist/core/queue/index.js +2 -1
- package/dist/core/queue/index.js.map +1 -1
- package/dist/core/storage/base.d.ts +159 -0
- package/dist/core/storage/base.d.ts.map +1 -1
- package/dist/core/storage/base.js +523 -0
- package/dist/core/storage/base.js.map +1 -1
- package/dist/core/storage/codegraph-types.d.ts +79 -0
- package/dist/core/storage/codegraph-types.d.ts.map +1 -0
- package/dist/core/storage/codegraph-types.js +14 -0
- package/dist/core/storage/codegraph-types.js.map +1 -0
- package/dist/core/storage/codegraph.d.ts +186 -0
- package/dist/core/storage/codegraph.d.ts.map +1 -0
- package/dist/core/storage/codegraph.js +452 -0
- package/dist/core/storage/codegraph.js.map +1 -0
- package/dist/core/storage/decisions.d.ts +30 -5
- package/dist/core/storage/decisions.d.ts.map +1 -1
- package/dist/core/storage/decisions.js +45 -13
- package/dist/core/storage/decisions.js.map +1 -1
- package/dist/core/storage/events.d.ts +127 -0
- package/dist/core/storage/events.d.ts.map +1 -1
- package/dist/core/storage/events.js +318 -3
- package/dist/core/storage/events.js.map +1 -1
- package/dist/core/storage/feedback.d.ts +3 -23
- package/dist/core/storage/feedback.d.ts.map +1 -1
- package/dist/core/storage/feedback.js +37 -38
- package/dist/core/storage/feedback.js.map +1 -1
- package/dist/core/storage/injections.d.ts +40 -0
- package/dist/core/storage/injections.d.ts.map +1 -1
- package/dist/core/storage/injections.js +69 -0
- package/dist/core/storage/injections.js.map +1 -1
- package/dist/core/storage/knowledge.d.ts +226 -0
- package/dist/core/storage/knowledge.d.ts.map +1 -1
- package/dist/core/storage/knowledge.js +391 -4
- package/dist/core/storage/knowledge.js.map +1 -1
- package/dist/core/storage/pipeline-rollup.d.ts +1 -7
- package/dist/core/storage/pipeline-rollup.d.ts.map +1 -1
- package/dist/core/storage/pipeline-rollup.js +18 -57
- package/dist/core/storage/pipeline-rollup.js.map +1 -1
- package/dist/core/storage/routing.d.ts +34 -0
- package/dist/core/storage/routing.d.ts.map +1 -1
- package/dist/core/storage/routing.js +92 -2
- package/dist/core/storage/routing.js.map +1 -1
- package/dist/core/storage/rows.d.ts +5 -25
- package/dist/core/storage/rows.d.ts.map +1 -1
- package/dist/core/storage/schema.sql +92 -27
- package/dist/core/storage/sessions.d.ts.map +1 -1
- package/dist/core/storage/sessions.js +2 -1
- package/dist/core/storage/sessions.js.map +1 -1
- package/dist/core/storage/skills.d.ts +159 -0
- package/dist/core/storage/skills.d.ts.map +1 -1
- package/dist/core/storage/skills.js +350 -4
- package/dist/core/storage/skills.js.map +1 -1
- package/dist/core/storage/sqlite.d.ts +81 -25
- package/dist/core/storage/sqlite.d.ts.map +1 -1
- package/dist/core/storage/sqlite.js +143 -45
- package/dist/core/storage/sqlite.js.map +1 -1
- package/dist/core/storage/tasks.d.ts +270 -0
- package/dist/core/storage/tasks.d.ts.map +1 -1
- package/dist/core/storage/tasks.js +495 -16
- package/dist/core/storage/tasks.js.map +1 -1
- package/dist/core/storage/tool-intercepts.d.ts +1 -1
- package/dist/core/storage/tool-intercepts.js +1 -1
- package/dist/core/types.d.ts +26 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils/binary-paths.d.ts +32 -0
- package/dist/core/utils/binary-paths.d.ts.map +1 -1
- package/dist/core/utils/binary-paths.js +52 -0
- package/dist/core/utils/binary-paths.js.map +1 -1
- package/dist/core/utils/claude-cli-resolver.d.ts.map +1 -0
- package/dist/{skills/distill → core/utils}/claude-cli-resolver.js +1 -1
- package/dist/core/utils/claude-cli-resolver.js.map +1 -0
- package/dist/core/utils/claude-cli-spawn.d.ts +1 -1
- package/dist/core/utils/claude-cli-spawn.js +2 -2
- package/dist/core/utils/claude-cli-spawn.js.map +1 -1
- package/dist/core/utils/noise-prompt.d.ts +1 -1
- package/dist/core/utils/noise-prompt.js +1 -1
- package/dist/core/utils/time.d.ts +26 -0
- package/dist/core/utils/time.d.ts.map +1 -1
- package/dist/core/utils/time.js +33 -0
- package/dist/core/utils/time.js.map +1 -1
- package/dist/daemon/config-store.d.ts.map +1 -1
- package/dist/daemon/config-store.js +14 -5
- package/dist/daemon/config-store.js.map +1 -1
- package/dist/daemon/event-parser.d.ts.map +1 -1
- package/dist/daemon/event-parser.js +5 -0
- package/dist/daemon/event-parser.js.map +1 -1
- package/dist/daemon/handlers/post-tool-use.d.ts +24 -16
- package/dist/daemon/handlers/post-tool-use.d.ts.map +1 -1
- package/dist/daemon/handlers/post-tool-use.js +76 -116
- package/dist/daemon/handlers/post-tool-use.js.map +1 -1
- package/dist/daemon/handlers/pre-tool-use.d.ts +35 -10
- package/dist/daemon/handlers/pre-tool-use.d.ts.map +1 -1
- package/dist/daemon/handlers/pre-tool-use.js +71 -38
- package/dist/daemon/handlers/pre-tool-use.js.map +1 -1
- package/dist/daemon/handlers/stop.d.ts +20 -0
- package/dist/daemon/handlers/stop.d.ts.map +1 -1
- package/dist/daemon/handlers/stop.js +96 -8
- package/dist/daemon/handlers/stop.js.map +1 -1
- package/dist/daemon/handlers/user-prompt.d.ts +16 -1
- package/dist/daemon/handlers/user-prompt.d.ts.map +1 -1
- package/dist/daemon/handlers/user-prompt.js +97 -56
- package/dist/daemon/handlers/user-prompt.js.map +1 -1
- package/dist/daemon/handlers/violation-content-backfill.d.ts +76 -0
- package/dist/daemon/handlers/violation-content-backfill.d.ts.map +1 -0
- package/dist/daemon/handlers/violation-content-backfill.js +167 -0
- package/dist/daemon/handlers/violation-content-backfill.js.map +1 -0
- package/dist/daemon/index.d.ts +19 -0
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +125 -200
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/rules/defaults.d.ts.map +1 -1
- package/dist/daemon/rules/defaults.js +151 -64
- package/dist/daemon/rules/defaults.js.map +1 -1
- package/dist/daemon/rules/types.d.ts +28 -22
- package/dist/daemon/rules/types.d.ts.map +1 -1
- package/dist/daemon/rules/workflow-defaults.js +9 -9
- package/dist/daemon/rules/workflow-defaults.js.map +1 -1
- package/dist/daemon/services/codegraph-sync.d.ts +94 -0
- package/dist/daemon/services/codegraph-sync.d.ts.map +1 -0
- package/dist/daemon/services/codegraph-sync.js +159 -0
- package/dist/daemon/services/codegraph-sync.js.map +1 -0
- package/dist/daemon/services/decision-hint.d.ts +47 -10
- package/dist/daemon/services/decision-hint.d.ts.map +1 -1
- package/dist/daemon/services/decision-hint.js +99 -24
- package/dist/daemon/services/decision-hint.js.map +1 -1
- package/dist/daemon/services/event-ttl-sweep.d.ts.map +1 -1
- package/dist/daemon/services/event-ttl-sweep.js +3 -2
- package/dist/daemon/services/event-ttl-sweep.js.map +1 -1
- package/dist/daemon/services/feedback-aggregator.d.ts +14 -26
- package/dist/daemon/services/feedback-aggregator.d.ts.map +1 -1
- package/dist/daemon/services/feedback-aggregator.js +23 -63
- package/dist/daemon/services/feedback-aggregator.js.map +1 -1
- package/dist/daemon/services/heartbeat-writer.d.ts +6 -15
- package/dist/daemon/services/heartbeat-writer.d.ts.map +1 -1
- package/dist/daemon/services/heartbeat-writer.js +7 -36
- package/dist/daemon/services/heartbeat-writer.js.map +1 -1
- package/dist/daemon/services/kb-injector.d.ts +1 -1
- package/dist/daemon/services/kb-injector.d.ts.map +1 -1
- package/dist/daemon/services/kb-injector.js +10 -2
- package/dist/daemon/services/kb-injector.js.map +1 -1
- package/dist/daemon/services/kb-rebuild-scheduler.d.ts +95 -0
- package/dist/daemon/services/kb-rebuild-scheduler.d.ts.map +1 -0
- package/dist/daemon/services/kb-rebuild-scheduler.js +149 -0
- package/dist/daemon/services/kb-rebuild-scheduler.js.map +1 -0
- package/dist/daemon/services/loop-hint.d.ts +139 -0
- package/dist/daemon/services/loop-hint.d.ts.map +1 -0
- package/dist/daemon/services/loop-hint.js +272 -0
- package/dist/daemon/services/loop-hint.js.map +1 -0
- package/dist/daemon/services/outcome-classification-service.js +1 -1
- package/dist/daemon/services/outcome-classification-service.js.map +1 -1
- package/dist/daemon/services/task-segmenter.d.ts +11 -0
- package/dist/daemon/services/task-segmenter.d.ts.map +1 -1
- package/dist/daemon/services/task-segmenter.js +48 -2
- package/dist/daemon/services/task-segmenter.js.map +1 -1
- package/dist/daemon/startup/maintenance-schedulers.d.ts +68 -0
- package/dist/daemon/startup/maintenance-schedulers.d.ts.map +1 -0
- package/dist/daemon/startup/maintenance-schedulers.js +294 -0
- package/dist/daemon/startup/maintenance-schedulers.js.map +1 -0
- package/dist/daemon/templates/agents/agent-retro-distiller.md +106 -0
- package/dist/daemon/templates/agents/claudemd-writer.md +1 -0
- package/dist/daemon/templates/agents/coder.md +165 -8
- package/dist/daemon/templates/agents/decision-maker.md +107 -21
- package/dist/daemon/templates/agents/doc-reviewer.md +4 -1
- package/dist/daemon/templates/agents/harness-debug-full.md +85 -3
- package/dist/daemon/templates/agents/knowledge-builder.md +1 -0
- package/dist/daemon/templates/agents/patch-applier.md +1 -0
- package/dist/daemon/templates/agents/planner.md +55 -3
- package/dist/daemon/templates/agents/safety-net-implementer.md +278 -0
- package/dist/daemon/templates/agents/skill-distiller.md +1 -0
- package/dist/daemon/templates/agents/task-boundary-classifier.md +1 -0
- package/dist/daemon/templates/agents/verify-agent.md +128 -5
- package/dist/hooks/stop.sh +7 -1
- package/dist/knowledge/builder.js +36 -7
- package/dist/knowledge/builder.js.map +1 -1
- package/dist/knowledge/constants.d.ts +10 -5
- package/dist/knowledge/constants.d.ts.map +1 -1
- package/dist/knowledge/constants.js +10 -5
- package/dist/knowledge/constants.js.map +1 -1
- package/dist/knowledge/graph/edge-extractor.d.ts +45 -0
- package/dist/knowledge/graph/edge-extractor.d.ts.map +1 -0
- package/dist/knowledge/graph/edge-extractor.js +242 -0
- package/dist/knowledge/graph/edge-extractor.js.map +1 -0
- package/dist/knowledge/graph/impact.d.ts +73 -0
- package/dist/knowledge/graph/impact.d.ts.map +1 -0
- package/dist/knowledge/graph/impact.js +94 -0
- package/dist/knowledge/graph/impact.js.map +1 -0
- package/dist/knowledge/graph/types.d.ts +22 -0
- package/dist/knowledge/graph/types.d.ts.map +1 -0
- package/dist/knowledge/graph/types.js +13 -0
- package/dist/knowledge/graph/types.js.map +1 -0
- package/dist/knowledge/prompt.d.ts +9 -0
- package/dist/knowledge/prompt.d.ts.map +1 -1
- package/dist/knowledge/prompt.js +17 -5
- package/dist/knowledge/prompt.js.map +1 -1
- package/dist/knowledge/query.d.ts +13 -0
- package/dist/knowledge/query.d.ts.map +1 -1
- package/dist/knowledge/query.js +107 -10
- package/dist/knowledge/query.js.map +1 -1
- package/dist/knowledge/repo-map.d.ts +11 -5
- package/dist/knowledge/repo-map.d.ts.map +1 -1
- package/dist/knowledge/repo-map.js +42 -3
- package/dist/knowledge/repo-map.js.map +1 -1
- package/dist/knowledge/validator.d.ts.map +1 -1
- package/dist/knowledge/validator.js +69 -2
- package/dist/knowledge/validator.js.map +1 -1
- package/dist/mcp/server.d.ts +64 -8
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +233 -18
- package/dist/mcp/server.js.map +1 -1
- package/dist/skills/distill/distiller.js +1 -1
- package/dist/skills/distill/distiller.js.map +1 -1
- package/dist/skills/distilled/distilled-api-design.md +4 -0
- package/dist/skills/distilled/distilled-brainstorming.md +79 -0
- package/dist/skills/distilled/distilled-brand-guidelines.md +86 -0
- package/dist/skills/distilled/distilled-canvas-design.md +128 -0
- package/dist/skills/distilled/distilled-claude-api.md +185 -0
- package/dist/skills/distilled/distilled-creator.md +5 -2
- package/dist/skills/distilled/distilled-dispatching-parallel-agents.md +136 -0
- package/dist/skills/distilled/distilled-doc-coauthoring.md +144 -0
- package/dist/skills/distilled/distilled-docx.md +231 -0
- package/dist/skills/distilled/distilled-executing-plans.md +85 -50
- package/dist/skills/distilled/distilled-finishing-a-development-branch.md +213 -0
- package/dist/skills/distilled/distilled-frontend-design.md +118 -0
- package/dist/skills/distilled/distilled-harness-engineering.md +1 -1
- package/dist/skills/distilled/distilled-receiving-code-review.md +185 -0
- package/dist/skills/distilled/distilled-subagent-driven-development.md +124 -0
- package/dist/skills/distilled/distilled-systematic-debugging.md +108 -260
- package/dist/skills/distilled/distilled-test-driven-development.md +432 -0
- package/dist/skills/distilled/distilled-using-superpowers.md +134 -0
- package/dist/skills/distilled/distilled-verification-before-completion.md +88 -78
- package/dist/skills/distilled/distilled-writing-skills.md +175 -0
- package/dist/skills/registry.d.ts +10 -50
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +7 -118
- package/dist/skills/registry.js.map +1 -1
- package/dist/skills/tools/pipeline-suggest.js +2 -2
- package/dist/skills/tools/pipeline-suggest.js.map +1 -1
- package/dist/skills/tools/skill-invoke.d.ts +2 -1
- package/dist/skills/tools/skill-invoke.d.ts.map +1 -1
- package/dist/skills/tools/skill-invoke.js +3 -1
- package/dist/skills/tools/skill-invoke.js.map +1 -1
- package/dist/web/analytics/anti-pattern-detector.d.ts.map +1 -1
- package/dist/web/analytics/anti-pattern-detector.js +6 -1
- package/dist/web/analytics/anti-pattern-detector.js.map +1 -1
- package/dist/web/analytics/drift-detector.d.ts +6 -0
- package/dist/web/analytics/drift-detector.d.ts.map +1 -1
- package/dist/web/analytics/drift-detector.js +15 -8
- package/dist/web/analytics/drift-detector.js.map +1 -1
- package/dist/web/analytics/weekly-report.d.ts +13 -0
- package/dist/web/analytics/weekly-report.d.ts.map +1 -1
- package/dist/web/analytics/weekly-report.js +17 -3
- package/dist/web/analytics/weekly-report.js.map +1 -1
- package/dist/web/routes/_helpers.d.ts +31 -0
- package/dist/web/routes/_helpers.d.ts.map +1 -1
- package/dist/web/routes/_helpers.js +33 -0
- package/dist/web/routes/_helpers.js.map +1 -1
- package/dist/web/routes/agent-distill.d.ts +49 -0
- package/dist/web/routes/agent-distill.d.ts.map +1 -0
- package/dist/web/routes/agent-distill.js +526 -0
- package/dist/web/routes/agent-distill.js.map +1 -0
- package/dist/web/routes/config.d.ts +56 -0
- package/dist/web/routes/config.d.ts.map +1 -0
- package/dist/web/routes/config.js +243 -0
- package/dist/web/routes/config.js.map +1 -0
- package/dist/web/routes/decisions.js +1 -1
- package/dist/web/routes/decisions.js.map +1 -1
- package/dist/web/routes/error-handler.d.ts +0 -4
- package/dist/web/routes/error-handler.d.ts.map +1 -1
- package/dist/web/routes/error-handler.js +0 -8
- package/dist/web/routes/error-handler.js.map +1 -1
- package/dist/web/routes/events.d.ts.map +1 -1
- package/dist/web/routes/events.js +2 -1
- package/dist/web/routes/events.js.map +1 -1
- package/dist/web/routes/insights.d.ts.map +1 -1
- package/dist/web/routes/insights.js +0 -0
- package/dist/web/routes/insights.js.map +1 -1
- package/dist/web/routes/knowledge.d.ts +43 -2
- package/dist/web/routes/knowledge.d.ts.map +1 -1
- package/dist/web/routes/knowledge.js +117 -6
- package/dist/web/routes/knowledge.js.map +1 -1
- package/dist/web/routes/pipeline.d.ts +0 -9
- package/dist/web/routes/pipeline.d.ts.map +1 -1
- package/dist/web/routes/pipeline.js +0 -4
- package/dist/web/routes/pipeline.js.map +1 -1
- package/dist/web/routes/rules.d.ts.map +1 -1
- package/dist/web/routes/rules.js +20 -6
- package/dist/web/routes/rules.js.map +1 -1
- package/dist/web/routes/sessions.d.ts.map +1 -1
- package/dist/web/routes/sessions.js +8 -7
- package/dist/web/routes/sessions.js.map +1 -1
- package/dist/web/routes/skill-stats.d.ts.map +1 -1
- package/dist/web/routes/skill-stats.js +153 -16
- package/dist/web/routes/skill-stats.js.map +1 -1
- package/dist/web/routes/skills-distill.js +1 -1
- package/dist/web/routes/skills-distill.js.map +1 -1
- package/dist/web/routes/stats.d.ts.map +1 -1
- package/dist/web/routes/stats.js +2 -1
- package/dist/web/routes/stats.js.map +1 -1
- package/dist/web/routes/task-timeline.d.ts +95 -19
- package/dist/web/routes/task-timeline.d.ts.map +1 -1
- package/dist/web/routes/task-timeline.js +344 -88
- package/dist/web/routes/task-timeline.js.map +1 -1
- package/dist/web/routes/tasks.d.ts.map +1 -1
- package/dist/web/routes/tasks.js +52 -30
- package/dist/web/routes/tasks.js.map +1 -1
- package/dist/web/routes/violations.d.ts +1 -1
- package/dist/web/routes/violations.d.ts.map +1 -1
- package/dist/web/routes/violations.js +3 -2
- package/dist/web/routes/violations.js.map +1 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +20 -0
- package/dist/web/server.js.map +1 -1
- package/dist/web/services/agent-distill-manager.d.ts +122 -0
- package/dist/web/services/agent-distill-manager.d.ts.map +1 -0
- package/dist/web/services/agent-distill-manager.js +397 -0
- package/dist/web/services/agent-distill-manager.js.map +1 -0
- package/dist/web/services/distill-manager.d.ts +47 -0
- package/dist/web/services/distill-manager.d.ts.map +1 -1
- package/dist/web/services/distill-manager.js +103 -0
- package/dist/web/services/distill-manager.js.map +1 -1
- package/dist/web/static/assets/AgentDetailPage-DlUeA1sX.js +2 -0
- package/dist/web/static/assets/AgentDetailPage-DlUeA1sX.js.map +1 -0
- package/dist/web/static/assets/AgentDistillRunPage-Cybo4bii.js +3 -0
- package/dist/web/static/assets/AgentDistillRunPage-Cybo4bii.js.map +1 -0
- package/dist/web/static/assets/AgentsPage-Qd9FExLG.js +2 -0
- package/dist/web/static/assets/AgentsPage-Qd9FExLG.js.map +1 -0
- package/dist/web/static/assets/DaemonHealthPage-DTSVqtrI.js +2 -0
- package/dist/web/static/assets/DaemonHealthPage-DTSVqtrI.js.map +1 -0
- package/dist/web/static/assets/DecisionDetailPage-b4BA8dhc.js +2 -0
- package/dist/web/static/assets/DecisionDetailPage-b4BA8dhc.js.map +1 -0
- package/dist/web/static/assets/DecisionsPage-a3NRo_T7.js +2 -0
- package/dist/web/static/assets/DecisionsPage-a3NRo_T7.js.map +1 -0
- package/dist/web/static/assets/DiagnosticsPage-DIVdiIQG.js +2 -0
- package/dist/web/static/assets/DiagnosticsPage-DIVdiIQG.js.map +1 -0
- package/dist/web/static/assets/DistillDetailPage-U6a3l2iP.js +4 -0
- package/dist/web/static/assets/DistillDetailPage-U6a3l2iP.js.map +1 -0
- package/dist/web/static/assets/DistillPage-O7BHtRN8.js +2 -0
- package/dist/web/static/assets/DistillPage-O7BHtRN8.js.map +1 -0
- package/dist/web/static/assets/DistillRunPage-D1JuRWWr.js +2 -0
- package/dist/web/static/assets/DistillRunPage-D1JuRWWr.js.map +1 -0
- package/dist/web/static/assets/GlobalScopeHint-Q3wTJx3F.js +2 -0
- package/dist/web/static/assets/GlobalScopeHint-Q3wTJx3F.js.map +1 -0
- package/dist/web/static/assets/IssueDetailPage-BDfrtk2C.js +2 -0
- package/dist/web/static/assets/IssueDetailPage-BDfrtk2C.js.map +1 -0
- package/dist/web/static/assets/IssuesPage-SKmhlCrw.js +2 -0
- package/dist/web/static/assets/IssuesPage-SKmhlCrw.js.map +1 -0
- package/dist/web/static/assets/KbDetailPage-Yna86Na8.js +2 -0
- package/dist/web/static/assets/KbDetailPage-Yna86Na8.js.map +1 -0
- package/dist/web/static/assets/KbHitsPage-Cljl7H9p.js +2 -0
- package/dist/web/static/assets/KbHitsPage-Cljl7H9p.js.map +1 -0
- package/dist/web/static/assets/{MarkdownRenderer-DZmTl-8J.js → MarkdownRenderer-DlDQNihj.js} +2 -2
- package/dist/web/static/assets/{MarkdownRenderer-DZmTl-8J.js.map → MarkdownRenderer-DlDQNihj.js.map} +1 -1
- package/dist/web/static/assets/NotFound-LMzbP51V.js +2 -0
- package/dist/web/static/assets/{NotFound-BQPh0vaF.js.map → NotFound-LMzbP51V.js.map} +1 -1
- package/dist/web/static/assets/SettingsPage-DzoK4PKg.js +2 -0
- package/dist/web/static/assets/SettingsPage-DzoK4PKg.js.map +1 -0
- package/dist/web/static/assets/SkillDetailPage-BuBJJ_NX.js +2 -0
- package/dist/web/static/assets/SkillDetailPage-BuBJJ_NX.js.map +1 -0
- package/dist/web/static/assets/SkillsPage-aojkJpBc.js +2 -0
- package/dist/web/static/assets/SkillsPage-aojkJpBc.js.map +1 -0
- package/dist/web/static/assets/TaskDetailPage-1ckxnGhw.js +4 -0
- package/dist/web/static/assets/TaskDetailPage-1ckxnGhw.js.map +1 -0
- package/dist/web/static/assets/TasksHubPage-C2PLh3eg.js +6 -0
- package/dist/web/static/assets/TasksHubPage-C2PLh3eg.js.map +1 -0
- package/dist/web/static/assets/WorkplacePage-DHrp5VxS.js +2 -0
- package/dist/web/static/assets/WorkplacePage-DHrp5VxS.js.map +1 -0
- package/dist/web/static/assets/arco-DV6xCLhr.js +14 -0
- package/dist/web/static/assets/arco-DV6xCLhr.js.map +1 -0
- package/dist/web/static/assets/charts-BSV4cyC4.js +37 -0
- package/dist/web/static/assets/charts-BSV4cyC4.js.map +1 -0
- package/dist/web/static/assets/{index-7bl3kbcx.css → index-B_v_MKlb.css} +1 -1
- package/dist/web/static/assets/index-DileOOE4.js +4 -0
- package/dist/web/static/assets/index-DileOOE4.js.map +1 -0
- package/dist/web/static/assets/markdown-CA7ePUts.js +30 -0
- package/dist/web/static/assets/markdown-CA7ePUts.js.map +1 -0
- package/dist/web/static/assets/{outcome-DUn1NjlC.js → outcome-BKGy9azt.js} +2 -2
- package/dist/web/static/assets/{outcome-DUn1NjlC.js.map → outcome-BKGy9azt.js.map} +1 -1
- package/dist/web/static/assets/{query-S6X1S7K9.js → query-CgCOpYWf.js} +2 -2
- package/dist/web/static/assets/{query-S6X1S7K9.js.map → query-CgCOpYWf.js.map} +1 -1
- package/dist/web/static/assets/{react-router-JVUrkhdd.js → react-router-Cxmg8RuL.js} +3 -3
- package/dist/web/static/assets/{react-router-JVUrkhdd.js.map → react-router-Cxmg8RuL.js.map} +1 -1
- package/dist/web/static/assets/{syntax-highlighter-BkZfCDsz.js → syntax-highlighter-BDYycNja.js} +3 -3
- package/dist/web/static/assets/{syntax-highlighter-BkZfCDsz.js.map → syntax-highlighter-BDYycNja.js.map} +1 -1
- package/dist/web/static/assets/task-title-BhOcemuR.js +2 -0
- package/dist/web/static/assets/task-title-BhOcemuR.js.map +1 -0
- package/dist/web/static/assets/useAgentStats-B-uTgqBd.js +2 -0
- package/dist/web/static/assets/useAgentStats-B-uTgqBd.js.map +1 -0
- package/dist/web/static/assets/useDecisions-D-G2Ft5T.js +2 -0
- package/dist/web/static/assets/useDecisions-D-G2Ft5T.js.map +1 -0
- package/dist/web/static/assets/useDistill-21dZkXlT.js +3 -0
- package/dist/web/static/assets/useDistill-21dZkXlT.js.map +1 -0
- package/dist/web/static/assets/useEffectiveProject-DQiyX54y.js +2 -0
- package/dist/web/static/assets/useEffectiveProject-DQiyX54y.js.map +1 -0
- package/dist/web/static/assets/useIssuesFeed-CFiyQkAL.js +2 -0
- package/dist/web/static/assets/useIssuesFeed-CFiyQkAL.js.map +1 -0
- package/dist/web/static/assets/useKbHits-xKXWgqh9.js +2 -0
- package/dist/web/static/assets/useKbHits-xKXWgqh9.js.map +1 -0
- package/dist/web/static/assets/useSkillStats-B5hbIwdf.js +2 -0
- package/dist/web/static/assets/useSkillStats-B5hbIwdf.js.map +1 -0
- package/dist/web/static/assets/vendor-DS-q4Eyc.js +36 -0
- package/dist/web/static/assets/vendor-DS-q4Eyc.js.map +1 -0
- package/dist/web/static/index.html +6 -6
- package/package.json +5 -3
- package/dist/core/storage/workflow-recommendations.d.ts +0 -124
- package/dist/core/storage/workflow-recommendations.d.ts.map +0 -1
- package/dist/core/storage/workflow-recommendations.js +0 -274
- package/dist/core/storage/workflow-recommendations.js.map +0 -1
- package/dist/daemon/services/experience-extractor.d.ts.map +0 -1
- package/dist/daemon/services/experience-extractor.js.map +0 -1
- package/dist/daemon/services/violation-reporter.d.ts.map +0 -1
- package/dist/daemon/services/violation-reporter.js.map +0 -1
- package/dist/daemon/templates/agents/harness-hotfix.md +0 -99
- package/dist/daemon/templates/agents/hybrid-feature-with-safety.md +0 -104
- package/dist/daemon/templates/agents/refactor-specialist.md +0 -98
- package/dist/skills/distill/claude-cli-resolver.d.ts.map +0 -1
- package/dist/skills/distill/claude-cli-resolver.js.map +0 -1
- package/dist/skills/distilled/distilled-defi-amm-security.md +0 -293
- package/dist/skills/keyword-score.d.ts +0 -29
- package/dist/skills/keyword-score.d.ts.map +0 -1
- package/dist/skills/keyword-score.js +0 -54
- package/dist/skills/keyword-score.js.map +0 -1
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js +0 -2
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js.map +0 -1
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js +0 -2
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js.map +0 -1
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js +0 -3
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js.map +0 -1
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js +0 -2
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js.map +0 -1
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js +0 -2
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js.map +0 -1
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js +0 -2
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js.map +0 -1
- package/dist/web/static/assets/DriftTab-DqpepOhI.js +0 -2
- package/dist/web/static/assets/DriftTab-DqpepOhI.js.map +0 -1
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js +0 -3
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js.map +0 -1
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js +0 -2
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js.map +0 -1
- package/dist/web/static/assets/NotFound-BQPh0vaF.js +0 -2
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js +0 -2
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js.map +0 -1
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js +0 -2
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js.map +0 -1
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js +0 -2
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js.map +0 -1
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js +0 -2
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js.map +0 -1
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js +0 -2
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js.map +0 -1
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js +0 -6
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js.map +0 -1
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js +0 -3
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js.map +0 -1
- package/dist/web/static/assets/arco-Bhi3a6Qp.js +0 -14
- package/dist/web/static/assets/arco-Bhi3a6Qp.js.map +0 -1
- package/dist/web/static/assets/charts-BuHQWDbQ.js +0 -37
- package/dist/web/static/assets/charts-BuHQWDbQ.js.map +0 -1
- package/dist/web/static/assets/index-BIYnq1Dx.js +0 -4
- package/dist/web/static/assets/index-BIYnq1Dx.js.map +0 -1
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js +0 -2
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js.map +0 -1
- package/dist/web/static/assets/vendor-DWgdB1eY.js +0 -65
- package/dist/web/static/assets/vendor-DWgdB1eY.js.map +0 -1
- /package/dist/{skills/distill → core/utils}/claude-cli-resolver.d.ts +0 -0
|
@@ -1,306 +1,154 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: distilled-systematic-debugging
|
|
3
|
-
version: 0.
|
|
4
|
-
description: 'Distilled IT-universal skill: systematic-debugging (score 5/5)'
|
|
3
|
+
version: 0.2.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: systematic-debugging (score 4.5/5)'
|
|
5
5
|
spawn_agent: harness-debug-full
|
|
6
6
|
keywords:
|
|
7
7
|
- systematic
|
|
8
8
|
- debugging
|
|
9
|
-
- debug
|
|
10
|
-
- 调试
|
|
11
|
-
- bug
|
|
12
|
-
- 修复
|
|
13
|
-
- fix
|
|
14
|
-
- hotfix
|
|
15
|
-
- 报错
|
|
16
|
-
- 异常
|
|
17
|
-
- error
|
|
18
|
-
- 不工作
|
|
19
|
-
- 失败
|
|
20
|
-
- failed
|
|
21
|
-
- crash
|
|
22
|
-
- 问题
|
|
23
9
|
rubric_version: 2
|
|
24
10
|
distilled_from:
|
|
25
|
-
- upstream: https://github.com/
|
|
11
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
26
12
|
license: MIT
|
|
27
|
-
commit:
|
|
13
|
+
commit: f2cbfbefebbfef77321e4c9abc9e949826bea9d7
|
|
28
14
|
paths:
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
- systematic-debugging/SKILL.md
|
|
16
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
17
|
+
license: MIT
|
|
18
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
19
|
+
paths:
|
|
20
|
+
- agent-introspection-debugging/SKILL.md
|
|
21
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
22
|
+
license: MIT
|
|
23
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
24
|
+
paths:
|
|
25
|
+
- agent-introspection-debugging/SKILL.md
|
|
26
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
27
|
+
license: MIT
|
|
28
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
29
|
+
paths:
|
|
30
|
+
- agent-introspection-debugging/SKILL.md
|
|
31
|
+
distilled_at: '2026-06-15T00:55:01.895Z'
|
|
32
|
+
distilled_by: claude-code skill-distiller agent
|
|
33
|
+
it_universal_score: 4.5
|
|
33
34
|
it_universal_dims:
|
|
34
35
|
d1: 1
|
|
35
|
-
d2:
|
|
36
|
+
d2: 0.5
|
|
36
37
|
d3: 1
|
|
37
38
|
d4: 1
|
|
38
39
|
d5: 1
|
|
39
|
-
it_universal_rationale:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- 某个行为无法稳定复现,或复现路径不明确,导致无法有效定位根因
|
|
45
|
-
- 日志、监控或测试输出显示异常,但根因不清晰(如事件丢失、统计不一致、接口报错)
|
|
46
|
-
- 近期变更引入了回归,需要系统性地缩小问题范围
|
|
47
|
-
- 修复方案已实施,但缺乏验证手段确认根因已消除且无副作用
|
|
48
|
-
- 多个组件协作时出现边界问题(如队列堆积、认证失效、缓存失效),难以单点定位
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 核心原则
|
|
53
|
-
|
|
54
|
-
1. **先复现,再分析** — 未能稳定复现的 bug 无法被可靠修复;复现步骤本身就是对问题的精确描述。
|
|
55
|
-
2. **一次只验证一个假设** — 同时改多处会使因果关系模糊,导致"修好了但不知道为什么"。
|
|
56
|
-
3. **最小化修复,直指根因** — 绕过症状的补丁会积累技术债;修复应消除根本原因,而非掩盖表现。
|
|
57
|
-
4. **修复前先写能复现 bug 的测试** — 测试锁定预期行为,防止同一问题在未来悄然回归。
|
|
58
|
-
5. **日志优于猜测** — 在关键路径加可观测性(日志、指标、断言),让系统状态可见,而非依赖直觉推断。
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## 工作流
|
|
63
|
-
|
|
64
|
-
1. **复现**
|
|
65
|
-
记录完整上下文:运行环境、输入数据、期望行为、实际行为。确认 bug 可在受控条件下稳定触发,再进入下一步。
|
|
66
|
-
|
|
67
|
-
2. **收集信息**
|
|
68
|
-
查阅日志(服务日志、错误日志、审计日志)、检查监控指标、确认当前系统状态(进程是否运行、连接是否建立、队列是否堆积)。
|
|
69
|
-
|
|
70
|
-
3. **缩小范围**
|
|
71
|
-
使用二分法排查代码路径或配置项。借助版本控制工具(如 `git bisect`)定位引入问题的变更。逐层排除:网络层 → 服务层 → 业务逻辑层 → 持久层。
|
|
72
|
-
|
|
73
|
-
4. **建立假设**
|
|
74
|
-
基于已有证据,清晰陈述一个可证伪的假设,例如:"问题出在 X 组件的 Y 行为上,因为观察到 Z 现象。"
|
|
75
|
-
|
|
76
|
-
5. **验证假设**
|
|
77
|
-
通过最小化实验(添加日志、临时断言、单元测试、隔离调用)验证或推翻假设。若推翻,返回步骤 4 建立新假设。
|
|
78
|
-
|
|
79
|
-
6. **实施修复**
|
|
80
|
-
先写一个能复现 bug 的测试,再实施最小化修复。修复应针对根因,而非症状。避免在同一 PR 中混入无关重构。
|
|
81
|
-
|
|
82
|
-
7. **验证修复**
|
|
83
|
-
确认:① 原始 bug 不再复现;② 新增测试通过;③ 现有测试套件无回归;④ 边界场景(空输入、并发、超时)行为符合预期。
|
|
84
|
-
|
|
85
|
-
8. **记录与沉淀**
|
|
86
|
-
将根因分析、修复思路、关键决策记录到项目知识库或 PR 描述中,供团队后续参考。
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## 反模式
|
|
91
|
-
|
|
92
|
-
- **靠猜测修复**:跳过复现和假设验证,直接"试一试"改代码。表面上节省时间,实际上引入更多不确定性,且无法确认问题是否真正解决。
|
|
93
|
-
|
|
94
|
-
- **同时修改多处**:一次性改动多个可疑点,导致无法判断哪个改动起了作用,也无法安全回滚单一变更。
|
|
95
|
-
|
|
96
|
-
- **修复症状而非根因**:例如用重试掩盖超时、用默认值掩盖空指针,问题会在不同场景下以新面目重现。
|
|
97
|
-
|
|
98
|
-
- **跳过回归验证**:修复后只确认原始场景通过,未运行完整测试套件,导致隐性回归流入主干。
|
|
99
|
-
|
|
100
|
-
- **不记录调试过程**:团队成员在未来遇到相同问题时重复投入相同的排查成本,知识无法复用。
|
|
101
|
-
|
|
40
|
+
it_universal_rationale: >-
|
|
41
|
+
Four-phase root-cause methodology (investigate → pattern → hypothesis → implement) with a
|
|
42
|
+
3+-failures-means-architectural-problem heuristic; language- and toolchain-neutral; directly
|
|
43
|
+
portable to any debugging session in any codebase.
|
|
102
44
|
---
|
|
103
45
|
|
|
104
|
-
|
|
46
|
+
# Systematic Debugging
|
|
105
47
|
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- [ ] 关键边界场景(并发、超时、空输入、服务不可达)已验证
|
|
112
|
-
- [ ] 修复内容最小化,未混入无关变更
|
|
113
|
-
- [ ] 根因分析和修复决策已记录(PR 描述、知识库条目或注释)
|
|
48
|
+
## When to use
|
|
49
|
+
- Any test failure, bug report, or unexpected behaviour — before proposing fixes
|
|
50
|
+
- Performance problems, build failures, integration breakage
|
|
51
|
+
- **Especially** when under time pressure, when an "obvious" fix hasn't worked, or when you've already tried multiple fixes
|
|
52
|
+
- **Do not skip** for "simple" bugs — simple bugs have root causes too; the process is fast for them
|
|
114
53
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## 适用范围
|
|
118
|
-
|
|
119
|
-
本技能适用于以下通用层次,与具体技术栈无关:
|
|
120
|
-
|
|
121
|
-
- **后端服务**:接口报错、事件处理异常、队列堆积、认证失效、重试逻辑错误
|
|
122
|
-
- **持久层**:Schema 迁移失败、数据不一致、索引冲突、聚合统计偏差
|
|
123
|
-
- **前端 / 客户端**:状态同步异常、渲染错误、网络请求失败
|
|
124
|
-
- **CLI 工具**:命令行参数解析错误、配置读取失败、进程通信异常
|
|
125
|
-
- **调度器 / 后台任务**:任务重复执行、任务丢失、TTL 超期处理异常
|
|
126
|
-
- **知识库 / 构建流水线**:增量构建缓存失效、降级占位未自愈、依赖缺失导致的静默失败
|
|
127
|
-
|
|
128
|
-
> // 项目特定,复用时跳过
|
|
129
|
-
>
|
|
130
|
-
> 对于使用本地 Unix socket 通信的守护进程架构,常见的额外排查点包括:socket 文件是否存在(`lsof -U`)、认证 token 是否在进程重启后同步、事件队列文件是否因守护进程不可达而堆积。这些属于该架构模式的特定表现,通用调试流程同样适用。
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## 上游对照
|
|
135
|
-
|
|
136
|
-
本技能综合自以下上游来源:
|
|
54
|
+
## Core idea
|
|
137
55
|
|
|
138
|
-
|
|
56
|
+
Random fixes waste time and create new bugs; symptom-level patches mask underlying issues.
|
|
57
|
+
The core principle is: always find the root cause before attempting any fix.
|
|
58
|
+
The methodology gates progress through four sequential phases — Root Cause → Pattern Analysis → Hypothesis Testing → Implementation — so each phase must be complete before the next begins.
|
|
59
|
+
The payoff is measurable: systematic debugging takes 15–30 minutes versus 2–3 hours of guess-and-check thrashing, with a first-time fix rate near 95 % versus ≈ 40 %.
|
|
60
|
+
The single most important escalation heuristic: **if three or more distinct fixes have failed, stop fixing symptoms and question the architecture.**
|
|
139
61
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 示例(伪代码)
|
|
145
|
-
|
|
146
|
-
以下以"后端服务事件处理后持久层未更新"为场景,演示完整调试流程。
|
|
147
|
-
|
|
148
|
-
### 场景描述
|
|
149
|
-
|
|
150
|
-
用户触发某操作后,查询接口返回的数据未反映该操作,但操作本身没有报错。
|
|
151
|
-
|
|
152
|
-
### 步骤 1:复现
|
|
62
|
+
## The Iron Law
|
|
153
63
|
|
|
154
64
|
```
|
|
155
|
-
|
|
156
|
-
输入:POST /events { type: "user_action", payload: {...} }
|
|
157
|
-
期望:GET /events 返回列表中包含新事件
|
|
158
|
-
实际:GET /events 返回列表中不包含新事件
|
|
159
|
-
可稳定复现:是
|
|
65
|
+
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
|
|
160
66
|
```
|
|
161
67
|
|
|
162
|
-
|
|
68
|
+
If Phase 1 is incomplete, no fix may be proposed.
|
|
163
69
|
|
|
164
|
-
|
|
165
|
-
// 检查服务是否正在运行
|
|
166
|
-
check_process_running("backend-service")
|
|
70
|
+
## Steps
|
|
167
71
|
|
|
168
|
-
|
|
169
|
-
tail_logs("backend-service", level="warn|error", lines=100)
|
|
72
|
+
### Phase 1 — Root Cause Investigation
|
|
170
73
|
|
|
171
|
-
|
|
172
|
-
check_connection("persistence-layer")
|
|
74
|
+
1. **Read error messages completely.** Do not skim warnings; read stack traces to the bottom; note exact line numbers, file paths, and error codes. They often contain the solution.
|
|
173
75
|
|
|
174
|
-
|
|
175
|
-
count_pending_items("event-queue")
|
|
176
|
-
```
|
|
76
|
+
2. **Reproduce consistently.** Establish exact reproduction steps. If the issue is not reliably reproducible, gather more data — do not guess.
|
|
177
77
|
|
|
178
|
-
|
|
78
|
+
3. **Check recent changes.** Review git diff, recent commits, new dependencies, config changes, and environment differences. Something changed; find it.
|
|
179
79
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
80
|
+
4. **Instrument boundaries in multi-component systems.**
|
|
81
|
+
For any system with multiple layers (e.g., API → service → database; build → sign → deploy):
|
|
82
|
+
- At each component boundary, log what data *enters* and what *exits*
|
|
83
|
+
- Verify config/environment propagation at every layer
|
|
84
|
+
- **Run once to collect evidence** showing *where* it breaks
|
|
85
|
+
- Analyse that evidence to identify the failing component
|
|
86
|
+
- Only then investigate that specific component in depth
|
|
184
87
|
|
|
185
|
-
|
|
186
|
-
|
|
88
|
+
5. **Trace data flow for deep call-stack errors.**
|
|
89
|
+
Start at the failing point and trace backwards: what called this with the bad value? Keep tracing up the call chain until you find the origination point. Fix at the source, not at the symptom.
|
|
187
90
|
|
|
188
|
-
|
|
189
|
-
→ 在写入操作前后加日志,确认 insert/upsert 被执行
|
|
91
|
+
### Phase 2 — Pattern Analysis
|
|
190
92
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
发现:`layer_4` 的日志显示 `warn: insert failed - unique constraint`,异常被静默忽略,函数返回了成功状态。
|
|
196
|
-
|
|
197
|
-
### 步骤 4:建立假设
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
假设:事件处理器在写入失败时静默忽略了唯一约束冲突,
|
|
201
|
-
导致调用方误认为写入成功,实际数据未持久化。
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### 步骤 5:验证假设
|
|
205
|
-
|
|
206
|
-
```pseudocode
|
|
207
|
-
// 构造触发唯一约束冲突的测试用例
|
|
208
|
-
test_case = {
|
|
209
|
-
description: "重复事件 ID 应返回错误或幂等成功",
|
|
210
|
-
input: duplicate_event_id,
|
|
211
|
-
expected: either ERROR or idempotent_success_with_existing_data
|
|
212
|
-
}
|
|
93
|
+
1. Find working examples of similar behaviour in the same codebase.
|
|
94
|
+
2. Read the reference implementation **completely** — never skim.
|
|
95
|
+
3. List every difference between working and broken, no matter how small.
|
|
96
|
+
4. Understand all dependencies: required config, environment assumptions, shared state.
|
|
213
97
|
|
|
214
|
-
|
|
215
|
-
// 结果:确认 handler 返回 success 但数据库无新行 → 假设成立
|
|
216
|
-
```
|
|
98
|
+
### Phase 3 — Hypothesis and Testing
|
|
217
99
|
|
|
218
|
-
|
|
100
|
+
1. **Form one specific hypothesis:** *"I think X is the root cause because Y."* Write it down.
|
|
101
|
+
2. Make the **smallest possible change** to test it — one variable at a time.
|
|
102
|
+
3. Did it work? → proceed to Phase 4. Did not work? → form a **new** hypothesis; do **not** stack additional fixes on top.
|
|
103
|
+
4. When you don't know, say so. Research or ask; do not pretend.
|
|
219
104
|
|
|
220
|
-
|
|
221
|
-
// 修复前:异常被静默
|
|
222
|
-
function handle_event(event):
|
|
223
|
-
try:
|
|
224
|
-
db.insert(event)
|
|
225
|
-
catch UniqueConstraintError as e:
|
|
226
|
-
log.warn("insert failed", e) // ← 静默,调用方不知道失败了
|
|
227
|
-
return { success: true } // ← 错误:返回了假成功
|
|
105
|
+
### Phase 4 — Implementation
|
|
228
106
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
```
|
|
107
|
+
1. **Create a failing test case first** — the simplest possible automated reproduction. The test must fail before the fix.
|
|
108
|
+
2. **Implement exactly one fix** that addresses the confirmed root cause. No "while I'm here" changes; no bundled refactoring.
|
|
109
|
+
3. **Verify:** test now passes, no regressions introduced, issue is actually resolved.
|
|
110
|
+
4. **If the fix doesn't work:** stop, return to Phase 1 with the new information gathered. Never attempt a fourth fix without re-investigating from scratch.
|
|
111
|
+
5. **If 3 or more fixes have failed — question the architecture.**
|
|
112
|
+
Signals of an architectural problem (not a symptom problem):
|
|
113
|
+
- Each fix reveals a new failure in a different place
|
|
114
|
+
- Fixes require "massive refactoring" to implement cleanly
|
|
115
|
+
- Fixing one symptom creates new symptoms elsewhere
|
|
116
|
+
|
|
117
|
+
At this point: stop, document the pattern, and discuss whether the underlying design needs to change before any more fixes are attempted.
|
|
241
118
|
|
|
242
|
-
|
|
119
|
+
## Anti-patterns
|
|
243
120
|
|
|
244
|
-
|
|
245
|
-
// TypeScript
|
|
246
|
-
async function handleEvent(event: Event): Promise<Result> {
|
|
247
|
-
try {
|
|
248
|
-
await db.insert(event);
|
|
249
|
-
return { success: true };
|
|
250
|
-
} catch (err) {
|
|
251
|
-
if (isUniqueConstraintError(err)) {
|
|
252
|
-
const existing = await db.findById(event.id);
|
|
253
|
-
return { success: true, idempotent: true, data: existing };
|
|
254
|
-
}
|
|
255
|
-
logger.error("insert failed", err);
|
|
256
|
-
throw err;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
```
|
|
121
|
+
Stop and return to Phase 1 whenever you catch yourself thinking:
|
|
260
122
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return Result(success=True, idempotent=True, data=existing)
|
|
270
|
-
except DatabaseError as e:
|
|
271
|
-
logger.error("insert failed: %s", e)
|
|
272
|
-
raise
|
|
273
|
-
```
|
|
123
|
+
- "Quick fix for now, investigate later"
|
|
124
|
+
- "Just try changing X and see if it works"
|
|
125
|
+
- "I'll add multiple changes at once and run tests"
|
|
126
|
+
- "It's probably X, let me fix that" — assumption without evidence
|
|
127
|
+
- "I don't fully understand, but this might work"
|
|
128
|
+
- "Pattern says X but I'll adapt it differently" — without reading it completely
|
|
129
|
+
- Proposing a solution before tracing the data flow
|
|
130
|
+
- "One more fix attempt" when two have already failed
|
|
274
131
|
|
|
275
|
-
|
|
276
|
-
// Go
|
|
277
|
-
func handleEvent(event Event) (Result, error) {
|
|
278
|
-
err := db.Insert(event)
|
|
279
|
-
if err == nil {
|
|
280
|
-
return Result{Success: true}, nil
|
|
281
|
-
}
|
|
282
|
-
if isUniqueConstraint(err) {
|
|
283
|
-
existing, _ := db.FindByID(event.ID)
|
|
284
|
-
return Result{Success: true, Idempotent: true, Data: existing}, nil
|
|
285
|
-
}
|
|
286
|
-
logger.Error("insert failed", "err", err)
|
|
287
|
-
return Result{}, err
|
|
288
|
-
}
|
|
289
|
-
```
|
|
132
|
+
### Common rationalisations
|
|
290
133
|
|
|
291
|
-
|
|
134
|
+
| Excuse | Reality |
|
|
135
|
+
|---|---|
|
|
136
|
+
| "Issue is simple, don't need process" | Simple issues have root causes. Process is fast for simple bugs. |
|
|
137
|
+
| "Emergency, no time for process" | Systematic debugging is faster than thrashing. |
|
|
138
|
+
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
|
|
139
|
+
| "I'll write the test after the fix works" | Untested fixes don't stick. A failing test first proves the fix. |
|
|
140
|
+
| "Multiple fixes at once saves time" | Can't isolate what worked; introduces new bugs. |
|
|
141
|
+
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
|
|
142
|
+
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question the design. |
|
|
292
143
|
|
|
293
|
-
|
|
294
|
-
run_test("重复事件 ID 返回幂等成功") // ✓ 通过
|
|
295
|
-
run_test("新事件正常写入并可查询") // ✓ 通过
|
|
296
|
-
run_test("数据库连接失败时错误向上传播") // ✓ 通过
|
|
297
|
-
run_full_test_suite() // ✓ 无回归
|
|
298
|
-
```
|
|
144
|
+
## Quick reference
|
|
299
145
|
|
|
300
|
-
|
|
146
|
+
| Phase | Key activities | Gate to move forward |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| 1 — Root Cause | Read errors; reproduce; check changes; instrument boundaries | Understand WHAT failed and WHY |
|
|
149
|
+
| 2 — Pattern | Find working examples; read reference completely; list differences | Root difference identified |
|
|
150
|
+
| 3 — Hypothesis | State single specific theory; test minimally | Confirmed or replaced with new hypothesis |
|
|
151
|
+
| 4 — Implementation | Failing test first; one fix; verify; escalate at 3 failures | Bug resolved, tests pass, no regressions |
|
|
301
152
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
修复:区分幂等冲突(返回已有数据)与真实错误(向上传播),消除假成功状态。
|
|
305
|
-
影响范围:所有依赖该 handler 返回值判断写入结果的调用方需确认行为符合预期。
|
|
306
|
-
```
|
|
153
|
+
## References
|
|
154
|
+
- Upstream: https://github.com/obra/superpowers.git
|