@winspan/claude-forge 8.54.4 → 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 +723 -46
- package/README.md +166 -21
- package/dist/catalogs/agents.json +67 -0
- package/dist/catalogs/skills.json +306 -0
- package/dist/claudemd/claudemd-generator.d.ts +45 -45
- package/dist/claudemd/claudemd-generator.d.ts.map +1 -1
- package/dist/claudemd/claudemd-generator.js +128 -449
- package/dist/claudemd/claudemd-generator.js.map +1 -1
- package/dist/claudemd/index.d.ts +14 -4
- package/dist/claudemd/index.d.ts.map +1 -1
- package/dist/claudemd/index.js +15 -4
- package/dist/claudemd/index.js.map +1 -1
- package/dist/claudemd/resume-manager.d.ts.map +1 -1
- package/dist/claudemd/resume-manager.js +37 -9
- package/dist/claudemd/resume-manager.js.map +1 -1
- package/dist/claudemd/templates/swarm-protocol.md +35 -186
- package/dist/claudemd/violations-manager.d.ts +40 -0
- package/dist/claudemd/violations-manager.d.ts.map +1 -0
- package/dist/claudemd/violations-manager.js +106 -0
- package/dist/claudemd/violations-manager.js.map +1 -0
- package/dist/cli/commands/admin.d.ts +15 -0
- package/dist/cli/commands/admin.d.ts.map +1 -0
- package/dist/cli/commands/admin.js +177 -0
- package/dist/cli/commands/admin.js.map +1 -0
- 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/agents.d.ts +18 -0
- package/dist/cli/commands/agents.d.ts.map +1 -0
- package/dist/cli/commands/agents.js +160 -0
- package/dist/cli/commands/agents.js.map +1 -0
- package/dist/cli/commands/bypass.d.ts +18 -0
- package/dist/cli/commands/bypass.d.ts.map +1 -0
- package/dist/cli/commands/bypass.js +87 -0
- package/dist/cli/commands/bypass.js.map +1 -0
- package/dist/cli/commands/claudemd.d.ts +60 -0
- package/dist/cli/commands/claudemd.d.ts.map +1 -1
- package/dist/cli/commands/claudemd.js +174 -37
- package/dist/cli/commands/claudemd.js.map +1 -1
- 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/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +94 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/daemon.d.ts +39 -0
- package/dist/cli/commands/daemon.d.ts.map +1 -1
- package/dist/cli/commands/daemon.js +167 -20
- package/dist/cli/commands/daemon.js.map +1 -1
- package/dist/cli/commands/decisions.d.ts +129 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/decisions.js +706 -0
- package/dist/cli/commands/decisions.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +29 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +124 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/entropy.d.ts +35 -0
- package/dist/cli/commands/entropy.d.ts.map +1 -0
- package/dist/cli/commands/entropy.js +121 -0
- package/dist/cli/commands/entropy.js.map +1 -0
- package/dist/cli/commands/executions.d.ts +1 -0
- package/dist/cli/commands/executions.d.ts.map +1 -1
- package/dist/cli/commands/executions.js +12 -2
- package/dist/cli/commands/executions.js.map +1 -1
- package/dist/cli/commands/fix.d.ts +31 -0
- package/dist/cli/commands/fix.d.ts.map +1 -0
- package/dist/cli/commands/fix.js +108 -0
- package/dist/cli/commands/fix.js.map +1 -0
- package/dist/cli/commands/governance.d.ts +21 -0
- package/dist/cli/commands/governance.d.ts.map +1 -0
- package/dist/cli/commands/governance.js +60 -0
- package/dist/cli/commands/governance.js.map +1 -0
- package/dist/cli/commands/init.d.ts +27 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +158 -146
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/insights-goal-check.d.ts +54 -0
- package/dist/cli/commands/insights-goal-check.d.ts.map +1 -0
- package/dist/cli/commands/insights-goal-check.js +318 -0
- package/dist/cli/commands/insights-goal-check.js.map +1 -0
- package/dist/cli/commands/insights.d.ts +15 -0
- package/dist/cli/commands/insights.d.ts.map +1 -0
- package/dist/cli/commands/insights.js +127 -0
- package/dist/cli/commands/insights.js.map +1 -0
- package/dist/cli/commands/knowledge.d.ts +117 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.js +1070 -0
- package/dist/cli/commands/knowledge.js.map +1 -0
- 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 +22 -11
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +93 -5
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/menu.d.ts.map +1 -1
- package/dist/cli/commands/menu.js +10 -184
- package/dist/cli/commands/menu.js.map +1 -1
- package/dist/cli/commands/project.d.ts +98 -0
- package/dist/cli/commands/project.d.ts.map +1 -0
- package/dist/cli/commands/project.js +382 -0
- package/dist/cli/commands/project.js.map +1 -0
- 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 +404 -118
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/spec.d.ts +40 -0
- package/dist/cli/commands/spec.d.ts.map +1 -0
- package/dist/cli/commands/spec.js +49 -0
- package/dist/cli/commands/spec.js.map +1 -0
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +11 -3
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +17 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/trace.d.ts.map +1 -1
- package/dist/cli/commands/trace.js +4 -9
- package/dist/cli/commands/trace.js.map +1 -1
- package/dist/cli/commands/violations.d.ts +14 -0
- package/dist/cli/commands/violations.d.ts.map +1 -0
- package/dist/cli/commands/violations.js +43 -0
- package/dist/cli/commands/violations.js.map +1 -0
- package/dist/cli/index.js +34 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/hook-manager.d.ts +1 -1
- package/dist/cli/init/hook-manager.d.ts.map +1 -1
- package/dist/cli/init/hook-manager.js +6 -0
- package/dist/cli/init/hook-manager.js.map +1 -1
- package/dist/cli/utils/resolve-session.d.ts +32 -0
- package/dist/cli/utils/resolve-session.d.ts.map +1 -0
- package/dist/cli/utils/resolve-session.js +39 -0
- package/dist/cli/utils/resolve-session.js.map +1 -0
- package/dist/core/config.d.ts +4 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +11 -23
- package/dist/core/config.js.map +1 -1
- package/dist/core/constants.d.ts +51 -13
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +63 -13
- package/dist/core/constants.js.map +1 -1
- package/dist/core/diagnostics/checks.d.ts +151 -0
- package/dist/core/diagnostics/checks.d.ts.map +1 -0
- package/dist/core/diagnostics/checks.js +766 -0
- package/dist/core/diagnostics/checks.js.map +1 -0
- package/dist/core/diagnostics/daemon-status.d.ts +77 -0
- package/dist/core/diagnostics/daemon-status.d.ts.map +1 -0
- package/dist/core/diagnostics/daemon-status.js +113 -0
- package/dist/core/diagnostics/daemon-status.js.map +1 -0
- package/dist/core/diagnostics/entropy-checks.d.ts +83 -0
- package/dist/core/diagnostics/entropy-checks.d.ts.map +1 -0
- package/dist/core/diagnostics/entropy-checks.js +400 -0
- package/dist/core/diagnostics/entropy-checks.js.map +1 -0
- package/dist/core/diagnostics/fix-runner.d.ts +54 -0
- package/dist/core/diagnostics/fix-runner.d.ts.map +1 -0
- package/dist/core/diagnostics/fix-runner.js +90 -0
- package/dist/core/diagnostics/fix-runner.js.map +1 -0
- 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/diagnostics/knip-runner.d.ts +49 -0
- package/dist/core/diagnostics/knip-runner.d.ts.map +1 -0
- package/dist/core/diagnostics/knip-runner.js +100 -0
- package/dist/core/diagnostics/knip-runner.js.map +1 -0
- package/dist/core/diagnostics/markers.d.ts +96 -0
- package/dist/core/diagnostics/markers.d.ts.map +1 -0
- package/dist/core/diagnostics/markers.js +153 -0
- package/dist/core/diagnostics/markers.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 +90 -0
- package/dist/core/governance/global-inject.d.ts.map +1 -0
- package/dist/core/governance/global-inject.js +184 -0
- package/dist/core/governance/global-inject.js.map +1 -0
- 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/core/insights/experience-extractor.d.ts +60 -0
- package/dist/core/insights/experience-extractor.d.ts.map +1 -0
- package/dist/core/insights/experience-extractor.js +319 -0
- package/dist/core/insights/experience-extractor.js.map +1 -0
- package/dist/core/insights/violation-reporter.d.ts +149 -0
- package/dist/core/insights/violation-reporter.d.ts.map +1 -0
- package/dist/core/insights/violation-reporter.js +391 -0
- 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 +16 -3
- package/dist/core/queue/index.d.ts.map +1 -1
- package/dist/core/queue/index.js +16 -4
- package/dist/core/queue/index.js.map +1 -1
- package/dist/core/storage/base.d.ts +317 -0
- package/dist/core/storage/base.d.ts.map +1 -1
- package/dist/core/storage/base.js +1093 -0
- package/dist/core/storage/base.js.map +1 -1
- package/dist/core/storage/codec/tool-input-codec.d.ts +93 -0
- package/dist/core/storage/codec/tool-input-codec.d.ts.map +1 -0
- package/dist/core/storage/codec/tool-input-codec.js +159 -0
- package/dist/core/storage/codec/tool-input-codec.js.map +1 -0
- 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 +387 -0
- package/dist/core/storage/decisions.d.ts.map +1 -0
- package/dist/core/storage/decisions.js +534 -0
- package/dist/core/storage/decisions.js.map +1 -0
- package/dist/core/storage/events.d.ts +239 -8
- package/dist/core/storage/events.d.ts.map +1 -1
- package/dist/core/storage/events.js +705 -39
- package/dist/core/storage/events.js.map +1 -1
- package/dist/core/storage/feedback.d.ts +111 -0
- package/dist/core/storage/feedback.d.ts.map +1 -0
- package/dist/core/storage/feedback.js +186 -0
- package/dist/core/storage/feedback.js.map +1 -0
- package/dist/core/storage/forge-config.d.ts +40 -0
- package/dist/core/storage/forge-config.d.ts.map +1 -0
- package/dist/core/storage/forge-config.js +65 -0
- package/dist/core/storage/forge-config.js.map +1 -0
- package/dist/core/storage/injections.d.ts +68 -0
- package/dist/core/storage/injections.d.ts.map +1 -1
- package/dist/core/storage/injections.js +131 -5
- package/dist/core/storage/injections.js.map +1 -1
- package/dist/core/storage/knowledge.d.ts +332 -0
- package/dist/core/storage/knowledge.d.ts.map +1 -0
- package/dist/core/storage/knowledge.js +589 -0
- package/dist/core/storage/knowledge.js.map +1 -0
- package/dist/core/storage/maintenance.d.ts +36 -9
- package/dist/core/storage/maintenance.d.ts.map +1 -1
- package/dist/core/storage/maintenance.js +56 -24
- package/dist/core/storage/maintenance.js.map +1 -1
- package/dist/core/storage/pipeline-rollup.d.ts +111 -0
- package/dist/core/storage/pipeline-rollup.d.ts.map +1 -0
- package/dist/core/storage/pipeline-rollup.js +432 -0
- package/dist/core/storage/pipeline-rollup.js.map +1 -0
- package/dist/core/storage/routing.d.ts +50 -3
- package/dist/core/storage/routing.d.ts.map +1 -1
- package/dist/core/storage/routing.js +131 -10
- package/dist/core/storage/routing.js.map +1 -1
- package/dist/core/storage/rows.d.ts +31 -8
- package/dist/core/storage/rows.d.ts.map +1 -1
- package/dist/core/storage/schema.sql +367 -23
- package/dist/core/storage/sessions.d.ts +136 -0
- package/dist/core/storage/sessions.d.ts.map +1 -1
- package/dist/core/storage/sessions.js +352 -15
- package/dist/core/storage/sessions.js.map +1 -1
- package/dist/core/storage/skills.d.ts +160 -0
- package/dist/core/storage/skills.d.ts.map +1 -1
- package/dist/core/storage/skills.js +368 -7
- package/dist/core/storage/skills.js.map +1 -1
- package/dist/core/storage/sqlite.d.ts +309 -20
- package/dist/core/storage/sqlite.d.ts.map +1 -1
- package/dist/core/storage/sqlite.js +523 -16
- package/dist/core/storage/sqlite.js.map +1 -1
- package/dist/core/storage/tasks.d.ts +744 -2
- package/dist/core/storage/tasks.d.ts.map +1 -1
- package/dist/core/storage/tasks.js +1691 -17
- package/dist/core/storage/tasks.js.map +1 -1
- package/dist/core/storage/tool-intercepts.d.ts +69 -0
- package/dist/core/storage/tool-intercepts.d.ts.map +1 -0
- package/dist/core/storage/tool-intercepts.js +116 -0
- package/dist/core/storage/tool-intercepts.js.map +1 -0
- package/dist/core/types.d.ts +136 -18
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +10 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils/backup.d.ts +81 -0
- package/dist/core/utils/backup.d.ts.map +1 -0
- package/dist/core/utils/backup.js +98 -0
- package/dist/core/utils/backup.js.map +1 -0
- package/dist/core/utils/binary-paths.d.ts +124 -0
- package/dist/core/utils/binary-paths.d.ts.map +1 -0
- package/dist/core/utils/binary-paths.js +218 -0
- package/dist/core/utils/binary-paths.js.map +1 -0
- package/dist/core/utils/bypass-token.d.ts +75 -0
- package/dist/core/utils/bypass-token.d.ts.map +1 -0
- package/dist/core/utils/bypass-token.js +133 -0
- package/dist/core/utils/bypass-token.js.map +1 -0
- package/dist/core/utils/cc-builtin-agents.d.ts +3 -0
- package/dist/core/utils/cc-builtin-agents.d.ts.map +1 -0
- package/dist/core/utils/cc-builtin-agents.js +29 -0
- package/dist/core/utils/cc-builtin-agents.js.map +1 -0
- package/dist/core/utils/claude-cli-resolver.d.ts +26 -0
- package/dist/core/utils/claude-cli-resolver.d.ts.map +1 -0
- package/dist/core/utils/claude-cli-resolver.js +115 -0
- package/dist/core/utils/claude-cli-resolver.js.map +1 -0
- package/dist/core/utils/claude-cli-spawn.d.ts +106 -0
- package/dist/core/utils/claude-cli-spawn.d.ts.map +1 -0
- package/dist/core/utils/claude-cli-spawn.js +219 -0
- package/dist/core/utils/claude-cli-spawn.js.map +1 -0
- package/dist/core/utils/forge-resume-block.d.ts.map +1 -1
- package/dist/core/utils/forge-resume-block.js +3 -2
- package/dist/core/utils/forge-resume-block.js.map +1 -1
- package/dist/core/utils/logger.d.ts +15 -3
- package/dist/core/utils/logger.d.ts.map +1 -1
- package/dist/core/utils/logger.js +20 -2
- package/dist/core/utils/logger.js.map +1 -1
- package/dist/core/utils/noise-prompt.d.ts +97 -0
- package/dist/core/utils/noise-prompt.d.ts.map +1 -0
- package/dist/core/utils/noise-prompt.js +127 -0
- package/dist/core/utils/noise-prompt.js.map +1 -0
- package/dist/core/utils/path.d.ts +0 -4
- package/dist/core/utils/path.d.ts.map +1 -1
- package/dist/core/utils/path.js +0 -7
- package/dist/core/utils/path.js.map +1 -1
- package/dist/core/utils/time.d.ts +67 -0
- package/dist/core/utils/time.d.ts.map +1 -1
- package/dist/core/utils/time.js +147 -0
- package/dist/core/utils/time.js.map +1 -1
- package/dist/daemon/agent-sync.d.ts +24 -0
- package/dist/daemon/agent-sync.d.ts.map +1 -0
- package/dist/daemon/agent-sync.js +114 -0
- package/dist/daemon/agent-sync.js.map +1 -0
- package/dist/daemon/config-store.d.ts +55 -0
- package/dist/daemon/config-store.d.ts.map +1 -0
- package/dist/daemon/config-store.js +146 -0
- package/dist/daemon/config-store.js.map +1 -0
- package/dist/daemon/event-parser.d.ts +22 -0
- package/dist/daemon/event-parser.d.ts.map +1 -1
- package/dist/daemon/event-parser.js +54 -3
- package/dist/daemon/event-parser.js.map +1 -1
- package/dist/daemon/handlers/history-exporter.d.ts.map +1 -1
- package/dist/daemon/handlers/history-exporter.js +9 -8
- package/dist/daemon/handlers/history-exporter.js.map +1 -1
- package/dist/daemon/handlers/post-tool-use.d.ts +66 -4
- package/dist/daemon/handlers/post-tool-use.d.ts.map +1 -1
- package/dist/daemon/handlers/post-tool-use.js +221 -8
- package/dist/daemon/handlers/post-tool-use.js.map +1 -1
- package/dist/daemon/handlers/pre-tool-use.d.ts +181 -0
- package/dist/daemon/handlers/pre-tool-use.d.ts.map +1 -0
- package/dist/daemon/handlers/pre-tool-use.js +618 -0
- package/dist/daemon/handlers/pre-tool-use.js.map +1 -0
- package/dist/daemon/handlers/stop.d.ts +55 -7
- package/dist/daemon/handlers/stop.d.ts.map +1 -1
- package/dist/daemon/handlers/stop.js +245 -8
- package/dist/daemon/handlers/stop.js.map +1 -1
- package/dist/daemon/handlers/user-prompt.d.ts +51 -14
- package/dist/daemon/handlers/user-prompt.d.ts.map +1 -1
- package/dist/daemon/handlers/user-prompt.js +223 -95
- 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/hook-sync.d.ts.map +1 -1
- package/dist/daemon/hook-sync.js +2 -1
- package/dist/daemon/hook-sync.js.map +1 -1
- package/dist/daemon/index.d.ts +19 -0
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +439 -86
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/lifecycle.d.ts +48 -1
- package/dist/daemon/lifecycle.d.ts.map +1 -1
- package/dist/daemon/lifecycle.js +98 -2
- package/dist/daemon/lifecycle.js.map +1 -1
- package/dist/daemon/router.d.ts +4 -1
- package/dist/daemon/router.d.ts.map +1 -1
- package/dist/daemon/router.js +4 -2
- package/dist/daemon/router.js.map +1 -1
- package/dist/daemon/rules/defaults.d.ts +20 -0
- package/dist/daemon/rules/defaults.d.ts.map +1 -0
- package/dist/daemon/rules/defaults.js +779 -0
- package/dist/daemon/rules/defaults.js.map +1 -0
- package/dist/daemon/rules/registry.d.ts +47 -0
- package/dist/daemon/rules/registry.d.ts.map +1 -0
- package/dist/daemon/rules/registry.js +84 -0
- package/dist/daemon/rules/registry.js.map +1 -0
- package/dist/daemon/rules/types.d.ts +176 -0
- package/dist/daemon/rules/types.d.ts.map +1 -0
- package/dist/daemon/rules/types.js +15 -0
- package/dist/daemon/rules/types.js.map +1 -0
- package/dist/daemon/rules/whitelist.d.ts +101 -0
- package/dist/daemon/rules/whitelist.d.ts.map +1 -0
- package/dist/daemon/rules/whitelist.js +210 -0
- package/dist/daemon/rules/whitelist.js.map +1 -0
- package/dist/daemon/rules/workflow-defaults.d.ts +52 -0
- package/dist/daemon/rules/workflow-defaults.d.ts.map +1 -0
- package/dist/daemon/rules/workflow-defaults.js +521 -0
- package/dist/daemon/rules/workflow-defaults.js.map +1 -0
- package/dist/daemon/server.d.ts +11 -1
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +7 -1
- package/dist/daemon/server.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/context-injector.d.ts +34 -0
- package/dist/daemon/services/context-injector.d.ts.map +1 -0
- package/dist/daemon/services/context-injector.js +61 -0
- package/dist/daemon/services/context-injector.js.map +1 -0
- package/dist/daemon/services/decision-hint.d.ts +240 -0
- package/dist/daemon/services/decision-hint.d.ts.map +1 -0
- package/dist/daemon/services/decision-hint.js +562 -0
- package/dist/daemon/services/decision-hint.js.map +1 -0
- package/dist/daemon/services/event-ttl-sweep.d.ts +86 -0
- package/dist/daemon/services/event-ttl-sweep.d.ts.map +1 -0
- package/dist/daemon/services/event-ttl-sweep.js +124 -0
- package/dist/daemon/services/event-ttl-sweep.js.map +1 -0
- package/dist/daemon/services/feedback-aggregator.d.ts +167 -0
- package/dist/daemon/services/feedback-aggregator.d.ts.map +1 -0
- package/dist/daemon/services/feedback-aggregator.js +415 -0
- package/dist/daemon/services/feedback-aggregator.js.map +1 -0
- package/dist/daemon/services/heartbeat-writer.d.ts +46 -0
- package/dist/daemon/services/heartbeat-writer.d.ts.map +1 -0
- package/dist/daemon/services/heartbeat-writer.js +82 -0
- package/dist/daemon/services/heartbeat-writer.js.map +1 -0
- package/dist/daemon/services/idle-session-sweeper.d.ts +61 -0
- package/dist/daemon/services/idle-session-sweeper.d.ts.map +1 -0
- package/dist/daemon/services/idle-session-sweeper.js +94 -0
- package/dist/daemon/services/idle-session-sweeper.js.map +1 -0
- package/dist/daemon/services/idle-task-budget.d.ts +50 -0
- package/dist/daemon/services/idle-task-budget.d.ts.map +1 -0
- package/dist/daemon/services/idle-task-budget.js +72 -0
- package/dist/daemon/services/idle-task-budget.js.map +1 -0
- package/dist/daemon/services/intercept-revive.d.ts +60 -0
- package/dist/daemon/services/intercept-revive.d.ts.map +1 -0
- package/dist/daemon/services/intercept-revive.js +86 -0
- package/dist/daemon/services/intercept-revive.js.map +1 -0
- package/dist/daemon/services/intercept-rollback-guard.d.ts +105 -0
- package/dist/daemon/services/intercept-rollback-guard.d.ts.map +1 -0
- package/dist/daemon/services/intercept-rollback-guard.js +152 -0
- package/dist/daemon/services/intercept-rollback-guard.js.map +1 -0
- package/dist/daemon/services/intercept-timeout-sweeper.d.ts +58 -0
- package/dist/daemon/services/intercept-timeout-sweeper.d.ts.map +1 -0
- package/dist/daemon/services/intercept-timeout-sweeper.js +83 -0
- package/dist/daemon/services/intercept-timeout-sweeper.js.map +1 -0
- package/dist/daemon/services/kb-injector.d.ts +57 -0
- package/dist/daemon/services/kb-injector.d.ts.map +1 -0
- package/dist/daemon/services/kb-injector.js +148 -0
- package/dist/daemon/services/kb-injector.js.map +1 -0
- 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.d.ts +49 -0
- package/dist/daemon/services/outcome-classification-service.d.ts.map +1 -0
- package/dist/daemon/services/outcome-classification-service.js +214 -0
- package/dist/daemon/services/outcome-classification-service.js.map +1 -0
- package/dist/daemon/services/outcome-classifier.d.ts +136 -0
- package/dist/daemon/services/outcome-classifier.d.ts.map +1 -0
- package/dist/daemon/services/outcome-classifier.js +178 -0
- package/dist/daemon/services/outcome-classifier.js.map +1 -0
- package/dist/daemon/services/outcome-nudge.d.ts +107 -0
- package/dist/daemon/services/outcome-nudge.d.ts.map +1 -0
- package/dist/daemon/services/outcome-nudge.js +242 -0
- package/dist/daemon/services/outcome-nudge.js.map +1 -0
- package/dist/daemon/services/spec-approval.d.ts +127 -0
- package/dist/daemon/services/spec-approval.d.ts.map +1 -0
- package/dist/daemon/services/spec-approval.js +216 -0
- package/dist/daemon/services/spec-approval.js.map +1 -0
- package/dist/daemon/services/spec-gate.d.ts +54 -0
- package/dist/daemon/services/spec-gate.d.ts.map +1 -0
- package/dist/daemon/services/spec-gate.js +113 -0
- package/dist/daemon/services/spec-gate.js.map +1 -0
- package/dist/daemon/services/task-boundary-classifier.d.ts +78 -0
- package/dist/daemon/services/task-boundary-classifier.d.ts.map +1 -0
- package/dist/daemon/services/task-boundary-classifier.js +202 -0
- package/dist/daemon/services/task-boundary-classifier.js.map +1 -0
- package/dist/daemon/services/task-segmenter.d.ts +230 -1
- package/dist/daemon/services/task-segmenter.d.ts.map +1 -1
- package/dist/daemon/services/task-segmenter.js +527 -17
- package/dist/daemon/services/task-segmenter.js.map +1 -1
- package/dist/daemon/skill-sync.d.ts +7 -2
- package/dist/daemon/skill-sync.d.ts.map +1 -1
- package/dist/daemon/skill-sync.js +114 -9
- package/dist/daemon/skill-sync.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 +102 -0
- package/dist/daemon/templates/agents/coder.md +262 -0
- package/dist/daemon/templates/agents/decision-maker.md +546 -0
- package/dist/daemon/templates/agents/doc-reviewer.md +118 -0
- package/dist/daemon/templates/agents/harness-debug-full.md +196 -0
- package/dist/daemon/templates/agents/knowledge-builder.md +120 -0
- package/dist/daemon/templates/agents/patch-applier.md +145 -0
- package/dist/daemon/templates/agents/planner.md +217 -0
- package/dist/daemon/templates/agents/safety-net-implementer.md +278 -0
- package/dist/daemon/templates/agents/skill-distiller.md +114 -0
- package/dist/daemon/templates/agents/task-boundary-classifier.md +65 -0
- package/dist/daemon/templates/agents/verify-agent.md +259 -0
- package/dist/daemon/utils/inject-block.d.ts +39 -0
- package/dist/daemon/utils/inject-block.d.ts.map +1 -0
- package/dist/daemon/utils/inject-block.js +25 -0
- package/dist/daemon/utils/inject-block.js.map +1 -0
- package/dist/hooks/hook-lib.sh +8 -0
- package/dist/hooks/notification.sh +19 -8
- package/dist/hooks/post-tool-use.sh +41 -23
- package/dist/hooks/pre-tool-use.sh +54 -23
- package/dist/hooks/session-start.sh +68 -0
- package/dist/hooks/stop.sh +31 -11
- package/dist/hooks/user-prompt-submit.sh +37 -21
- package/dist/knowledge/adapters/go-adapter.d.ts +65 -0
- package/dist/knowledge/adapters/go-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/go-adapter.js +294 -0
- package/dist/knowledge/adapters/go-adapter.js.map +1 -0
- package/dist/knowledge/adapters/index.d.ts +41 -0
- package/dist/knowledge/adapters/index.d.ts.map +1 -0
- package/dist/knowledge/adapters/index.js +71 -0
- package/dist/knowledge/adapters/index.js.map +1 -0
- package/dist/knowledge/adapters/java-adapter.d.ts +66 -0
- package/dist/knowledge/adapters/java-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/java-adapter.js +260 -0
- package/dist/knowledge/adapters/java-adapter.js.map +1 -0
- package/dist/knowledge/adapters/js-vue-adapter.d.ts +56 -0
- package/dist/knowledge/adapters/js-vue-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/js-vue-adapter.js +203 -0
- package/dist/knowledge/adapters/js-vue-adapter.js.map +1 -0
- package/dist/knowledge/adapters/kotlin-adapter.d.ts +55 -0
- package/dist/knowledge/adapters/kotlin-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/kotlin-adapter.js +209 -0
- package/dist/knowledge/adapters/kotlin-adapter.js.map +1 -0
- package/dist/knowledge/adapters/monorepo-adapter.d.ts +77 -0
- package/dist/knowledge/adapters/monorepo-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/monorepo-adapter.js +170 -0
- package/dist/knowledge/adapters/monorepo-adapter.js.map +1 -0
- package/dist/knowledge/adapters/python-adapter.d.ts +89 -0
- package/dist/knowledge/adapters/python-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/python-adapter.js +358 -0
- package/dist/knowledge/adapters/python-adapter.js.map +1 -0
- package/dist/knowledge/adapters/rust-adapter.d.ts +73 -0
- package/dist/knowledge/adapters/rust-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/rust-adapter.js +329 -0
- package/dist/knowledge/adapters/rust-adapter.js.map +1 -0
- package/dist/knowledge/adapters/types.d.ts +99 -0
- package/dist/knowledge/adapters/types.d.ts.map +1 -0
- package/dist/knowledge/adapters/types.js +17 -0
- package/dist/knowledge/adapters/types.js.map +1 -0
- package/dist/knowledge/adapters/typescript-adapter.d.ts +57 -0
- package/dist/knowledge/adapters/typescript-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/typescript-adapter.js +171 -0
- package/dist/knowledge/adapters/typescript-adapter.js.map +1 -0
- package/dist/knowledge/audit-applier.d.ts +70 -0
- package/dist/knowledge/audit-applier.d.ts.map +1 -0
- package/dist/knowledge/audit-applier.js +251 -0
- package/dist/knowledge/audit-applier.js.map +1 -0
- package/dist/knowledge/builder.d.ts +261 -0
- package/dist/knowledge/builder.d.ts.map +1 -0
- package/dist/knowledge/builder.js +966 -0
- package/dist/knowledge/builder.js.map +1 -0
- package/dist/knowledge/cli-provider.d.ts +151 -0
- package/dist/knowledge/cli-provider.d.ts.map +1 -0
- package/dist/knowledge/cli-provider.js +313 -0
- package/dist/knowledge/cli-provider.js.map +1 -0
- package/dist/knowledge/constants.d.ts +78 -0
- package/dist/knowledge/constants.d.ts.map +1 -0
- package/dist/knowledge/constants.js +98 -0
- package/dist/knowledge/constants.js.map +1 -0
- package/dist/knowledge/cross-module.d.ts +139 -0
- package/dist/knowledge/cross-module.d.ts.map +1 -0
- package/dist/knowledge/cross-module.js +370 -0
- package/dist/knowledge/cross-module.js.map +1 -0
- package/dist/knowledge/git-hooks.d.ts +67 -0
- package/dist/knowledge/git-hooks.d.ts.map +1 -0
- package/dist/knowledge/git-hooks.js +258 -0
- package/dist/knowledge/git-hooks.js.map +1 -0
- 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/module-hash.d.ts +88 -0
- package/dist/knowledge/module-hash.d.ts.map +1 -0
- package/dist/knowledge/module-hash.js +162 -0
- package/dist/knowledge/module-hash.js.map +1 -0
- package/dist/knowledge/project-detector.d.ts +101 -0
- package/dist/knowledge/project-detector.d.ts.map +1 -0
- package/dist/knowledge/project-detector.js +223 -0
- package/dist/knowledge/project-detector.js.map +1 -0
- package/dist/knowledge/prompt.d.ts +237 -0
- package/dist/knowledge/prompt.d.ts.map +1 -0
- package/dist/knowledge/prompt.js +416 -0
- package/dist/knowledge/prompt.js.map +1 -0
- package/dist/knowledge/query.d.ts +118 -0
- package/dist/knowledge/query.d.ts.map +1 -0
- package/dist/knowledge/query.js +438 -0
- package/dist/knowledge/query.js.map +1 -0
- package/dist/knowledge/repo-map.d.ts +97 -0
- package/dist/knowledge/repo-map.d.ts.map +1 -0
- package/dist/knowledge/repo-map.js +447 -0
- package/dist/knowledge/repo-map.js.map +1 -0
- package/dist/knowledge/tools/index.d.ts +14 -0
- package/dist/knowledge/tools/index.d.ts.map +1 -0
- package/dist/knowledge/tools/index.js +11 -0
- package/dist/knowledge/tools/index.js.map +1 -0
- package/dist/knowledge/tools/knowledge-get-page.d.ts +46 -0
- package/dist/knowledge/tools/knowledge-get-page.d.ts.map +1 -0
- package/dist/knowledge/tools/knowledge-get-page.js +101 -0
- package/dist/knowledge/tools/knowledge-get-page.js.map +1 -0
- package/dist/knowledge/tools/knowledge-query.d.ts +77 -0
- package/dist/knowledge/tools/knowledge-query.d.ts.map +1 -0
- package/dist/knowledge/tools/knowledge-query.js +104 -0
- package/dist/knowledge/tools/knowledge-query.js.map +1 -0
- package/dist/knowledge/tools/repo-map-lookup.d.ts +45 -0
- package/dist/knowledge/tools/repo-map-lookup.d.ts.map +1 -0
- package/dist/knowledge/tools/repo-map-lookup.js +82 -0
- package/dist/knowledge/tools/repo-map-lookup.js.map +1 -0
- package/dist/knowledge/types.d.ts +269 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +10 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/knowledge/validator.d.ts +90 -0
- package/dist/knowledge/validator.d.ts.map +1 -0
- package/dist/knowledge/validator.js +355 -0
- package/dist/knowledge/validator.js.map +1 -0
- package/dist/mcp/server.d.ts +64 -8
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +448 -12
- package/dist/mcp/server.js.map +1 -1
- package/dist/skills/builtin-skills.d.ts +35 -0
- package/dist/skills/builtin-skills.d.ts.map +1 -0
- package/dist/skills/builtin-skills.js +68 -0
- package/dist/skills/builtin-skills.js.map +1 -0
- package/dist/skills/distill/attribution.d.ts +59 -0
- package/dist/skills/distill/attribution.d.ts.map +1 -0
- package/dist/skills/distill/attribution.js +101 -0
- package/dist/skills/distill/attribution.js.map +1 -0
- package/dist/skills/distill/distiller.d.ts +161 -0
- package/dist/skills/distill/distiller.d.ts.map +1 -0
- package/dist/skills/distill/distiller.js +461 -0
- package/dist/skills/distill/distiller.js.map +1 -0
- package/dist/skills/distill/index.d.ts +223 -0
- package/dist/skills/distill/index.d.ts.map +1 -0
- package/dist/skills/distill/index.js +466 -0
- package/dist/skills/distill/index.js.map +1 -0
- package/dist/skills/distill/project-anchor-guard.d.ts +116 -0
- package/dist/skills/distill/project-anchor-guard.d.ts.map +1 -0
- package/dist/skills/distill/project-anchor-guard.js +334 -0
- package/dist/skills/distill/project-anchor-guard.js.map +1 -0
- package/dist/skills/distill/topic-deduper.d.ts +77 -0
- package/dist/skills/distill/topic-deduper.d.ts.map +1 -0
- package/dist/skills/distill/topic-deduper.js +119 -0
- package/dist/skills/distill/topic-deduper.js.map +1 -0
- package/dist/skills/distill/upstream-fetcher.d.ts +71 -0
- package/dist/skills/distill/upstream-fetcher.d.ts.map +1 -0
- package/dist/skills/distill/upstream-fetcher.js +202 -0
- package/dist/skills/distill/upstream-fetcher.js.map +1 -0
- package/dist/skills/distilled/distilled-api-design.md +495 -0
- package/dist/skills/distilled/distilled-architecture-decision.md +173 -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 +181 -0
- package/dist/skills/distilled/distilled-db-schema-design.md +245 -0
- 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 +148 -0
- 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 +242 -0
- package/dist/skills/distilled/distilled-karpathy-guidelines.md +104 -0
- package/dist/skills/distilled/distilled-performance-optimization.md +175 -0
- package/dist/skills/distilled/distilled-receiving-code-review.md +185 -0
- package/dist/skills/distilled/distilled-spec-driven-design.md +193 -0
- package/dist/skills/distilled/distilled-subagent-driven-development.md +124 -0
- package/dist/skills/distilled/distilled-systematic-debugging.md +154 -0
- 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 +213 -0
- package/dist/skills/distilled/distilled-writing-skills.md +175 -0
- package/dist/skills/registry.d.ts +55 -51
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +82 -196
- package/dist/skills/registry.js.map +1 -1
- package/dist/skills/tools/pipeline-suggest.js +14 -14
- package/dist/skills/tools/pipeline-suggest.js.map +1 -1
- package/dist/skills/tools/skill-invoke.d.ts +3 -2
- package/dist/skills/tools/skill-invoke.d.ts.map +1 -1
- package/dist/skills/tools/skill-invoke.js +4 -2
- 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-content.d.ts +30 -0
- package/dist/web/routes/agent-content.d.ts.map +1 -0
- package/dist/web/routes/agent-content.js +139 -0
- package/dist/web/routes/agent-content.js.map +1 -0
- 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.d.ts +15 -0
- package/dist/web/routes/decisions.d.ts.map +1 -0
- package/dist/web/routes/decisions.js +181 -0
- package/dist/web/routes/decisions.js.map +1 -0
- package/dist/web/routes/diagnostics.d.ts +61 -0
- package/dist/web/routes/diagnostics.d.ts.map +1 -0
- package/dist/web/routes/diagnostics.js +203 -0
- package/dist/web/routes/diagnostics.js.map +1 -0
- 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 +26 -1
- package/dist/web/routes/events.js.map +1 -1
- package/dist/web/routes/health.d.ts +33 -0
- package/dist/web/routes/health.d.ts.map +1 -0
- package/dist/web/routes/health.js +37 -0
- package/dist/web/routes/health.js.map +1 -0
- package/dist/web/routes/insights.d.ts +0 -5
- 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 +57 -0
- package/dist/web/routes/knowledge.d.ts.map +1 -0
- package/dist/web/routes/knowledge.js +772 -0
- package/dist/web/routes/knowledge.js.map +1 -0
- package/dist/web/routes/patch.d.ts +60 -1
- package/dist/web/routes/patch.d.ts.map +1 -1
- package/dist/web/routes/patch.js +170 -64
- package/dist/web/routes/patch.js.map +1 -1
- package/dist/web/routes/pipeline.d.ts +28 -0
- package/dist/web/routes/pipeline.d.ts.map +1 -0
- package/dist/web/routes/pipeline.js +145 -0
- package/dist/web/routes/pipeline.js.map +1 -0
- package/dist/web/routes/rules.d.ts.map +1 -1
- package/dist/web/routes/rules.js +26 -7
- 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 +17 -8
- package/dist/web/routes/sessions.js.map +1 -1
- package/dist/web/routes/skill-content.d.ts +30 -0
- package/dist/web/routes/skill-content.d.ts.map +1 -0
- package/dist/web/routes/skill-content.js +117 -0
- package/dist/web/routes/skill-content.js.map +1 -0
- 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.d.ts +29 -0
- package/dist/web/routes/skills-distill.d.ts.map +1 -0
- package/dist/web/routes/skills-distill.js +552 -0
- package/dist/web/routes/skills-distill.js.map +1 -0
- package/dist/web/routes/skills.js +7 -7
- package/dist/web/routes/skills.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 +178 -0
- package/dist/web/routes/task-timeline.d.ts.map +1 -0
- package/dist/web/routes/task-timeline.js +530 -0
- package/dist/web/routes/task-timeline.js.map +1 -0
- package/dist/web/routes/tasks.d.ts.map +1 -1
- package/dist/web/routes/tasks.js +377 -8
- package/dist/web/routes/tasks.js.map +1 -1
- package/dist/web/routes/trace.d.ts.map +1 -1
- package/dist/web/routes/trace.js +3 -2
- package/dist/web/routes/trace.js.map +1 -1
- package/dist/web/routes/types.d.ts +0 -4
- package/dist/web/routes/types.d.ts.map +1 -1
- package/dist/web/routes/types.js +1 -1
- package/dist/web/routes/types.js.map +1 -1
- package/dist/web/routes/violations.d.ts +14 -0
- package/dist/web/routes/violations.d.ts.map +1 -0
- package/dist/web/routes/violations.js +112 -0
- package/dist/web/routes/violations.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +99 -19
- 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/build-manager.d.ts +72 -0
- package/dist/web/services/build-manager.d.ts.map +1 -0
- package/dist/web/services/build-manager.js +189 -0
- package/dist/web/services/build-manager.js.map +1 -0
- package/dist/web/services/distill-manager.d.ts +172 -0
- package/dist/web/services/distill-manager.d.ts.map +1 -0
- package/dist/web/services/distill-manager.js +411 -0
- package/dist/web/services/distill-manager.js.map +1 -0
- 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-DlDQNihj.js +3 -0
- package/dist/web/static/assets/MarkdownRenderer-DlDQNihj.js.map +1 -0
- package/dist/web/static/assets/NotFound-LMzbP51V.js +2 -0
- package/dist/web/static/assets/NotFound-LMzbP51V.js.map +1 -0
- 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-DFQA6dO_.css +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/date-fns-sbWH3_uq.js +2 -0
- package/dist/web/static/assets/date-fns-sbWH3_uq.js.map +1 -0
- package/dist/web/static/assets/index-B_v_MKlb.css +1 -0
- 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/lucide-CnlPQoG8.js +72 -0
- package/dist/web/static/assets/lucide-CnlPQoG8.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-BKGy9azt.js +2 -0
- package/dist/web/static/assets/outcome-BKGy9azt.js.map +1 -0
- package/dist/web/static/assets/query-CgCOpYWf.js +2 -0
- package/dist/web/static/assets/{query-C99w429o.js.map → query-CgCOpYWf.js.map} +1 -1
- package/dist/web/static/assets/{react-router-r79dBVy4.js → react-router-Cxmg8RuL.js} +3 -3
- package/dist/web/static/assets/{react-router-r79dBVy4.js.map → react-router-Cxmg8RuL.js.map} +1 -1
- package/dist/web/static/assets/react-vendor-tkvCrao7.js +57 -0
- package/dist/web/static/assets/react-vendor-tkvCrao7.js.map +1 -0
- package/dist/web/static/assets/syntax-highlighter-BDYycNja.js +6 -0
- package/dist/web/static/assets/syntax-highlighter-BDYycNja.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 +12 -8
- package/package.json +18 -5
- package/dist/core/ai/provider.d.ts +0 -63
- package/dist/core/ai/provider.d.ts.map +0 -1
- package/dist/core/ai/provider.js +0 -241
- package/dist/core/ai/provider.js.map +0 -1
- package/dist/core/ai/types.d.ts +0 -43
- package/dist/core/ai/types.d.ts.map +0 -1
- package/dist/core/ai/types.js +0 -5
- package/dist/core/ai/types.js.map +0 -1
- package/dist/core/storage/token-usage.d.ts +0 -36
- package/dist/core/storage/token-usage.d.ts.map +0 -1
- package/dist/core/storage/token-usage.js +0 -59
- package/dist/core/storage/token-usage.js.map +0 -1
- package/dist/core/utils/token-tracker.d.ts +0 -39
- package/dist/core/utils/token-tracker.d.ts.map +0 -1
- package/dist/core/utils/token-tracker.js +0 -69
- package/dist/core/utils/token-tracker.js.map +0 -1
- package/dist/skills/index.d.ts +0 -3
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js +0 -3
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/matcher.d.ts +0 -26
- package/dist/skills/matcher.d.ts.map +0 -1
- package/dist/skills/matcher.js +0 -113
- package/dist/skills/matcher.js.map +0 -1
- package/dist/skills/official/code-simplifier.md +0 -52
- package/dist/skills/official/find-skills.md +0 -142
- package/dist/skills/official/official-api-design.md +0 -30
- package/dist/skills/official/official-architecture-decision.md +0 -41
- package/dist/skills/official/official-bmad.md +0 -118
- package/dist/skills/official/official-db-schema-design.md +0 -34
- package/dist/skills/official/official-debug.md +0 -25
- package/dist/skills/official/official-doc-driven.md +0 -31
- package/dist/skills/official/official-harness-engineering.md +0 -108
- package/dist/skills/official/official-openspec.md +0 -89
- package/dist/skills/official/official-performance-optimization.md +0 -30
- package/dist/skills/official/official-pr-review.md +0 -35
- package/dist/skills/official/official-release-checklist.md +0 -30
- package/dist/skills/official/official-security-hardening.md +0 -32
- package/dist/skills/official/official-spec-driven-design.md +0 -31
- package/dist/skills/official/planning-with-files.md +0 -241
- package/dist/skills/official/ui-ux-pro-max.md +0 -105
- package/dist/skills/official/webapp-testing.md +0 -96
- package/dist/skills/official-skills.d.ts +0 -26
- package/dist/skills/official-skills.d.ts.map +0 -1
- package/dist/skills/official-skills.js +0 -74
- package/dist/skills/official-skills.js.map +0 -1
- package/dist/skills/semantic-matcher.d.ts +0 -60
- package/dist/skills/semantic-matcher.d.ts.map +0 -1
- package/dist/skills/semantic-matcher.js +0 -192
- package/dist/skills/semantic-matcher.js.map +0 -1
- package/dist/skills/upgrade-engine.d.ts +0 -93
- package/dist/skills/upgrade-engine.d.ts.map +0 -1
- package/dist/skills/upgrade-engine.js +0 -447
- package/dist/skills/upgrade-engine.js.map +0 -1
- package/dist/skills/upgrade-prompt.d.ts +0 -20
- package/dist/skills/upgrade-prompt.d.ts.map +0 -1
- package/dist/skills/upgrade-prompt.js +0 -75
- package/dist/skills/upgrade-prompt.js.map +0 -1
- package/dist/web/routes/ai.d.ts +0 -10
- package/dist/web/routes/ai.d.ts.map +0 -1
- package/dist/web/routes/ai.js +0 -186
- package/dist/web/routes/ai.js.map +0 -1
- package/dist/web/routes/token-usage.d.ts +0 -7
- package/dist/web/routes/token-usage.d.ts.map +0 -1
- package/dist/web/routes/token-usage.js +0 -18
- package/dist/web/routes/token-usage.js.map +0 -1
- package/dist/web/ssrf-guard.d.ts +0 -35
- package/dist/web/ssrf-guard.d.ts.map +0 -1
- package/dist/web/ssrf-guard.js +0 -93
- package/dist/web/ssrf-guard.js.map +0 -1
- package/dist/web/static/assets/AIConfig-CdDWzJyO.js +0 -2
- package/dist/web/static/assets/AIConfig-CdDWzJyO.js.map +0 -1
- package/dist/web/static/assets/Dashboard-CoEmmIDt.js +0 -2
- package/dist/web/static/assets/Dashboard-CoEmmIDt.js.map +0 -1
- package/dist/web/static/assets/Drawer-DdRTzlLB.js +0 -2
- package/dist/web/static/assets/Drawer-DdRTzlLB.js.map +0 -1
- package/dist/web/static/assets/Events-DrIq1SUS.js +0 -2
- package/dist/web/static/assets/Events-DrIq1SUS.js.map +0 -1
- package/dist/web/static/assets/Reports-DFBM3MDK.js +0 -2
- package/dist/web/static/assets/Reports-DFBM3MDK.js.map +0 -1
- package/dist/web/static/assets/SearchInput-qCj_jAcf.js +0 -2
- package/dist/web/static/assets/SearchInput-qCj_jAcf.js.map +0 -1
- package/dist/web/static/assets/SessionDetail-CCzwdoT7.js +0 -2
- package/dist/web/static/assets/SessionDetail-CCzwdoT7.js.map +0 -1
- package/dist/web/static/assets/Sessions-FfLYkAw9.js +0 -2
- package/dist/web/static/assets/Sessions-FfLYkAw9.js.map +0 -1
- package/dist/web/static/assets/Skills-C8Gvs3Qa.js +0 -2
- package/dist/web/static/assets/Skills-C8Gvs3Qa.js.map +0 -1
- package/dist/web/static/assets/TaskDetail-BS8pYhaR.js +0 -2
- package/dist/web/static/assets/TaskDetail-BS8pYhaR.js.map +0 -1
- package/dist/web/static/assets/Tasks-CyuhizG8.js +0 -2
- package/dist/web/static/assets/Tasks-CyuhizG8.js.map +0 -1
- package/dist/web/static/assets/charts-CLrM0_uM.js +0 -37
- package/dist/web/static/assets/charts-CLrM0_uM.js.map +0 -1
- package/dist/web/static/assets/date-fns-CZ_bHujz.js +0 -2
- package/dist/web/static/assets/date-fns-CZ_bHujz.js.map +0 -1
- package/dist/web/static/assets/export-L_VBD2p1.js +0 -4
- package/dist/web/static/assets/export-L_VBD2p1.js.map +0 -1
- package/dist/web/static/assets/index-CBX47X8l.js +0 -3
- package/dist/web/static/assets/index-CBX47X8l.js.map +0 -1
- package/dist/web/static/assets/index-DjIoMdoR.css +0 -1
- package/dist/web/static/assets/lucide-Bs_edTLa.js +0 -232
- package/dist/web/static/assets/lucide-Bs_edTLa.js.map +0 -1
- package/dist/web/static/assets/query-C99w429o.js +0 -2
- package/dist/web/static/assets/react-vendor-CSp-GLFF.js +0 -49
- package/dist/web/static/assets/react-vendor-CSp-GLFF.js.map +0 -1
- package/dist/web/static/assets/syntax-highlighter-44FakypI.js +0 -9
- package/dist/web/static/assets/syntax-highlighter-44FakypI.js.map +0 -1
- package/dist/web/static/assets/time-Bxuk0M-C.js +0 -2
- package/dist/web/static/assets/time-Bxuk0M-C.js.map +0 -1
- package/dist/web/static/assets/vendor-CMMjVdZs.js +0 -64
- package/dist/web/static/assets/vendor-CMMjVdZs.js.map +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-performance-optimization
|
|
3
|
+
version: 1.0.0-portable
|
|
4
|
+
description: 'Distilled IT-universal skill: performance optimization workflow (portable, hand-rewritten 2026-05-27)'
|
|
5
|
+
keywords:
|
|
6
|
+
- performance
|
|
7
|
+
- optimization
|
|
8
|
+
- profiling
|
|
9
|
+
- latency
|
|
10
|
+
- bottleneck
|
|
11
|
+
- optimize
|
|
12
|
+
- 优化
|
|
13
|
+
- 瓶颈
|
|
14
|
+
- 慢
|
|
15
|
+
- slow
|
|
16
|
+
- timeout
|
|
17
|
+
- 超时
|
|
18
|
+
- 卡顿
|
|
19
|
+
- 性能
|
|
20
|
+
rubric_version: 2
|
|
21
|
+
distilled_from:
|
|
22
|
+
- upstream: https://github.com/winspan/claude-forge.git
|
|
23
|
+
license: MIT
|
|
24
|
+
commit: 7d96b86c
|
|
25
|
+
paths:
|
|
26
|
+
- official/official-performance-optimization.md
|
|
27
|
+
distilled_at: '2026-05-27T02:12:00.000Z'
|
|
28
|
+
distilled_by: hand-rewrite (D4-reverse)
|
|
29
|
+
it_universal_score: 4.5
|
|
30
|
+
it_universal_dims:
|
|
31
|
+
d1: 1
|
|
32
|
+
d2: 1
|
|
33
|
+
d3: 1
|
|
34
|
+
d4: 1
|
|
35
|
+
d5: 0.5
|
|
36
|
+
it_universal_rationale: Measure-first methodology + bottleneck hierarchy; lang-agnostic and stack-agnostic.
|
|
37
|
+
is_stub: false
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Goal
|
|
41
|
+
|
|
42
|
+
Make the system meaningfully faster (or cheaper, or less resource-hungry) by **measuring first, locating the dominant bottleneck, fixing only that bottleneck, and proving the gain with a re-measurement**. Avoid the seductive trap of "obvious" optimizations that turn out to address the wrong thing.
|
|
43
|
+
|
|
44
|
+
## When to trigger
|
|
45
|
+
|
|
46
|
+
- A user-facing latency budget (P95, P99) is being missed under realistic load.
|
|
47
|
+
- Throughput is below the required rate.
|
|
48
|
+
- Costs are scaling super-linearly with traffic (CPU, memory, I/O, database calls, money).
|
|
49
|
+
- A recent change caused a measurable regression (compare to baseline).
|
|
50
|
+
- A planned scale-up (10x users, larger dataset) needs validation before launch.
|
|
51
|
+
|
|
52
|
+
Do NOT trigger on: gut feelings, "feels slow", or single-instance anecdotes. Confirm with a measurement first.
|
|
53
|
+
|
|
54
|
+
## Steps
|
|
55
|
+
|
|
56
|
+
1. **Establish a baseline.** Before touching anything:
|
|
57
|
+
- Pick metrics that match the user-visible goal: latency percentiles (P50 / P95 / P99), throughput (req/sec), memory peak / steady-state, CPU utilization, cost per unit work.
|
|
58
|
+
- Define the workload: representative input distribution, concurrency, duration. Synthetic load that doesn't match production patterns produces lies.
|
|
59
|
+
- Record the numbers somewhere durable (a baseline file, a dashboard snapshot, a test report). You will compare against this later.
|
|
60
|
+
|
|
61
|
+
2. **Locate the bottleneck — profile, do not guess.** Use the right tool for the suspected dimension:
|
|
62
|
+
- **CPU-bound**: sampling profiler, flame graph. Look for the widest stack frames.
|
|
63
|
+
- **Memory-bound**: heap dump, allocation profiler. Look for the largest retained objects and the highest-allocation call sites.
|
|
64
|
+
- **I/O-bound**: slow-query log, network trace, syscall trace. Look for waits, not active time.
|
|
65
|
+
- **Concurrency-bound**: lock contention profiler, goroutine / thread dump, event-loop lag. Look for blocked time.
|
|
66
|
+
- **End-to-end**: distributed tracing. Look for the single longest span on a slow request.
|
|
67
|
+
|
|
68
|
+
3. **Confirm the bottleneck with a measurement, not a hypothesis.** Before optimizing, you should be able to say "the slowest thing is X, accounting for Y% of total time", backed by numbers. If you cannot, you do not yet know the bottleneck.
|
|
69
|
+
|
|
70
|
+
4. **Optimize, in the priority order that has the best return on effort.** Generally:
|
|
71
|
+
1. **Algorithmic / complexity** — switching from O(n^2) to O(n log n) on a hot path beats almost any micro-optimization.
|
|
72
|
+
2. **Eliminate work** — remove duplicated queries (N+1), unnecessary serialization, debug logging on hot paths.
|
|
73
|
+
3. **Cache** — memoize results that are expensive and repeated; cache hot read paths with explicit invalidation.
|
|
74
|
+
4. **Batch** — replace per-item I/O with bulk operations.
|
|
75
|
+
5. **Concurrency / async** — overlap waitable work; use connection pools and bounded parallelism.
|
|
76
|
+
6. **Lower-level tuning** — data layout, allocations, compiler flags, query plans. High effort, situational gains.
|
|
77
|
+
|
|
78
|
+
5. **Re-measure.** Run the same workload against the same metrics. The diff between baseline and post-change is your evidence. If the gain is smaller than expected, return to step 2 — you misidentified the bottleneck.
|
|
79
|
+
|
|
80
|
+
6. **Verify correctness.** Functional tests must still pass. Performance changes are a frequent source of subtle bugs (race conditions, stale caches, batch boundary errors). Treat any failing test as blocking; speed is worthless if behavior is wrong.
|
|
81
|
+
|
|
82
|
+
7. **Stop when the budget is met.** Performance work has diminishing returns. The third optimization usually contributes less than the first. Lock in the gain, document the baseline-vs-now in a short note, and move on. Iterate again only when the next budget or regression triggers it.
|
|
83
|
+
|
|
84
|
+
## Anti-patterns
|
|
85
|
+
|
|
86
|
+
- **Optimizing without measuring.** "It looks slow here" is a hypothesis, not a finding. Profile first.
|
|
87
|
+
- **Optimizing the wrong layer.** Spending a week on micro-allocations when the dominant cost is a missing database index.
|
|
88
|
+
- **Micro-benchmarks divorced from real workload.** A benchmark that runs the function 1M times in a tight loop can look fine while production is hitting cache, GC, and contention effects the loop never sees.
|
|
89
|
+
- **Caching as a first response.** Caching covers up bottlenecks but does not remove them, and introduces invalidation as a new failure mode. Reach for it after you understand the actual cost.
|
|
90
|
+
- **Premature parallelism.** Adding threads / async to a single-threaded bottleneck can hurt — increasing contention, scheduler overhead, or amplifying I/O storms.
|
|
91
|
+
- **Multiple changes at once.** Changing the algorithm AND the cache AND the batch size in one commit makes it impossible to attribute the gain (or loss). One change, one measurement.
|
|
92
|
+
- **Skipping the post-change measurement.** Without the re-measurement, you don't actually know if you helped. Sometimes "optimizations" regress.
|
|
93
|
+
- **Confusing average with tail.** A change that improves P50 but worsens P99 may be a regression for a latency-sensitive system.
|
|
94
|
+
|
|
95
|
+
## Success criteria
|
|
96
|
+
|
|
97
|
+
- [ ] A baseline measurement exists and is recorded somewhere reproducible.
|
|
98
|
+
- [ ] The bottleneck has been named explicitly, backed by profiler output or trace data.
|
|
99
|
+
- [ ] The change addresses **only** that bottleneck (single-axis change).
|
|
100
|
+
- [ ] A post-change measurement on the same workload shows the targeted metric improved.
|
|
101
|
+
- [ ] Functional tests still pass.
|
|
102
|
+
- [ ] The improvement meets the budget that triggered the work (or the work is escalated as "harder than expected").
|
|
103
|
+
- [ ] A short note records: baseline numbers, identified bottleneck, change made, post-change numbers.
|
|
104
|
+
|
|
105
|
+
## Failure modes
|
|
106
|
+
|
|
107
|
+
- **No improvement after the fix.** Most common: you misidentified the bottleneck. Re-profile. The next candidate is likely something you saw in profiler output but dismissed.
|
|
108
|
+
- **Improvement on the benchmark, no improvement in production.** Benchmark didn't match real workload. Re-profile in production-like conditions (real data sizes, real concurrency, real network).
|
|
109
|
+
- **One metric improved, another regressed.** A trade-off you didn't notice — e.g. lower latency at the cost of more memory. Decide explicitly which matters; document the trade.
|
|
110
|
+
- **Fix introduced a correctness bug.** Roll back, restore the failing test as a guard, and approach the optimization with that constraint visible in the design.
|
|
111
|
+
- **Optimization works, then degrades over time.** Often a cache that grows unboundedly, a connection pool exhausting, or a data-set growth pattern. Add a size / eviction policy and a monitoring signal.
|
|
112
|
+
- **The bottleneck is in code you don't own.** A library, a managed service, a network hop. Options in order: ask the vendor / open an issue; route around the slow call (cache, batch, async); replace the dependency. Document the constraint either way.
|
|
113
|
+
|
|
114
|
+
## Examples
|
|
115
|
+
|
|
116
|
+
### Imagine a typical web service: a "list orders" endpoint at 1.2s P95
|
|
117
|
+
|
|
118
|
+
**Step 1 — Baseline.** Hit the endpoint with the realistic mix: 80% logged-in users, average 50 orders per account, 100 concurrent requests for 60 seconds.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
P50: 320ms P95: 1180ms P99: 2400ms
|
|
122
|
+
DB query count per request: 51
|
|
123
|
+
CPU: 35% Memory: stable Error rate: 0
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Step 2 — Profile.** Trace one slow request end-to-end. The trace shows:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
GET /orders 1180ms total
|
|
130
|
+
auth middleware 8ms
|
|
131
|
+
load user 12ms
|
|
132
|
+
load orders list 20ms (1 query)
|
|
133
|
+
load items per order 1100ms (50 queries, 22ms each) <-- here
|
|
134
|
+
serialize response 40ms
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
50 sub-queries, one per order — a textbook N+1.
|
|
138
|
+
|
|
139
|
+
**Step 3 — Confirm.** "The slowest thing is the per-order item fetch, contributing ~93% of P95 latency."
|
|
140
|
+
|
|
141
|
+
**Step 4 — Optimize.** The right tool is **eliminate work / batch**, not cache: rewrite the loader to fetch items for all 50 orders in one query using `WHERE order_id IN (...)`. Single-axis change, no caching, no concurrency.
|
|
142
|
+
|
|
143
|
+
**Step 5 — Re-measure.** Same workload:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
P50: 90ms P95: 180ms P99: 280ms
|
|
147
|
+
DB query count per request: 2 (1 for orders, 1 for items)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
P95 from 1180 → 180ms. The targeted metric moved by the order of magnitude the bottleneck analysis predicted.
|
|
151
|
+
|
|
152
|
+
**Step 6 — Verify.** Functional tests for the endpoint still pass; pagination still works; orders without items still render correctly.
|
|
153
|
+
|
|
154
|
+
**Step 7 — Document and stop.** P95 budget was 300ms; we're at 180ms with healthy margin. No further optimization is justified right now. A note in the perf log records baseline, fix, and post-change numbers.
|
|
155
|
+
|
|
156
|
+
### A second example: misidentified bottleneck
|
|
157
|
+
|
|
158
|
+
Same endpoint, different team's first attempt: they noticed the response serialization showed up "near the top" of the profile and spent two days swapping the JSON library. After the change:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
P50: 310ms P95: 1170ms (no meaningful change)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The serialization was 40ms out of 1180. Even a perfect 0ms serialization could only have moved P95 to ~1140ms. Lesson: always confirm the **share** of total time before optimizing a layer, not just its position in the profiler list.
|
|
165
|
+
|
|
166
|
+
## Adoption notes
|
|
167
|
+
|
|
168
|
+
To bake this into a project's practice:
|
|
169
|
+
|
|
170
|
+
- Define explicit latency / throughput / cost budgets per endpoint or per workload. Targets without numbers cannot be met.
|
|
171
|
+
- Keep a per-service "perf log" file (e.g. `docs/perf/<service>.md`) recording baselines, identified bottlenecks, and dated optimizations. Old entries are the institutional memory of what worked.
|
|
172
|
+
- Standardize on one profiler / tracer per language in the stack so engineers do not relearn tools each time.
|
|
173
|
+
- Add load tests against the realistic workload to CI (or at least to a pre-release checklist) so regressions surface before users notice.
|
|
174
|
+
- Pair this skill with the systematic-debugging skill: both rest on "measure before changing"; both reward small, isolated, verifiable changes over speculative rewrites.
|
|
175
|
+
- Treat the post-change measurement as a deliverable, not an afterthought — a perf PR without before/after numbers is incomplete review material.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-receiving-code-review
|
|
3
|
+
version: 0.2.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: receiving-code-review (score 4/5)'
|
|
5
|
+
keywords:
|
|
6
|
+
- receiving
|
|
7
|
+
- code
|
|
8
|
+
- review
|
|
9
|
+
rubric_version: 2
|
|
10
|
+
distilled_from:
|
|
11
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
12
|
+
license: MIT
|
|
13
|
+
commit: f2cbfbefebbfef77321e4c9abc9e949826bea9d7
|
|
14
|
+
paths:
|
|
15
|
+
- receiving-code-review/SKILL.md
|
|
16
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
17
|
+
license: MIT
|
|
18
|
+
commit: f2cbfbefebbfef77321e4c9abc9e949826bea9d7
|
|
19
|
+
paths:
|
|
20
|
+
- requesting-code-review/SKILL.md
|
|
21
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
22
|
+
license: MIT
|
|
23
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
24
|
+
paths:
|
|
25
|
+
- flutter-dart-code-review/SKILL.md
|
|
26
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
27
|
+
license: MIT
|
|
28
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
29
|
+
paths:
|
|
30
|
+
- scientific-thinking-literature-review/SKILL.md
|
|
31
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
32
|
+
license: MIT
|
|
33
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
34
|
+
paths:
|
|
35
|
+
- flutter-dart-code-review/SKILL.md
|
|
36
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
37
|
+
license: MIT
|
|
38
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
39
|
+
paths:
|
|
40
|
+
- flutter-dart-code-review/SKILL.md
|
|
41
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
42
|
+
license: MIT
|
|
43
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
44
|
+
paths:
|
|
45
|
+
- prediction-market-risk-review/SKILL.md
|
|
46
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
47
|
+
license: MIT
|
|
48
|
+
commit: 928076cc08cbb31e8549cea2883b4f51811de1c8
|
|
49
|
+
paths:
|
|
50
|
+
- scientific-thinking-literature-review/SKILL.md
|
|
51
|
+
distilled_at: '2026-06-15T00:52:05.047Z'
|
|
52
|
+
distilled_by: claude-code skill-distiller agent
|
|
53
|
+
it_universal_score: 4
|
|
54
|
+
it_universal_dims:
|
|
55
|
+
d1: 1
|
|
56
|
+
d2: 0.5
|
|
57
|
+
d3: 1
|
|
58
|
+
d4: 0.5
|
|
59
|
+
d5: 1
|
|
60
|
+
it_universal_rationale: >-
|
|
61
|
+
Language-neutral code-review reception methodology (verify → evaluate → implement) applicable to
|
|
62
|
+
any codebase and review workflow; project-specific terms removed.
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
# Receiving Code Review: Verify Before You Implement
|
|
66
|
+
|
|
67
|
+
## When to use
|
|
68
|
+
- When receiving code review feedback (from teammates, CI bots, or external reviewers)
|
|
69
|
+
- Before implementing any review suggestion, especially if it seems unclear or technically questionable
|
|
70
|
+
- When you feel the urge to say "You're absolutely right!" and immediately start coding
|
|
71
|
+
- When feedback items are partially unclear and you're tempted to implement what you understand now
|
|
72
|
+
|
|
73
|
+
## Core idea
|
|
74
|
+
|
|
75
|
+
Code review reception is a **technical evaluation exercise**, not a social performance. The only correct response to feedback is to verify it against codebase reality before acting. Performative agreement ("Great point!", "You're absolutely right!") is a red flag that you are about to implement something without understanding it. Clarity on all items must precede implementation of any item — partial understanding produces wrong implementations. External reviewers often lack full context; skepticism paired with careful checking is the right posture.
|
|
76
|
+
|
|
77
|
+
## Steps
|
|
78
|
+
|
|
79
|
+
### 1. Full read first
|
|
80
|
+
Read all feedback completely before reacting or touching any code.
|
|
81
|
+
|
|
82
|
+
### 2. Clarify before acting
|
|
83
|
+
```
|
|
84
|
+
IF any item is unclear:
|
|
85
|
+
STOP — do not implement anything yet
|
|
86
|
+
ASK for clarification on ALL unclear items
|
|
87
|
+
|
|
88
|
+
Rationale: Items may be interdependent. Partial understanding → wrong implementation.
|
|
89
|
+
|
|
90
|
+
Example:
|
|
91
|
+
Feedback: "Fix items 1–6"
|
|
92
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
93
|
+
✅ "I understand 1,2,3,6. Need clarification on 4 and 5 before proceeding."
|
|
94
|
+
❌ Implement 1,2,3,6 now and ask about 4,5 later
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. Evaluate by feedback source
|
|
98
|
+
|
|
99
|
+
**From project lead / code owner (trusted)**
|
|
100
|
+
- Implement after understanding, no sycophancy
|
|
101
|
+
- Still ask if scope is unclear
|
|
102
|
+
- Skip to action or a brief technical acknowledgment
|
|
103
|
+
|
|
104
|
+
**From external reviewers (skeptical)**
|
|
105
|
+
```
|
|
106
|
+
BEFORE implementing, check:
|
|
107
|
+
1. Is this technically correct for THIS codebase?
|
|
108
|
+
2. Does it break existing functionality?
|
|
109
|
+
3. Is there a reason the current impl exists (legacy, compat)?
|
|
110
|
+
4. Does it work across all required platforms/versions?
|
|
111
|
+
5. Does the reviewer have full context?
|
|
112
|
+
|
|
113
|
+
IF suggestion seems wrong → push back with technical reasoning
|
|
114
|
+
IF you can't easily verify → say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
|
|
115
|
+
IF it conflicts with a prior architectural decision → discuss with project lead first
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 4. YAGNI check for "proper" feature suggestions
|
|
119
|
+
```
|
|
120
|
+
IF reviewer suggests implementing a feature "properly":
|
|
121
|
+
Search codebase for actual usage
|
|
122
|
+
|
|
123
|
+
IF unused: "This endpoint/function isn't called anywhere. Remove it (YAGNI)?"
|
|
124
|
+
IF used: Then implement properly
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 5. Implement in priority order
|
|
128
|
+
```
|
|
129
|
+
1. Blocking issues (breaks, security)
|
|
130
|
+
2. Simple fixes (typos, wrong imports)
|
|
131
|
+
3. Complex fixes (refactoring, logic changes)
|
|
132
|
+
|
|
133
|
+
Test each fix individually. Verify no regressions before moving to next.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 6. Acknowledge correctly
|
|
137
|
+
```
|
|
138
|
+
✅ "Fixed. [One-sentence description of what changed]"
|
|
139
|
+
✅ "Good catch — [specific issue]. Fixed in [location]."
|
|
140
|
+
✅ [Just fix it and show the diff]
|
|
141
|
+
|
|
142
|
+
❌ "You're absolutely right!"
|
|
143
|
+
❌ "Great point!"
|
|
144
|
+
❌ "Thanks for catching that!" / any gratitude expression
|
|
145
|
+
```
|
|
146
|
+
Actions speak. The code itself shows you heard the feedback.
|
|
147
|
+
|
|
148
|
+
### 7. Gracefully correct a wrong pushback
|
|
149
|
+
```
|
|
150
|
+
If you pushed back and were wrong:
|
|
151
|
+
✅ "Checked [X] — you're right, it does [Y]. Implementing now."
|
|
152
|
+
✅ "Verified this; my initial read was wrong because [reason]. Fixing."
|
|
153
|
+
|
|
154
|
+
❌ Long apology
|
|
155
|
+
❌ Defending the pushback
|
|
156
|
+
❌ Over-explaining
|
|
157
|
+
```
|
|
158
|
+
State the correction factually and move on.
|
|
159
|
+
|
|
160
|
+
## When to push back
|
|
161
|
+
|
|
162
|
+
Push back when:
|
|
163
|
+
- The suggestion breaks existing functionality or tests
|
|
164
|
+
- The reviewer lacks full codebase context
|
|
165
|
+
- YAGNI: the feature/endpoint is not actually used
|
|
166
|
+
- It is technically incorrect for this stack/version
|
|
167
|
+
- Legacy or compatibility constraints exist that the reviewer missed
|
|
168
|
+
- It conflicts with a prior architectural decision by the project lead
|
|
169
|
+
|
|
170
|
+
**How to push back:** Use technical reasoning, not defensiveness. Ask specific questions. Reference working tests or existing code. Escalate to project lead if architectural.
|
|
171
|
+
|
|
172
|
+
## Anti-patterns
|
|
173
|
+
|
|
174
|
+
| Anti-pattern | Correct alternative |
|
|
175
|
+
|---|---|
|
|
176
|
+
| Performative agreement ("Absolutely right!") | State the requirement or just act |
|
|
177
|
+
| Blind implementation without verification | Grep/read codebase first |
|
|
178
|
+
| Batching all fixes without testing each | One fix → test → next |
|
|
179
|
+
| Assuming reviewer is always right | Check whether it breaks things |
|
|
180
|
+
| Avoiding pushback to stay comfortable | Technical correctness > social comfort |
|
|
181
|
+
| Implementing understood items while skipping unclear ones | Clarify ALL items first |
|
|
182
|
+
| Can't verify → proceed anyway | State the limitation, ask for direction |
|
|
183
|
+
|
|
184
|
+
## References
|
|
185
|
+
- Upstream: https://github.com/obra/superpowers.git
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-spec-driven-design
|
|
3
|
+
version: 1.0.0-portable
|
|
4
|
+
description: 'Distilled IT-universal skill: spec-driven design + file-based planning (portable, hand-rewritten 2026-05-27)'
|
|
5
|
+
spawn_agent: planner
|
|
6
|
+
keywords:
|
|
7
|
+
- spec
|
|
8
|
+
- sdd
|
|
9
|
+
- plan
|
|
10
|
+
- design
|
|
11
|
+
- requirements
|
|
12
|
+
- acceptance
|
|
13
|
+
- spec-driven
|
|
14
|
+
- 规格
|
|
15
|
+
- 需求文档
|
|
16
|
+
- planning
|
|
17
|
+
- 规划
|
|
18
|
+
- task plan
|
|
19
|
+
- organize
|
|
20
|
+
- 组织任务
|
|
21
|
+
- 怎么做
|
|
22
|
+
- 方案
|
|
23
|
+
- 步骤
|
|
24
|
+
- 计划
|
|
25
|
+
rubric_version: 2
|
|
26
|
+
distilled_from:
|
|
27
|
+
- upstream: https://github.com/winspan/claude-forge.git
|
|
28
|
+
license: MIT
|
|
29
|
+
commit: 7d96b86c
|
|
30
|
+
paths:
|
|
31
|
+
- official/official-spec-driven-design.md
|
|
32
|
+
- official/planning-with-files.md
|
|
33
|
+
distilled_at: '2026-05-27T02:10:00.000Z'
|
|
34
|
+
distilled_by: hand-rewrite (D4-reverse)
|
|
35
|
+
it_universal_score: 5
|
|
36
|
+
it_universal_dims:
|
|
37
|
+
d1: 1
|
|
38
|
+
d2: 1
|
|
39
|
+
d3: 1
|
|
40
|
+
d4: 1
|
|
41
|
+
d5: 1
|
|
42
|
+
it_universal_rationale: SDD methodology + persistent file-based planning; both stack-agnostic, SDLC-universal, principle-level.
|
|
43
|
+
is_stub: false
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Goal
|
|
47
|
+
|
|
48
|
+
Before writing code, write a clear specification. A spec is a contract: the code's job is to satisfy the spec exactly, no more, no less. Keep the plan and findings in persistent files so context survives session boundaries, tool resets, and team handoff.
|
|
49
|
+
|
|
50
|
+
## When to trigger
|
|
51
|
+
|
|
52
|
+
- Starting a new feature, module, or non-trivial change (3+ steps or 3+ files)
|
|
53
|
+
- Requirements are ambiguous, debated, or only verbally agreed
|
|
54
|
+
- A change crosses multiple modules / has cross-cutting effects
|
|
55
|
+
- A task is expected to span multiple sessions or tool calls
|
|
56
|
+
- After a long debugging session — write the failure mode down before fixing
|
|
57
|
+
- Re-attempting a task that previously stalled or got muddled
|
|
58
|
+
|
|
59
|
+
## Steps
|
|
60
|
+
|
|
61
|
+
1. **Draft the spec file.** Create `SPEC.md` (or `docs/design/<task>-spec.md`) with:
|
|
62
|
+
- **Goal**: one sentence describing the change.
|
|
63
|
+
- **Inputs / outputs**: types, examples, edge values, error cases.
|
|
64
|
+
- **Out of scope**: explicit list of things this change will NOT do.
|
|
65
|
+
- **Acceptance criteria**: bullet list of testable conditions. Each item must be verifiable with a test, manual check, or measurable signal.
|
|
66
|
+
- **Risks / open questions**: things you are unsure about; mark each as resolved before implementation.
|
|
67
|
+
|
|
68
|
+
2. **Review the spec.** Walk every acceptance criterion and ask:
|
|
69
|
+
- Could a competent reader misinterpret this?
|
|
70
|
+
- Can each criterion become a single test?
|
|
71
|
+
- Are boundary cases (empty input, max size, missing field, concurrent calls) covered?
|
|
72
|
+
- If you cannot answer "yes" to all three, revise the spec before moving on.
|
|
73
|
+
|
|
74
|
+
3. **Create planning files (for multi-phase work).** Alongside the spec, maintain:
|
|
75
|
+
- `task_plan.md` — phases, status (`pending` / `in_progress` / `complete`), decisions log.
|
|
76
|
+
- `findings.md` — discoveries, research notes, references collected while working.
|
|
77
|
+
- `progress.md` — session log: what was done, what failed, what test results look like.
|
|
78
|
+
|
|
79
|
+
4. **Implement strictly to the spec.** Code only what the spec describes. If you encounter a situation the spec did not cover, **stop, update the spec, then resume**. Never silently expand scope.
|
|
80
|
+
|
|
81
|
+
5. **Update planning files after each phase.** When a phase completes:
|
|
82
|
+
- Flip its status in `task_plan.md`.
|
|
83
|
+
- Append a session entry to `progress.md` with what changed and which tests ran.
|
|
84
|
+
- Record any new errors and how they were resolved.
|
|
85
|
+
|
|
86
|
+
6. **Acceptance pass.** Walk the acceptance criteria one by one and verify each is met by a test or a concrete observation. A criterion without a green check is unfinished work.
|
|
87
|
+
|
|
88
|
+
7. **Continue or close.** If the user requests follow-up, add new phases to `task_plan.md` and loop back to step 1 for any non-trivial extension. If done, archive the plan files into a per-task directory.
|
|
89
|
+
|
|
90
|
+
## Anti-patterns
|
|
91
|
+
|
|
92
|
+
- Starting to code before the spec exists ("I'll write it down later").
|
|
93
|
+
- Acceptance criteria that are vague ("works correctly", "feels fast") instead of testable.
|
|
94
|
+
- Adding features the spec did not call for, even when they "obviously" belong.
|
|
95
|
+
- Treating the spec as immutable. Specs are living documents; just update them BEFORE the code.
|
|
96
|
+
- Keeping the plan only in the chat / context window — it evaporates on `/clear` or session reset.
|
|
97
|
+
- Using a TODO list utility for persistence; durable plans go in tracked files.
|
|
98
|
+
- Repeating a failed action without changing approach.
|
|
99
|
+
- Hiding errors silently and retrying — every error belongs in the plan file with attempt count and resolution.
|
|
100
|
+
|
|
101
|
+
## Success criteria
|
|
102
|
+
|
|
103
|
+
- [ ] A `SPEC.md` (or equivalent) exists before any production code change.
|
|
104
|
+
- [ ] Every acceptance criterion is paired with a test, assertion, or measurable check.
|
|
105
|
+
- [ ] An "Out of scope" section exists and is non-empty.
|
|
106
|
+
- [ ] Planning files (`task_plan.md`, `findings.md`, `progress.md`) exist for tasks spanning 3+ phases or 5+ tool calls.
|
|
107
|
+
- [ ] After implementation, the diff contains nothing not described in the spec.
|
|
108
|
+
- [ ] All acceptance criteria are individually checked off (manual or automated).
|
|
109
|
+
- [ ] The plan files reflect final state — no "in progress" leftovers.
|
|
110
|
+
|
|
111
|
+
## Failure modes
|
|
112
|
+
|
|
113
|
+
- **Spec drift during implementation.** You discover a missing case. Resist patching code; pause, edit the spec, flag the new requirement, then code.
|
|
114
|
+
- **Acceptance criteria not testable.** Often a sign the criterion is a hope, not a behavior. Rewrite it as a deterministic check ("returns 404 when X" instead of "handles errors").
|
|
115
|
+
- **Planning files go stale.** Set a rule: after every 2 search / read / browse operations, write findings to disk; after every phase, update plan status. If you haven't updated in 5+ tool calls, you're likely losing state.
|
|
116
|
+
- **Three failed attempts at the same step.** Escalate: stop, summarize what you tried in `progress.md`, ask the user / collaborator for direction. Do not loop a 4th time.
|
|
117
|
+
- **Spec was right, code is wrong.** Walk the acceptance criteria backwards from the test failure and locate the violated contract; fix code to match spec.
|
|
118
|
+
- **Spec was wrong, code reveals it.** Revise the spec (note the revision in `progress.md`), then continue. Do not let the code silently lead the spec.
|
|
119
|
+
|
|
120
|
+
## Examples
|
|
121
|
+
|
|
122
|
+
### Imagine a typical web service: adding a "rate-limit per API key" feature
|
|
123
|
+
|
|
124
|
+
**Spec file** (`docs/design/rate-limit-spec.md`):
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
# Rate Limit per API Key
|
|
128
|
+
|
|
129
|
+
## Goal
|
|
130
|
+
Throttle requests to <= N per minute per API key, returning 429 on overflow.
|
|
131
|
+
|
|
132
|
+
## Inputs / Outputs
|
|
133
|
+
- Input: HTTP request with `X-API-Key` header.
|
|
134
|
+
- Output: normal response, or HTTP 429 with `Retry-After: <seconds>` header.
|
|
135
|
+
- Default limit: 60/min. Configurable per key.
|
|
136
|
+
|
|
137
|
+
## Out of scope
|
|
138
|
+
- IP-based throttling.
|
|
139
|
+
- Burst allowance / token-bucket smoothing.
|
|
140
|
+
- Distributed coordination across multiple instances (single-node only for v1).
|
|
141
|
+
|
|
142
|
+
## Acceptance criteria
|
|
143
|
+
- [ ] Requests over the limit return HTTP 429.
|
|
144
|
+
- [ ] `Retry-After` header is present on 429 and is a positive integer.
|
|
145
|
+
- [ ] Counter resets exactly 60 seconds after the first request in a window.
|
|
146
|
+
- [ ] Unknown / missing API key → existing auth behaviour, not rate-limited.
|
|
147
|
+
- [ ] Limit is configurable via env var `RATE_LIMIT_PER_MIN`.
|
|
148
|
+
|
|
149
|
+
## Risks / open questions
|
|
150
|
+
- [resolved] What's the storage backend? In-memory map, evicted by TTL.
|
|
151
|
+
- [resolved] Clock skew? Use monotonic clock.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Planning files** (created at the start of the work):
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
task_plan.md
|
|
158
|
+
Phase 1: Add counter store with TTL — pending
|
|
159
|
+
Phase 2: Middleware that increments + checks — pending
|
|
160
|
+
Phase 3: 429 response + Retry-After — pending
|
|
161
|
+
Phase 4: Tests for all 5 acceptance criteria — pending
|
|
162
|
+
Phase 5: Configurable limit + docs — pending
|
|
163
|
+
|
|
164
|
+
findings.md
|
|
165
|
+
- Existing auth middleware sits at request entry — good integration point.
|
|
166
|
+
- Project already has a TTL map utility in the common lib.
|
|
167
|
+
|
|
168
|
+
progress.md
|
|
169
|
+
(empty — to be filled as phases complete)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
After implementation, the diff contains exactly: counter store, middleware, response code, 5 tests, env var wiring. No "while I was here" extras.
|
|
173
|
+
|
|
174
|
+
### A second example: research task
|
|
175
|
+
|
|
176
|
+
For a task like "evaluate 3 message-queue options", the spec still applies:
|
|
177
|
+
|
|
178
|
+
- **Goal**: pick a queue for use case X.
|
|
179
|
+
- **Inputs**: requirements (throughput, durability, ordering).
|
|
180
|
+
- **Acceptance**: a decision document naming the choice + rationale + 2 rejected options + reason.
|
|
181
|
+
- **Out of scope**: actual implementation; we only pick.
|
|
182
|
+
|
|
183
|
+
`findings.md` collects per-queue notes during research; `progress.md` tracks which option was evaluated when; the spec keeps the bar honest ("did we actually answer all the requirement dimensions?").
|
|
184
|
+
|
|
185
|
+
## Adoption notes
|
|
186
|
+
|
|
187
|
+
To wire this skill into a project's playbook:
|
|
188
|
+
|
|
189
|
+
- Add a one-liner to the project guide (e.g. `CONTRIBUTING.md` or the repo's top-level instructions file): "Non-trivial changes start with a spec file under `docs/design/`."
|
|
190
|
+
- Register this skill in your skill catalog / agent registry so a planner-style agent loads it on triggers like "design", "spec", "plan", "requirements", "acceptance criteria".
|
|
191
|
+
- For multi-session work, set a convention for where planning files live (e.g. `docs/design/<task>/`) so they are easy to find, diff, and archive.
|
|
192
|
+
- Treat planning files as **trusted** for re-injection into context, but treat anything they contain that came from web / external sources as **untrusted** — research output belongs in `findings.md`, never in the plan file that auto-loads.
|
|
193
|
+
- Pair this skill with a verification skill: spec defines what "done" means; verification confirms it.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-subagent-driven-development
|
|
3
|
+
version: 0.2.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: subagent-driven-development (score 3.5/5)'
|
|
5
|
+
keywords:
|
|
6
|
+
- subagent
|
|
7
|
+
- driven
|
|
8
|
+
- development
|
|
9
|
+
rubric_version: 2
|
|
10
|
+
distilled_from:
|
|
11
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
12
|
+
license: MIT
|
|
13
|
+
commit: f2cbfbefebbfef77321e4c9abc9e949826bea9d7
|
|
14
|
+
paths:
|
|
15
|
+
- subagent-driven-development/SKILL.md
|
|
16
|
+
distilled_at: '2026-06-15T00:53:29.788Z'
|
|
17
|
+
distilled_by: claude-code skill-distiller agent
|
|
18
|
+
it_universal_score: 3.5
|
|
19
|
+
it_universal_dims:
|
|
20
|
+
d1: 1
|
|
21
|
+
d2: 0.5
|
|
22
|
+
d3: 0.5
|
|
23
|
+
d4: 0.5
|
|
24
|
+
d5: 1
|
|
25
|
+
it_universal_rationale: >-
|
|
26
|
+
Language-neutral orchestration methodology with transferable status taxonomy, model-selection
|
|
27
|
+
heuristics, and two-stage review pattern; only minor framework-specific template filenames require
|
|
28
|
+
renaming in a new codebase.
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# Subagent-Driven Development
|
|
32
|
+
|
|
33
|
+
## When to use
|
|
34
|
+
- You have a concrete implementation plan with multiple, mostly-independent tasks
|
|
35
|
+
- You want continuous execution without human check-ins between each task
|
|
36
|
+
- You need systematic quality gates (spec compliance + code quality) that self-loop until passing
|
|
37
|
+
- You want each implementer to have clean, unpolluted context rather than inheriting the coordinator's history
|
|
38
|
+
|
|
39
|
+
## Core idea
|
|
40
|
+
|
|
41
|
+
Dispatch a **fresh subagent** for each task in your plan, giving it exactly the context it needs — no more, no less. After each task, run two sequential review subagents: first a **spec compliance reviewer** (did the implementer build precisely what was asked — nothing missing, nothing extra?), then a **code quality reviewer** (is it well-structured and maintainable?). Each review stage loops — reviewer finds issues → implementer fixes → reviewer re-reviews — until the stage is ✅ before advancing.
|
|
42
|
+
|
|
43
|
+
The coordinator reads the entire plan once upfront, extracts all task text, creates a task tracker, then executes sequentially without stopping to narrate progress. The only valid stops are: BLOCKED status that cannot be resolved, genuine ambiguity preventing progress, or all tasks complete.
|
|
44
|
+
|
|
45
|
+
## Steps
|
|
46
|
+
|
|
47
|
+
### 0 — Setup (once)
|
|
48
|
+
1. Read the plan file once. Extract all tasks with their **full text** and any cross-task context notes.
|
|
49
|
+
2. Create a task tracker (e.g., todo list) with every task marked pending.
|
|
50
|
+
3. Do not re-read the plan during execution.
|
|
51
|
+
|
|
52
|
+
### 1 — Dispatch implementer subagent (per task)
|
|
53
|
+
- Provide: full task text, scene-setting (where this task fits in the overall plan), any files or interfaces relevant to this task.
|
|
54
|
+
- **Never** let the subagent read the plan file itself — construct exactly what it needs.
|
|
55
|
+
- If the subagent asks questions before starting, answer completely before it proceeds.
|
|
56
|
+
|
|
57
|
+
### 2 — Handle implementer status
|
|
58
|
+
|
|
59
|
+
| Status | Action |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `DONE` | Proceed to spec compliance review |
|
|
62
|
+
| `DONE_WITH_CONCERNS` | Read concerns. Correctness/scope concerns → address before review. Observations ("file is getting large") → note and proceed |
|
|
63
|
+
| `NEEDS_CONTEXT` | Provide the missing information, re-dispatch same subagent |
|
|
64
|
+
| `BLOCKED` | Assess root cause: (a) provide more context + re-dispatch, (b) upgrade to a more capable model, (c) split the task into smaller pieces, (d) escalate to human. Never force retry without changing something. |
|
|
65
|
+
|
|
66
|
+
### 3 — Spec compliance review
|
|
67
|
+
- Dispatch a spec reviewer subagent with: original task spec + committed code (provide git SHAs or diff).
|
|
68
|
+
- Question it answers: **Did the implementation match the spec exactly?** Nothing missing, nothing extra.
|
|
69
|
+
- If issues found → implementer subagent fixes → spec reviewer re-reviews. Loop until ✅.
|
|
70
|
+
- **Do not start code quality review until spec compliance is ✅.**
|
|
71
|
+
|
|
72
|
+
### 4 — Code quality review
|
|
73
|
+
- Dispatch a code quality reviewer subagent with: the committed code.
|
|
74
|
+
- Question it answers: **Is this well-structured, tested, and maintainable?**
|
|
75
|
+
- If issues found → implementer subagent fixes → code quality reviewer re-reviews. Loop until ✅.
|
|
76
|
+
|
|
77
|
+
### 5 — Mark complete, advance
|
|
78
|
+
- Mark the task complete in the task tracker.
|
|
79
|
+
- Move immediately to the next task. No progress summaries.
|
|
80
|
+
|
|
81
|
+
### 6 — Final review (after all tasks)
|
|
82
|
+
- Dispatch a final code reviewer for the entire implementation holistically.
|
|
83
|
+
- Proceed to branch finalization (full test run, linting, PR preparation).
|
|
84
|
+
|
|
85
|
+
## Model Selection
|
|
86
|
+
|
|
87
|
+
Choose the least powerful model that can handle each role — reduces cost and increases speed.
|
|
88
|
+
|
|
89
|
+
| Role / Task Type | Suggested model tier |
|
|
90
|
+
|---|---|
|
|
91
|
+
| Mechanical implementation: isolated function, clear spec, 1–2 files | Cheapest / fastest |
|
|
92
|
+
| Integration tasks: multi-file coordination, pattern matching, debugging | Standard |
|
|
93
|
+
| Architecture, design decisions, broad codebase understanding | Most capable |
|
|
94
|
+
| Spec compliance review | Standard (needs judgment, not brute force) |
|
|
95
|
+
| Code quality review | Most capable (architectural patterns, test adequacy) |
|
|
96
|
+
|
|
97
|
+
## Anti-patterns
|
|
98
|
+
|
|
99
|
+
- **Never start on main/master** without explicit user consent — work on a feature branch
|
|
100
|
+
- **Never skip spec compliance review** before code quality review — wrong order wastes cycles
|
|
101
|
+
- **Never skip code quality review** even if spec passes — both gates are required
|
|
102
|
+
- **Never dispatch multiple implementer subagents in parallel** — they will conflict on shared files
|
|
103
|
+
- **Never make the subagent read the plan file** — provide the extracted task text directly
|
|
104
|
+
- **Never skip scene-setting context** — subagent needs to understand where the task fits
|
|
105
|
+
- **Never let implementer self-review substitute for reviewer subagents** — self-review is supplementary
|
|
106
|
+
- **Never accept "close enough" on spec compliance** — it is either ✅ or the fix loop runs
|
|
107
|
+
- **Never skip re-review after fixes** — reviewer found issues → implementer fixes → same reviewer reviews again
|
|
108
|
+
- **Never pause between tasks to ask "should I continue?"** — the human asked you to execute the plan; execute it
|
|
109
|
+
- **Never ignore BLOCKED status** — something must change before retry (model, context, or task scope)
|
|
110
|
+
|
|
111
|
+
## Key Principles
|
|
112
|
+
|
|
113
|
+
**Fresh context = focused subagents.** Each implementer subagent is constructed from scratch by the coordinator. It inherits no session history, no tool call history, no side conversations. This keeps it on-task and prevents compounding confusion across tasks.
|
|
114
|
+
|
|
115
|
+
**Spec before quality.** Spec compliance first ensures the right thing was built. Code quality second ensures it was built well. Reversing the order wastes quality review effort on implementations that may be refactored or scrapped.
|
|
116
|
+
|
|
117
|
+
**Review loops are the mechanism, not optional.** A reviewer finding issues does not mean failure — it means the loop is working. The loop closes when the reviewer explicitly approves.
|
|
118
|
+
|
|
119
|
+
**Continuous execution is a contract.** The human asked you to execute the plan. Pausing to narrate progress or ask "shall I continue?" breaks the contract and wastes their time.
|
|
120
|
+
|
|
121
|
+
**Context curation is the coordinator's core job.** The coordinator's value is in extracting exactly the right text, interfaces, and background from the plan and codebase, and handing it to each subagent. Get this right and subagents succeed on the first attempt.
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
- Upstream: https://github.com/obra/superpowers.git
|