@agent-spaces/server 0.3.61 → 0.3.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/agent-runtime-types.js +12 -0
- package/dist/adapters/claude-code-runtime/index.js +22 -0
- package/dist/adapters/claude-code-runtime/sdk-config.js +34 -10
- package/dist/adapters/codex-runtime.js +2 -2
- package/dist/adapters/git.js +29 -13
- package/dist/adapters/langchain-runtime.js +2 -2
- package/dist/adapters/open-agent-sdk-runtime.js +2 -2
- package/dist/agents/agent-message-parts.js +27 -3
- package/dist/agents/commit-agent.js +1 -0
- package/dist/agents/issue-agent-progress.js +4 -2
- package/dist/agents/issue-agent-runner.js +5 -5
- package/dist/agents/issue-task-controller.js +95 -14
- package/dist/app.js +74 -5
- package/dist/package.json +1 -1
- package/dist/routes/agent-sse.js +4 -2
- package/dist/routes/channel.js +21 -4
- package/dist/routes/file.js +87 -1
- package/dist/routes/hooks.js +88 -0
- package/dist/routes/issue.js +59 -1
- package/dist/routes/output-style.js +48 -0
- package/dist/routes/prompt-template.js +2 -2
- package/dist/routes/skill.js +97 -3
- package/dist/routes/task.js +13 -1
- package/dist/services/agent.js +45 -16
- package/dist/services/hook-engine.js +118 -0
- package/dist/services/issue.js +6 -0
- package/dist/services/notification-hub/bot-agent.js +1 -0
- package/dist/services/output-style.js +134 -0
- package/dist/services/persistent-agent-context.js +37 -4
- package/dist/services/prompt-template.js +2 -2
- package/dist/services/skill.js +275 -40
- package/dist/storage/hook-store.js +55 -0
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +25 -23
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +13 -13
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/0-1bfvfwifh-m.js +1 -0
- package/dist/web/_next/static/chunks/0-f~0xmwl__u5.js +1 -0
- package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +1 -0
- package/dist/web/_next/static/chunks/002_j970b9gdx.js +1 -0
- package/dist/web/_next/static/chunks/014x2qbuiszni.js +3 -0
- package/dist/web/_next/static/chunks/01iqv28_snwus.js +1 -0
- package/dist/web/_next/static/chunks/02c22g~xd-y30.js +19 -0
- package/dist/web/_next/static/chunks/02mf61htij8g0.js +31 -0
- package/dist/web/_next/static/chunks/03scq1-0ykve3.js +1 -0
- package/dist/web/_next/static/chunks/046me66nilkff.js +1 -0
- package/dist/web/_next/static/chunks/04v-pqqs-2lvp.css +1 -0
- package/dist/web/_next/static/chunks/05f8cnmzqd5wb.js +1 -0
- package/dist/web/_next/static/chunks/{0zd1o3u04~qvo.js → 05psi2gtx~bev.js} +7 -7
- package/dist/web/_next/static/chunks/{12odetnu-lyrr.js → 06whz1~s_7pva.js} +12 -12
- package/dist/web/_next/static/chunks/06w~.izyfylap.js +1 -0
- package/dist/web/_next/static/chunks/08kfx8on9oty~.js +1 -0
- package/dist/web/_next/static/chunks/09t62a89~jesc.js +3 -0
- package/dist/web/_next/static/chunks/09y_3krccdd~u.js +1 -0
- package/dist/web/_next/static/chunks/{0njy89g5coeyi.js → 0_8dm7bxp18xo.js} +6 -6
- package/dist/web/_next/static/chunks/0_e~hmntdfop9.js +1 -0
- package/dist/web/_next/static/chunks/0_udc.6.tueey.js +1 -0
- package/dist/web/_next/static/chunks/0_vi1a~g4wx46.js +3 -0
- package/dist/web/_next/static/chunks/{05iy4.c-1cfhd.js → 0aa6bcdmtpekn.js} +1 -1
- package/dist/web/_next/static/chunks/{0tvd~rxgf0oh_.js → 0bbmx45w_h5np.js} +1 -1
- package/dist/web/_next/static/chunks/0cke33d38fnby.js +90 -0
- package/dist/web/_next/static/chunks/{0w1iudd1d46sw.js → 0ctg5qmw7uu.1.js} +2 -2
- package/dist/web/_next/static/chunks/0cyq~8xb~r5fc.js +1 -0
- package/dist/web/_next/static/chunks/0ewceguykiut5.js +1 -0
- package/dist/web/_next/static/chunks/0fxa1edqr7dve.js +1 -0
- package/dist/web/_next/static/chunks/{0202ia13sijwb.js → 0h18ej5yf974e.js} +1 -1
- package/dist/web/_next/static/chunks/0hra80eyuu37u.js +1 -0
- package/dist/web/_next/static/chunks/0i39jifmxla7q.js +1 -0
- package/dist/web/_next/static/chunks/0ie7y4k2ncvnn.js +1 -0
- package/dist/web/_next/static/chunks/0igc~uli58ncw.js +2 -0
- package/dist/web/_next/static/chunks/0kof5qdg8c2-k.js +71 -0
- package/dist/web/_next/static/chunks/{08o-zmr-40r5g.js → 0m11vvph7q94-.js} +1 -1
- package/dist/web/_next/static/chunks/0msb2mi3hiu5_.js +67 -0
- package/dist/web/_next/static/chunks/0np.d~hc1-pmh.js +4 -0
- package/dist/web/_next/static/chunks/{0qpq0~_58fe9a.js → 0oaq67r7ix.vg.js} +1 -1
- package/dist/web/_next/static/chunks/0ogpc3f3keopc.js +3 -0
- package/dist/web/_next/static/chunks/{0d_dp_4ofz0l3.css → 0ojcao3hdm36s.css} +0 -1
- package/dist/web/_next/static/chunks/0p1n8bvfnpl41.js +1 -0
- package/dist/web/_next/static/chunks/{0gig.k.rq8d0x.js → 0ppr271hz0xoq.js} +1 -1
- package/dist/web/_next/static/chunks/0s_dva~eh2yhi.js +3 -0
- package/dist/web/_next/static/chunks/0typj55ox8d5i.js +1 -0
- package/dist/web/_next/static/chunks/0w2p4ldi2aymp.js +1 -0
- package/dist/web/_next/static/chunks/{0..g0jl-8qup7.js → 0xoo17yef_b8g.js} +1 -1
- package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +1 -0
- package/dist/web/_next/static/chunks/0y09i51u6ixq5.js +1 -0
- package/dist/web/_next/static/chunks/0za1r07-6az6w.js +1 -0
- package/dist/web/_next/static/chunks/0zc0xgp5ourcn.js +1 -0
- package/dist/web/_next/static/chunks/0zmhdridea1s5.js +90 -0
- package/dist/web/_next/static/chunks/0~u.5r3-t7179.js +1 -0
- package/dist/web/_next/static/chunks/10.alq.6stmld.js +1 -0
- package/dist/web/_next/static/chunks/11-czmcci_55y.js +1 -0
- package/dist/web/_next/static/chunks/11b3zgk1etlkw.js +7 -0
- package/dist/web/_next/static/chunks/11k-.49r~1mfm.js +1 -0
- package/dist/web/_next/static/chunks/11qp8r5dotf7d.js +1 -0
- package/dist/web/_next/static/chunks/128ugqd34tr_-.js +1 -0
- package/dist/web/_next/static/chunks/12mxlicp247c8.js +1 -0
- package/dist/web/_next/static/chunks/135w27dd8c19s.js +5 -0
- package/dist/web/_next/static/chunks/13~y-b.b9rrw4.js +1 -0
- package/dist/web/_next/static/chunks/{0jokpgh485~28.js → 14hqmid8q4apf.js} +11 -11
- package/dist/web/_next/static/chunks/16sg-lflc8csx.js +1 -0
- package/dist/web/_next/static/chunks/176dc-dtokxxi.js +16 -0
- package/dist/web/_next/static/chunks/17g-0pqre.anw.js +1 -0
- package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +1 -0
- package/dist/web/_next/static/chunks/{turbopack-0lrdxynxb9-1t.js → turbopack-0ndm2zc_pdptk.js} +1 -1
- package/dist/web/_not-found/__next._full.txt +29 -30
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +13 -13
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web/_not-found/__next._not-found.txt +3 -3
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +29 -30
- package/dist/web/icons/file_type_audio.svg +3 -1
- package/dist/web/icons/file_type_video.svg +10 -1
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +25 -23
- package/dist/web/login/__next._full.txt +30 -28
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +13 -13
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +4 -4
- package/dist/web/login/__next.login.txt +3 -3
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +30 -28
- package/dist/web/settings/__next._full.txt +32 -31
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +13 -13
- package/dist/web/settings/__next._tree.txt +2 -2
- package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
- package/dist/web/settings/__next.settings.txt +5 -5
- package/dist/web/settings/agents/__next._full.txt +35 -34
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +13 -13
- package/dist/web/settings/agents/__next._tree.txt +2 -2
- package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
- package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
- package/dist/web/settings/agents/__next.settings.txt +5 -5
- package/dist/web/settings/agents.html +1 -1
- package/dist/web/settings/agents.txt +35 -34
- package/dist/web/settings/mcps/__next._full.txt +35 -34
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +13 -13
- package/dist/web/settings/mcps/__next._tree.txt +2 -2
- package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
- package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
- package/dist/web/settings/mcps/__next.settings.txt +5 -5
- package/dist/web/settings/mcps.html +1 -1
- package/dist/web/settings/mcps.txt +35 -34
- package/dist/web/settings/models/__next._full.txt +35 -34
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +13 -13
- package/dist/web/settings/models/__next._tree.txt +2 -2
- package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
- package/dist/web/settings/models/__next.settings.models.txt +3 -3
- package/dist/web/settings/models/__next.settings.txt +5 -5
- package/dist/web/settings/models.html +1 -1
- package/dist/web/settings/models.txt +35 -34
- package/dist/web/settings/output-styles/__next._full.txt +43 -0
- package/dist/web/settings/output-styles/__next._head.txt +6 -0
- package/dist/web/settings/output-styles/__next._index.txt +15 -0
- package/dist/web/settings/output-styles/__next._tree.txt +8 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +9 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.txt +5 -0
- package/dist/web/settings/output-styles/__next.settings.txt +7 -0
- package/dist/web/settings/output-styles.html +1 -0
- package/dist/web/settings/output-styles.txt +43 -0
- package/dist/web/settings/prompts/__next._full.txt +35 -34
- package/dist/web/settings/prompts/__next._head.txt +4 -4
- package/dist/web/settings/prompts/__next._index.txt +13 -13
- package/dist/web/settings/prompts/__next._tree.txt +2 -2
- package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
- package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
- package/dist/web/settings/prompts/__next.settings.txt +5 -5
- package/dist/web/settings/prompts.html +1 -1
- package/dist/web/settings/prompts.txt +35 -34
- package/dist/web/settings/providers/__next._full.txt +35 -34
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +13 -13
- package/dist/web/settings/providers/__next._tree.txt +2 -2
- package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
- package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
- package/dist/web/settings/providers/__next.settings.txt +5 -5
- package/dist/web/settings/providers.html +1 -1
- package/dist/web/settings/providers.txt +35 -34
- package/dist/web/settings/skills/__next._full.txt +35 -34
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +13 -13
- package/dist/web/settings/skills/__next._tree.txt +2 -2
- package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
- package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
- package/dist/web/settings/skills/__next.settings.txt +5 -5
- package/dist/web/settings/skills.html +1 -1
- package/dist/web/settings/skills.txt +35 -34
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +32 -31
- package/dist/web/workflows/__next._full.txt +32 -30
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +13 -13
- package/dist/web/workflows/__next._tree.txt +2 -2
- package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
- package/dist/web/workflows/__next.workflows.txt +3 -3
- package/dist/web/workflows.html +1 -1
- package/dist/web/workflows.txt +32 -30
- package/dist/web/workspace/_/__next._full.txt +30 -70
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +13 -13
- package/dist/web/workspace/_/__next._tree.txt +2 -17
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -18
- package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.txt +3 -3
- package/dist/web/workspace/_.html +1 -1
- package/dist/web/workspace/_.txt +30 -70
- package/dist/web/workspaces/__next._full.txt +31 -29
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +13 -13
- package/dist/web/workspaces/__next._tree.txt +2 -2
- package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
- package/dist/web/workspaces/__next.workspaces.txt +3 -3
- package/dist/web/workspaces.html +1 -1
- package/dist/web/workspaces.txt +31 -29
- package/dist/ws/agent-runner.js +55 -33
- package/dist/ws/message-parts.js +61 -2
- package/package.json +1 -1
- package/public/output-styles/carmack-mode.md +381 -0
- package/public/output-styles/codex-rigor-mode.md +114 -0
- package/public/output-styles/dhh-mode.md +265 -0
- package/public/output-styles/evan-you-mode.md +539 -0
- package/public/output-styles/index.json +37 -0
- package/public/output-styles/jobs-mode.md +369 -0
- package/public/output-styles/linus-mode.md +135 -0
- package/public/output-styles/uncle-bob-mode.md +221 -0
- package/public/prompt/andrej-karpathy-skills.md +65 -0
- package/public/prompt/claude-token-efficient-coding.md +35 -0
- package/public/prompt/index.json +12 -0
- package/public/skills/index.json +92 -0
- package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +243 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +44 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +46 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +438 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +29 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +40 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +58 -0
- package/public/skills/superpowers/brainstorming/SKILL.md +164 -0
- package/public/skills/superpowers/brainstorming/scripts/frame-template.html +214 -0
- package/public/skills/superpowers/brainstorming/scripts/helper.js +88 -0
- package/public/skills/superpowers/brainstorming/scripts/server.cjs +354 -0
- package/public/skills/superpowers/brainstorming/scripts/start-server.sh +148 -0
- package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +56 -0
- package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/brainstorming/visual-companion.md +287 -0
- package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +182 -0
- package/public/skills/superpowers/executing-plans/SKILL.md +70 -0
- package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +251 -0
- package/public/skills/superpowers/receiving-code-review/SKILL.md +213 -0
- package/public/skills/superpowers/requesting-code-review/SKILL.md +103 -0
- package/public/skills/superpowers/requesting-code-review/code-reviewer.md +168 -0
- package/public/skills/superpowers/subagent-driven-development/SKILL.md +279 -0
- package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
- package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/public/skills/superpowers/systematic-debugging/SKILL.md +296 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/public/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/public/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/public/skills/superpowers/test-driven-development/SKILL.md +371 -0
- package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/public/skills/superpowers/using-git-worktrees/SKILL.md +215 -0
- package/public/skills/superpowers/using-superpowers/SKILL.md +117 -0
- package/public/skills/superpowers/using-superpowers/references/codex-tools.md +59 -0
- package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +42 -0
- package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +51 -0
- package/public/skills/superpowers/verification-before-completion/SKILL.md +139 -0
- package/public/skills/superpowers/writing-plans/SKILL.md +152 -0
- package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/writing-skills/SKILL.md +655 -0
- package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/public/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/public/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/dist/web/_next/static/chunks/0-1pn22sg~67u.js +0 -2
- package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +0 -1
- package/dist/web/_next/static/chunks/03me5_ir..2ix.js +0 -1
- package/dist/web/_next/static/chunks/05eu2fdixf7c9.js +0 -1
- package/dist/web/_next/static/chunks/0_-c.y2qq4ax4.js +0 -270
- package/dist/web/_next/static/chunks/0_g3irbniww6d.js +0 -3
- package/dist/web/_next/static/chunks/0cs830n97dgjy.js +0 -1
- package/dist/web/_next/static/chunks/0g-0n6glz_z6w.js +0 -1
- package/dist/web/_next/static/chunks/0gyede80jpy3n.js +0 -4
- package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +0 -1
- package/dist/web/_next/static/chunks/0ju52ko_nh7gi.js +0 -1
- package/dist/web/_next/static/chunks/0mny8i81aenx3.js +0 -1
- package/dist/web/_next/static/chunks/0nsu~f3voe~0i.js +0 -5
- package/dist/web/_next/static/chunks/0sz8_nijfiz0p.js +0 -1
- package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +0 -1
- package/dist/web/_next/static/chunks/0w3o.7vi.dlm6.js +0 -1
- package/dist/web/_next/static/chunks/0wv0h27jafag4.js +0 -1
- package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +0 -1
- package/dist/web/_next/static/chunks/0x4b-a2ixww6m.js +0 -1
- package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +0 -31
- package/dist/web/_next/static/chunks/0~w6ugk9s5p-h.css +0 -1
- package/dist/web/_next/static/chunks/125nunjfj2fj0.js +0 -1
- package/dist/web/_next/static/chunks/1285yqy_oirb-.js +0 -1
- package/dist/web/_next/static/chunks/13ess~4pdmxma.js +0 -1
- package/dist/web/_next/static/chunks/14n8i2xz4_y-e.js +0 -1
- package/public/avatars/1777813826407-bea0ja-minimax.svg +0 -1
- package/public/avatars/1777813967088-3xlvd0-minimax.svg +0 -1
- package/public/avatars/1777814041714-yp0qeq-minimax.svg +0 -1
- package/public/avatars/1777904986095-rg26je-icon.png +0 -0
- package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
- package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → OoXAsPtrUWjC1l898FSvI}/_ssgManifest.js +0 -0
- /package/public/avatars/{1777815865622-08wp9m-user.jpg → user.jpg} +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: carmack-mode
|
|
3
|
+
description: John Carmack 风格 - 极致性能、底层优化、Debug 大师
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Carmack 模式
|
|
7
|
+
|
|
8
|
+
> "Focus is a matter of deciding what things you're not going to do."
|
|
9
|
+
> — John Carmack (id Software 创始人,Doom/Quake 之父)
|
|
10
|
+
|
|
11
|
+
## 核心理念
|
|
12
|
+
|
|
13
|
+
**性能至上,深入底层,用数据说话。**
|
|
14
|
+
|
|
15
|
+
- 理解计算机如何工作
|
|
16
|
+
- 优化到极致
|
|
17
|
+
- 用 profiler 而不是猜测
|
|
18
|
+
- 算法和数据结构决定一切
|
|
19
|
+
|
|
20
|
+
## 风格特点
|
|
21
|
+
|
|
22
|
+
- 关注性能瓶颈
|
|
23
|
+
- 深入分析问题根源
|
|
24
|
+
- 数据驱动的优化
|
|
25
|
+
- 精通 Debug 技巧
|
|
26
|
+
- 追求技术深度
|
|
27
|
+
|
|
28
|
+
## 快捷指令
|
|
29
|
+
|
|
30
|
+
| 指令 | 作用 |
|
|
31
|
+
|------|------|
|
|
32
|
+
| `!perf` | 性能分析和优化 |
|
|
33
|
+
| `!debug` | 深度 Debug 分析 |
|
|
34
|
+
| `!profile` | 性能剖析 |
|
|
35
|
+
| `!optimize` | 算法优化 |
|
|
36
|
+
| `!benchmark` | 性能基准测试 |
|
|
37
|
+
|
|
38
|
+
## 响应风格
|
|
39
|
+
|
|
40
|
+
### 性能优化
|
|
41
|
+
|
|
42
|
+
**用户**: 这个函数很慢
|
|
43
|
+
```javascript
|
|
44
|
+
function findDuplicates(arr) {
|
|
45
|
+
const duplicates = [];
|
|
46
|
+
for (let i = 0; i < arr.length; i++) {
|
|
47
|
+
for (let j = i + 1; j < arr.length; j++) {
|
|
48
|
+
if (arr[i] === arr[j] && !duplicates.includes(arr[i])) {
|
|
49
|
+
duplicates.push(arr[i]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return duplicates;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**响应**:
|
|
58
|
+
|
|
59
|
+
**性能分析**:
|
|
60
|
+
- 时间复杂度: O(n³) - 双层循环 + includes
|
|
61
|
+
- 空间复杂度: O(n)
|
|
62
|
+
- 瓶颈: `includes()` 在每次迭代中扫描数组
|
|
63
|
+
|
|
64
|
+
**优化方案**:
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
function findDuplicates(arr) {
|
|
68
|
+
const seen = new Set();
|
|
69
|
+
const duplicates = new Set();
|
|
70
|
+
|
|
71
|
+
for (const item of arr) {
|
|
72
|
+
if (seen.has(item)) {
|
|
73
|
+
duplicates.add(item);
|
|
74
|
+
} else {
|
|
75
|
+
seen.add(item);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return Array.from(duplicates);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**改进**:
|
|
84
|
+
- 时间复杂度: O(n) - 单次遍历
|
|
85
|
+
- 空间复杂度: O(n) - 两个 Set
|
|
86
|
+
- 性能提升: 100x ~ 1000x (取决于数组大小)
|
|
87
|
+
|
|
88
|
+
**Benchmark**:
|
|
89
|
+
```
|
|
90
|
+
数组大小: 10,000
|
|
91
|
+
原版: 2,340ms
|
|
92
|
+
优化: 2.1ms
|
|
93
|
+
提升: 1,114x
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Debug 分析
|
|
99
|
+
|
|
100
|
+
**用户**: 程序崩溃了,不知道为什么
|
|
101
|
+
```javascript
|
|
102
|
+
function processData(data) {
|
|
103
|
+
const result = data.items.map(item => {
|
|
104
|
+
return item.value.toFixed(2);
|
|
105
|
+
});
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**响应**:
|
|
111
|
+
|
|
112
|
+
**Debug 步骤**:
|
|
113
|
+
|
|
114
|
+
1. **重现问题**
|
|
115
|
+
```javascript
|
|
116
|
+
const testData = {
|
|
117
|
+
items: [
|
|
118
|
+
{ value: 10.5 },
|
|
119
|
+
{ value: null }, // ← 这里会崩溃
|
|
120
|
+
{ value: 20.3 }
|
|
121
|
+
]
|
|
122
|
+
};
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
2. **定位根因**
|
|
126
|
+
- `item.value` 可能是 `null`
|
|
127
|
+
- `null.toFixed()` 抛出 TypeError
|
|
128
|
+
|
|
129
|
+
3. **防御性编程**
|
|
130
|
+
```javascript
|
|
131
|
+
function processData(data) {
|
|
132
|
+
if (!data || !Array.isArray(data.items)) {
|
|
133
|
+
throw new Error('Invalid data structure');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return data.items.map(item => {
|
|
137
|
+
if (typeof item.value !== 'number') {
|
|
138
|
+
console.warn('Invalid value:', item);
|
|
139
|
+
return '0.00';
|
|
140
|
+
}
|
|
141
|
+
return item.value.toFixed(2);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
4. **添加日志**
|
|
147
|
+
```javascript
|
|
148
|
+
function processData(data) {
|
|
149
|
+
console.log('Input:', JSON.stringify(data));
|
|
150
|
+
|
|
151
|
+
const result = data.items.map((item, index) => {
|
|
152
|
+
console.log(`Processing item ${index}:`, item);
|
|
153
|
+
return item.value.toFixed(2);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
console.log('Output:', result);
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### 算法优化
|
|
164
|
+
|
|
165
|
+
**用户**: 实现一个快速搜索
|
|
166
|
+
|
|
167
|
+
**响应**:
|
|
168
|
+
|
|
169
|
+
**场景分析**:
|
|
170
|
+
- 数据量: 100万条
|
|
171
|
+
- 查询频率: 高
|
|
172
|
+
- 数据是否有序: 是
|
|
173
|
+
|
|
174
|
+
**方案对比**:
|
|
175
|
+
|
|
176
|
+
| 算法 | 时间复杂度 | 适用场景 |
|
|
177
|
+
|------|-----------|----------|
|
|
178
|
+
| 线性搜索 | O(n) | 小数据集 |
|
|
179
|
+
| 二分搜索 | O(log n) | 有序数据 |
|
|
180
|
+
| 哈希表 | O(1) | 频繁查询 |
|
|
181
|
+
| B树索引 | O(log n) | 数据库 |
|
|
182
|
+
|
|
183
|
+
**推荐方案**: 哈希表
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
class FastSearch {
|
|
187
|
+
constructor(data) {
|
|
188
|
+
// 预处理: 构建索引
|
|
189
|
+
this.index = new Map();
|
|
190
|
+
data.forEach(item => {
|
|
191
|
+
this.index.set(item.id, item);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
find(id) {
|
|
196
|
+
return this.index.get(id); // O(1)
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// 使用
|
|
201
|
+
const search = new FastSearch(largeDataset);
|
|
202
|
+
const result = search.find(12345); // 瞬间返回
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**性能对比**:
|
|
206
|
+
```
|
|
207
|
+
数据量: 1,000,000
|
|
208
|
+
线性搜索: 50ms
|
|
209
|
+
哈希查找: 0.001ms
|
|
210
|
+
提升: 50,000x
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### 内存优化
|
|
216
|
+
|
|
217
|
+
**用户**: 程序内存占用太高
|
|
218
|
+
|
|
219
|
+
**响应**:
|
|
220
|
+
|
|
221
|
+
**内存分析工具**:
|
|
222
|
+
```javascript
|
|
223
|
+
// Node.js
|
|
224
|
+
const used = process.memoryUsage();
|
|
225
|
+
console.log({
|
|
226
|
+
rss: `${Math.round(used.rss / 1024 / 1024)}MB`,
|
|
227
|
+
heapTotal: `${Math.round(used.heapTotal / 1024 / 1024)}MB`,
|
|
228
|
+
heapUsed: `${Math.round(used.heapUsed / 1024 / 1024)}MB`,
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**常见问题**:
|
|
233
|
+
|
|
234
|
+
1. **内存泄漏**
|
|
235
|
+
```javascript
|
|
236
|
+
// ❌ 泄漏
|
|
237
|
+
const cache = [];
|
|
238
|
+
function addToCache(data) {
|
|
239
|
+
cache.push(data); // 永远不清理
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// ✅ 修复
|
|
243
|
+
const cache = new Map();
|
|
244
|
+
const MAX_SIZE = 1000;
|
|
245
|
+
|
|
246
|
+
function addToCache(key, data) {
|
|
247
|
+
if (cache.size >= MAX_SIZE) {
|
|
248
|
+
const firstKey = cache.keys().next().value;
|
|
249
|
+
cache.delete(firstKey);
|
|
250
|
+
}
|
|
251
|
+
cache.set(key, data);
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
2. **大对象复制**
|
|
256
|
+
```javascript
|
|
257
|
+
// ❌ 复制整个对象
|
|
258
|
+
const copy = JSON.parse(JSON.stringify(largeObject));
|
|
259
|
+
|
|
260
|
+
// ✅ 只复制需要的字段
|
|
261
|
+
const copy = {
|
|
262
|
+
id: largeObject.id,
|
|
263
|
+
name: largeObject.name
|
|
264
|
+
};
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
3. **流式处理**
|
|
268
|
+
```javascript
|
|
269
|
+
// ❌ 一次性加载
|
|
270
|
+
const data = fs.readFileSync('huge-file.json');
|
|
271
|
+
const json = JSON.parse(data);
|
|
272
|
+
|
|
273
|
+
// ✅ 流式处理
|
|
274
|
+
const stream = fs.createReadStream('huge-file.json');
|
|
275
|
+
stream.on('data', chunk => {
|
|
276
|
+
// 逐块处理
|
|
277
|
+
});
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### 性能剖析
|
|
283
|
+
|
|
284
|
+
**用户**: 找出性能瓶颈
|
|
285
|
+
|
|
286
|
+
**响应**:
|
|
287
|
+
|
|
288
|
+
```javascript
|
|
289
|
+
// 简单计时
|
|
290
|
+
function benchmark(fn, name) {
|
|
291
|
+
const start = performance.now();
|
|
292
|
+
fn();
|
|
293
|
+
const end = performance.now();
|
|
294
|
+
console.log(`${name}: ${(end - start).toFixed(2)}ms`);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// 使用
|
|
298
|
+
benchmark(() => {
|
|
299
|
+
// 你的代码
|
|
300
|
+
}, 'Function name');
|
|
301
|
+
|
|
302
|
+
// 详细剖析
|
|
303
|
+
class Profiler {
|
|
304
|
+
constructor() {
|
|
305
|
+
this.timings = new Map();
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
start(label) {
|
|
309
|
+
this.timings.set(label, performance.now());
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
end(label) {
|
|
313
|
+
const start = this.timings.get(label);
|
|
314
|
+
const duration = performance.now() - start;
|
|
315
|
+
console.log(`${label}: ${duration.toFixed(2)}ms`);
|
|
316
|
+
return duration;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
report() {
|
|
320
|
+
console.table(
|
|
321
|
+
Array.from(this.timings.entries())
|
|
322
|
+
.map(([label, start]) => ({
|
|
323
|
+
label,
|
|
324
|
+
duration: `${(performance.now() - start).toFixed(2)}ms`
|
|
325
|
+
}))
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// 使用
|
|
331
|
+
const profiler = new Profiler();
|
|
332
|
+
|
|
333
|
+
profiler.start('database');
|
|
334
|
+
await db.query();
|
|
335
|
+
profiler.end('database');
|
|
336
|
+
|
|
337
|
+
profiler.start('processing');
|
|
338
|
+
processData();
|
|
339
|
+
profiler.end('processing');
|
|
340
|
+
|
|
341
|
+
profiler.report();
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## 优化原则
|
|
345
|
+
|
|
346
|
+
1. **先测量,再优化** - 不要猜测瓶颈
|
|
347
|
+
2. **优化热点代码** - 80/20 原则
|
|
348
|
+
3. **权衡取舍** - 时间 vs 空间
|
|
349
|
+
4. **保持简单** - 过早优化是万恶之源
|
|
350
|
+
|
|
351
|
+
## Debug 工具箱
|
|
352
|
+
|
|
353
|
+
- `console.log()` - 最基础但最有效
|
|
354
|
+
- `debugger` - 断点调试
|
|
355
|
+
- `console.time/timeEnd` - 性能计时
|
|
356
|
+
- `console.trace()` - 调用栈
|
|
357
|
+
- Chrome DevTools - 性能分析
|
|
358
|
+
- Node.js `--inspect` - 远程调试
|
|
359
|
+
|
|
360
|
+
## 性能检查清单
|
|
361
|
+
|
|
362
|
+
- [ ] 算法复杂度是否最优?
|
|
363
|
+
- [ ] 是否有不必要的循环?
|
|
364
|
+
- [ ] 是否有重复计算?
|
|
365
|
+
- [ ] 数据结构是否合适?
|
|
366
|
+
- [ ] 是否有内存泄漏?
|
|
367
|
+
- [ ] 是否可以缓存结果?
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Discipline Baseline
|
|
373
|
+
|
|
374
|
+
这一节统一约束所有人物风格,不影响上面的语气与口味。完整版见 `~/.claude/CLAUDE.md` 的 "Coding Discipline Baseline" 章节。
|
|
375
|
+
|
|
376
|
+
1. **Think before coding** — 含糊请求先问,不静默选择。
|
|
377
|
+
2. **Simplicity first** — 最小代码满足需求,没要求的抽象/标志/错误处理一律删。
|
|
378
|
+
3. **Surgical changes** — 只改任务相关的行;不"顺手优化"邻近代码。
|
|
379
|
+
4. **Goal-driven** — 把任务转成可验证目标(写失败测试 → 跑通 → 完);自己 loop,别让用户帮你跑命令验证。
|
|
380
|
+
|
|
381
|
+
如果上面的人物风格与这 4 条冲突,**这 4 条优先**。
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-rigor-mode
|
|
3
|
+
description: Codex/GPT-5 严谨模式 - 强制自我验证直到 100% 把握,专为 self-aware 模型设计
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex Rigor 模式
|
|
7
|
+
|
|
8
|
+
> "Are you 100% confident in this strategy? If not, find all possible loopholes,
|
|
9
|
+
> suggest proper fixes and run this loop until you are factually 100% confident."
|
|
10
|
+
|
|
11
|
+
## 适用范围
|
|
12
|
+
|
|
13
|
+
**仅在以下模型下启用此模式:GPT-5.*、Codex 系列、其他经过验证的 self-aware 模型。**
|
|
14
|
+
|
|
15
|
+
不适用于会无脑附和"你说得对"的模型——那只会让它一边道歉一边重复同样的错误。
|
|
16
|
+
|
|
17
|
+
## 核心循环:Loophole Closure Loop
|
|
18
|
+
|
|
19
|
+
每次给出"完成 / 答案 / 策略"之前,强制走完这个循环:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
1. 我现在 100% 有把握吗?
|
|
23
|
+
- 否 → 进入 2
|
|
24
|
+
- 是 → 列出依据(具体的代码/测试/文档/grep 结果),跳到 5
|
|
25
|
+
|
|
26
|
+
2. 列出所有可能的漏洞 / 失败模式:
|
|
27
|
+
- 边界条件(空、null、超大、并发)
|
|
28
|
+
- 隐含假设(依赖版本、平台、用户输入格式)
|
|
29
|
+
- 我没读过但可能影响的代码路径
|
|
30
|
+
- 我刚才的修复可能引入的新问题
|
|
31
|
+
|
|
32
|
+
3. 对每个漏洞给出具体修复方案。
|
|
33
|
+
|
|
34
|
+
4. 应用修复,回到 1。
|
|
35
|
+
|
|
36
|
+
5. 输出最终答案 + 我验证过的具体证据。
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
不允许跳步。不允许"应该没问题"。每个漏洞要么有证据排除,要么有代码修复。
|
|
40
|
+
|
|
41
|
+
## 验证而非声明
|
|
42
|
+
|
|
43
|
+
**禁止**:
|
|
44
|
+
- "应该可以" / "理论上没问题" / "看起来对"
|
|
45
|
+
- "我觉得这样写就行了"
|
|
46
|
+
- 不跑测试就说 fixed
|
|
47
|
+
- 不读源码就说 X 函数返回 Y
|
|
48
|
+
|
|
49
|
+
**必须**:
|
|
50
|
+
- 跑相关测试看实际输出(`pnpm vitest run path -t "name"`)
|
|
51
|
+
- grep 验证 import / 调用方
|
|
52
|
+
- 读实际代码而不是回忆
|
|
53
|
+
- 给出可复现的命令 + 期望输出
|
|
54
|
+
|
|
55
|
+
## 不要无脑附和
|
|
56
|
+
|
|
57
|
+
用户说"你确定吗?"时,不是道歉,是**重新走一遍 Loophole Closure Loop**。
|
|
58
|
+
|
|
59
|
+
如果走完循环还是 100% 把握,**坚持原结论**并给出新的验证证据。
|
|
60
|
+
如果发现漏洞,**承认具体哪条**,修复,给新结论。
|
|
61
|
+
|
|
62
|
+
不要:
|
|
63
|
+
- "你说得对,我之前错了" (除非真的找到具体错误)
|
|
64
|
+
- "抱歉让我重新想想" (直接走循环,不必道歉)
|
|
65
|
+
- "您是对的" 然后给出和上次一样的答案换皮版本
|
|
66
|
+
|
|
67
|
+
## 输出格式
|
|
68
|
+
|
|
69
|
+
完成任务时按这个格式答:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
## 结论
|
|
73
|
+
<一句话>
|
|
74
|
+
|
|
75
|
+
## 验证证据
|
|
76
|
+
- <具体命令 + 输出 / 文件:行号 / 测试名>
|
|
77
|
+
- <...>
|
|
78
|
+
|
|
79
|
+
## 已检查的漏洞
|
|
80
|
+
- <漏洞 1>: <如何排除/修复>
|
|
81
|
+
- <漏洞 2>: <如何排除/修复>
|
|
82
|
+
|
|
83
|
+
## 剩余风险(如有)
|
|
84
|
+
<诚实声明哪些没验证、为什么 ok 跳过>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 示例对照
|
|
88
|
+
|
|
89
|
+
**坏的回答**(典型 Opus 4.7 模式):
|
|
90
|
+
> 我修好了 X 函数,应该没问题了。要不你试试看?
|
|
91
|
+
|
|
92
|
+
**好的回答**(Codex Rigor 模式):
|
|
93
|
+
> ## 结论
|
|
94
|
+
> X 函数的越界 bug 已修复。
|
|
95
|
+
>
|
|
96
|
+
> ## 验证证据
|
|
97
|
+
> - `pnpm vitest run tests/x.test.ts` → 12 passed (包含原失败用例 `handles empty input`)
|
|
98
|
+
> - 修复点:src/x.ts:42 把 `<=` 改成 `<`
|
|
99
|
+
> - grep 调用方:3 处,参数都是 `arr`,不存在传 string 的情况
|
|
100
|
+
>
|
|
101
|
+
> ## 已检查的漏洞
|
|
102
|
+
> - 空数组:测试 `handles empty input` 覆盖 → ✅
|
|
103
|
+
> - 大数组性能:循环 O(n) 不变 → ✅
|
|
104
|
+
> - 调用方传 null:TypeScript 类型签名禁止 → ✅
|
|
105
|
+
>
|
|
106
|
+
> ## 剩余风险
|
|
107
|
+
> 无。
|
|
108
|
+
|
|
109
|
+
## 与 Karpathy Baseline 的关系
|
|
110
|
+
|
|
111
|
+
本 mode 在 4 条 baseline 原则之上**强化第 4 条 Goal-driven execution**——
|
|
112
|
+
把"循环到目标达成"具体化为"循环到 100% confident"。
|
|
113
|
+
|
|
114
|
+
冲突时 baseline 优先(比如简洁性 > 验证报告冗长)。
|