@winspan/claude-forge 8.54.4 → 9.2.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 +649 -33
- package/README.md +154 -16
- package/dist/catalogs/agents.json +72 -0
- package/dist/catalogs/skills.json +194 -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/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/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 +669 -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 +10 -1
- 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 +50 -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 +66 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.js +897 -0
- package/dist/cli/commands/knowledge.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +0 -12
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +11 -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.map +1 -1
- package/dist/cli/commands/skills.js +14 -128
- 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 +3 -2
- 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 +26 -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 +14 -13
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +20 -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 +765 -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 +82 -0
- package/dist/core/diagnostics/entropy-checks.d.ts.map +1 -0
- package/dist/core/diagnostics/entropy-checks.js +395 -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/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/governance/global-inject.d.ts +60 -0
- package/dist/core/governance/global-inject.d.ts.map +1 -0
- package/dist/core/governance/global-inject.js +129 -0
- package/dist/core/governance/global-inject.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 +14 -3
- package/dist/core/queue/index.js.map +1 -1
- package/dist/core/storage/base.d.ts +158 -0
- package/dist/core/storage/base.d.ts.map +1 -1
- package/dist/core/storage/base.js +570 -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/decisions.d.ts +362 -0
- package/dist/core/storage/decisions.d.ts.map +1 -0
- package/dist/core/storage/decisions.js +502 -0
- package/dist/core/storage/decisions.js.map +1 -0
- package/dist/core/storage/events.d.ts +112 -8
- package/dist/core/storage/events.d.ts.map +1 -1
- package/dist/core/storage/events.js +390 -39
- package/dist/core/storage/events.js.map +1 -1
- package/dist/core/storage/feedback.d.ts +131 -0
- package/dist/core/storage/feedback.d.ts.map +1 -0
- package/dist/core/storage/feedback.js +187 -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 +28 -0
- package/dist/core/storage/injections.d.ts.map +1 -1
- package/dist/core/storage/injections.js +62 -5
- package/dist/core/storage/injections.js.map +1 -1
- package/dist/core/storage/knowledge.d.ts +106 -0
- package/dist/core/storage/knowledge.d.ts.map +1 -0
- package/dist/core/storage/knowledge.js +202 -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 +117 -0
- package/dist/core/storage/pipeline-rollup.d.ts.map +1 -0
- package/dist/core/storage/pipeline-rollup.js +471 -0
- package/dist/core/storage/pipeline-rollup.js.map +1 -0
- package/dist/core/storage/routing.d.ts +16 -3
- package/dist/core/storage/routing.d.ts.map +1 -1
- package/dist/core/storage/routing.js +39 -8
- package/dist/core/storage/routing.js.map +1 -1
- package/dist/core/storage/rows.d.ts +50 -7
- package/dist/core/storage/rows.d.ts.map +1 -1
- package/dist/core/storage/schema.sql +302 -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 +351 -15
- package/dist/core/storage/sessions.js.map +1 -1
- package/dist/core/storage/skills.d.ts +1 -0
- package/dist/core/storage/skills.d.ts.map +1 -1
- package/dist/core/storage/skills.js +21 -6
- package/dist/core/storage/skills.js.map +1 -1
- package/dist/core/storage/sqlite.d.ts +253 -20
- package/dist/core/storage/sqlite.d.ts.map +1 -1
- package/dist/core/storage/sqlite.js +425 -16
- package/dist/core/storage/sqlite.js.map +1 -1
- package/dist/core/storage/tasks.d.ts +474 -2
- package/dist/core/storage/tasks.d.ts.map +1 -1
- package/dist/core/storage/tasks.js +1213 -18
- 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/storage/workflow-recommendations.d.ts +124 -0
- package/dist/core/storage/workflow-recommendations.d.ts.map +1 -0
- package/dist/core/storage/workflow-recommendations.js +274 -0
- package/dist/core/storage/workflow-recommendations.js.map +1 -0
- package/dist/core/types.d.ts +112 -17
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +12 -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 +92 -0
- package/dist/core/utils/binary-paths.d.ts.map +1 -0
- package/dist/core/utils/binary-paths.js +166 -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-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 +41 -0
- package/dist/core/utils/time.d.ts.map +1 -1
- package/dist/core/utils/time.js +114 -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 +137 -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 +49 -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 +58 -4
- package/dist/daemon/handlers/post-tool-use.d.ts.map +1 -1
- package/dist/daemon/handlers/post-tool-use.js +261 -8
- package/dist/daemon/handlers/post-tool-use.js.map +1 -1
- package/dist/daemon/handlers/pre-tool-use.d.ts +156 -0
- package/dist/daemon/handlers/pre-tool-use.d.ts.map +1 -0
- package/dist/daemon/handlers/pre-tool-use.js +585 -0
- package/dist/daemon/handlers/pre-tool-use.js.map +1 -0
- package/dist/daemon/handlers/stop.d.ts +35 -7
- package/dist/daemon/handlers/stop.d.ts.map +1 -1
- package/dist/daemon/handlers/stop.js +157 -8
- package/dist/daemon/handlers/stop.js.map +1 -1
- package/dist/daemon/handlers/user-prompt.d.ts +36 -14
- package/dist/daemon/handlers/user-prompt.d.ts.map +1 -1
- package/dist/daemon/handlers/user-prompt.js +135 -48
- package/dist/daemon/handlers/user-prompt.js.map +1 -1
- 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.map +1 -1
- package/dist/daemon/index.js +471 -43
- 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 +692 -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 +170 -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/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 +203 -0
- package/dist/daemon/services/decision-hint.d.ts.map +1 -0
- package/dist/daemon/services/decision-hint.js +487 -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 +123 -0
- package/dist/daemon/services/event-ttl-sweep.js.map +1 -0
- package/dist/daemon/services/experience-extractor.d.ts +67 -0
- package/dist/daemon/services/experience-extractor.d.ts.map +1 -0
- package/dist/daemon/services/experience-extractor.js +323 -0
- package/dist/daemon/services/experience-extractor.js.map +1 -0
- package/dist/daemon/services/feedback-aggregator.d.ts +179 -0
- package/dist/daemon/services/feedback-aggregator.d.ts.map +1 -0
- package/dist/daemon/services/feedback-aggregator.js +455 -0
- package/dist/daemon/services/feedback-aggregator.js.map +1 -0
- package/dist/daemon/services/heartbeat-writer.d.ts +55 -0
- package/dist/daemon/services/heartbeat-writer.d.ts.map +1 -0
- package/dist/daemon/services/heartbeat-writer.js +111 -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 +140 -0
- package/dist/daemon/services/kb-injector.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 +219 -1
- package/dist/daemon/services/task-segmenter.d.ts.map +1 -1
- package/dist/daemon/services/task-segmenter.js +481 -17
- package/dist/daemon/services/task-segmenter.js.map +1 -1
- package/dist/daemon/services/violation-reporter.d.ts +130 -0
- package/dist/daemon/services/violation-reporter.d.ts.map +1 -0
- package/dist/daemon/services/violation-reporter.js +339 -0
- package/dist/daemon/services/violation-reporter.js.map +1 -0
- 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/templates/agents/claudemd-writer.md +101 -0
- package/dist/daemon/templates/agents/coder.md +105 -0
- package/dist/daemon/templates/agents/decision-maker.md +460 -0
- package/dist/daemon/templates/agents/doc-reviewer.md +115 -0
- package/dist/daemon/templates/agents/harness-debug-full.md +114 -0
- package/dist/daemon/templates/agents/harness-hotfix.md +99 -0
- package/dist/daemon/templates/agents/hybrid-feature-with-safety.md +104 -0
- package/dist/daemon/templates/agents/knowledge-builder.md +119 -0
- package/dist/daemon/templates/agents/patch-applier.md +144 -0
- package/dist/daemon/templates/agents/planner.md +165 -0
- package/dist/daemon/templates/agents/refactor-specialist.md +98 -0
- package/dist/daemon/templates/agents/skill-distiller.md +113 -0
- package/dist/daemon/templates/agents/task-boundary-classifier.md +64 -0
- package/dist/daemon/templates/agents/verify-agent.md +136 -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 +24 -10
- 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 +937 -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 +73 -0
- package/dist/knowledge/constants.d.ts.map +1 -0
- package/dist/knowledge/constants.js +93 -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/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 +228 -0
- package/dist/knowledge/prompt.d.ts.map +1 -0
- package/dist/knowledge/prompt.js +404 -0
- package/dist/knowledge/prompt.js.map +1 -0
- package/dist/knowledge/query.d.ts +105 -0
- package/dist/knowledge/query.d.ts.map +1 -0
- package/dist/knowledge/query.js +341 -0
- package/dist/knowledge/query.js.map +1 -0
- package/dist/knowledge/repo-map.d.ts +91 -0
- package/dist/knowledge/repo-map.d.ts.map +1 -0
- package/dist/knowledge/repo-map.js +408 -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 +288 -0
- package/dist/knowledge/validator.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +222 -1
- 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/claude-cli-resolver.d.ts +26 -0
- package/dist/skills/distill/claude-cli-resolver.d.ts.map +1 -0
- package/dist/skills/distill/claude-cli-resolver.js +115 -0
- package/dist/skills/distill/claude-cli-resolver.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 +491 -0
- package/dist/skills/distilled/distilled-architecture-decision.md +173 -0
- package/dist/skills/distilled/distilled-creator.md +178 -0
- package/dist/skills/distilled/distilled-db-schema-design.md +245 -0
- package/dist/skills/distilled/distilled-defi-amm-security.md +293 -0
- package/dist/skills/distilled/distilled-executing-plans.md +113 -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-spec-driven-design.md +193 -0
- package/dist/skills/distilled/distilled-systematic-debugging.md +306 -0
- package/dist/skills/distilled/distilled-verification-before-completion.md +203 -0
- package/dist/skills/keyword-score.d.ts +29 -0
- package/dist/skills/keyword-score.d.ts.map +1 -0
- package/dist/skills/keyword-score.js +54 -0
- package/dist/skills/keyword-score.js.map +1 -0
- package/dist/skills/registry.d.ts +64 -20
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +102 -105
- package/dist/skills/registry.js.map +1 -1
- package/dist/skills/tools/pipeline-suggest.js +14 -14
- package/dist/skills/tools/skill-invoke.d.ts +1 -1
- package/dist/skills/tools/skill-invoke.js +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/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/events.d.ts.map +1 -1
- package/dist/web/routes/events.js +24 -0
- 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 +783 -2
- package/dist/web/routes/insights.js.map +1 -1
- package/dist/web/routes/knowledge.d.ts +16 -0
- package/dist/web/routes/knowledge.d.ts.map +1 -0
- package/dist/web/routes/knowledge.js +661 -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 +37 -0
- package/dist/web/routes/pipeline.d.ts.map +1 -0
- package/dist/web/routes/pipeline.js +149 -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 +6 -1
- 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 +9 -1
- 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/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/task-timeline.d.ts +102 -0
- package/dist/web/routes/task-timeline.d.ts.map +1 -0
- package/dist/web/routes/task-timeline.js +274 -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 +355 -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 +111 -0
- package/dist/web/routes/violations.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +79 -19
- package/dist/web/server.js.map +1 -1
- 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 +125 -0
- package/dist/web/services/distill-manager.d.ts.map +1 -0
- package/dist/web/services/distill-manager.js +308 -0
- package/dist/web/services/distill-manager.js.map +1 -0
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js +2 -0
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js.map +1 -0
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js +2 -0
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js.map +1 -0
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js +3 -0
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js.map +1 -0
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js +2 -0
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js.map +1 -0
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js +2 -0
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js.map +1 -0
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js +2 -0
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js.map +1 -0
- package/dist/web/static/assets/DriftTab-DqpepOhI.js +2 -0
- package/dist/web/static/assets/DriftTab-DqpepOhI.js.map +1 -0
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js +3 -0
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js.map +1 -0
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js +2 -0
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js.map +1 -0
- package/dist/web/static/assets/MarkdownRenderer-DZmTl-8J.js +3 -0
- package/dist/web/static/assets/MarkdownRenderer-DZmTl-8J.js.map +1 -0
- package/dist/web/static/assets/NotFound-BQPh0vaF.js +2 -0
- package/dist/web/static/assets/NotFound-BQPh0vaF.js.map +1 -0
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js +2 -0
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js.map +1 -0
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js +2 -0
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js.map +1 -0
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js +2 -0
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js.map +1 -0
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js +2 -0
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js.map +1 -0
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js +2 -0
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js.map +1 -0
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js +6 -0
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js.map +1 -0
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js +3 -0
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js.map +1 -0
- package/dist/web/static/assets/arco-Bhi3a6Qp.js +14 -0
- package/dist/web/static/assets/arco-Bhi3a6Qp.js.map +1 -0
- package/dist/web/static/assets/arco-DFQA6dO_.css +1 -0
- package/dist/web/static/assets/charts-BuHQWDbQ.js +37 -0
- package/dist/web/static/assets/charts-BuHQWDbQ.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-7bl3kbcx.css +1 -0
- package/dist/web/static/assets/index-BIYnq1Dx.js +4 -0
- package/dist/web/static/assets/index-BIYnq1Dx.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/outcome-DUn1NjlC.js +2 -0
- package/dist/web/static/assets/outcome-DUn1NjlC.js.map +1 -0
- package/dist/web/static/assets/query-S6X1S7K9.js +2 -0
- package/dist/web/static/assets/{query-C99w429o.js.map → query-S6X1S7K9.js.map} +1 -1
- package/dist/web/static/assets/{react-router-r79dBVy4.js → react-router-JVUrkhdd.js} +3 -3
- package/dist/web/static/assets/{react-router-r79dBVy4.js.map → react-router-JVUrkhdd.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-BkZfCDsz.js +6 -0
- package/dist/web/static/assets/syntax-highlighter-BkZfCDsz.js.map +1 -0
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js +2 -0
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js.map +1 -0
- package/dist/web/static/assets/vendor-DWgdB1eY.js +65 -0
- package/dist/web/static/assets/vendor-DWgdB1eY.js.map +1 -0
- package/dist/web/static/index.html +12 -8
- package/package.json +14 -3
- 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/task-title-BhOcemuR.js +0 -2
- package/dist/web/static/assets/task-title-BhOcemuR.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,293 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-defi-amm-security
|
|
3
|
+
version: 0.2.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: defi-amm-security (score 3.5/5)'
|
|
5
|
+
keywords:
|
|
6
|
+
- defi
|
|
7
|
+
- amm
|
|
8
|
+
- security
|
|
9
|
+
rubric_version: 2
|
|
10
|
+
distilled_from:
|
|
11
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
12
|
+
license: MIT
|
|
13
|
+
commit: unknown
|
|
14
|
+
paths:
|
|
15
|
+
- defi-amm-security/SKILL.md
|
|
16
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
17
|
+
license: MIT
|
|
18
|
+
commit: unknown
|
|
19
|
+
paths:
|
|
20
|
+
- django-security/SKILL.md
|
|
21
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
22
|
+
license: MIT
|
|
23
|
+
commit: unknown
|
|
24
|
+
paths:
|
|
25
|
+
- laravel-security/SKILL.md
|
|
26
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
27
|
+
license: MIT
|
|
28
|
+
commit: unknown
|
|
29
|
+
paths:
|
|
30
|
+
- llm-trading-agent-security/SKILL.md
|
|
31
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
32
|
+
license: MIT
|
|
33
|
+
commit: unknown
|
|
34
|
+
paths:
|
|
35
|
+
- perl-security/SKILL.md
|
|
36
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
37
|
+
license: MIT
|
|
38
|
+
commit: unknown
|
|
39
|
+
paths:
|
|
40
|
+
- quarkus-security/SKILL.md
|
|
41
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
42
|
+
license: MIT
|
|
43
|
+
commit: unknown
|
|
44
|
+
paths:
|
|
45
|
+
- security-bounty-hunter/SKILL.md
|
|
46
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
47
|
+
license: MIT
|
|
48
|
+
commit: unknown
|
|
49
|
+
paths:
|
|
50
|
+
- security-review/SKILL.md
|
|
51
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
52
|
+
license: MIT
|
|
53
|
+
commit: unknown
|
|
54
|
+
paths:
|
|
55
|
+
- security-scan/SKILL.md
|
|
56
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
57
|
+
license: MIT
|
|
58
|
+
commit: unknown
|
|
59
|
+
paths:
|
|
60
|
+
- springboot-security/SKILL.md
|
|
61
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
62
|
+
license: MIT
|
|
63
|
+
commit: unknown
|
|
64
|
+
paths:
|
|
65
|
+
- security-review/SKILL.md
|
|
66
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
67
|
+
license: MIT
|
|
68
|
+
commit: unknown
|
|
69
|
+
paths:
|
|
70
|
+
- laravel-security/SKILL.md
|
|
71
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
72
|
+
license: MIT
|
|
73
|
+
commit: unknown
|
|
74
|
+
paths:
|
|
75
|
+
- quarkus-security/SKILL.md
|
|
76
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
77
|
+
license: MIT
|
|
78
|
+
commit: unknown
|
|
79
|
+
paths:
|
|
80
|
+
- security-review/SKILL.md
|
|
81
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
82
|
+
license: MIT
|
|
83
|
+
commit: unknown
|
|
84
|
+
paths:
|
|
85
|
+
- springboot-security/SKILL.md
|
|
86
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
87
|
+
license: MIT
|
|
88
|
+
commit: unknown
|
|
89
|
+
paths:
|
|
90
|
+
- defi-amm-security/SKILL.md
|
|
91
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
92
|
+
license: MIT
|
|
93
|
+
commit: unknown
|
|
94
|
+
paths:
|
|
95
|
+
- django-security/SKILL.md
|
|
96
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
97
|
+
license: MIT
|
|
98
|
+
commit: unknown
|
|
99
|
+
paths:
|
|
100
|
+
- laravel-security/SKILL.md
|
|
101
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
102
|
+
license: MIT
|
|
103
|
+
commit: unknown
|
|
104
|
+
paths:
|
|
105
|
+
- llm-trading-agent-security/SKILL.md
|
|
106
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
107
|
+
license: MIT
|
|
108
|
+
commit: unknown
|
|
109
|
+
paths:
|
|
110
|
+
- perl-security/SKILL.md
|
|
111
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
112
|
+
license: MIT
|
|
113
|
+
commit: unknown
|
|
114
|
+
paths:
|
|
115
|
+
- security-bounty-hunter/SKILL.md
|
|
116
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
117
|
+
license: MIT
|
|
118
|
+
commit: unknown
|
|
119
|
+
paths:
|
|
120
|
+
- security-review/SKILL.md
|
|
121
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
122
|
+
license: MIT
|
|
123
|
+
commit: unknown
|
|
124
|
+
paths:
|
|
125
|
+
- security-scan/SKILL.md
|
|
126
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
127
|
+
license: MIT
|
|
128
|
+
commit: unknown
|
|
129
|
+
paths:
|
|
130
|
+
- springboot-security/SKILL.md
|
|
131
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
132
|
+
license: MIT
|
|
133
|
+
commit: unknown
|
|
134
|
+
paths:
|
|
135
|
+
- security-review/SKILL.md
|
|
136
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
137
|
+
license: MIT
|
|
138
|
+
commit: unknown
|
|
139
|
+
paths:
|
|
140
|
+
- defi-amm-security/SKILL.md
|
|
141
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
142
|
+
license: MIT
|
|
143
|
+
commit: unknown
|
|
144
|
+
paths:
|
|
145
|
+
- django-security/SKILL.md
|
|
146
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
147
|
+
license: MIT
|
|
148
|
+
commit: unknown
|
|
149
|
+
paths:
|
|
150
|
+
- laravel-security/SKILL.md
|
|
151
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
152
|
+
license: MIT
|
|
153
|
+
commit: unknown
|
|
154
|
+
paths:
|
|
155
|
+
- llm-trading-agent-security/SKILL.md
|
|
156
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
157
|
+
license: MIT
|
|
158
|
+
commit: unknown
|
|
159
|
+
paths:
|
|
160
|
+
- perl-security/SKILL.md
|
|
161
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
162
|
+
license: MIT
|
|
163
|
+
commit: unknown
|
|
164
|
+
paths:
|
|
165
|
+
- quarkus-security/SKILL.md
|
|
166
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
167
|
+
license: MIT
|
|
168
|
+
commit: unknown
|
|
169
|
+
paths:
|
|
170
|
+
- security-bounty-hunter/SKILL.md
|
|
171
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
172
|
+
license: MIT
|
|
173
|
+
commit: unknown
|
|
174
|
+
paths:
|
|
175
|
+
- security-review/SKILL.md
|
|
176
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
177
|
+
license: MIT
|
|
178
|
+
commit: unknown
|
|
179
|
+
paths:
|
|
180
|
+
- security-scan/SKILL.md
|
|
181
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
182
|
+
license: MIT
|
|
183
|
+
commit: unknown
|
|
184
|
+
paths:
|
|
185
|
+
- springboot-security/SKILL.md
|
|
186
|
+
distilled_at: '2026-05-29T08:14:29.853Z'
|
|
187
|
+
distilled_by: claude-code skill-distiller agent
|
|
188
|
+
it_universal_score: 3.5
|
|
189
|
+
it_universal_dims:
|
|
190
|
+
d1: 0.5
|
|
191
|
+
d2: 1
|
|
192
|
+
d3: 0.5
|
|
193
|
+
d4: 1
|
|
194
|
+
d5: 0.5
|
|
195
|
+
it_universal_rationale: >-
|
|
196
|
+
Domain-specific to DeFi/smart-contracts but toolchain-neutral and directly reusable across any AMM
|
|
197
|
+
protocol audit without project-specific rewrites.
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
# DeFi AMM Smart Contract Security Audit Patterns
|
|
201
|
+
|
|
202
|
+
## When to use
|
|
203
|
+
- Auditing or reviewing any AMM-style smart contract (swap, mint, burn logic)
|
|
204
|
+
- Detecting economic attack vectors: flash loans, sandwich attacks, price manipulation
|
|
205
|
+
- Adding security assertions to DeFi protocol tests
|
|
206
|
+
- Pre-deployment security review for decentralized exchange contracts
|
|
207
|
+
- Evaluating third-party DeFi integrations your protocol depends on
|
|
208
|
+
|
|
209
|
+
## Core idea
|
|
210
|
+
AMM contracts face economic attacks that don't exist in traditional software — a
|
|
211
|
+
single transaction can borrow billions, manipulate prices, and repay within the
|
|
212
|
+
same block. The primary defense is the **Check-Effects-Interactions (CEI)**
|
|
213
|
+
pattern combined with trustless price oracles and user-controlled slippage
|
|
214
|
+
guards. Flash loans make any on-chain spot price untrustworthy as a valuation
|
|
215
|
+
oracle; always reference time-weighted or off-chain signed prices. Reentrancy
|
|
216
|
+
guards prevent state corruption when external calls re-enter your contract.
|
|
217
|
+
Access control and event emission provide governance safety and off-chain
|
|
218
|
+
auditability.
|
|
219
|
+
|
|
220
|
+
## Steps
|
|
221
|
+
|
|
222
|
+
### 1. Flash Loan Resistance
|
|
223
|
+
- Never trust spot reserve ratios (`reserve1 / reserve0`) as a price oracle
|
|
224
|
+
inside a single transaction — they are flash-loanable in one block
|
|
225
|
+
- Use TWAP (Time-Weighted Average Price) accumulators sampled over ≥ 30 min,
|
|
226
|
+
or off-chain signed feeds (e.g., Chainlink, Pyth) for valuation decisions
|
|
227
|
+
- If your function snapshots a price at entry, verify it against a trustworthy
|
|
228
|
+
oracle *before* any critical state change
|
|
229
|
+
|
|
230
|
+
### 2. Slippage Protection
|
|
231
|
+
- Every trade/swap function must accept caller-supplied `minAmountOut`
|
|
232
|
+
(or equivalent) — revert if actual output < `minAmountOut`
|
|
233
|
+
- Add a `deadline` parameter; revert if `block.timestamp > deadline` to
|
|
234
|
+
prevent transactions from sitting in the mempool and executing at stale rates
|
|
235
|
+
- Never silently accept a worse rate on the user's behalf
|
|
236
|
+
|
|
237
|
+
### 3. Reentrancy Guards
|
|
238
|
+
- Apply CEI order strictly on every state-changing path:
|
|
239
|
+
**Check** conditions → **Effect** storage writes → **Interact** externally
|
|
240
|
+
- Add a reentrancy mutex or use a standard `ReentrancyGuard` on swap, mint,
|
|
241
|
+
burn, and flash-loan entry points
|
|
242
|
+
- Callback tokens (ERC-777, hooks) can re-enter on `transfer` — test this
|
|
243
|
+
path explicitly
|
|
244
|
+
|
|
245
|
+
### 4. Price Oracle Integrity
|
|
246
|
+
- **Instantaneous** (`reserve1/reserve0`): manipulable, use only for display
|
|
247
|
+
- **TWAP** (cumulative price accumulators, ≥ 30 min): safer for reference
|
|
248
|
+
- **Off-chain signed feeds**: validate `updatedAt` staleness and deviation
|
|
249
|
+
thresholds before accepting a price
|
|
250
|
+
- Clearly document which oracle type each function relies on
|
|
251
|
+
|
|
252
|
+
### 5. Integer Arithmetic Safety
|
|
253
|
+
- Use a compiler version / library with built-in overflow checks, or explicit
|
|
254
|
+
safe-math throughout
|
|
255
|
+
- In fixed-point math: **multiply before divide** to preserve precision;
|
|
256
|
+
use adequate decimal precision (18 decimals is standard for ERC-20)
|
|
257
|
+
- For fee calculations in basis points (e.g., 30 bps = 0.3%), verify
|
|
258
|
+
`amount * fee / 10_000` does not truncate to zero for dust amounts
|
|
259
|
+
|
|
260
|
+
### 6. Access Control & Governance
|
|
261
|
+
- Separate liquidity-provider roles from protocol-admin roles
|
|
262
|
+
- Privileged operations (fee changes, pause, emergency drain) must be
|
|
263
|
+
role-gated and ideally time-locked
|
|
264
|
+
- Emit events for every privileged and economically significant state change
|
|
265
|
+
to enable off-chain monitoring and incident response
|
|
266
|
+
|
|
267
|
+
## Anti-patterns
|
|
268
|
+
- **Trusting spot reserves as an oracle**: single-block flash loan makes this
|
|
269
|
+
trivially exploitable
|
|
270
|
+
- **Missing `minAmountOut`**: exposes users to MEV sandwich attacks
|
|
271
|
+
- **State update after external call**: classic reentrancy window
|
|
272
|
+
- **Hardcoded price thresholds**: market conditions change; use relative %
|
|
273
|
+
deviation guards instead
|
|
274
|
+
- **Single-owner admin key with no timelock**: single point of failure for
|
|
275
|
+
protocol governance
|
|
276
|
+
- **Silent overflow/underflow**: corrupts pool accounting without revert
|
|
277
|
+
|
|
278
|
+
## Audit Checklist
|
|
279
|
+
|
|
280
|
+
- [ ] All valuation-critical price references come from TWAP or external oracle
|
|
281
|
+
- [ ] Flash loan scenario analyzed — protocol is not exploitable within a
|
|
282
|
+
single block
|
|
283
|
+
- [ ] Every trade function has `minAmountOut` + `deadline` parameters
|
|
284
|
+
- [ ] CEI pattern applied on all state-changing functions with external calls
|
|
285
|
+
- [ ] Reentrancy guard present on swap, mint, burn, and flash entry points
|
|
286
|
+
- [ ] Integer overflow / underflow handled (compiler-enforced or explicit)
|
|
287
|
+
- [ ] Admin vs. LP roles separated; governance actions time-locked
|
|
288
|
+
- [ ] Events emitted for all privileged and economic state changes
|
|
289
|
+
- [ ] Callback-token (ERC-777, hooks) reentrancy explicitly tested in your
|
|
290
|
+
test suite
|
|
291
|
+
|
|
292
|
+
## References
|
|
293
|
+
- Upstream: https://github.com/affaan-m/ECC.git
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-executing-plans
|
|
3
|
+
version: 0.2.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: executing-plans (score 4/5)'
|
|
5
|
+
keywords:
|
|
6
|
+
- executing
|
|
7
|
+
- plans
|
|
8
|
+
rubric_version: 2
|
|
9
|
+
distilled_from:
|
|
10
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
11
|
+
license: MIT
|
|
12
|
+
commit: unknown
|
|
13
|
+
paths:
|
|
14
|
+
- executing-plans/SKILL.md
|
|
15
|
+
- upstream: https://github.com/obra/superpowers.git
|
|
16
|
+
license: MIT
|
|
17
|
+
commit: unknown
|
|
18
|
+
paths:
|
|
19
|
+
- writing-plans/SKILL.md
|
|
20
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
21
|
+
license: MIT
|
|
22
|
+
commit: unknown
|
|
23
|
+
paths:
|
|
24
|
+
- inventory-demand-planning/SKILL.md
|
|
25
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
26
|
+
license: MIT
|
|
27
|
+
commit: unknown
|
|
28
|
+
paths:
|
|
29
|
+
- plan-orchestrate/SKILL.md
|
|
30
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
31
|
+
license: MIT
|
|
32
|
+
commit: unknown
|
|
33
|
+
paths:
|
|
34
|
+
- inventory-demand-planning/SKILL.md
|
|
35
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
36
|
+
license: MIT
|
|
37
|
+
commit: unknown
|
|
38
|
+
paths:
|
|
39
|
+
- inventory-demand-planning/SKILL.md
|
|
40
|
+
- upstream: https://github.com/affaan-m/ECC.git
|
|
41
|
+
license: MIT
|
|
42
|
+
commit: unknown
|
|
43
|
+
paths:
|
|
44
|
+
- plan-orchestrate/SKILL.md
|
|
45
|
+
distilled_at: '2026-05-29T08:10:47.754Z'
|
|
46
|
+
distilled_by: claude-code skill-distiller agent
|
|
47
|
+
it_universal_score: 4
|
|
48
|
+
it_universal_dims:
|
|
49
|
+
d1: 1
|
|
50
|
+
d2: 0.5
|
|
51
|
+
d3: 1
|
|
52
|
+
d4: 0.5
|
|
53
|
+
d5: 1
|
|
54
|
+
it_universal_rationale: >-
|
|
55
|
+
Language-neutral plan-execution methodology with strong stop/verify discipline; only mild
|
|
56
|
+
deduction for cross-referencing a platform-specific skill framework (abstracted away in
|
|
57
|
+
distillation).
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
# Executing Plans
|
|
61
|
+
|
|
62
|
+
## When to use
|
|
63
|
+
- You have a written implementation plan (file or structured checklist) and are about to start a separate implementation session
|
|
64
|
+
- You want to ensure critical review, progress tracking, and verification gates before shipping
|
|
65
|
+
- Any codebase, any language — the skill governs *how* you work through a plan, not *what* the plan contains
|
|
66
|
+
|
|
67
|
+
## Core idea
|
|
68
|
+
|
|
69
|
+
Before writing a single line of code, load the plan and review it critically. Raise any concerns with your collaborator; resolve ambiguity before execution, not during. Then execute task-by-task, marking each item `in_progress` → `completed` and running the verifications the plan specifies. If you hit a genuine blocker, stop and ask — never guess your way through an unclear or broken instruction. After all tasks pass verification, hand off to a finishing/review phase before merging.
|
|
70
|
+
|
|
71
|
+
## Steps
|
|
72
|
+
|
|
73
|
+
1. **Announce intent** — Tell your collaborator which plan file you are executing, so they have the same mental model.
|
|
74
|
+
|
|
75
|
+
2. **Load & review the plan critically**
|
|
76
|
+
- Read the entire plan before touching any code.
|
|
77
|
+
- Flag ambiguities, missing dependencies, or risky assumptions.
|
|
78
|
+
- If concerns exist → raise them with your collaborator and wait for resolution.
|
|
79
|
+
- If no concerns → proceed to step 3.
|
|
80
|
+
|
|
81
|
+
3. **Create a task list** — Derive a checklist (e.g., TodoWrite or any tracking mechanism) directly from the plan's task list. Do not reinterpret task scope at this stage.
|
|
82
|
+
|
|
83
|
+
4. **Execute tasks one at a time**
|
|
84
|
+
- Mark the task `in_progress`.
|
|
85
|
+
- Follow every sub-step exactly as written; bite-sized steps exist for a reason.
|
|
86
|
+
- Run each verification the plan specifies (tests, lint, manual checks, etc.).
|
|
87
|
+
- Mark the task `completed` only after verification passes.
|
|
88
|
+
- Repeat for the next task.
|
|
89
|
+
|
|
90
|
+
5. **Stop-and-ask triggers** — Immediately halt execution and ask your collaborator when:
|
|
91
|
+
- A dependency is missing or unavailable.
|
|
92
|
+
- A verification fails repeatedly and the cause is unclear.
|
|
93
|
+
- An instruction is ambiguous or contradictory.
|
|
94
|
+
- The plan has a critical gap that prevents starting the next task.
|
|
95
|
+
|
|
96
|
+
6. **Do not skip to a later task** to work around a blocker in an earlier one — partial execution can leave the codebase in an inconsistent state.
|
|
97
|
+
|
|
98
|
+
7. **Finishing phase** — After all tasks complete and all verifications pass:
|
|
99
|
+
- Summarise what was done and which tests were run.
|
|
100
|
+
- Present the diff / change summary to your collaborator.
|
|
101
|
+
- Get explicit sign-off before merging to the main branch.
|
|
102
|
+
|
|
103
|
+
## Anti-patterns
|
|
104
|
+
|
|
105
|
+
- **Guessing through blockers** — If an instruction is unclear, guessing introduces silent bugs. Stop and ask.
|
|
106
|
+
- **Skipping verifications** — "I'll run the tests later" defeats the purpose of checkpoints.
|
|
107
|
+
- **Starting on the main branch without consent** — Always confirm the branch policy with your collaborator; default to a feature branch.
|
|
108
|
+
- **Re-interpreting plan scope mid-execution** — If the plan seems wrong, surface it (step 2 or stop-and-ask), don't silently change what you're building.
|
|
109
|
+
- **Marking completed before verification** — Status should reflect reality, not optimism.
|
|
110
|
+
- **Merging multiple tasks into one batch** — Granular tracking makes rollback and review far easier.
|
|
111
|
+
|
|
112
|
+
## References
|
|
113
|
+
- Upstream: https://github.com/obra/superpowers.git
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: distilled-harness-engineering
|
|
3
|
+
version: 0.1.0-distilled
|
|
4
|
+
description: 'Distilled IT-universal skill: harness-engineering (score 5/5)'
|
|
5
|
+
spawn_agent: refactor-specialist
|
|
6
|
+
keywords:
|
|
7
|
+
- harness
|
|
8
|
+
- engineering
|
|
9
|
+
- legacy
|
|
10
|
+
- 遗留代码
|
|
11
|
+
- 特征测试
|
|
12
|
+
- characterization
|
|
13
|
+
- 重构
|
|
14
|
+
- refactor
|
|
15
|
+
- 改造
|
|
16
|
+
- 老代码
|
|
17
|
+
rubric_version: 2
|
|
18
|
+
distilled_from:
|
|
19
|
+
- upstream: https://github.com/winspan/claude-forge.git
|
|
20
|
+
license: MIT
|
|
21
|
+
commit: 7d96b86c
|
|
22
|
+
paths:
|
|
23
|
+
- official/official-harness-engineering.md
|
|
24
|
+
distilled_at: '2026-05-27T02:00:47.967Z'
|
|
25
|
+
distilled_by: claude-sonnet-4-6
|
|
26
|
+
it_universal_score: 5
|
|
27
|
+
it_universal_dims:
|
|
28
|
+
d1: 1
|
|
29
|
+
d2: 1
|
|
30
|
+
d3: 1
|
|
31
|
+
d4: 1
|
|
32
|
+
d5: 1
|
|
33
|
+
it_universal_rationale: Characterization-tests-first refactor; SDLC universal.
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 触发条件
|
|
37
|
+
|
|
38
|
+
- 需要修改缺少测试覆盖的现有代码(遗留代码、接手的陌生代码库)
|
|
39
|
+
- 代码复杂度高,直接改动风险大,担心破坏现有行为
|
|
40
|
+
- 计划进行大规模重构或模块迁移
|
|
41
|
+
- 接手高风险核心模块,需要在理解行为后再动手
|
|
42
|
+
- 现有代码有隐含假设或副作用,需要先记录再修改
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 核心原则
|
|
47
|
+
|
|
48
|
+
1. **先保护,后修改** — 在任何改动之前,用测试固化现有行为,确保改动有安全网兜底。
|
|
49
|
+
2. **特征测试记录现实,不评判对错** — 测试描述"代码现在做什么",即使存在 bug 也先如实记录,避免在理解阶段引入主观判断。
|
|
50
|
+
3. **小步前进,即时验证** — 每次只改一处,改完立即运行测试套件;测试失败立即回滚,不积累未验证的变更。
|
|
51
|
+
4. **行为一致性是重构的唯一成功标准** — 重构完成后,外部可观测行为必须与原始行为文档一致;新功能用新测试覆盖,不混入重构过程。
|
|
52
|
+
5. **与 TDD 的边界清晰** — TDD 用于新功能(先写测试再实现);Harness Engineering 用于改动现有代码(先理解再保护再修改),两者目的不同,不可混用。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 工作流
|
|
57
|
+
|
|
58
|
+
**复杂度判断(入口)**
|
|
59
|
+
|
|
60
|
+
| 复杂度 | 描述 | 流程 |
|
|
61
|
+
|--------|------|------|
|
|
62
|
+
| 简单 | 改动范围小、依赖少 | 跳过阶段 1,直接从阶段 2 开始 |
|
|
63
|
+
| 中等 | 多模块依赖、有副作用 | 完整四阶段 |
|
|
64
|
+
| 复杂 | 核心模块、跨层依赖、高风险迁移 | 完整四阶段 + 额外人工审查 |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
**阶段 1 — 理解(Understand)**
|
|
69
|
+
|
|
70
|
+
1. 阅读目标代码,识别关键逻辑、边界条件和隐含假设。
|
|
71
|
+
2. 绘制依赖关系图:哪些调用方依赖这段代码,哪些外部资源(数据库、网络、文件系统)被访问。
|
|
72
|
+
3. 找到所有入口点(公开接口、事件触发点)和输出点(返回值、副作用、写操作)。
|
|
73
|
+
4. 输出**行为文档**:以自然语言或表格记录当前实际行为,作为后续阶段的基准。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
**阶段 2 — 特征测试(Characterize)**
|
|
78
|
+
|
|
79
|
+
5. 针对行为文档中的每条行为编写特征测试(Characterization Tests),覆盖正常路径、边界条件和已知异常路径。
|
|
80
|
+
6. 运行测试套件,确保**全部通过**(目标覆盖率 > 80%)。若测试失败,说明行为文档有遗漏,先补文档再补测试,不修改被测代码。
|
|
81
|
+
7. 全绿后方可进入下一阶段。
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
**阶段 3 — 安全重构(Refactor)**
|
|
86
|
+
|
|
87
|
+
8. 按优先级逐步重构:消除重复 → 提取函数/模块 → 改善命名 → 简化复杂逻辑。每次只改一处,改完立即运行完整 harness;测试失败立即回滚。
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
**阶段 4 — 验证(Verify)**
|
|
92
|
+
|
|
93
|
+
在阶段 3 完成后执行:运行完整测试套件;对照原始行为文档逐条确认行为一致性;进行代码审查;新增行为用新测试覆盖,旧特征测试在确认无用后逐步退役。
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 反模式
|
|
98
|
+
|
|
99
|
+
1. **边理解边修改** — 在行为文档和特征测试建立之前就动手改代码,导致无法判断改动是否破坏了原有行为。
|
|
100
|
+
2. **特征测试写"应该怎样"而非"现在怎样"** — 将期望行为写入特征测试,掩盖了现有 bug,后续重构时误以为行为已修复。
|
|
101
|
+
3. **大步重构,延迟运行测试** — 一次性改动多处后才运行测试,失败时无法定位是哪一步引入的问题。
|
|
102
|
+
4. **测试失败后继续前进** — 不回滚、不修复,带着红色测试继续重构,导致安全网失效。
|
|
103
|
+
5. **将重构与新功能开发混在同一次提交** — 行为变更和结构变更混合,代码审查和问题定位都变得困难。
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 验证标准
|
|
108
|
+
|
|
109
|
+
完成 Harness Engineering 流程后,逐项确认:
|
|
110
|
+
|
|
111
|
+
- [ ] 行为文档已输出,覆盖所有已知入口点、输出点和边界条件
|
|
112
|
+
- [ ] 特征测试覆盖率 ≥ 80%,且在重构开始前全部通过(全绿)
|
|
113
|
+
- [ ] 重构过程中每一步改动后测试均保持全绿;出现红色时已立即回滚
|
|
114
|
+
- [ ] 重构完成后,外部可观测行为与行为文档逐条一致
|
|
115
|
+
- [ ] 新增行为有独立的新测试覆盖,未混入特征测试
|
|
116
|
+
- [ ] 代码审查已完成,无遗留的 TODO / 临时注释
|
|
117
|
+
- [ ] 旧特征测试中已无用的部分已标记退役或删除
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 适用范围
|
|
122
|
+
|
|
123
|
+
本技能适用于以下通用层次,与具体技术栈无关:
|
|
124
|
+
|
|
125
|
+
- **后端服务** — 业务逻辑层、API 处理层、中间件
|
|
126
|
+
- **持久化层** — 数据库访问、文件读写、缓存操作
|
|
127
|
+
- **CLI 工具** — 命令解析、子命令处理、输出格式化
|
|
128
|
+
- **前端** — 组件逻辑、状态管理、数据转换工具函数
|
|
129
|
+
- **调度器 / 后台任务** — 定时任务、队列消费者、事件处理器
|
|
130
|
+
- **知识库 / 配置加载** — 配置解析、数据初始化、静态资源处理
|
|
131
|
+
|
|
132
|
+
> 任何存在"不敢改、不了解、没有测试"的代码模块,均适用本技能。
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 上游对照
|
|
137
|
+
|
|
138
|
+
本技能从单一上游的 harness-engineering 规范(来源见 frontmatter)提炼,核心方法论源自 Michael Feathers《Working Effectively with Legacy Code》的特征测试思想。上游文档包含特定 Agent 调用建议(`researcher` / `tester` / `refactor-specialist`),已泛化为通用流程步骤,适配任意项目的工具链和团队分工。
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 示例(伪代码)
|
|
143
|
+
|
|
144
|
+
场景:对一个缺少测试的"用户权限校验"模块进行重构。
|
|
145
|
+
|
|
146
|
+
### 阶段 1 — 理解
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
// 阅读 auth_check 模块,记录行为文档
|
|
150
|
+
behavior_doc = {
|
|
151
|
+
inputs: [user_id, resource_id, action],
|
|
152
|
+
outputs: [bool: allowed, side_effect: audit_log_write],
|
|
153
|
+
paths: [
|
|
154
|
+
"user not found → return false",
|
|
155
|
+
"resource not found → raise NotFoundError",
|
|
156
|
+
"user.role == 'admin' → return true (skip resource check)",
|
|
157
|
+
"user.permissions includes action → return true",
|
|
158
|
+
"otherwise → return false + write audit log"
|
|
159
|
+
],
|
|
160
|
+
hidden_deps: ["reads from cache first, falls back to DB", "audit log is async"]
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 阶段 2 — 特征测试
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
# Python
|
|
168
|
+
def test_admin_always_allowed():
|
|
169
|
+
assert auth_check(admin_user, any_resource, "delete") == True
|
|
170
|
+
|
|
171
|
+
def test_unknown_user_denied():
|
|
172
|
+
assert auth_check(unknown_id, resource, "read") == False
|
|
173
|
+
|
|
174
|
+
def test_missing_resource_raises():
|
|
175
|
+
with raises(NotFoundError):
|
|
176
|
+
auth_check(user, nonexistent_resource, "read")
|
|
177
|
+
|
|
178
|
+
def test_permitted_action_allowed():
|
|
179
|
+
assert auth_check(user_with_read, resource, "read") == True
|
|
180
|
+
|
|
181
|
+
def test_denied_action_writes_audit():
|
|
182
|
+
auth_check(user_no_perms, resource, "write")
|
|
183
|
+
assert audit_log.last_entry.action == "write"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// TypeScript
|
|
188
|
+
test("admin always allowed", () => {
|
|
189
|
+
expect(authCheck(adminUser, anyResource, "delete")).toBe(true);
|
|
190
|
+
});
|
|
191
|
+
test("unknown user denied", () => {
|
|
192
|
+
expect(authCheck(unknownId, resource, "read")).toBe(false);
|
|
193
|
+
});
|
|
194
|
+
test("missing resource raises", () => {
|
|
195
|
+
expect(() => authCheck(user, nonexistentResource, "read")).toThrow(NotFoundError);
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```go
|
|
200
|
+
// Go
|
|
201
|
+
func TestAdminAlwaysAllowed(t *testing.T) {
|
|
202
|
+
result, _ := authCheck(adminUser, anyResource, "delete")
|
|
203
|
+
assert.True(t, result)
|
|
204
|
+
}
|
|
205
|
+
func TestUnknownUserDenied(t *testing.T) {
|
|
206
|
+
result, _ := authCheck(unknownID, resource, "read")
|
|
207
|
+
assert.False(t, result)
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
> 运行测试套件 → 全绿 → 进入阶段 3。
|
|
212
|
+
|
|
213
|
+
### 阶段 3 — 安全重构(小步示例)
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
// 步骤 A:提取 "admin shortcut" 为独立函数
|
|
217
|
+
function isAdminShortcut(user, action) → bool
|
|
218
|
+
|
|
219
|
+
// 运行 harness → 全绿 → 提交
|
|
220
|
+
|
|
221
|
+
// 步骤 B:提取 "permission lookup" 为独立函数
|
|
222
|
+
function hasPermission(user, resource, action) → bool
|
|
223
|
+
|
|
224
|
+
// 运行 harness → 全绿 → 提交
|
|
225
|
+
|
|
226
|
+
// 步骤 C:将 audit log 写入改为显式调用,消除隐式副作用
|
|
227
|
+
// 运行 harness → 某测试红色 → 立即 git revert 步骤 C → 分析原因
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 阶段 4 — 验证
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
// 对照行为文档逐条验证
|
|
234
|
+
✓ "admin → true" — test_admin_always_allowed 通过
|
|
235
|
+
✓ "user not found → false" — test_unknown_user_denied 通过
|
|
236
|
+
✓ "resource not found → raise"— test_missing_resource_raises 通过
|
|
237
|
+
✓ "permitted → true" — test_permitted_action_allowed 通过
|
|
238
|
+
✓ "denied → audit log" — test_denied_action_writes_audit 通过
|
|
239
|
+
|
|
240
|
+
// 新增行为(重构后 audit log 改为显式)→ 新增独立测试覆盖
|
|
241
|
+
// 旧特征测试中针对隐式副作用的断言 → 标记退役
|
|
242
|
+
```
|