sema-core 1.0.14 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -10
- package/dist/{constants → conf}/config.d.ts +0 -1
- package/dist/conf/config.d.ts.map +1 -0
- package/dist/{constants → conf}/config.js +1 -3
- package/dist/conf/config.js.map +1 -0
- package/dist/core/Conversation.d.ts +3 -14
- package/dist/core/Conversation.d.ts.map +1 -1
- package/dist/core/Conversation.js +70 -106
- package/dist/core/Conversation.js.map +1 -1
- package/dist/core/RunTools.d.ts +5 -5
- package/dist/core/RunTools.d.ts.map +1 -1
- package/dist/core/RunTools.js +27 -36
- package/dist/core/RunTools.js.map +1 -1
- package/dist/core/SemaCore.d.ts +35 -40
- package/dist/core/SemaCore.d.ts.map +1 -1
- package/dist/core/SemaCore.js +61 -59
- package/dist/core/SemaCore.js.map +1 -1
- package/dist/core/SemaEngine.d.ts +26 -17
- package/dist/core/SemaEngine.d.ts.map +1 -1
- package/dist/core/SemaEngine.js +128 -221
- package/dist/core/SemaEngine.js.map +1 -1
- package/dist/core/SemaSession.d.ts +43 -0
- package/dist/core/SemaSession.d.ts.map +1 -0
- package/dist/core/SemaSession.js +72 -0
- package/dist/core/SemaSession.js.map +1 -0
- package/dist/core/SessionPool.d.ts +32 -0
- package/dist/core/SessionPool.d.ts.map +1 -0
- package/dist/core/SessionPool.js +89 -0
- package/dist/core/SessionPool.js.map +1 -0
- package/dist/events/EventSystem.d.ts +40 -12
- package/dist/events/EventSystem.d.ts.map +1 -1
- package/dist/events/EventSystem.js +85 -26
- package/dist/events/EventSystem.js.map +1 -1
- package/dist/events/types.d.ts +86 -46
- package/dist/events/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/manager/ConfManager.d.ts +10 -3
- package/dist/manager/ConfManager.d.ts.map +1 -1
- package/dist/manager/ConfManager.js +30 -13
- package/dist/manager/ConfManager.js.map +1 -1
- package/dist/manager/CronManager.d.ts +18 -10
- package/dist/manager/CronManager.d.ts.map +1 -1
- package/dist/manager/CronManager.js +106 -91
- package/dist/manager/CronManager.js.map +1 -1
- package/dist/manager/ModelManager.d.ts +0 -3
- package/dist/manager/ModelManager.d.ts.map +1 -1
- package/dist/manager/ModelManager.js +2 -4
- package/dist/manager/ModelManager.js.map +1 -1
- package/dist/manager/PermissionManager.d.ts +4 -6
- package/dist/manager/PermissionManager.d.ts.map +1 -1
- package/dist/manager/PermissionManager.js +85 -81
- package/dist/manager/PermissionManager.js.map +1 -1
- package/dist/manager/StateManager.d.ts +84 -122
- package/dist/manager/StateManager.d.ts.map +1 -1
- package/dist/manager/StateManager.js +194 -194
- package/dist/manager/StateManager.js.map +1 -1
- package/dist/manager/TaskManager.d.ts +30 -19
- package/dist/manager/TaskManager.d.ts.map +1 -1
- package/dist/manager/TaskManager.js +157 -98
- package/dist/manager/TaskManager.js.map +1 -1
- package/dist/prompt/agents.d.ts +3 -0
- package/dist/prompt/agents.d.ts.map +1 -0
- package/dist/prompt/agents.js +52 -0
- package/dist/prompt/agents.js.map +1 -0
- package/dist/prompt/commands.d.ts +3 -0
- package/dist/prompt/commands.d.ts.map +1 -0
- package/dist/prompt/commands.js +19 -0
- package/dist/prompt/commands.js.map +1 -0
- package/dist/prompt/compact.d.ts +2 -0
- package/dist/prompt/compact.d.ts.map +1 -0
- package/dist/prompt/compact.js +22 -0
- package/dist/prompt/compact.js.map +1 -0
- package/dist/prompt/define.d.ts +5 -0
- package/dist/prompt/define.d.ts.map +1 -0
- package/dist/prompt/define.js +8 -0
- package/dist/prompt/define.js.map +1 -0
- package/dist/prompt/design/design.d.ts +47 -0
- package/dist/prompt/design/design.d.ts.map +1 -0
- package/dist/prompt/design/design.js +230 -0
- package/dist/prompt/design/design.js.map +1 -0
- package/dist/prompt/design/designPhilosophy.d.ts +2 -0
- package/dist/prompt/design/designPhilosophy.d.ts.map +1 -0
- package/dist/prompt/design/designPhilosophy.js +79 -0
- package/dist/prompt/design/designPhilosophy.js.map +1 -0
- package/dist/prompt/design/designSystemSpec.d.ts +2 -0
- package/dist/prompt/design/designSystemSpec.d.ts.map +1 -0
- package/dist/prompt/design/designSystemSpec.js +44 -0
- package/dist/prompt/design/designSystemSpec.js.map +1 -0
- package/dist/prompt/design/imgPlaceholder.d.ts +2 -0
- package/dist/prompt/design/imgPlaceholder.d.ts.map +1 -0
- package/dist/prompt/design/imgPlaceholder.js +56 -0
- package/dist/prompt/design/imgPlaceholder.js.map +1 -0
- package/dist/prompt/memory.d.ts +2 -0
- package/dist/prompt/memory.d.ts.map +1 -0
- package/dist/prompt/memory.js +23 -0
- package/dist/prompt/memory.js.map +1 -0
- package/dist/prompt/plan.d.ts +2 -0
- package/dist/prompt/plan.d.ts.map +1 -0
- package/dist/prompt/plan.js +30 -0
- package/dist/prompt/plan.js.map +1 -0
- package/dist/prompt/quickchat.d.ts +2 -0
- package/dist/prompt/quickchat.d.ts.map +1 -0
- package/dist/prompt/quickchat.js +16 -0
- package/dist/prompt/quickchat.js.map +1 -0
- package/dist/prompt/system.d.ts +3 -0
- package/dist/prompt/system.d.ts.map +1 -0
- package/dist/prompt/system.js +79 -0
- package/dist/prompt/system.js.map +1 -0
- package/dist/prompt/tool.d.ts +22 -0
- package/dist/prompt/tool.d.ts.map +1 -0
- package/dist/prompt/tool.js +25 -0
- package/dist/prompt/tool.js.map +1 -0
- package/dist/prompt/toolAliases.d.ts +16 -0
- package/dist/prompt/toolAliases.d.ts.map +1 -0
- package/dist/prompt/toolAliases.js +46 -0
- package/dist/prompt/toolAliases.js.map +1 -0
- package/dist/prompt/tools/createCron.d.ts +2 -0
- package/dist/prompt/tools/createCron.d.ts.map +1 -0
- package/dist/prompt/tools/createCron.js +29 -0
- package/dist/prompt/tools/createCron.js.map +1 -0
- package/dist/prompt/tools/createTodo.d.ts +2 -0
- package/dist/prompt/tools/createTodo.d.ts.map +1 -0
- package/dist/prompt/tools/createTodo.js +23 -0
- package/dist/prompt/tools/createTodo.js.map +1 -0
- package/dist/prompt/tools/fetchUrl.d.ts +3 -0
- package/dist/prompt/tools/fetchUrl.d.ts.map +1 -0
- package/dist/prompt/tools/fetchUrl.js +27 -0
- package/dist/prompt/tools/fetchUrl.js.map +1 -0
- package/dist/prompt/tools/planToAgent.d.ts +2 -0
- package/dist/prompt/tools/planToAgent.d.ts.map +1 -0
- package/dist/prompt/tools/planToAgent.js +24 -0
- package/dist/prompt/tools/planToAgent.js.map +1 -0
- package/dist/prompt/tools/runShell.d.ts +2 -0
- package/dist/prompt/tools/runShell.d.ts.map +1 -0
- package/dist/prompt/tools/runShell.js +31 -0
- package/dist/prompt/tools/runShell.js.map +1 -0
- package/dist/prompt/tools/searchContent.d.ts +2 -0
- package/dist/prompt/tools/searchContent.d.ts.map +1 -0
- package/dist/prompt/tools/searchContent.js +18 -0
- package/dist/prompt/tools/searchContent.js.map +1 -0
- package/dist/prompt/tools/skill.d.ts +2 -0
- package/dist/prompt/tools/skill.d.ts.map +1 -0
- package/dist/prompt/tools/skill.js +14 -0
- package/dist/prompt/tools/skill.js.map +1 -0
- package/dist/prompt/tools/subAgent.d.ts +2 -0
- package/dist/prompt/tools/subAgent.d.ts.map +1 -0
- package/dist/prompt/tools/subAgent.js +45 -0
- package/dist/prompt/tools/subAgent.js.map +1 -0
- package/dist/prompt/tools/viewFile.d.ts +4 -0
- package/dist/prompt/tools/viewFile.d.ts.map +1 -0
- package/dist/prompt/tools/viewFile.js +26 -0
- package/dist/prompt/tools/viewFile.js.map +1 -0
- package/dist/services/agents/agentsManager.d.ts +12 -15
- package/dist/services/agents/agentsManager.d.ts.map +1 -1
- package/dist/services/agents/agentsManager.js +67 -65
- package/dist/services/agents/agentsManager.js.map +1 -1
- package/dist/services/agents/genDesignSystemReminder.d.ts +3 -0
- package/dist/services/agents/genDesignSystemReminder.d.ts.map +1 -0
- package/dist/services/agents/genDesignSystemReminder.js +149 -0
- package/dist/services/agents/genDesignSystemReminder.js.map +1 -0
- package/dist/services/agents/genSystemPrompt.d.ts +11 -11
- package/dist/services/agents/genSystemPrompt.d.ts.map +1 -1
- package/dist/services/agents/genSystemPrompt.js +58 -121
- package/dist/services/agents/genSystemPrompt.js.map +1 -1
- package/dist/services/agents/{systemReminder.d.ts → genSystemReminder.d.ts} +2 -7
- package/dist/services/agents/genSystemReminder.d.ts.map +1 -0
- package/dist/services/agents/genSystemReminder.js +86 -0
- package/dist/services/agents/genSystemReminder.js.map +1 -0
- package/dist/services/api/adapt/anthropic.d.ts +3 -5
- package/dist/services/api/adapt/anthropic.d.ts.map +1 -1
- package/dist/services/api/adapt/anthropic.js +39 -25
- package/dist/services/api/adapt/anthropic.js.map +1 -1
- package/dist/services/api/adapt/openai.d.ts +3 -3
- package/dist/services/api/adapt/openai.d.ts.map +1 -1
- package/dist/services/api/adapt/openai.js +27 -30
- package/dist/services/api/adapt/openai.js.map +1 -1
- package/dist/services/api/adapt/util.d.ts +2 -3
- package/dist/services/api/adapt/util.d.ts.map +1 -1
- package/dist/services/api/adapt/util.js +7 -9
- package/dist/services/api/adapt/util.js.map +1 -1
- package/dist/services/api/apiUtil.d.ts +3 -0
- package/dist/services/api/apiUtil.d.ts.map +1 -1
- package/dist/services/api/apiUtil.js +30 -26
- package/dist/services/api/apiUtil.js.map +1 -1
- package/dist/services/api/cache.d.ts +5 -5
- package/dist/services/api/cache.d.ts.map +1 -1
- package/dist/services/api/cache.js +23 -27
- package/dist/services/api/cache.js.map +1 -1
- package/dist/services/api/queryLLM.d.ts +17 -5
- package/dist/services/api/queryLLM.d.ts.map +1 -1
- package/dist/services/api/queryLLM.js +19 -23
- package/dist/services/api/queryLLM.js.map +1 -1
- package/dist/services/commands/commandsManager.d.ts +11 -14
- package/dist/services/commands/commandsManager.d.ts.map +1 -1
- package/dist/services/commands/commandsManager.js +54 -64
- package/dist/services/commands/commandsManager.js.map +1 -1
- package/dist/services/commands/runCommand.d.ts +1 -1
- package/dist/services/commands/runCommand.d.ts.map +1 -1
- package/dist/services/commands/runCommand.js +28 -52
- package/dist/services/commands/runCommand.js.map +1 -1
- package/dist/services/design/designManager.d.ts +29 -0
- package/dist/services/design/designManager.d.ts.map +1 -0
- package/dist/services/design/designManager.js +365 -0
- package/dist/services/design/designManager.js.map +1 -0
- package/dist/services/mcp/MCPClient.d.ts.map +1 -1
- package/dist/services/mcp/MCPClient.js +9 -1
- package/dist/services/mcp/MCPClient.js.map +1 -1
- package/dist/services/mcp/MCPManager.d.ts +9 -29
- package/dist/services/mcp/MCPManager.d.ts.map +1 -1
- package/dist/services/mcp/MCPManager.js +53 -147
- package/dist/services/mcp/MCPManager.js.map +1 -1
- package/dist/services/mcp/MCPToolAdapter.js +4 -4
- package/dist/services/mcp/MCPToolAdapter.js.map +1 -1
- package/dist/services/memory/memManager.d.ts +6 -9
- package/dist/services/memory/memManager.d.ts.map +1 -1
- package/dist/services/memory/memManager.js +22 -42
- package/dist/services/memory/memManager.js.map +1 -1
- package/dist/services/plugins/pluginsManager.d.ts +9 -17
- package/dist/services/plugins/pluginsManager.d.ts.map +1 -1
- package/dist/services/plugins/pluginsManager.js +33 -104
- package/dist/services/plugins/pluginsManager.js.map +1 -1
- package/dist/services/rules/rulesManager.d.ts +7 -9
- package/dist/services/rules/rulesManager.d.ts.map +1 -1
- package/dist/services/rules/rulesManager.js +19 -39
- package/dist/services/rules/rulesManager.js.map +1 -1
- package/dist/services/skills/skillsManager.d.ts +10 -13
- package/dist/services/skills/skillsManager.d.ts.map +1 -1
- package/dist/services/skills/skillsManager.js +41 -54
- package/dist/services/skills/skillsManager.js.map +1 -1
- package/dist/tools/CreateCron.d.ts +68 -0
- package/dist/tools/CreateCron.d.ts.map +1 -0
- package/dist/tools/CreateCron.js +76 -0
- package/dist/tools/CreateCron.js.map +1 -0
- package/dist/tools/CreateTodo.d.ts +48 -0
- package/dist/tools/CreateTodo.d.ts.map +1 -0
- package/dist/tools/CreateTodo.js +50 -0
- package/dist/tools/CreateTodo.js.map +1 -0
- package/dist/tools/{CronDelete/CronDelete.d.ts → DelCron.d.ts} +11 -11
- package/dist/tools/DelCron.d.ts.map +1 -0
- package/dist/tools/{CronDelete/CronDelete.js → DelCron.js} +12 -12
- package/dist/tools/DelCron.js.map +1 -0
- package/dist/tools/{NotebookEdit/NotebookEdit.d.ts → EditNotebook.d.ts} +37 -37
- package/dist/tools/EditNotebook.d.ts.map +1 -0
- package/dist/tools/EditNotebook.js +220 -0
- package/dist/tools/EditNotebook.js.map +1 -0
- package/dist/tools/{WebFetch/WebFetch.d.ts → FetchUrl.d.ts} +8 -8
- package/dist/tools/FetchUrl.d.ts.map +1 -0
- package/dist/tools/{WebFetch/WebFetch.js → FetchUrl.js} +31 -35
- package/dist/tools/FetchUrl.js.map +1 -0
- package/dist/tools/GetTodo.d.ts +34 -0
- package/dist/tools/GetTodo.d.ts.map +1 -0
- package/dist/tools/GetTodo.js +58 -0
- package/dist/tools/GetTodo.js.map +1 -0
- package/dist/tools/{CronList/CronList.d.ts → ListCrons.d.ts} +12 -13
- package/dist/tools/ListCrons.d.ts.map +1 -0
- package/dist/tools/{CronList/CronList.js → ListCrons.js} +20 -20
- package/dist/tools/ListCrons.js.map +1 -0
- package/dist/tools/ListTodos.d.ts +27 -0
- package/dist/tools/ListTodos.d.ts.map +1 -0
- package/dist/tools/ListTodos.js +57 -0
- package/dist/tools/ListTodos.js.map +1 -0
- package/dist/tools/{Edit/Edit.d.ts → PatchFile.d.ts} +39 -43
- package/dist/tools/PatchFile.d.ts.map +1 -0
- package/dist/tools/PatchFile.js +214 -0
- package/dist/tools/PatchFile.js.map +1 -0
- package/dist/tools/PeekBgJob.d.ts +58 -0
- package/dist/tools/PeekBgJob.d.ts.map +1 -0
- package/dist/tools/PeekBgJob.js +93 -0
- package/dist/tools/PeekBgJob.js.map +1 -0
- package/dist/tools/PickOption.d.ts +463 -0
- package/dist/tools/PickOption.d.ts.map +1 -0
- package/dist/tools/PickOption.js +226 -0
- package/dist/tools/PickOption.js.map +1 -0
- package/dist/tools/PlanToAgent.d.ts +42 -0
- package/dist/tools/PlanToAgent.d.ts.map +1 -0
- package/dist/tools/{ExitPlanMode/ExitPlanMode.js → PlanToAgent.js} +54 -51
- package/dist/tools/PlanToAgent.js.map +1 -0
- package/dist/tools/{Bash/Bash.d.ts → RunShell.d.ts} +23 -21
- package/dist/tools/RunShell.d.ts.map +1 -0
- package/dist/tools/{Bash/Bash.js → RunShell.js} +56 -59
- package/dist/tools/RunShell.js.map +1 -0
- package/dist/tools/SearchContent.d.ts +86 -0
- package/dist/tools/SearchContent.d.ts.map +1 -0
- package/dist/tools/SearchContent.js +237 -0
- package/dist/tools/SearchContent.js.map +1 -0
- package/dist/tools/{Glob/Glob.d.ts → SearchFiles.d.ts} +8 -8
- package/dist/tools/SearchFiles.d.ts.map +1 -0
- package/dist/tools/{Glob/Glob.js → SearchFiles.js} +24 -31
- package/dist/tools/SearchFiles.js.map +1 -0
- package/dist/tools/{Skill/Skill.d.ts → Skill.d.ts} +11 -11
- package/dist/tools/Skill.d.ts.map +1 -0
- package/dist/tools/{Skill/Skill.js → Skill.js} +21 -19
- package/dist/tools/Skill.js.map +1 -0
- package/dist/tools/{TaskStop/TaskStop.d.ts → StopBgJob.d.ts} +17 -17
- package/dist/tools/StopBgJob.d.ts.map +1 -0
- package/dist/tools/StopBgJob.js +69 -0
- package/dist/tools/StopBgJob.js.map +1 -0
- package/dist/tools/SubAgent.d.ts +67 -0
- package/dist/tools/SubAgent.d.ts.map +1 -0
- package/dist/tools/{Agent/Agent.js → SubAgent.js} +76 -71
- package/dist/tools/SubAgent.js.map +1 -0
- package/dist/tools/UpdateTodo.d.ts +76 -0
- package/dist/tools/UpdateTodo.d.ts.map +1 -0
- package/dist/tools/UpdateTodo.js +111 -0
- package/dist/tools/UpdateTodo.js.map +1 -0
- package/dist/tools/{Read/Read.d.ts → ViewFile.d.ts} +26 -64
- package/dist/tools/ViewFile.d.ts.map +1 -0
- package/dist/tools/ViewFile.js +365 -0
- package/dist/tools/ViewFile.js.map +1 -0
- package/dist/tools/{Write/Write.d.ts → WriteFile.d.ts} +12 -12
- package/dist/tools/WriteFile.d.ts.map +1 -0
- package/dist/tools/WriteFile.js +150 -0
- package/dist/tools/WriteFile.js.map +1 -0
- package/dist/tools/base/Tool.d.ts +2 -2
- package/dist/tools/base/Tool.d.ts.map +1 -1
- package/dist/tools/base/tools.d.ts +3 -2
- package/dist/tools/base/tools.d.ts.map +1 -1
- package/dist/tools/base/tools.js +66 -54
- package/dist/tools/base/tools.js.map +1 -1
- package/dist/types/agent.d.ts +2 -1
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/command.d.ts +0 -2
- package/dist/types/command.d.ts.map +1 -1
- package/dist/types/cron.d.ts +7 -6
- package/dist/types/cron.d.ts.map +1 -1
- package/dist/types/design.d.ts +24 -0
- package/dist/types/design.d.ts.map +1 -0
- package/dist/types/design.js +6 -0
- package/dist/types/design.js.map +1 -0
- package/dist/types/errors.d.ts +0 -2
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +0 -2
- package/dist/types/errors.js.map +1 -1
- package/dist/types/index.d.ts +18 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +28 -5
- package/dist/types/index.js.map +1 -1
- package/dist/types/mcp.d.ts +1 -3
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/message.d.ts +5 -4
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/model.d.ts +1 -1
- package/dist/types/model.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +8 -11
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/session.d.ts +18 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +3 -0
- package/dist/types/session.js.map +1 -0
- package/dist/types/skill.d.ts +0 -3
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/skill.js +0 -2
- package/dist/types/skill.js.map +1 -1
- package/dist/types/task.d.ts +12 -10
- package/dist/types/task.d.ts.map +1 -1
- package/dist/types/todoTask.d.ts +4 -5
- package/dist/types/todoTask.d.ts.map +1 -1
- package/dist/util/adapter.d.ts +8 -3
- package/dist/util/adapter.d.ts.map +1 -1
- package/dist/util/adapter.js +22 -49
- package/dist/util/adapter.js.map +1 -1
- package/dist/util/agentStats.d.ts +1 -1
- package/dist/util/agentStats.d.ts.map +1 -1
- package/dist/util/agentStats.js +16 -24
- package/dist/util/agentStats.js.map +1 -1
- package/dist/util/cacheLLM.d.ts +5 -5
- package/dist/util/cacheLLM.d.ts.map +1 -1
- package/dist/util/cacheLLM.js.map +1 -1
- package/dist/util/color.d.ts +44 -0
- package/dist/util/color.d.ts.map +1 -0
- package/dist/util/color.js +247 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/commands.d.ts +4 -5
- package/dist/util/commands.d.ts.map +1 -1
- package/dist/util/commands.js +22 -112
- package/dist/util/commands.js.map +1 -1
- package/dist/util/compact.d.ts +8 -5
- package/dist/util/compact.d.ts.map +1 -1
- package/dist/util/compact.js +26 -156
- package/dist/util/compact.js.map +1 -1
- package/dist/util/cron.d.ts +1 -9
- package/dist/util/cron.d.ts.map +1 -1
- package/dist/util/cron.js +2 -29
- package/dist/util/cron.js.map +1 -1
- package/dist/util/cwd.d.ts +2 -35
- package/dist/util/cwd.d.ts.map +1 -1
- package/dist/util/cwd.js +7 -57
- package/dist/util/cwd.js.map +1 -1
- package/dist/util/diff.d.ts +6 -4
- package/dist/util/diff.d.ts.map +1 -1
- package/dist/util/diff.js +63 -104
- package/dist/util/diff.js.map +1 -1
- package/dist/{tools/Edit/utils.d.ts → util/edit.d.ts} +2 -5
- package/dist/util/edit.d.ts.map +1 -0
- package/dist/util/edit.js +44 -0
- package/dist/util/edit.js.map +1 -0
- package/dist/util/env.d.ts +1 -4
- package/dist/util/env.d.ts.map +1 -1
- package/dist/util/env.js +22 -15
- package/dist/util/env.js.map +1 -1
- package/dist/util/fetchUrl.d.ts +18 -0
- package/dist/util/fetchUrl.d.ts.map +1 -0
- package/dist/util/fetchUrl.js +101 -0
- package/dist/util/fetchUrl.js.map +1 -0
- package/dist/util/file.d.ts +34 -45
- package/dist/util/file.d.ts.map +1 -1
- package/dist/util/file.js +164 -236
- package/dist/util/file.js.map +1 -1
- package/dist/util/fileReference.d.ts +1 -9
- package/dist/util/fileReference.d.ts.map +1 -1
- package/dist/util/fileReference.js +49 -58
- package/dist/util/fileReference.js.map +1 -1
- package/dist/util/format.d.ts +1 -9
- package/dist/util/format.d.ts.map +1 -1
- package/dist/util/format.js +5 -46
- package/dist/util/format.js.map +1 -1
- package/dist/util/formatter.d.ts +5 -8
- package/dist/util/formatter.d.ts.map +1 -1
- package/dist/util/formatter.js +5 -15
- package/dist/util/formatter.js.map +1 -1
- package/dist/util/git.d.ts +2 -3
- package/dist/util/git.d.ts.map +1 -1
- package/dist/util/git.js +34 -39
- package/dist/util/git.js.map +1 -1
- package/dist/util/history.d.ts +0 -7
- package/dist/util/history.d.ts.map +1 -1
- package/dist/util/history.js +3 -50
- package/dist/util/history.js.map +1 -1
- package/dist/util/log.d.ts +0 -1
- package/dist/util/log.d.ts.map +1 -1
- package/dist/util/log.js +2 -7
- package/dist/util/log.js.map +1 -1
- package/dist/util/logLLM.d.ts +3 -7
- package/dist/util/logLLM.d.ts.map +1 -1
- package/dist/util/logLLM.js +16 -31
- package/dist/util/logLLM.js.map +1 -1
- package/dist/util/message.d.ts +12 -11
- package/dist/util/message.d.ts.map +1 -1
- package/dist/util/message.js +72 -93
- package/dist/util/message.js.map +1 -1
- package/dist/util/model.d.ts +0 -3
- package/dist/util/model.d.ts.map +1 -1
- package/dist/util/model.js +1 -5
- package/dist/util/model.js.map +1 -1
- package/dist/util/notebook.d.ts +1 -8
- package/dist/util/notebook.d.ts.map +1 -1
- package/dist/util/notebook.js +36 -63
- package/dist/util/notebook.js.map +1 -1
- package/dist/util/notifyRegistry.d.ts +18 -0
- package/dist/util/notifyRegistry.d.ts.map +1 -0
- package/dist/util/notifyRegistry.js +28 -0
- package/dist/util/notifyRegistry.js.map +1 -0
- package/dist/util/pdf.d.ts +14 -72
- package/dist/util/pdf.d.ts.map +1 -1
- package/dist/util/pdf.js +51 -460
- package/dist/util/pdf.js.map +1 -1
- package/dist/util/process.d.ts +1 -1
- package/dist/util/process.d.ts.map +1 -1
- package/dist/util/process.js +8 -13
- package/dist/util/process.js.map +1 -1
- package/dist/util/quickchat.d.ts +6 -0
- package/dist/util/quickchat.d.ts.map +1 -0
- package/dist/util/quickchat.js +64 -0
- package/dist/util/quickchat.js.map +1 -0
- package/dist/util/ripgrep.d.ts +4 -2
- package/dist/util/ripgrep.d.ts.map +1 -1
- package/dist/util/ripgrep.js +40 -116
- package/dist/util/ripgrep.js.map +1 -1
- package/dist/util/savePath.d.ts +2 -18
- package/dist/util/savePath.d.ts.map +1 -1
- package/dist/util/savePath.js +7 -47
- package/dist/util/savePath.js.map +1 -1
- package/dist/util/secureFile.d.ts +13 -135
- package/dist/util/secureFile.d.ts.map +1 -1
- package/dist/util/secureFile.js +74 -478
- package/dist/util/secureFile.js.map +1 -1
- package/dist/util/session.d.ts +2 -19
- package/dist/util/session.d.ts.map +1 -1
- package/dist/util/session.js +5 -47
- package/dist/util/session.js.map +1 -1
- package/dist/util/shell.d.ts +25 -3
- package/dist/util/shell.d.ts.map +1 -1
- package/dist/util/shell.js +218 -290
- package/dist/util/shell.js.map +1 -1
- package/dist/util/time.d.ts +6 -5
- package/dist/util/time.d.ts.map +1 -1
- package/dist/util/time.js +10 -6
- package/dist/util/time.js.map +1 -1
- package/dist/util/tokens.d.ts +0 -1
- package/dist/util/tokens.d.ts.map +1 -1
- package/dist/util/tokens.js +12 -23
- package/dist/util/tokens.js.map +1 -1
- package/dist/util/topic.d.ts +1 -4
- package/dist/util/topic.d.ts.map +1 -1
- package/dist/util/topic.js +12 -11
- package/dist/util/topic.js.map +1 -1
- package/dist/util/writeFile.d.ts +12 -0
- package/dist/util/writeFile.d.ts.map +1 -0
- package/dist/util/writeFile.js +69 -0
- package/dist/util/writeFile.js.map +1 -0
- package/package.json +1 -1
- package/dist/constants/config.d.ts.map +0 -1
- package/dist/constants/config.js.map +0 -1
- package/dist/constants/message.d.ts +0 -10
- package/dist/constants/message.d.ts.map +0 -1
- package/dist/constants/message.js +0 -25
- package/dist/constants/message.js.map +0 -1
- package/dist/constants/product.d.ts +0 -4
- package/dist/constants/product.d.ts.map +0 -1
- package/dist/constants/product.js +0 -7
- package/dist/constants/product.js.map +0 -1
- package/dist/services/agents/defaultBuiltInAgentsConfs.d.ts +0 -3
- package/dist/services/agents/defaultBuiltInAgentsConfs.d.ts.map +0 -1
- package/dist/services/agents/defaultBuiltInAgentsConfs.js +0 -125
- package/dist/services/agents/defaultBuiltInAgentsConfs.js.map +0 -1
- package/dist/services/agents/prompt.d.ts +0 -10
- package/dist/services/agents/prompt.d.ts.map +0 -1
- package/dist/services/agents/prompt.js +0 -144
- package/dist/services/agents/prompt.js.map +0 -1
- package/dist/services/agents/systemReminder.d.ts.map +0 -1
- package/dist/services/agents/systemReminder.js +0 -68
- package/dist/services/agents/systemReminder.js.map +0 -1
- package/dist/tools/Agent/Agent.d.ts +0 -67
- package/dist/tools/Agent/Agent.d.ts.map +0 -1
- package/dist/tools/Agent/Agent.js.map +0 -1
- package/dist/tools/Agent/prompt.d.ts +0 -6
- package/dist/tools/Agent/prompt.d.ts.map +0 -1
- package/dist/tools/Agent/prompt.js +0 -73
- package/dist/tools/Agent/prompt.js.map +0 -1
- package/dist/tools/AskUserQuestion/AskUserQuestion.d.ts +0 -179
- package/dist/tools/AskUserQuestion/AskUserQuestion.d.ts.map +0 -1
- package/dist/tools/AskUserQuestion/AskUserQuestion.js +0 -165
- package/dist/tools/AskUserQuestion/AskUserQuestion.js.map +0 -1
- package/dist/tools/AskUserQuestion/prompt.d.ts +0 -3
- package/dist/tools/AskUserQuestion/prompt.d.ts.map +0 -1
- package/dist/tools/AskUserQuestion/prompt.js +0 -17
- package/dist/tools/AskUserQuestion/prompt.js.map +0 -1
- package/dist/tools/Bash/Bash.d.ts.map +0 -1
- package/dist/tools/Bash/Bash.js.map +0 -1
- package/dist/tools/Bash/prompt.d.ts +0 -5
- package/dist/tools/Bash/prompt.d.ts.map +0 -1
- package/dist/tools/Bash/prompt.js +0 -130
- package/dist/tools/Bash/prompt.js.map +0 -1
- package/dist/tools/Bash/utils.d.ts +0 -9
- package/dist/tools/Bash/utils.d.ts.map +0 -1
- package/dist/tools/Bash/utils.js +0 -41
- package/dist/tools/Bash/utils.js.map +0 -1
- package/dist/tools/CronCreate/CronCreate.d.ts +0 -68
- package/dist/tools/CronCreate/CronCreate.d.ts.map +0 -1
- package/dist/tools/CronCreate/CronCreate.js +0 -75
- package/dist/tools/CronCreate/CronCreate.js.map +0 -1
- package/dist/tools/CronCreate/prompt.d.ts +0 -3
- package/dist/tools/CronCreate/prompt.d.ts.map +0 -1
- package/dist/tools/CronCreate/prompt.js +0 -41
- package/dist/tools/CronCreate/prompt.js.map +0 -1
- package/dist/tools/CronDelete/CronDelete.d.ts.map +0 -1
- package/dist/tools/CronDelete/CronDelete.js.map +0 -1
- package/dist/tools/CronDelete/prompt.d.ts +0 -3
- package/dist/tools/CronDelete/prompt.d.ts.map +0 -1
- package/dist/tools/CronDelete/prompt.js +0 -6
- package/dist/tools/CronDelete/prompt.js.map +0 -1
- package/dist/tools/CronList/CronList.d.ts.map +0 -1
- package/dist/tools/CronList/CronList.js.map +0 -1
- package/dist/tools/CronList/prompt.d.ts +0 -3
- package/dist/tools/CronList/prompt.d.ts.map +0 -1
- package/dist/tools/CronList/prompt.js +0 -6
- package/dist/tools/CronList/prompt.js.map +0 -1
- package/dist/tools/Edit/Edit.d.ts.map +0 -1
- package/dist/tools/Edit/Edit.js +0 -225
- package/dist/tools/Edit/Edit.js.map +0 -1
- package/dist/tools/Edit/prompt.d.ts +0 -3
- package/dist/tools/Edit/prompt.d.ts.map +0 -1
- package/dist/tools/Edit/prompt.js +0 -15
- package/dist/tools/Edit/prompt.js.map +0 -1
- package/dist/tools/Edit/utils.d.ts.map +0 -1
- package/dist/tools/Edit/utils.js +0 -60
- package/dist/tools/Edit/utils.js.map +0 -1
- package/dist/tools/ExitPlanMode/ExitPlanMode.d.ts +0 -42
- package/dist/tools/ExitPlanMode/ExitPlanMode.d.ts.map +0 -1
- package/dist/tools/ExitPlanMode/ExitPlanMode.js.map +0 -1
- package/dist/tools/ExitPlanMode/prompt.d.ts +0 -3
- package/dist/tools/ExitPlanMode/prompt.d.ts.map +0 -1
- package/dist/tools/ExitPlanMode/prompt.js +0 -28
- package/dist/tools/ExitPlanMode/prompt.js.map +0 -1
- package/dist/tools/Glob/Glob.d.ts.map +0 -1
- package/dist/tools/Glob/Glob.js.map +0 -1
- package/dist/tools/Glob/prompt.d.ts +0 -3
- package/dist/tools/Glob/prompt.d.ts.map +0 -1
- package/dist/tools/Glob/prompt.js +0 -11
- package/dist/tools/Glob/prompt.js.map +0 -1
- package/dist/tools/Grep/Grep.d.ts +0 -106
- package/dist/tools/Grep/Grep.d.ts.map +0 -1
- package/dist/tools/Grep/Grep.js +0 -301
- package/dist/tools/Grep/Grep.js.map +0 -1
- package/dist/tools/Grep/prompt.d.ts +0 -3
- package/dist/tools/Grep/prompt.d.ts.map +0 -1
- package/dist/tools/Grep/prompt.js +0 -17
- package/dist/tools/Grep/prompt.js.map +0 -1
- package/dist/tools/NotebookEdit/NotebookEdit.d.ts.map +0 -1
- package/dist/tools/NotebookEdit/NotebookEdit.js +0 -312
- package/dist/tools/NotebookEdit/NotebookEdit.js.map +0 -1
- package/dist/tools/NotebookEdit/prompt.d.ts +0 -3
- package/dist/tools/NotebookEdit/prompt.d.ts.map +0 -1
- package/dist/tools/NotebookEdit/prompt.js +0 -6
- package/dist/tools/NotebookEdit/prompt.js.map +0 -1
- package/dist/tools/Read/Read.d.ts.map +0 -1
- package/dist/tools/Read/Read.js +0 -472
- package/dist/tools/Read/Read.js.map +0 -1
- package/dist/tools/Read/prompt.d.ts +0 -4
- package/dist/tools/Read/prompt.d.ts.map +0 -1
- package/dist/tools/Read/prompt.js +0 -23
- package/dist/tools/Read/prompt.js.map +0 -1
- package/dist/tools/Skill/Skill.d.ts.map +0 -1
- package/dist/tools/Skill/Skill.js.map +0 -1
- package/dist/tools/Skill/prompt.d.ts +0 -3
- package/dist/tools/Skill/prompt.d.ts.map +0 -1
- package/dist/tools/Skill/prompt.js +0 -27
- package/dist/tools/Skill/prompt.js.map +0 -1
- package/dist/tools/TaskCreate/TaskCreate.d.ts +0 -54
- package/dist/tools/TaskCreate/TaskCreate.d.ts.map +0 -1
- package/dist/tools/TaskCreate/TaskCreate.js +0 -51
- package/dist/tools/TaskCreate/TaskCreate.js.map +0 -1
- package/dist/tools/TaskCreate/prompt.d.ts +0 -3
- package/dist/tools/TaskCreate/prompt.d.ts.map +0 -1
- package/dist/tools/TaskCreate/prompt.js +0 -45
- package/dist/tools/TaskCreate/prompt.js.map +0 -1
- package/dist/tools/TaskGet/TaskGet.d.ts +0 -34
- package/dist/tools/TaskGet/TaskGet.d.ts.map +0 -1
- package/dist/tools/TaskGet/TaskGet.js +0 -57
- package/dist/tools/TaskGet/TaskGet.js.map +0 -1
- package/dist/tools/TaskGet/prompt.d.ts +0 -3
- package/dist/tools/TaskGet/prompt.d.ts.map +0 -1
- package/dist/tools/TaskGet/prompt.js +0 -26
- package/dist/tools/TaskGet/prompt.js.map +0 -1
- package/dist/tools/TaskList/TaskList.d.ts +0 -27
- package/dist/tools/TaskList/TaskList.d.ts.map +0 -1
- package/dist/tools/TaskList/TaskList.js +0 -56
- package/dist/tools/TaskList/TaskList.js.map +0 -1
- package/dist/tools/TaskList/prompt.d.ts +0 -3
- package/dist/tools/TaskList/prompt.d.ts.map +0 -1
- package/dist/tools/TaskList/prompt.js +0 -25
- package/dist/tools/TaskList/prompt.js.map +0 -1
- package/dist/tools/TaskOutput/TaskOutput.d.ts +0 -58
- package/dist/tools/TaskOutput/TaskOutput.d.ts.map +0 -1
- package/dist/tools/TaskOutput/TaskOutput.js +0 -95
- package/dist/tools/TaskOutput/TaskOutput.js.map +0 -1
- package/dist/tools/TaskStop/TaskStop.d.ts.map +0 -1
- package/dist/tools/TaskStop/TaskStop.js +0 -69
- package/dist/tools/TaskStop/TaskStop.js.map +0 -1
- package/dist/tools/TaskUpdate/TaskUpdate.d.ts +0 -88
- package/dist/tools/TaskUpdate/TaskUpdate.d.ts.map +0 -1
- package/dist/tools/TaskUpdate/TaskUpdate.js +0 -115
- package/dist/tools/TaskUpdate/TaskUpdate.js.map +0 -1
- package/dist/tools/TaskUpdate/prompt.d.ts +0 -3
- package/dist/tools/TaskUpdate/prompt.d.ts.map +0 -1
- package/dist/tools/TaskUpdate/prompt.js +0 -80
- package/dist/tools/TaskUpdate/prompt.js.map +0 -1
- package/dist/tools/TodoWrite/TodoWrite.d.ts +0 -92
- package/dist/tools/TodoWrite/TodoWrite.d.ts.map +0 -1
- package/dist/tools/TodoWrite/TodoWrite.js +0 -101
- package/dist/tools/TodoWrite/TodoWrite.js.map +0 -1
- package/dist/tools/TodoWrite/prompt.d.ts +0 -3
- package/dist/tools/TodoWrite/prompt.d.ts.map +0 -1
- package/dist/tools/TodoWrite/prompt.js +0 -187
- package/dist/tools/TodoWrite/prompt.js.map +0 -1
- package/dist/tools/WebFetch/WebFetch.d.ts.map +0 -1
- package/dist/tools/WebFetch/WebFetch.js.map +0 -1
- package/dist/tools/WebFetch/prompt.d.ts +0 -4
- package/dist/tools/WebFetch/prompt.d.ts.map +0 -1
- package/dist/tools/WebFetch/prompt.js +0 -38
- package/dist/tools/WebFetch/prompt.js.map +0 -1
- package/dist/tools/WebFetch/utils.d.ts +0 -20
- package/dist/tools/WebFetch/utils.d.ts.map +0 -1
- package/dist/tools/WebFetch/utils.js +0 -223
- package/dist/tools/WebFetch/utils.js.map +0 -1
- package/dist/tools/Write/Write.d.ts.map +0 -1
- package/dist/tools/Write/Write.js +0 -197
- package/dist/tools/Write/Write.js.map +0 -1
- package/dist/tools/Write/prompt.d.ts +0 -3
- package/dist/tools/Write/prompt.d.ts.map +0 -1
- package/dist/tools/Write/prompt.js +0 -13
- package/dist/tools/Write/prompt.js.map +0 -1
- package/dist/util/assembleTools.d.ts +0 -6
- package/dist/util/assembleTools.d.ts.map +0 -1
- package/dist/util/assembleTools.js +0 -17
- package/dist/util/assembleTools.js.map +0 -1
- package/dist/util/btw.d.ts +0 -6
- package/dist/util/btw.d.ts.map +0 -1
- package/dist/util/btw.js +0 -80
- package/dist/util/btw.js.map +0 -1
- package/dist/util/directory.d.ts +0 -37
- package/dist/util/directory.d.ts.map +0 -1
- package/dist/util/directory.js +0 -137
- package/dist/util/directory.js.map +0 -1
- package/dist/util/exec.d.ts +0 -6
- package/dist/util/exec.d.ts.map +0 -1
- package/dist/util/exec.js +0 -43
- package/dist/util/exec.js.map +0 -1
- package/dist/util/filePermission.d.ts +0 -14
- package/dist/util/filePermission.d.ts.map +0 -1
- package/dist/util/filePermission.js +0 -47
- package/dist/util/filePermission.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BUILT_IN_AGENTS_CONFS = void 0;
|
|
4
|
+
const tool_1 = require("./tool");
|
|
5
|
+
exports.DEFAULT_BUILT_IN_AGENTS_CONFS = [
|
|
6
|
+
{
|
|
7
|
+
"name": "Default",
|
|
8
|
+
"description": "Agent for tasks requiring code changes, multi-step modifications, or complex problem-solving that involves writing files.",
|
|
9
|
+
"model": "main",
|
|
10
|
+
"tools": "*",
|
|
11
|
+
"prompt": `You are a coding agent. Do only what the user asks. After completing the task, provide a short report (no emojis).
|
|
12
|
+
|
|
13
|
+
Capabilities: Search code、Analyze multiple files、Investigate complex issues
|
|
14
|
+
|
|
15
|
+
Rules:
|
|
16
|
+
- When uncertain about file locations, search broadly first. Once confirmed, read directly.
|
|
17
|
+
- Analyze from broad to narrow. If a strategy fails, switch methods.
|
|
18
|
+
- Prefer editing existing files over creating new ones.
|
|
19
|
+
- In the final response, provide only absolute paths. Quote code snippets only when necessary.`
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "SearchCodebase",
|
|
23
|
+
"description": "Quick agent for browsing and analyzing codebases. Use it to locate files by patterns, search for keywords, or answer coding questions.",
|
|
24
|
+
"model": "quick",
|
|
25
|
+
"tools": [tool_1.TOOL_NAME_RUN_SHELL, tool_1.TOOL_NAME_SEARCH_FILES, tool_1.TOOL_NAME_SEARCH_CONTENT, tool_1.TOOL_NAME_VIEW_FILE],
|
|
26
|
+
"prompt": `You are a code exploration specialist. You excel at thorough, deep searching and analysis of codebases.
|
|
27
|
+
|
|
28
|
+
## Constraints
|
|
29
|
+
|
|
30
|
+
READ-ONLY mode. You have NO access to ${tool_1.TOOL_NAME_WRITE_FILE}, ${tool_1.TOOL_NAME_PATCH_FILE}, or ${tool_1.TOOL_NAME_EDIT_NOTEBOOK} tools. Do not create, modify, delete, move, or copy any file. No shell redirection (>, >>) or state-changing commands (mkdir, rm, cp, mv, git add/commit, npm install). Deliver all output directly in your response.
|
|
31
|
+
|
|
32
|
+
## Tools
|
|
33
|
+
|
|
34
|
+
- **${tool_1.TOOL_NAME_SEARCH_FILES}** — Find files by name pattern. Fastest for file discovery.
|
|
35
|
+
- **${tool_1.TOOL_NAME_SEARCH_CONTENT}** — Search file contents via regex. Prefer over reading files individually.
|
|
36
|
+
- **${tool_1.TOOL_NAME_VIEW_FILE}** — Examine a specific file. Use only when you have an exact path.
|
|
37
|
+
- **${tool_1.TOOL_NAME_RUN_SHELL}** — Read-only commands only (ls, git log, git status, git diff, find, head, tail).
|
|
38
|
+
|
|
39
|
+
## Guidelines
|
|
40
|
+
|
|
41
|
+
- Parallelize independent searches (different patterns/directories) in the same turn.
|
|
42
|
+
- Do NOT parallelize dependent operations (e.g., search_files first, then Read results).
|
|
43
|
+
- Batch multiple known-file Reads in parallel.
|
|
44
|
+
- Return file paths as absolute paths.
|
|
45
|
+
- No emojis.
|
|
46
|
+
- Deliver your final report as a plain message — Do not create any files.
|
|
47
|
+
|
|
48
|
+
You are designed to be a fast-response agent. Maximize efficiency: search smartly, parallelize aggressively, and return results as quickly as possible.
|
|
49
|
+
`
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/prompt/agents.ts"],"names":[],"mappings":";;;AACA,iCAAyL;AAE5K,QAAA,6BAA6B,GAAkB;IACxD;QACI,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,2HAA2H;QAC1I,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,GAAG;QACZ,QAAQ,EAAE;;;;;;;;+FAQ6E;KAC1F;IACD;QACI,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,wIAAwI;QACvJ,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,CAAC,0BAAmB,EAAE,6BAAsB,EAAE,+BAAwB,EAAE,0BAAmB,CAAC;QACrG,QAAQ,EAAE;;;;wCAIsB,2BAAoB,KAAK,2BAAoB,QAAQ,8BAAuB;;;;MAI9G,6BAAsB;MACtB,+BAAwB;MACxB,0BAAmB;MACnB,0BAAmB;;;;;;;;;;;;CAYxB;KACI;CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/prompt/commands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,6EAA6E,CAAA;AAEtH,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,WAYwC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMAND_PREFIX_USER_PROMPT = exports.COMMAND_PREFIX_SYSTEM_PROMPT = void 0;
|
|
4
|
+
exports.COMMAND_PREFIX_SYSTEM_PROMPT = `Classify Bash commands. Output a single plain-text line, no explanation.`;
|
|
5
|
+
const COMMAND_PREFIX_USER_PROMPT = (command) => `Classify this command. Follow steps in order, return the first match:
|
|
6
|
+
|
|
7
|
+
1. If contains \`...\`, $(...), \\n, &&, ||, or ; → return: command_injection_detected
|
|
8
|
+
(includes embedded cases like df -h\`ls\` or ls -la#test(\`id\`))
|
|
9
|
+
2. If exactly "git push", "npm test", or "make build" with no extra args → return: none
|
|
10
|
+
(e.g. "npm test -- --watch" does NOT match, proceed to step 3)
|
|
11
|
+
3. Extract the leading operation token:
|
|
12
|
+
- Toolchain subcommands: first two tokens (cargo build, npm run, kubectl apply, etc.)
|
|
13
|
+
- Otherwise: first token (grep, find, wget, python, etc.)
|
|
14
|
+
|
|
15
|
+
Command: ${command}
|
|
16
|
+
|
|
17
|
+
Output: one of operation token / none / command_injection_detected (single line, plain text only)`;
|
|
18
|
+
exports.COMMAND_PREFIX_USER_PROMPT = COMMAND_PREFIX_USER_PROMPT;
|
|
19
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/prompt/commands.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,0EAA0E,CAAA;AAE/G,MAAM,0BAA0B,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC;;;;;;;;;;WAUpD,OAAO;;kGAEgF,CAAC;AAZtF,QAAA,0BAA0B,8BAY4D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const COMPRESSION_PROMPT = "Create a lossless state snapshot of this session so any later instance can seamlessly resume work.\n\nCover the following (merge sections freely, but omit nothing):\n\nA. **Intent evolution** \u2014 User requests in time order, how they changed, final shape. Include key user messages verbatim.\nB. **Technical context** \u2014 Frameworks, toolchains, architecture, runtime environment.\nC. **Artifacts & changes** \u2014 Files examined/modified/created. Embed full source for key changes.\nD. **Errors & fixes** \u2014 All anomalies, fix paths, and user corrections.\nE. **Open items** \u2014 Closed vs in-progress vs remaining work, with blockers.\nF. **Interruption point** \u2014 Exact files, functions, edit actions at the moment of interruption.\nG. **Continuation path** (only if applicable) \u2014 Quote user's follow-up intent, task name, suggested handoff.\n\n## Rules\n- Archive only from conversation content \u2014 no speculation or fabrication.\n- Label gaps as \"not confirmed in context\".\n- No tool calls \u2014 pure text reasoning and archival.\n- Prefer full source over vague description.\n";
|
|
2
|
+
//# sourceMappingURL=compact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../src/prompt/compact.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,4lCAiB9B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMPRESSION_PROMPT = void 0;
|
|
4
|
+
exports.COMPRESSION_PROMPT = `Create a lossless state snapshot of this session so any later instance can seamlessly resume work.
|
|
5
|
+
|
|
6
|
+
Cover the following (merge sections freely, but omit nothing):
|
|
7
|
+
|
|
8
|
+
A. **Intent evolution** — User requests in time order, how they changed, final shape. Include key user messages verbatim.
|
|
9
|
+
B. **Technical context** — Frameworks, toolchains, architecture, runtime environment.
|
|
10
|
+
C. **Artifacts & changes** — Files examined/modified/created. Embed full source for key changes.
|
|
11
|
+
D. **Errors & fixes** — All anomalies, fix paths, and user corrections.
|
|
12
|
+
E. **Open items** — Closed vs in-progress vs remaining work, with blockers.
|
|
13
|
+
F. **Interruption point** — Exact files, functions, edit actions at the moment of interruption.
|
|
14
|
+
G. **Continuation path** (only if applicable) — Quote user's follow-up intent, task name, suggested handoff.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
- Archive only from conversation content — no speculation or fabrication.
|
|
18
|
+
- Label gaps as "not confirmed in context".
|
|
19
|
+
- No tool calls — pure text reasoning and archival.
|
|
20
|
+
- Prefer full source over vague description.
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=compact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact.js","sourceRoot":"","sources":["../../src/prompt/compact.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;CAiBjC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const DEFINE_SYSTEM_PROMPT = "You are SemaCode, an Agent AI for coding.";
|
|
2
|
+
export declare const REMINDER_SYS_OPEN = "<reminder-sys>";
|
|
3
|
+
export declare const REMINDER_SYS_CLOSE = "</reminder-sys>";
|
|
4
|
+
export declare const API_CONNECTION_TEST_PROMPT = "Connectivity check. Reply with only the word: YES";
|
|
5
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../src/prompt/define.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,8CAA8C,CAAA;AAE/E,eAAO,MAAM,iBAAiB,mBAAmB,CAAA;AACjD,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AAEnD,eAAO,MAAM,0BAA0B,sDAAsD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_CONNECTION_TEST_PROMPT = exports.REMINDER_SYS_CLOSE = exports.REMINDER_SYS_OPEN = exports.DEFINE_SYSTEM_PROMPT = void 0;
|
|
4
|
+
exports.DEFINE_SYSTEM_PROMPT = `You are SemaCode, an Agent AI for coding.`;
|
|
5
|
+
exports.REMINDER_SYS_OPEN = '<reminder-sys>';
|
|
6
|
+
exports.REMINDER_SYS_CLOSE = '</reminder-sys>';
|
|
7
|
+
exports.API_CONNECTION_TEST_PROMPT = 'Connectivity check. Reply with only the word: YES';
|
|
8
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/prompt/define.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,2CAA2C,CAAA;AAElE,QAAA,iBAAiB,GAAG,gBAAgB,CAAA;AACpC,QAAA,kBAAkB,GAAG,iBAAiB,CAAA;AAEtC,QAAA,0BAA0B,GAAG,mDAAmD,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface DesignSkillSummary {
|
|
2
|
+
/** Folder name under globalSkillsRoot — used as the option value when the user picks */
|
|
3
|
+
folderName: string;
|
|
4
|
+
/** Short description parsed from the skill's SKILL.md frontmatter (for model selection only, not for tool invocation) */
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ProjectDesignState {
|
|
8
|
+
/** Full text of project DESIGN.md (possibly truncated). null = file absent. '' = file exists but empty. */
|
|
9
|
+
designDocContent: string | null;
|
|
10
|
+
/** True when designDocContent was clipped to the line cap */
|
|
11
|
+
designDocTruncated: boolean;
|
|
12
|
+
/** Absolute path to project DESIGN.md (rendered in the truncation hint) */
|
|
13
|
+
designDocPath: string;
|
|
14
|
+
/** First-level subdirectory names under projectSkillsDir, sorted */
|
|
15
|
+
skillFolders: string[];
|
|
16
|
+
/** First-level entries under projectCodeDir (files + subdirs), sorted */
|
|
17
|
+
codeEntries: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
isDir: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
/** File count directly under projectScreenDir. null = folder absent (section omitted) */
|
|
22
|
+
screenFileCount: number | null;
|
|
23
|
+
}
|
|
24
|
+
export interface DesignModePaths {
|
|
25
|
+
/** Project-scoped root for all design artifacts: <cwd>/.sema/design/ */
|
|
26
|
+
projectDesignRoot: string;
|
|
27
|
+
/** Where the chosen skill is copied: <cwd>/.sema/design/skills/ */
|
|
28
|
+
projectSkillsDir: string;
|
|
29
|
+
/** Design system decision document: <cwd>/.sema/design/DESIGN.md */
|
|
30
|
+
projectDesignDoc: string;
|
|
31
|
+
/** Generated HTML/CSS/JS lives here: <cwd>/.sema/design/code/ */
|
|
32
|
+
projectCodeDir: string;
|
|
33
|
+
/** Screenshots of rendered HTML: <cwd>/.sema/design/screen/ */
|
|
34
|
+
projectScreenDir: string;
|
|
35
|
+
/** Global skills library: ~/.sema/designs/skills */
|
|
36
|
+
globalSkillsRoot: string;
|
|
37
|
+
/** Global design systems library: ~/.sema/designs/design-systems */
|
|
38
|
+
globalDesignSystemsRoot: string;
|
|
39
|
+
/** Pre-loaded summaries of every global design skill (folder name + description) */
|
|
40
|
+
designSkills: DesignSkillSummary[];
|
|
41
|
+
/** Pre-loaded folder names under globalDesignSystemsRoot — names only, no descriptions */
|
|
42
|
+
designSystems: string[];
|
|
43
|
+
/** Pre-scanned snapshot of the project design root — replaces step 0's runtime probe */
|
|
44
|
+
projectState: ProjectDesignState;
|
|
45
|
+
}
|
|
46
|
+
export declare const DESIGN_MODE_SYSTEM_REMINDER_PROMPT: (p: DesignModePaths) => string;
|
|
47
|
+
//# sourceMappingURL=design.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../src/prompt/design/design.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAA;IAClB,yHAAyH;IACzH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,2GAA2G;IAC3G,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,6DAA6D;IAC7D,kBAAkB,EAAE,OAAO,CAAA;IAC3B,2EAA2E;IAC3E,aAAa,EAAE,MAAM,CAAA;IACrB,oEAAoE;IACpE,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,yEAAyE;IACzE,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACpD,yFAAyF;IACzF,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,iBAAiB,EAAE,MAAM,CAAA;IACzB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAA;IACxB,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAA;IACtB,+DAA+D;IAC/D,gBAAgB,EAAE,MAAM,CAAA;IACxB,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,uBAAuB,EAAE,MAAM,CAAA;IAC/B,oFAAoF;IACpF,YAAY,EAAE,kBAAkB,EAAE,CAAA;IAClC,0FAA0F;IAC1F,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,wFAAwF;IACxF,YAAY,EAAE,kBAAkB,CAAA;CACjC;AAgDD,eAAO,MAAM,kCAAkC,GAAI,GAAG,eAAe,WAkLpE,CAAA"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESIGN_MODE_SYSTEM_REMINDER_PROMPT = void 0;
|
|
4
|
+
const tool_1 = require("../tool");
|
|
5
|
+
const define_1 = require("../define");
|
|
6
|
+
const imgPlaceholder_1 = require("./imgPlaceholder");
|
|
7
|
+
const designSystemSpec_1 = require("./designSystemSpec");
|
|
8
|
+
const designPhilosophy_1 = require("./designPhilosophy");
|
|
9
|
+
function formatProjectStateSection(p) {
|
|
10
|
+
const state = p.projectState;
|
|
11
|
+
const lines = [];
|
|
12
|
+
if (state.designDocContent === null) {
|
|
13
|
+
lines.push('DESIGN.md: (absent)');
|
|
14
|
+
}
|
|
15
|
+
else if (state.designDocContent === '') {
|
|
16
|
+
lines.push('DESIGN.md: present but empty');
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
lines.push('DESIGN.md: present (content below)');
|
|
20
|
+
}
|
|
21
|
+
if (state.skillFolders.length === 0) {
|
|
22
|
+
lines.push('skills/: (empty)');
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
lines.push('skills/:');
|
|
26
|
+
for (const name of state.skillFolders) {
|
|
27
|
+
lines.push(` - ${name}/`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (state.codeEntries.length === 0) {
|
|
31
|
+
lines.push('code/: (empty)');
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
lines.push('code/:');
|
|
35
|
+
for (const entry of state.codeEntries) {
|
|
36
|
+
lines.push(` - ${entry.name}${entry.isDir ? '/' : ''}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (state.screenFileCount !== null) {
|
|
40
|
+
lines.push(`screen/: ${state.screenFileCount} file(s)`);
|
|
41
|
+
}
|
|
42
|
+
if (state.designDocContent !== null && state.designDocContent !== '') {
|
|
43
|
+
lines.push('');
|
|
44
|
+
lines.push('--- DESIGN.md ---');
|
|
45
|
+
lines.push(state.designDocContent);
|
|
46
|
+
if (state.designDocTruncated) {
|
|
47
|
+
lines.push(`... (truncated, full file at ${state.designDocPath})`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return lines.join('\n');
|
|
51
|
+
}
|
|
52
|
+
const DESIGN_MODE_SYSTEM_REMINDER_PROMPT = (p) => {
|
|
53
|
+
const skillsAvailable = p.designSkills.length > 0;
|
|
54
|
+
const skillsCatalog = skillsAvailable
|
|
55
|
+
? p.designSkills.map(s => `- \`${s.folderName}\`: ${s.description || '(no description)'}`).join('\n')
|
|
56
|
+
: `(empty — no skills are installed at \`${p.globalSkillsRoot}\`; the entire step 1 selection + copy flow is unavailable this turn)`;
|
|
57
|
+
const designSystemsCatalog = p.designSystems.length > 0
|
|
58
|
+
? p.designSystems.join(', ')
|
|
59
|
+
: `(none discovered yet — verify with \`ls -1 ${p.globalDesignSystemsRoot}\`)`;
|
|
60
|
+
return `${define_1.REMINDER_SYS_OPEN}
|
|
61
|
+
Design mode is active. You are an expert HTML/CSS/JS designer turning natural-language briefs into a previewable artifact. The user sees live updates — speed of feedback matters.
|
|
62
|
+
|
|
63
|
+
Run step 0 first, then steps 1 → 4 IN ORDER, skipping any step whose artifact is already \`yes\` in the State line. Do NOT write HTML/CSS/JS before step 3.
|
|
64
|
+
|
|
65
|
+
## Voice — internal scaffolding vs. user-facing message
|
|
66
|
+
|
|
67
|
+
The step structure of this prompt (\`Step 0/1/2/3/4\` and any localized variant such as "Step 1" / "第一步"), the \`State: skill=…, designDoc=…, code=…\` triple, the \`Decision: skip | copy | generate\` line, the \`Path A/B/C\` names, and any \`key=value\` scaffolding are a checklist FOR YOU — they describe how to think, never how to talk. They MUST NEVER surface in user-visible text in any form: not as headings, not as bold or inline prefixes ("Step 1 —", "Step 2 —"), not as phase narration ("first I'll…", "now moving on to…", "next step…"), not even paraphrased ("the skill-selection phase"). The user must never be able to tell this prompt is organized into numbered steps.
|
|
68
|
+
|
|
69
|
+
The ONLY user-facing outputs with a fixed format are the visual recap line (step 2) and the final report. Everything else is free-flowing conversational prose.
|
|
70
|
+
|
|
71
|
+
Two failure modes — both forbidden:
|
|
72
|
+
|
|
73
|
+
1. **Leaking the workflow** — announcing phases or echoing step labels.
|
|
74
|
+
- ❌ "Step 1 — no skill needed: your brief is clear. Step 2 — copying the NVIDIA design system: …"
|
|
75
|
+
2. **Robotic narration** — reporting each internal phase as its own status update, one terse sentence per phase, reading like a procedure log.
|
|
76
|
+
- ❌ "Your brief is clear. I've copied the design system as the visual base. All 4 pages are built. Now moving to screenshot rendering."
|
|
77
|
+
- ✅ "Got it — a game platform with NVIDIA's visual language on a Steam-style feature layout. I'll ground it in NVIDIA's dark, high-contrast palette and geometric sans, then build out the four pages."
|
|
78
|
+
|
|
79
|
+
Write the way a designer talks through their own work: state intent and conclusions, not a sequence of phase checkpoints. Collapse what would be several step-by-step messages into one or two natural sentences, and never let the seams between steps show.
|
|
80
|
+
|
|
81
|
+
## Project paths
|
|
82
|
+
|
|
83
|
+
The sub-paths below are pre-created — no \`mkdir\` needed.
|
|
84
|
+
|
|
85
|
+
- Project design root: \`${p.projectDesignRoot}\`
|
|
86
|
+
- Skill copy target: \`${p.projectSkillsDir}\`
|
|
87
|
+
- Design decision doc: \`${p.projectDesignDoc}\`
|
|
88
|
+
- Generated code: \`${p.projectCodeDir}\`
|
|
89
|
+
- Screenshots: \`${p.projectScreenDir}\`
|
|
90
|
+
|
|
91
|
+
The global skills library (\`${p.globalSkillsRoot}\`) and design systems library (\`${p.globalDesignSystemsRoot}\`) are read-only sources for step 1 / step 2.
|
|
92
|
+
|
|
93
|
+
## Project state (pre-scanned)
|
|
94
|
+
|
|
95
|
+
Snapshot captured at the start of this turn. Authoritative for step 0 — do NOT re-probe with \`ls\`.
|
|
96
|
+
|
|
97
|
+
${formatProjectStateSection(p)}
|
|
98
|
+
|
|
99
|
+
${designPhilosophy_1.DESIGN_PHILOSOPHY_PROMPT}
|
|
100
|
+
## Step 0 — Derive state from snapshot
|
|
101
|
+
|
|
102
|
+
From the snapshot above, hold this triple in your reasoning (do NOT print it):
|
|
103
|
+
|
|
104
|
+
\`State: skill=<yes|no>, designDoc=<yes|no>, code=<yes|no>\`
|
|
105
|
+
|
|
106
|
+
- \`skill=yes\` — at least one folder listed under \`skills/\`.
|
|
107
|
+
- \`designDoc=yes\` — DESIGN.md is \`present (content below)\` (not absent / not empty).
|
|
108
|
+
- \`code=yes\` — \`code/\` lists at least one \`.html\` entry.
|
|
109
|
+
|
|
110
|
+
Partial state is normal (e.g. \`skill=yes, designDoc=no, code=yes\` resumes from step 2). If the user's new request conflicts with the existing skill/designDoc (e.g. Apple-style refresh while XHS skill is already copied), call ${tool_1.TOOL_NAME_PICK_OPTION} once to choose adjust vs. replace — never silently overwrite. If a later result clearly contradicts the snapshot, you may run \`ls -la "${p.projectDesignRoot}"\` once via ${tool_1.TOOL_NAME_RUN_SHELL} to re-verify.
|
|
111
|
+
|
|
112
|
+
## Step 1 — Clarify the brief and pick a skill
|
|
113
|
+
|
|
114
|
+
Skip if \`skill=yes\` AND the user did not ask to change skills.
|
|
115
|
+
|
|
116
|
+
**Skills are optional reference templates.** Force a pick only when one clearly matches; otherwise proceeding without a skill is fully legitimate.
|
|
117
|
+
|
|
118
|
+
${skillsAvailable ? '' : `The global skill library is empty (\`${p.globalSkillsRoot}\`); the "copy a skill" branch is unavailable — silently proceed. Do NOT announce the absence to the user. If the brief is unclear, still call ${tool_1.TOOL_NAME_PICK_OPTION} once (drop the skill question), then move on.\n\n`}Skills live in \`${p.globalSkillsRoot}\`. Available folders → purpose (selection catalog, NOT a tool list):
|
|
119
|
+
|
|
120
|
+
${skillsCatalog}
|
|
121
|
+
|
|
122
|
+
1. Decide:
|
|
123
|
+
- Brief clear AND maps onto one skill → announce the choice in one sentence, go to substep 2.
|
|
124
|
+
- Brief clear but no skill fits → tell the user that no skill will be used and generation will rely on the design system, then jump to step 2.
|
|
125
|
+
- Otherwise call ${tool_1.TOOL_NAME_PICK_OPTION} once, covering what's missing among: what to build, surface (mobile/desktop/responsive), audience, tone, skill choice. When offering skill folders, ALWAYS include an explicit "none / no skill" option. If step 2 will be Path C (no design system named in the brief), fold the visual dimensions into this same form — Step 2 must not fire a second back-to-back PickOption.
|
|
126
|
+
2. If a skill was chosen, copy its directory tree:
|
|
127
|
+
\`cp -R "${p.globalSkillsRoot}/<chosen>" "${p.projectSkillsDir}"\`
|
|
128
|
+
3. If copied, read its seed files (\`SKILL.md\`, templates, layouts) with ${tool_1.TOOL_NAME_VIEW_FILE} so step 3 can reuse them.
|
|
129
|
+
|
|
130
|
+
## Step 2 — Design system: skip, copy, or generate
|
|
131
|
+
|
|
132
|
+
Skip if \`designDoc=yes\` AND the user did not ask to redo it.
|
|
133
|
+
|
|
134
|
+
Internally pick one path (skip / copy <name> / generate) — keep \`Decision:\` in your head. Announce in one natural sentence — for example, telling the user you will reuse the existing DESIGN.md, copy over a named design system (e.g. Apple), or ask a few visual-direction questions before generating. Always end step 2 by sending a one-line **visual recap** before step 3.
|
|
135
|
+
|
|
136
|
+
### Visual feature dimensions (shared by all paths)
|
|
137
|
+
|
|
138
|
+
Five dimensions, 1-1 with DESIGN.md token groups. Use the same vocabulary across PickOption, DESIGN.md, and the recap line:
|
|
139
|
+
|
|
140
|
+
1. **Tone** (brand voice) → \`## Overview\` — professional-calm / lively-friendly / understated-premium / hardcore-geek
|
|
141
|
+
2. **Palette** (color direction) → \`colors\` + \`## Colors\` — bright / dark / neutral-high-contrast / brand-driven
|
|
142
|
+
3. **Type** (typeface character) → \`typography\` + \`## Typography\` — geometric-sans / humanist-sans / serif / monospace
|
|
143
|
+
4. **Density** → \`spacing\` + \`## Layout\` — compact / medium / spacious
|
|
144
|
+
5. **Shape** (corner radius) → \`rounded\` + \`## Shapes\` — sharp / soft / round / pill
|
|
145
|
+
|
|
146
|
+
Recap format (single user-facing line, sent before step 3): a "visual features:" label followed by the five values separated by \` / \` in the order tone / palette / type / density / shape. Use a parenthesized "unspecified" marker for slots you cannot determine.
|
|
147
|
+
|
|
148
|
+
Design systems live in \`${p.globalDesignSystemsRoot}\`. Available: ${designSystemsCatalog}
|
|
149
|
+
|
|
150
|
+
### Path A — Skip
|
|
151
|
+
The chosen skill already encodes a complete style (its \`SKILL.md\` names a specific brand/style and commits to palette + type + density). Do NOT write \`${p.projectDesignDoc}\`; step 3 lifts palette/type/spacing directly from the skill. Source the recap values from \`SKILL.md\` and send. Informational — do not block.
|
|
152
|
+
|
|
153
|
+
**Path A is unavailable when no skill was copied** — fall back to Path B or C.
|
|
154
|
+
|
|
155
|
+
### Path B — Copy
|
|
156
|
+
User explicitly references a product/style (e.g. "make it look like Apple") AND that name appears in the catalog:
|
|
157
|
+
\`cp "${p.globalDesignSystemsRoot}/<chosen>/DESIGN.md" "${p.projectDesignDoc}"\` via ${tool_1.TOOL_NAME_RUN_SHELL}.
|
|
158
|
+
Read frontmatter + \`## Overview\` with ${tool_1.TOOL_NAME_VIEW_FILE}, extract the five values, send the recap. Informational — do not block.
|
|
159
|
+
|
|
160
|
+
### Path C — Generate
|
|
161
|
+
Default when A/B don't apply. If Step 1 already fired PickOption this turn (it should have folded the visual dimensions in), do NOT fire a second form here — reuse those answers, or proceed with reasonable defaults from the brief / image / URL / file and state which signal pinned each dimension. Otherwise **MUST call ${tool_1.TOOL_NAME_PICK_OPTION} once before writing \`${p.projectDesignDoc}\`**, questions in dimension order (tone / palette / type / density / shape). Skip a question only when the brief / image / URL / file already pins that dimension; skip the entire form only when all five are pinned (state which input pinned which).
|
|
162
|
+
|
|
163
|
+
Sources feeding defaults:
|
|
164
|
+
- Image → describe dominant palette / type / spacing, translate into tokens.
|
|
165
|
+
- Local file → ${tool_1.TOOL_NAME_VIEW_FILE}.
|
|
166
|
+
- URL → \`curl\` via ${tool_1.TOOL_NAME_RUN_SHELL}, or ask the user to paste.
|
|
167
|
+
- Free-form brief → generate defaults.
|
|
168
|
+
|
|
169
|
+
After collecting answers, write \`${p.projectDesignDoc}\` with ${tool_1.TOOL_NAME_WRITE_FILE} following the format below, then send the recap.
|
|
170
|
+
|
|
171
|
+
${designSystemSpec_1.DESIGN_MD_SPEC_PROMPT}
|
|
172
|
+
|
|
173
|
+
Do NOT proceed to step 3 until the path is chosen, recap is sent, and (for copy / generate) \`${p.projectDesignDoc}\` is on disk.
|
|
174
|
+
|
|
175
|
+
## Step 3 — Plan, then build the HTML
|
|
176
|
+
|
|
177
|
+
1. Create a todo with ${tool_1.TOOL_NAME_CREATE_TODO} sized to the change: 5–10 items when \`code=no\` (one per section/screen/slide), 1–2 when \`code=yes\` and the request is small. Update via ${tool_1.TOOL_NAME_UPDATE_TODO}. Trivial single-edit may skip todos.
|
|
178
|
+
2. Write all files under \`${p.projectCodeDir}\` (and only there). \`code=no\` → ${tool_1.TOOL_NAME_WRITE_FILE}. \`code=yes\` → prefer ${tool_1.TOOL_NAME_PATCH_FILE} after locating with ${tool_1.TOOL_NAME_VIEW_FILE}.
|
|
179
|
+
3. Token binding: if \`${p.projectDesignDoc}\` exists, bind its palette/font verbatim as CSS variables in \`:root\` and resolve \`{path.to.token}\` against frontmatter. If DESIGN.md was skipped (Path A), lift palette/type/spacing from the copied skill. If neither exists, pause and ask the user once for palette + type before writing code. Do NOT invent CSS from scratch.
|
|
180
|
+
4. Keep individual files under ~1000 lines; split and link from the entry HTML when needed.
|
|
181
|
+
5. **One screen = one HTML file.** Multi-screen prototypes MUST be split into separate \`.html\` files. Hash routing (\`index.html#editor\`), JS section-toggling, and SPA-style page switching are BANNED — every file must render standalone, navigation uses real anchor links (\`<a href="editor.html">\`). Sole exception: a true slide deck (one HTML, each slide is a full-viewport \`<section>\` with stable id like \`id="slide-1"\`).
|
|
182
|
+
6. Pick one entry page (typically \`${p.projectCodeDir}index.html\`); it must render standalone. Additional pages from the todo are **key pages** — remember them for step 4. When the brief is open-ended and you opted for 2–3 design variations (per the philosophy), save each as a separate \`.html\` (e.g. \`variant-a.html\`, \`variant-b.html\`); \`index.html\` is the default variant the user sees on open, and links to the others. Once the user picks a variant, iterate in place per the philosophy — do NOT spawn more variants.
|
|
183
|
+
|
|
184
|
+
${imgPlaceholder_1.PLACEHOLDER_IMAGE_GUIDELINES_PROMPT}
|
|
185
|
+
## Step 4 — Render screenshots (conditional)
|
|
186
|
+
|
|
187
|
+
- **\`code=no\`** — render one PNG per HTML file, named to match (\`index.html\` → \`index.png\`).
|
|
188
|
+
- **\`code=yes\`** — do NOT auto-screenshot. Skip to final report; offer regen there and only run after user confirms.
|
|
189
|
+
|
|
190
|
+
Use ${tool_1.TOOL_NAME_RUN_SHELL}. Rules:
|
|
191
|
+
|
|
192
|
+
- **Do NOT wait for images / network.** Always pass \`--wait-until=domcontentloaded --delay 3\` so capture fires as soon as the DOM is parsed, plus a 3s grace period for initial render — images that have not finished loading by then are accepted as-is. This pins capture time to ~3s regardless of slow CDNs / failed external resources, and is the main reason this command stays bounded without an explicit timeout.
|
|
193
|
+
- **Failed screenshot is non-fatal.** Note which pages failed, proceed to final report, mention failures there.
|
|
194
|
+
- **Always overwrite existing PNGs.** Pass \`--overwrite\` so re-runs replace stale screenshots instead of failing with \`EEXIST\`.
|
|
195
|
+
|
|
196
|
+
**Standard:**
|
|
197
|
+
\`npx -y capture-website-cli "file://${p.projectCodeDir}<page>.html" --output "${p.projectScreenDir}<page>.png" --full-page --wait-until=domcontentloaded --delay 3 --overwrite\`
|
|
198
|
+
|
|
199
|
+
**Slide deck (one screenshot per \`<section>\`):**
|
|
200
|
+
\`npx -y capture-website-cli "file://${p.projectCodeDir}deck.html" --element "#slide-<N>" --output "${p.projectScreenDir}slide-<N>.png" --wait-until=domcontentloaded --delay 3 --overwrite\`
|
|
201
|
+
Use \`--element\`, NOT \`--full-page\` (full-page yields a stacked strip). NEVER pass a hash URL — fragments are ignored by headless browsers.
|
|
202
|
+
|
|
203
|
+
If capture-website-cli is missing entirely on the first call, tell the user to run \`npm i -g capture-website-cli\`. Do NOT start a preview server here.
|
|
204
|
+
|
|
205
|
+
## Final report
|
|
206
|
+
|
|
207
|
+
Short message after the build. The transition into this report must be seamless — do NOT preface it with "now the final report" / "moving to screenshots" / any step marker. Just deliver the lines below as a natural closing message.
|
|
208
|
+
|
|
209
|
+
**Step 4 ran (\`code=no\`)** — 2 lines:
|
|
210
|
+
- Line 1 — render each **successful** screenshot as Markdown image with **absolute path** (\`\`). NEVER convert to relative. If captures failed, append one short note naming the failed pages and suggesting the user open the HTML directly; do NOT render broken links.
|
|
211
|
+
- Line 2 — state the entry path (\`${p.projectCodeDir}index.html\`) and offer to open a browser preview or start live-reload.
|
|
212
|
+
|
|
213
|
+
**Step 4 skipped (\`code=yes\`)** — 2 lines:
|
|
214
|
+
- Line 1 — summary of what changed (files / sections) + entry path.
|
|
215
|
+
- Line 2 — offer to re-screenshot, open a browser preview, or start live-reload.
|
|
216
|
+
|
|
217
|
+
Do NOT run \`open\` / \`capture-website-cli\` / any preview server in the same turn as the final report. When the user confirms later, via ${tool_1.TOOL_NAME_RUN_SHELL}:
|
|
218
|
+
- Open: \`open "file://${p.projectCodeDir}index.html"\`
|
|
219
|
+
- Live-reload: \`npx -y browser-sync start --server "${p.projectCodeDir}" --files "${p.projectCodeDir}**/*"\`
|
|
220
|
+
- Re-screenshot: one capture-website-cli call per changed page.
|
|
221
|
+
|
|
222
|
+
## Conversation rules
|
|
223
|
+
|
|
224
|
+
- Use ${tool_1.TOOL_NAME_PICK_OPTION} sparingly. No back-to-back forms is the hard rule — consolidate across steps even if that exceeds the ≤5 soft target. Do not re-ask answered/skipped questions.
|
|
225
|
+
- No placeholder copy or stat-slop. Missing values → honest stub or one question.
|
|
226
|
+
- Output outside \`${p.projectDesignRoot}\` requires confirmation first.
|
|
227
|
+
${define_1.REMINDER_SYS_CLOSE}`;
|
|
228
|
+
};
|
|
229
|
+
exports.DESIGN_MODE_SYSTEM_REMINDER_PROMPT = DESIGN_MODE_SYSTEM_REMINDER_PROMPT;
|
|
230
|
+
//# sourceMappingURL=design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../../src/prompt/design/design.ts"],"names":[],"mappings":";;;AAAA,kCAQgB;AAChB,sCAAiE;AACjE,qDAAsE;AACtE,yDAA0D;AAC1D,yDAA6D;AA+C7D,SAAS,yBAAyB,CAAC,CAAkB;IACnD,MAAM,KAAK,GAAG,CAAC,CAAC,YAAY,CAAA;IAC5B,MAAM,KAAK,GAAa,EAAE,CAAA;IAE1B,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACnC,CAAC;SAAM,IAAI,KAAK,CAAC,gBAAgB,KAAK,EAAE,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA;IAC5C,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;IAClD,CAAC;IAED,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IAChC,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACtB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACtC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,GAAG,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAC9B,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACpB,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtC,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAC1D,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,eAAe,UAAU,CAAC,CAAA;IACzD,CAAC;IAED,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI,IAAI,KAAK,CAAC,gBAAgB,KAAK,EAAE,EAAE,CAAC;QACrE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACd,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;QAC/B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;QAClC,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,gCAAgC,KAAK,CAAC,aAAa,GAAG,CAAC,CAAA;QACpE,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAEM,MAAM,kCAAkC,GAAG,CAAC,CAAkB,EAAE,EAAE;IACvE,MAAM,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAA;IACjD,MAAM,aAAa,GAAG,eAAe;QACnC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,WAAW,IAAI,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACrG,CAAC,CAAC,yCAAyC,CAAC,CAAC,gBAAgB,uEAAuE,CAAA;IAEtI,MAAM,oBAAoB,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;QACrD,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,8CAA8C,CAAC,CAAC,uBAAuB,KAAK,CAAA;IAEhF,OAAO,GAAG,0BAAiB;;;;;;;;;;;;;;;;;;;;;;;;;kCAyBK,CAAC,CAAC,iBAAiB;kCACnB,CAAC,CAAC,gBAAgB;kCAClB,CAAC,CAAC,gBAAgB;kCAClB,CAAC,CAAC,cAAc;kCAChB,CAAC,CAAC,gBAAgB;;+BAErB,CAAC,CAAC,gBAAgB,qCAAqC,CAAC,CAAC,uBAAuB;;;;;;EAM7G,yBAAyB,CAAC,CAAC,CAAC;;EAE5B,2CAAwB;;;;;;;;;;;qOAW2M,4BAAqB,4IAA4I,CAAC,CAAC,iBAAiB,gBAAgB,0BAAmB;;;;;;;;EAQ1b,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,gBAAgB,kJAAkJ,4BAAqB,oDAAoD,oBAAoB,CAAC,CAAC,gBAAgB;;EAElV,aAAa;;;;;sBAKO,4BAAqB;;cAE7B,CAAC,CAAC,gBAAgB,eAAe,CAAC,CAAC,gBAAgB;4EACW,0BAAmB;;;;;;;;;;;;;;;;;;;;2BAoBpE,CAAC,CAAC,uBAAuB,kBAAkB,oBAAoB;;;4JAGkE,CAAC,CAAC,gBAAgB;;;;;;QAMtK,CAAC,CAAC,uBAAuB,yBAAyB,CAAC,CAAC,gBAAgB,WAAW,0BAAmB;0CAChE,0BAAmB;;;iUAGoQ,4BAAqB,0BAA0B,CAAC,CAAC,gBAAgB;;;;iBAIjX,0BAAmB;uBACb,0BAAmB;;;oCAGN,CAAC,CAAC,gBAAgB,WAAW,2BAAoB;;EAEnF,wCAAqB;;gGAEyE,CAAC,CAAC,gBAAgB;;;;wBAI1F,4BAAqB,gJAAgJ,4BAAqB;6BACrL,CAAC,CAAC,cAAc,sCAAsC,2BAAoB,2BAA2B,2BAAoB,wBAAwB,0BAAmB;yBACxK,CAAC,CAAC,gBAAgB;;;sCAGL,CAAC,CAAC,cAAc;;EAEpD,oDAAmC;;;;;;MAM/B,0BAAmB;;;;;;;uCAOc,CAAC,CAAC,cAAc,0BAA0B,CAAC,CAAC,gBAAgB;;;uCAG5D,CAAC,CAAC,cAAc,+CAA+C,CAAC,CAAC,gBAAgB;;;;;;;;;;yGAUf,CAAC,CAAC,gBAAgB;qCACtF,CAAC,CAAC,cAAc;;;;;;6IAMwF,0BAAmB;yBACvI,CAAC,CAAC,cAAc;uDACc,CAAC,CAAC,cAAc,cAAc,CAAC,CAAC,cAAc;;;;;QAK7F,4BAAqB;;qBAER,CAAC,CAAC,iBAAiB;EACtC,2BAAkB,EAAE,CAAA;AACtB,CAAC,CAAA;AAlLY,QAAA,kCAAkC,sCAkL9C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const DESIGN_PHILOSOPHY_PROMPT = "## Design philosophy (read before any step)\n\nHTML is your tool, not your medium. Before any CSS, decide whether you are a slide / interaction / brand / systems designer \u2014 that persona owns the defaults.\n\n### Commit to a direction before code\n\nThree sentences before any pixel:\n- **Scene** \u2014 who uses this, where, in what light, in what mood. One concrete sentence; if it doesn't force the dark/light answer, add detail.\n- **Direction** \u2014 pick an extreme (brutalist, maximalist, editorial, retro-futuristic, terminal-native, soft pastel, industrial). The wobbly middle is the trap.\n- **Memorable thing** \u2014 name the one element someone will recall. If you can't, the design has no point of view yet.\n\nMatch implementation complexity to the vision: maximalism needs elaborate code, minimalism needs precision. Both fail when timid.\n\n### Color\n\nReason in `oklch()`. Never `#000` or `#fff` \u2014 tint every neutral toward the brand hue (chroma 0.005\u20130.01). Reduce chroma as lightness approaches 0 or 100. Extend palettes via `oklch()` / `color-mix()`, not invented hex.\n\nPick a **strategy** before picking colors:\n- **Restrained** \u2014 tinted neutrals + one accent \u2264 10%. Product / tool default.\n- **Committed** \u2014 one saturated color carries 30\u201360% of the surface.\n- **Full palette** \u2014 3\u20134 named roles, each used deliberately. Campaigns, data viz.\n- **Drenched** \u2014 the surface IS the color. Hero / campaign moments.\n\n### Typography\n\n- Pair a display face with a quieter body face. Same-family pairing is only valid for intentional \"tech / utility\" direction.\n- Hierarchy needs \u2265 1.25 ratio between steps. Flat scales read as undesigned.\n- Body line length 50\u201375ch.\n- Inter / Roboto / Arial / Space Grotesk / Fraunces as a *display* face is a slop reflex \u2014 pick something else if you used it last brief.\n\n### Layout & motion\n\n- Vary spacing for rhythm; identical padding everywhere is monotony. Cards are the lazy answer \u2014 don't nest cards, don't wrap everything in a container.\n- Welcome asymmetry, overlap, grid-breaking \u2014 but commit to one rhythm rather than mixing several.\n- Animate `transform` / `opacity` only; ease out with exponential curves (quart / quint / expo). No bounce, no elastic. One orchestrated moment beats micro-interactions on every element.\n\n### Absolute bans (match-and-refuse)\n\nIf any of these appear, restructure the element instead:\n- **Side-stripe borders** > 1px as accents on cards, callouts, alerts.\n- **Gradient text** (`background-clip: text` over a gradient). Emphasise via weight or size.\n- **Glassmorphism as default** \u2014 decorative blurs / glass cards. Rare and purposeful, or nothing.\n- **Hero-metric template** \u2014 big number + small label + supporting stats + gradient accent.\n- **Identical card grids** \u2014 same-sized icon + heading + text, repeated endlessly.\n- **Modal as first thought** \u2014 exhaust inline / progressive alternatives first.\n- **Purple / violet gradient backgrounds**, **a gradient on every background**, **an icon next to every heading**.\n- **Generic emoji as feature icons** (sparkles, rocket, target), **hand-drawn SVG humans / faces / scenery**.\n- **Em dashes in flowing copy** (also not `--`). A single `\u2014` standing alone as a value placeholder is fine; mid-sentence is not.\n- **Invented metrics** (\"10\u00D7 faster\", \"99.9% uptime\") with no source, and filler copy (\"Feature One / Feature Two\", lorem ipsum).\n\n### The category-reflex check\n\nRun twice; the second catches what the first misses.\n- **First-order**: if someone could guess theme + palette from the category alone (\"observability \u2192 dark blue\", \"finance \u2192 navy + gold\", \"crypto \u2192 neon on black\"), you landed on the training-data reflex. Rework.\n- **Second-order**: if they could guess the aesthetic from category *plus* the obvious anti-reference, you only hit the second reflex. Rework until neither is obvious.\n\nNever converge across projects. The choice you reach for reflexively is the one to skip this time.\n\n### Process\n\n- **Junior pass first.** Ship something visible early \u2014 even a wireframe with grey blocks and labelled stubs. Say it's a wireframe so the user redirects cheaply.\n- **Variations, not \"the answer\".** For open-ended briefs, default to 2\u20133 differentiated directions. Once iterating on a specific page, tweak in place rather than multiplying files.\n- **Honest stubs over invented content.** A \"\u2014\", a labelled grey block, a \"TBD\" beats a fake stat or fabricated quote. One decisive flourish per artifact; three competing flourishes collapse back into noise.\n\n### Persona defaults\n\n- **Slide deck** \u2014 1920\u00D71080 canvas, scale-to-fit, one idea per slide, headlines \u2265 36px, body \u2265 24px, visible slide counter, theme rhythm (no 3+ same-theme in a row).\n- **Mobile prototype** \u2014 real device frame (Dynamic Island / status bar / home indicator), \u2265 44\u00D744px hit targets, real screens with real content.\n- **Landing / marketing** \u2014 one hero, 3\u20136 sections, real copy, one flourish. Not a generic SaaS template.\n- **Dashboard / tool UI** \u2014 information density is the feature: monospace numerics, tabular alignment, restrained decoration.\n\n### Modern CSS is welcome\n\n`text-wrap: pretty`, CSS Grid, container queries, `color-mix()`, `@scope`, view transitions, `oklch()`. Avoid `scrollIntoView` (breaks embedded previews).\n";
|
|
2
|
+
//# sourceMappingURL=designPhilosophy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"designPhilosophy.d.ts","sourceRoot":"","sources":["../../../src/prompt/design/designPhilosophy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,25KA0EpC,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESIGN_PHILOSOPHY_PROMPT = void 0;
|
|
4
|
+
exports.DESIGN_PHILOSOPHY_PROMPT = `## Design philosophy (read before any step)
|
|
5
|
+
|
|
6
|
+
HTML is your tool, not your medium. Before any CSS, decide whether you are a slide / interaction / brand / systems designer — that persona owns the defaults.
|
|
7
|
+
|
|
8
|
+
### Commit to a direction before code
|
|
9
|
+
|
|
10
|
+
Three sentences before any pixel:
|
|
11
|
+
- **Scene** — who uses this, where, in what light, in what mood. One concrete sentence; if it doesn't force the dark/light answer, add detail.
|
|
12
|
+
- **Direction** — pick an extreme (brutalist, maximalist, editorial, retro-futuristic, terminal-native, soft pastel, industrial). The wobbly middle is the trap.
|
|
13
|
+
- **Memorable thing** — name the one element someone will recall. If you can't, the design has no point of view yet.
|
|
14
|
+
|
|
15
|
+
Match implementation complexity to the vision: maximalism needs elaborate code, minimalism needs precision. Both fail when timid.
|
|
16
|
+
|
|
17
|
+
### Color
|
|
18
|
+
|
|
19
|
+
Reason in \`oklch()\`. Never \`#000\` or \`#fff\` — tint every neutral toward the brand hue (chroma 0.005–0.01). Reduce chroma as lightness approaches 0 or 100. Extend palettes via \`oklch()\` / \`color-mix()\`, not invented hex.
|
|
20
|
+
|
|
21
|
+
Pick a **strategy** before picking colors:
|
|
22
|
+
- **Restrained** — tinted neutrals + one accent ≤ 10%. Product / tool default.
|
|
23
|
+
- **Committed** — one saturated color carries 30–60% of the surface.
|
|
24
|
+
- **Full palette** — 3–4 named roles, each used deliberately. Campaigns, data viz.
|
|
25
|
+
- **Drenched** — the surface IS the color. Hero / campaign moments.
|
|
26
|
+
|
|
27
|
+
### Typography
|
|
28
|
+
|
|
29
|
+
- Pair a display face with a quieter body face. Same-family pairing is only valid for intentional "tech / utility" direction.
|
|
30
|
+
- Hierarchy needs ≥ 1.25 ratio between steps. Flat scales read as undesigned.
|
|
31
|
+
- Body line length 50–75ch.
|
|
32
|
+
- Inter / Roboto / Arial / Space Grotesk / Fraunces as a *display* face is a slop reflex — pick something else if you used it last brief.
|
|
33
|
+
|
|
34
|
+
### Layout & motion
|
|
35
|
+
|
|
36
|
+
- Vary spacing for rhythm; identical padding everywhere is monotony. Cards are the lazy answer — don't nest cards, don't wrap everything in a container.
|
|
37
|
+
- Welcome asymmetry, overlap, grid-breaking — but commit to one rhythm rather than mixing several.
|
|
38
|
+
- Animate \`transform\` / \`opacity\` only; ease out with exponential curves (quart / quint / expo). No bounce, no elastic. One orchestrated moment beats micro-interactions on every element.
|
|
39
|
+
|
|
40
|
+
### Absolute bans (match-and-refuse)
|
|
41
|
+
|
|
42
|
+
If any of these appear, restructure the element instead:
|
|
43
|
+
- **Side-stripe borders** > 1px as accents on cards, callouts, alerts.
|
|
44
|
+
- **Gradient text** (\`background-clip: text\` over a gradient). Emphasise via weight or size.
|
|
45
|
+
- **Glassmorphism as default** — decorative blurs / glass cards. Rare and purposeful, or nothing.
|
|
46
|
+
- **Hero-metric template** — big number + small label + supporting stats + gradient accent.
|
|
47
|
+
- **Identical card grids** — same-sized icon + heading + text, repeated endlessly.
|
|
48
|
+
- **Modal as first thought** — exhaust inline / progressive alternatives first.
|
|
49
|
+
- **Purple / violet gradient backgrounds**, **a gradient on every background**, **an icon next to every heading**.
|
|
50
|
+
- **Generic emoji as feature icons** (sparkles, rocket, target), **hand-drawn SVG humans / faces / scenery**.
|
|
51
|
+
- **Em dashes in flowing copy** (also not \`--\`). A single \`—\` standing alone as a value placeholder is fine; mid-sentence is not.
|
|
52
|
+
- **Invented metrics** ("10× faster", "99.9% uptime") with no source, and filler copy ("Feature One / Feature Two", lorem ipsum).
|
|
53
|
+
|
|
54
|
+
### The category-reflex check
|
|
55
|
+
|
|
56
|
+
Run twice; the second catches what the first misses.
|
|
57
|
+
- **First-order**: if someone could guess theme + palette from the category alone ("observability → dark blue", "finance → navy + gold", "crypto → neon on black"), you landed on the training-data reflex. Rework.
|
|
58
|
+
- **Second-order**: if they could guess the aesthetic from category *plus* the obvious anti-reference, you only hit the second reflex. Rework until neither is obvious.
|
|
59
|
+
|
|
60
|
+
Never converge across projects. The choice you reach for reflexively is the one to skip this time.
|
|
61
|
+
|
|
62
|
+
### Process
|
|
63
|
+
|
|
64
|
+
- **Junior pass first.** Ship something visible early — even a wireframe with grey blocks and labelled stubs. Say it's a wireframe so the user redirects cheaply.
|
|
65
|
+
- **Variations, not "the answer".** For open-ended briefs, default to 2–3 differentiated directions. Once iterating on a specific page, tweak in place rather than multiplying files.
|
|
66
|
+
- **Honest stubs over invented content.** A "—", a labelled grey block, a "TBD" beats a fake stat or fabricated quote. One decisive flourish per artifact; three competing flourishes collapse back into noise.
|
|
67
|
+
|
|
68
|
+
### Persona defaults
|
|
69
|
+
|
|
70
|
+
- **Slide deck** — 1920×1080 canvas, scale-to-fit, one idea per slide, headlines ≥ 36px, body ≥ 24px, visible slide counter, theme rhythm (no 3+ same-theme in a row).
|
|
71
|
+
- **Mobile prototype** — real device frame (Dynamic Island / status bar / home indicator), ≥ 44×44px hit targets, real screens with real content.
|
|
72
|
+
- **Landing / marketing** — one hero, 3–6 sections, real copy, one flourish. Not a generic SaaS template.
|
|
73
|
+
- **Dashboard / tool UI** — information density is the feature: monospace numerics, tabular alignment, restrained decoration.
|
|
74
|
+
|
|
75
|
+
### Modern CSS is welcome
|
|
76
|
+
|
|
77
|
+
\`text-wrap: pretty\`, CSS Grid, container queries, \`color-mix()\`, \`@scope\`, view transitions, \`oklch()\`. Avoid \`scrollIntoView\` (breaks embedded previews).
|
|
78
|
+
`;
|
|
79
|
+
//# sourceMappingURL=designPhilosophy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"designPhilosophy.js","sourceRoot":"","sources":["../../../src/prompt/design/designPhilosophy.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EvC,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const DESIGN_MD_SPEC_PROMPT = "#### DESIGN.md format (follow exactly)\n\nTwo parts: optional YAML frontmatter (machine-readable tokens) + markdown body (human rationale). Be specific \u2014 concrete hex codes, real font stacks, real numbers.\n\nYAML frontmatter is a fenced block between two `---` lines. Each token group is optional but must be well-formed:\n\n```yaml\n---\nname: <string> # short brand/style name\ndescription: <string> # optional one-liner\ncolors:\n <token>: \"#RRGGBB\" # roles: primary, secondary, tertiary, neutral, surface, on-surface, error...\ntypography:\n <token>: # roles: headline-display, headline-lg/md, body-lg/md/sm, label-lg/md/sm...\n fontFamily: <string>\n fontSize: <px|em|rem>\n fontWeight: <number>\n lineHeight: <px|em|rem|number> # unitless number = multiplier of fontSize\n letterSpacing: <px|em|rem>\nrounded:\n <scale>: <px|em|rem> # scale: none, sm, md, lg, xl, full\nspacing:\n <scale>: <px|em|rem|number> # scale: xs, sm, md, lg, xl, gutter, margin\ncomponents:\n <component>: # e.g. button-primary, chip, list-item, input\n backgroundColor: \"{colors.primary}\"\n textColor: \"{colors.on-surface}\"\n typography: \"{typography.label-md}\"\n rounded: \"{rounded.md}\"\n padding: <Dimension>\n---\n```\n\nToken rules: reason about color in `oklch()` (per the design philosophy), then serialize the final token as hex `#RRGGBB` (sRGB) here; dimensions use `px` / `em` / `rem`; cross-references use `{path.to.token}` and must point at primitive values (composite refs like `{typography.label-md}` are allowed only inside `components`).\n\nMarkdown body \u2014 sections in THIS order; omit any that don't apply, never reorder:\n\n`## Overview` \u2192 `## Colors` \u2192 `## Typography` \u2192 `## Layout` \u2192 `## Elevation & Depth` \u2192 `## Shapes` \u2192 `## Components` \u2192 `## Do's and Don'ts`.\n\nAt most one `<h1>` (doc title). Every section uses `<h2>`. Prose references tokens by descriptive name; frontmatter values are normative.";
|
|
2
|
+
//# sourceMappingURL=designSystemSpec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"designSystemSpec.d.ts","sourceRoot":"","sources":["../../../src/prompt/design/designSystemSpec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,omEAuC4G,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESIGN_MD_SPEC_PROMPT = void 0;
|
|
4
|
+
exports.DESIGN_MD_SPEC_PROMPT = `#### DESIGN.md format (follow exactly)
|
|
5
|
+
|
|
6
|
+
Two parts: optional YAML frontmatter (machine-readable tokens) + markdown body (human rationale). Be specific — concrete hex codes, real font stacks, real numbers.
|
|
7
|
+
|
|
8
|
+
YAML frontmatter is a fenced block between two \`---\` lines. Each token group is optional but must be well-formed:
|
|
9
|
+
|
|
10
|
+
\`\`\`yaml
|
|
11
|
+
---
|
|
12
|
+
name: <string> # short brand/style name
|
|
13
|
+
description: <string> # optional one-liner
|
|
14
|
+
colors:
|
|
15
|
+
<token>: "#RRGGBB" # roles: primary, secondary, tertiary, neutral, surface, on-surface, error...
|
|
16
|
+
typography:
|
|
17
|
+
<token>: # roles: headline-display, headline-lg/md, body-lg/md/sm, label-lg/md/sm...
|
|
18
|
+
fontFamily: <string>
|
|
19
|
+
fontSize: <px|em|rem>
|
|
20
|
+
fontWeight: <number>
|
|
21
|
+
lineHeight: <px|em|rem|number> # unitless number = multiplier of fontSize
|
|
22
|
+
letterSpacing: <px|em|rem>
|
|
23
|
+
rounded:
|
|
24
|
+
<scale>: <px|em|rem> # scale: none, sm, md, lg, xl, full
|
|
25
|
+
spacing:
|
|
26
|
+
<scale>: <px|em|rem|number> # scale: xs, sm, md, lg, xl, gutter, margin
|
|
27
|
+
components:
|
|
28
|
+
<component>: # e.g. button-primary, chip, list-item, input
|
|
29
|
+
backgroundColor: "{colors.primary}"
|
|
30
|
+
textColor: "{colors.on-surface}"
|
|
31
|
+
typography: "{typography.label-md}"
|
|
32
|
+
rounded: "{rounded.md}"
|
|
33
|
+
padding: <Dimension>
|
|
34
|
+
---
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
Token rules: reason about color in \`oklch()\` (per the design philosophy), then serialize the final token as hex \`#RRGGBB\` (sRGB) here; dimensions use \`px\` / \`em\` / \`rem\`; cross-references use \`{path.to.token}\` and must point at primitive values (composite refs like \`{typography.label-md}\` are allowed only inside \`components\`).
|
|
38
|
+
|
|
39
|
+
Markdown body — sections in THIS order; omit any that don't apply, never reorder:
|
|
40
|
+
|
|
41
|
+
\`## Overview\` → \`## Colors\` → \`## Typography\` → \`## Layout\` → \`## Elevation & Depth\` → \`## Shapes\` → \`## Components\` → \`## Do's and Don'ts\`.
|
|
42
|
+
|
|
43
|
+
At most one \`<h1>\` (doc title). Every section uses \`<h2>\`. Prose references tokens by descriptive name; frontmatter values are normative.`;
|
|
44
|
+
//# sourceMappingURL=designSystemSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"designSystemSpec.js","sourceRoot":"","sources":["../../../src/prompt/design/designSystemSpec.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8IAuCyG,CAAA"}
|