deepclause-sdk 0.0.89 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +417 -948
- package/dist/agent.d.ts +18 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +74 -21
- package/dist/agent.js.map +1 -1
- package/dist/cli/config.d.ts +323 -176
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +146 -188
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/index.d.ts +3 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +61 -425
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/login.d.ts +29 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/login.js +184 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/readline.d.ts +6 -0
- package/dist/cli/readline.d.ts.map +1 -0
- package/dist/cli/readline.js +15 -0
- package/dist/cli/readline.js.map +1 -0
- package/dist/cli/repl-bin.d.ts +9 -0
- package/dist/cli/repl-bin.d.ts.map +1 -0
- package/dist/cli/repl-bin.js +16 -0
- package/dist/cli/repl-bin.js.map +1 -0
- package/dist/cli/repl.d.ts +191 -0
- package/dist/cli/repl.d.ts.map +1 -0
- package/dist/cli/repl.js +1232 -0
- package/dist/cli/repl.js.map +1 -0
- package/dist/cli/run.d.ts +17 -18
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +196 -183
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/set-backend.d.ts +53 -0
- package/dist/cli/set-backend.d.ts.map +1 -0
- package/dist/cli/set-backend.js +259 -0
- package/dist/cli/set-backend.js.map +1 -0
- package/dist/cli/visualize.d.ts +38 -0
- package/dist/cli/visualize.d.ts.map +1 -0
- package/dist/cli/visualize.js +125 -0
- package/dist/cli/visualize.js.map +1 -0
- package/dist/compiler.d.ts +5 -52
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +4 -768
- package/dist/compiler.js.map +1 -1
- package/dist/index.d.ts +27 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/prolog/bridge.d.ts +3 -1
- package/dist/prolog/bridge.d.ts.map +1 -1
- package/dist/prolog/bridge.js +8 -1
- package/dist/prolog/bridge.js.map +1 -1
- package/dist/prolog-src/deepclause_analysis.pl +10 -2
- package/dist/prolog-src/deepclause_mi.pl +2245 -41
- package/dist/repl/agent.d.ts +72 -0
- package/dist/repl/agent.d.ts.map +1 -0
- package/dist/repl/agent.js +366 -0
- package/dist/repl/agent.js.map +1 -0
- package/dist/repl/auth.d.ts +45 -0
- package/dist/repl/auth.d.ts.map +1 -0
- package/dist/repl/auth.js +116 -0
- package/dist/repl/auth.js.map +1 -0
- package/dist/repl/backend.d.ts +290 -0
- package/dist/repl/backend.d.ts.map +1 -0
- package/dist/repl/backend.js +370 -0
- package/dist/repl/backend.js.map +1 -0
- package/dist/repl/compaction.d.ts +122 -0
- package/dist/repl/compaction.d.ts.map +1 -0
- package/dist/repl/compaction.js +318 -0
- package/dist/repl/compaction.js.map +1 -0
- package/dist/repl/export.d.ts +30 -0
- package/dist/repl/export.d.ts.map +1 -0
- package/dist/repl/export.js +23 -0
- package/dist/repl/export.js.map +1 -0
- package/dist/repl/frames.d.ts +21 -0
- package/dist/repl/frames.d.ts.map +1 -0
- package/dist/repl/frames.js +79 -0
- package/dist/repl/frames.js.map +1 -0
- package/dist/repl/harness-tools.d.ts +74 -0
- package/dist/repl/harness-tools.d.ts.map +1 -0
- package/dist/repl/harness-tools.js +121 -0
- package/dist/repl/harness-tools.js.map +1 -0
- package/dist/repl/highlight.d.ts +30 -0
- package/dist/repl/highlight.d.ts.map +1 -0
- package/dist/repl/highlight.js +285 -0
- package/dist/repl/highlight.js.map +1 -0
- package/dist/repl/history.d.ts +234 -0
- package/dist/repl/history.d.ts.map +1 -0
- package/dist/repl/history.js +661 -0
- package/dist/repl/history.js.map +1 -0
- package/dist/repl/index.d.ts +120 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/repl/index.js +107 -0
- package/dist/repl/index.js.map +1 -0
- package/dist/repl/judge.d.ts +51 -0
- package/dist/repl/judge.d.ts.map +1 -0
- package/dist/repl/judge.js +58 -0
- package/dist/repl/judge.js.map +1 -0
- package/dist/repl/markdown.d.ts +25 -0
- package/dist/repl/markdown.d.ts.map +1 -0
- package/dist/repl/markdown.js +103 -0
- package/dist/repl/markdown.js.map +1 -0
- package/dist/repl/picker.d.ts +34 -0
- package/dist/repl/picker.d.ts.map +1 -0
- package/dist/repl/picker.js +81 -0
- package/dist/repl/picker.js.map +1 -0
- package/dist/repl/project-context.d.ts +16 -0
- package/dist/repl/project-context.d.ts.map +1 -0
- package/dist/repl/project-context.js +23 -0
- package/dist/repl/project-context.js.map +1 -0
- package/dist/repl/render.d.ts +160 -0
- package/dist/repl/render.d.ts.map +1 -0
- package/dist/repl/render.js +715 -0
- package/dist/repl/render.js.map +1 -0
- package/dist/repl/session.d.ts +356 -0
- package/dist/repl/session.d.ts.map +1 -0
- package/dist/repl/session.js +1275 -0
- package/dist/repl/session.js.map +1 -0
- package/dist/repl/status.d.ts +100 -0
- package/dist/repl/status.d.ts.map +1 -0
- package/dist/repl/status.js +218 -0
- package/dist/repl/status.js.map +1 -0
- package/dist/repl/tools.d.ts +53 -0
- package/dist/repl/tools.d.ts.map +1 -0
- package/dist/repl/tools.js +307 -0
- package/dist/repl/tools.js.map +1 -0
- package/dist/repl/toolset.d.ts +32 -0
- package/dist/repl/toolset.d.ts.map +1 -0
- package/dist/repl/toolset.js +82 -0
- package/dist/repl/toolset.js.map +1 -0
- package/dist/repl/tui/editor.d.ts +17 -0
- package/dist/repl/tui/editor.d.ts.map +1 -0
- package/dist/repl/tui/editor.js +39 -0
- package/dist/repl/tui/editor.js.map +1 -0
- package/dist/repl/tui/status-bar.d.ts +26 -0
- package/dist/repl/tui/status-bar.d.ts.map +1 -0
- package/dist/repl/tui/status-bar.js +47 -0
- package/dist/repl/tui/status-bar.js.map +1 -0
- package/dist/repl/tui/theme.d.ts +30 -0
- package/dist/repl/tui/theme.d.ts.map +1 -0
- package/dist/repl/tui/theme.js +81 -0
- package/dist/repl/tui/theme.js.map +1 -0
- package/dist/repl/tui/transcript.d.ts +39 -0
- package/dist/repl/tui/transcript.d.ts.map +1 -0
- package/dist/repl/tui/transcript.js +123 -0
- package/dist/repl/tui/transcript.js.map +1 -0
- package/dist/runner.d.ts +132 -13
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +434 -277
- package/dist/runner.js.map +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +0 -32
- package/dist/sdk.js.map +1 -1
- package/dist/system/assets/docs/AGENT_PROMPT.md +1373 -0
- package/dist/system/assets/docs/DML_AUTHORING.md +195 -0
- package/dist/system/assets/docs/DML_REFERENCE.md +312 -72
- package/dist/system/assets/docs/HARNESS_EXAMPLES.md +172 -0
- package/dist/system/assets/docs/HARNESS_PATTERNS.md +562 -0
- package/dist/system/assets/docs/META_PROMPT.md +68 -0
- package/dist/system/assets/docs/PROLOG_SNIPPETS.md +117 -0
- package/dist/system/assets/index.d.ts +9 -17
- package/dist/system/assets/index.d.ts.map +1 -1
- package/dist/system/assets/index.js +26 -85
- package/dist/system/assets/index.js.map +1 -1
- package/dist/system/runtime/agentvm-manager.d.ts +9 -2
- package/dist/system/runtime/agentvm-manager.d.ts.map +1 -1
- package/dist/system/runtime/agentvm-manager.js +70 -44
- package/dist/system/runtime/agentvm-manager.js.map +1 -1
- package/dist/system/runtime/media.d.ts +23 -0
- package/dist/system/runtime/media.d.ts.map +1 -0
- package/dist/system/runtime/media.js +55 -0
- package/dist/system/runtime/media.js.map +1 -0
- package/dist/system/runtime/shell-limits.d.ts +21 -0
- package/dist/system/runtime/shell-limits.d.ts.map +1 -0
- package/dist/system/runtime/shell-limits.js +39 -0
- package/dist/system/runtime/shell-limits.js.map +1 -0
- package/dist/system/runtime/shell-manager.d.ts +8 -3
- package/dist/system/runtime/shell-manager.d.ts.map +1 -1
- package/dist/system/runtime/shell-manager.js +56 -39
- package/dist/system/runtime/shell-manager.js.map +1 -1
- package/dist/system/runtime/shell-tool-events.js +5 -0
- package/dist/system/runtime/shell-tool-events.js.map +1 -1
- package/dist/system/runtime/token-usage.d.ts +2 -0
- package/dist/system/runtime/token-usage.d.ts.map +1 -1
- package/dist/system/runtime/token-usage.js +7 -0
- package/dist/system/runtime/token-usage.js.map +1 -1
- package/dist/tools.d.ts +3 -21
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +14 -168
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +80 -118
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +19 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +338 -0
- package/dist/validate.js.map +1 -0
- package/dist/visualize/index.d.ts +52 -0
- package/dist/visualize/index.d.ts.map +1 -0
- package/dist/visualize/index.js +189 -0
- package/dist/visualize/index.js.map +1 -0
- package/package.json +17 -15
- package/src/prolog-src/deepclause_analysis.pl +10 -2
- package/src/prolog-src/deepclause_mi.pl +2245 -41
- package/dist/cli/commands.d.ts +0 -42
- package/dist/cli/commands.d.ts.map +0 -1
- package/dist/cli/commands.js +0 -246
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/compile.d.ts +0 -99
- package/dist/cli/compile.d.ts.map +0 -1
- package/dist/cli/compile.js +0 -363
- package/dist/cli/compile.js.map +0 -1
- package/dist/cli/default-skills.d.ts +0 -10
- package/dist/cli/default-skills.d.ts.map +0 -1
- package/dist/cli/default-skills.js +0 -206
- package/dist/cli/default-skills.js.map +0 -1
- package/dist/cli/interactive.d.ts +0 -2
- package/dist/cli/interactive.d.ts.map +0 -1
- package/dist/cli/interactive.js +0 -20
- package/dist/cli/interactive.js.map +0 -1
- package/dist/cli/mcp.d.ts +0 -56
- package/dist/cli/mcp.d.ts.map +0 -1
- package/dist/cli/mcp.js +0 -138
- package/dist/cli/mcp.js.map +0 -1
- package/dist/cli/prompt.d.ts +0 -2
- package/dist/cli/prompt.d.ts.map +0 -1
- package/dist/cli/prompt.js +0 -2
- package/dist/cli/prompt.js.map +0 -1
- package/dist/cli/search.d.ts +0 -19
- package/dist/cli/search.d.ts.map +0 -1
- package/dist/cli/search.js +0 -189
- package/dist/cli/search.js.map +0 -1
- package/dist/cli/tool-args.d.ts +0 -2
- package/dist/cli/tool-args.d.ts.map +0 -1
- package/dist/cli/tool-args.js +0 -39
- package/dist/cli/tool-args.js.map +0 -1
- package/dist/cli/tools.d.ts +0 -36
- package/dist/cli/tools.d.ts.map +0 -1
- package/dist/cli/tools.js +0 -229
- package/dist/cli/tools.js.map +0 -1
- package/dist/cli/tui/index.d.ts +0 -22
- package/dist/cli/tui/index.d.ts.map +0 -1
- package/dist/cli/tui/index.js +0 -29
- package/dist/cli/tui/index.js.map +0 -1
- package/dist/cli/tui.d.ts +0 -167
- package/dist/cli/tui.d.ts.map +0 -1
- package/dist/cli/tui.js +0 -5228
- package/dist/cli/tui.js.map +0 -1
- package/dist/compiler_prompt.d.ts +0 -20
- package/dist/compiler_prompt.d.ts.map +0 -1
- package/dist/compiler_prompt.js +0 -870
- package/dist/compiler_prompt.js.map +0 -1
- package/dist/deepclause-cli.skill +0 -0
- package/dist/prolog-src/deepclause_mi.pl.bak +0 -570
- package/dist/system/assets/docs/CONDUCTOR_PROMPT.md +0 -105
- package/dist/system/assets/docs/DML_COMPILER_PROMPT.md +0 -700
- package/dist/system/assets/docs/TUI.md +0 -150
- package/dist/system/assets/recipes/deepclause-coding-workflow/SKILL.md +0 -100
- package/dist/system/assets/skills/conductor.dml +0 -76
- package/dist/system/assets/skills/deep-planner.dml +0 -412
- package/dist/system/assets/skills/plan.dml +0 -429
- package/dist/system/assets/skills/security-planner.dml +0 -337
- package/dist/system/assets/skills/skill-creator.dml +0 -187
- package/dist/system/runtime/catalog-recipes.d.ts +0 -24
- package/dist/system/runtime/catalog-recipes.d.ts.map +0 -1
- package/dist/system/runtime/catalog-recipes.js +0 -273
- package/dist/system/runtime/catalog-recipes.js.map +0 -1
- package/dist/system/runtime/catalog-skills.d.ts +0 -50
- package/dist/system/runtime/catalog-skills.d.ts.map +0 -1
- package/dist/system/runtime/catalog-skills.js +0 -152
- package/dist/system/runtime/catalog-skills.js.map +0 -1
- package/dist/system/runtime/conductor.d.ts +0 -105
- package/dist/system/runtime/conductor.d.ts.map +0 -1
- package/dist/system/runtime/conductor.js +0 -732
- package/dist/system/runtime/conductor.js.map +0 -1
- package/dist/system/runtime/console-capture.d.ts +0 -9
- package/dist/system/runtime/console-capture.d.ts.map +0 -1
- package/dist/system/runtime/console-capture.js +0 -67
- package/dist/system/runtime/console-capture.js.map +0 -1
- package/dist/system/runtime/dml-executor.d.ts +0 -52
- package/dist/system/runtime/dml-executor.d.ts.map +0 -1
- package/dist/system/runtime/dml-executor.js +0 -203
- package/dist/system/runtime/dml-executor.js.map +0 -1
- package/dist/system/runtime/runtime-tools.d.ts +0 -31
- package/dist/system/runtime/runtime-tools.d.ts.map +0 -1
- package/dist/system/runtime/runtime-tools.js +0 -312
- package/dist/system/runtime/runtime-tools.js.map +0 -1
- package/dist/system/runtime/skill-creator.d.ts +0 -38
- package/dist/system/runtime/skill-creator.d.ts.map +0 -1
- package/dist/system/runtime/skill-creator.js +0 -763
- package/dist/system/runtime/skill-creator.js.map +0 -1
- package/src/prolog-src/deepclause_mi.pl.bak +0 -570
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
# DeepClause TUI Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Running `deepclause` with no subcommand starts the fullscreen CLI TUI.
|
|
6
|
-
|
|
7
|
-
The TUI is the operator interface around a single built-in agent: the conductor.
|
|
8
|
-
|
|
9
|
-
- The left pane shows sessions.
|
|
10
|
-
- The center pane shows the conversation transcript.
|
|
11
|
-
- The upper-right pane shows live execution activity.
|
|
12
|
-
- The lower-right pane shows context, token usage, system asset sources, and shell execution details.
|
|
13
|
-
|
|
14
|
-
The local `.deepclause/docs/` folder contains editable workspace docs such as `TUI.md` and `DML_REFERENCE.md`. The system `plan` skill reads `DML_REFERENCE.md` and `.deepclause/system/DML_COMPILER_PROMPT.md` before generating new plan files.
|
|
15
|
-
|
|
16
|
-
## Command Bar
|
|
17
|
-
|
|
18
|
-
The command bar accepts three main input styles plus direct skill execution:
|
|
19
|
-
|
|
20
|
-
- Plain text sends a normal request to the conductor.
|
|
21
|
-
- `/...` runs a built-in slash command.
|
|
22
|
-
- `/<skill> [args]` runs a compiled local skill directly.
|
|
23
|
-
- `/plan <request>` runs the system `plan` skill from `.deepclause/system/plan.dml`.
|
|
24
|
-
- `/<plan> [args]` runs `plans/<plan>.dml` when no compiled local skill matches that name.
|
|
25
|
-
- `/run <file> [args]` runs a workspace DML file directly.
|
|
26
|
-
- `!<command>` runs a shell command directly in the configured workspace shell.
|
|
27
|
-
|
|
28
|
-
Examples:
|
|
29
|
-
|
|
30
|
-
```text
|
|
31
|
-
summarize the latest test failures
|
|
32
|
-
/sessions
|
|
33
|
-
/set-model openai:gpt-4.1 --slot run
|
|
34
|
-
/plan create a simple repo cleanup workflow
|
|
35
|
-
/run plans/repo_cleanup.dml
|
|
36
|
-
/compile create a skill that reviews changelogs
|
|
37
|
-
/deep-research transformers scaling laws
|
|
38
|
-
!git status
|
|
39
|
-
!npm test
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Use `\!text` if you need to send a normal conductor prompt that starts with a literal `!`.
|
|
43
|
-
|
|
44
|
-
## Slash Commands
|
|
45
|
-
|
|
46
|
-
Common built-in slash commands:
|
|
47
|
-
|
|
48
|
-
- `/new [title]` creates a new conductor session.
|
|
49
|
-
- `/sessions` refreshes or switches sessions.
|
|
50
|
-
- `/set-model <model> [--slot <slot>]` updates the configured model for all slots or one slot.
|
|
51
|
-
- `/plan <request>` runs the system plan skill and writes a simple standalone plan under `plans/`.
|
|
52
|
-
- `/run <file> [args]` runs a workspace DML file directly.
|
|
53
|
-
- `/compile <spec>` runs the skill creator.
|
|
54
|
-
- `/skill-creator <spec>` is an alias for `/compile`.
|
|
55
|
-
- `/cancel` aborts the current running task, skill, or shell command.
|
|
56
|
-
- `/help` prints command help into the execution pane.
|
|
57
|
-
- `/quit` or `/exit` closes the TUI.
|
|
58
|
-
|
|
59
|
-
Any other `/name` is treated as a compiled skill invocation if that skill exists in the local catalog.
|
|
60
|
-
If no compiled skill matches, the TUI looks for `plans/<name>.dml` and runs that file directly.
|
|
61
|
-
|
|
62
|
-
## Direct Shell Mode
|
|
63
|
-
|
|
64
|
-
`!<command>` is a TUI-local execution mode. It does not go through the conductor.
|
|
65
|
-
|
|
66
|
-
- The shell command runs immediately.
|
|
67
|
-
- Output streams live into the execution pane.
|
|
68
|
-
- The process pane shows running state, PID when available, and host vs sandbox backend.
|
|
69
|
-
- `/cancel` and `Ctrl+C` stop the running shell command.
|
|
70
|
-
- The skill catalog refreshes after the shell command finishes, so newly created skills can appear without restarting the TUI.
|
|
71
|
-
|
|
72
|
-
If the TUI is running with sandbox mode enabled, shell commands use the AgentVM sandbox instead of the host shell.
|
|
73
|
-
|
|
74
|
-
## Menus and Palette
|
|
75
|
-
|
|
76
|
-
The TUI includes a Borland-style menu bar and an action palette.
|
|
77
|
-
|
|
78
|
-
- `F10` or `Ctrl+G` opens the menu bar.
|
|
79
|
-
- `Ctrl+P` opens the action palette.
|
|
80
|
-
- The Run menu includes prompt execution, shell command entry, repeat last command, cancellation, and skill catalog refresh.
|
|
81
|
-
- The View menu can move focus between panes.
|
|
82
|
-
- The Files and Skills menus open searchable pickers.
|
|
83
|
-
|
|
84
|
-
## Navigation and Keys
|
|
85
|
-
|
|
86
|
-
Important keys:
|
|
87
|
-
|
|
88
|
-
- `Left` and `Right` switch the focused pane when the command bar is empty.
|
|
89
|
-
- `Up` and `Down` select sessions or scroll the focused pane.
|
|
90
|
-
- `PgUp` and `PgDn` page-scroll the focused pane.
|
|
91
|
-
- `End` jumps back to the newest visible content.
|
|
92
|
-
- `Tab` autocompletes slash commands and skill names.
|
|
93
|
-
- `Ctrl+W` cycles focus across panes.
|
|
94
|
-
|
|
95
|
-
## Execution Pane
|
|
96
|
-
|
|
97
|
-
The execution pane is the main observability surface.
|
|
98
|
-
|
|
99
|
-
It can show:
|
|
100
|
-
|
|
101
|
-
- conductor streaming output
|
|
102
|
-
- child-skill activity
|
|
103
|
-
- tool lifecycle events
|
|
104
|
-
- live shell stdout and stderr
|
|
105
|
-
- active tool status, including PID when available
|
|
106
|
-
|
|
107
|
-
This is where to look when a task seems stuck, is waiting for clarification, or is running shell or tool-heavy work.
|
|
108
|
-
|
|
109
|
-
## Context Pane
|
|
110
|
-
|
|
111
|
-
The context pane shows session and runtime state, including:
|
|
112
|
-
|
|
113
|
-
- approximate context and token usage
|
|
114
|
-
- resolved source paths for conductor and skill-creator DML/prompt assets
|
|
115
|
-
- the active shell backend and shell working directory
|
|
116
|
-
|
|
117
|
-
Changes to `.deepclause/system/` overrides are picked up on the next conductor turn or skill-creator run. A dedicated reload action is not required.
|
|
118
|
-
|
|
119
|
-
## Sessions and Storage
|
|
120
|
-
|
|
121
|
-
Each session lives under `.deepclause/sessions/<session-id>/`.
|
|
122
|
-
|
|
123
|
-
Typical files include:
|
|
124
|
-
|
|
125
|
-
- `metadata.json`
|
|
126
|
-
- `messages.jsonl`
|
|
127
|
-
- `assistant-memory.md`
|
|
128
|
-
- `task-memory.md`
|
|
129
|
-
- `usage.json`
|
|
130
|
-
|
|
131
|
-
The TUI loads these sessions into the session list and shows their messages in the transcript pane.
|
|
132
|
-
|
|
133
|
-
## Relationship to Skills
|
|
134
|
-
|
|
135
|
-
The conductor is not the same thing as a compiled skill.
|
|
136
|
-
|
|
137
|
-
- The conductor handles freeform user requests and orchestration.
|
|
138
|
-
- Compiled skills are reusable DML workers in `.deepclause/tools/`.
|
|
139
|
-
- The `plan` system skill lives at `.deepclause/system/plan.dml` and follows the same override model as the other system DML assets.
|
|
140
|
-
- `/set-model` updates the configured gateway, run, and compile model selection for future turns, or only one slot when `--slot` is provided.
|
|
141
|
-
- `/compile` and `/skill-creator` use the skill creator to turn a spec into a validated local skill.
|
|
142
|
-
|
|
143
|
-
If a user asks how to automate something repeatedly, the right TUI workflow is usually to use `/compile <spec>` rather than repeating the same one-off prompt manually.
|
|
144
|
-
|
|
145
|
-
## Troubleshooting
|
|
146
|
-
|
|
147
|
-
- If a command appears to be stuck, check the execution pane for active tool status or a clarification request.
|
|
148
|
-
- If shell commands do not behave as expected, check the context pane for the current shell backend and working directory.
|
|
149
|
-
- If a newly created skill does not appear, refresh the skill catalog or run a new turn after the command completes.
|
|
150
|
-
- If a system prompt or system DML change does not seem active, verify the source paths shown in the context pane.
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: DeepClause Coding Workflow
|
|
3
|
-
description: Guidance for implementing and validating local repository changes in a DeepClause workspace.
|
|
4
|
-
tags: [coding, repository, tests, docs, deepclause]
|
|
5
|
-
when_to_use:
|
|
6
|
-
- tasks that require making specific changes to repository files with clear validation steps
|
|
7
|
-
- debugging and fixing a local behavior with focused edits and tests
|
|
8
|
-
- updating documentation to reflect code changes in the same commit
|
|
9
|
-
- work that is not intended to become a reusable DML skill but is still important to track and execute in a controlled way
|
|
10
|
-
- making focused code changes with clear validation steps
|
|
11
|
-
- implementing a feature or bug fix in the current repository
|
|
12
|
-
- updating tests and documentation alongside code changes
|
|
13
|
-
- debugging a local behavior before editing files
|
|
14
|
-
when_not_to_use:
|
|
15
|
-
- purely informational web research
|
|
16
|
-
- work that should become a reusable executable skill instead of a one-off repo change
|
|
17
|
-
globs: [src/**, tests/**, README.md, docs/**]
|
|
18
|
-
priority: high
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# Goal
|
|
22
|
-
|
|
23
|
-
Make small, grounded repository changes with focused validation and clear outcomes.
|
|
24
|
-
|
|
25
|
-
# Workflow
|
|
26
|
-
|
|
27
|
-
1. Start from a concrete anchor such as a failing test, a named file, a command, or the nearest implementation surface.
|
|
28
|
-
2. Read only enough nearby code to form one falsifiable local hypothesis about what should change.
|
|
29
|
-
3. Prefer the smallest edit that tests that hypothesis.
|
|
30
|
-
4. Run the narrowest validation that can falsify the change before widening scope.
|
|
31
|
-
5. If the validation fails, repair the same slice first instead of opening new work.
|
|
32
|
-
6. Update documentation when behavior, workflow, or user-visible commands changed.
|
|
33
|
-
|
|
34
|
-
# When To Use
|
|
35
|
-
|
|
36
|
-
Use this recipe when the task is primarily about changing repository files, adding tests, or updating documentation in a controlled way.
|
|
37
|
-
|
|
38
|
-
# When Not To Use
|
|
39
|
-
|
|
40
|
-
Do not use this recipe for pure research or when the right outcome is to create a reusable DML worker skill.
|
|
41
|
-
|
|
42
|
-
# Examples
|
|
43
|
-
|
|
44
|
-
- Implement a narrow bug fix in `src/` and validate it with one focused Vitest file.
|
|
45
|
-
- Update a CLI workflow and document the changed behavior in `README.md`.
|
|
46
|
-
- Add a new config seed and verify it with the corresponding init tests.
|
|
47
|
-
|
|
48
|
-
# Escalation
|
|
49
|
-
|
|
50
|
-
If the task repeats often or clearly represents a reusable automation, stop treating it as a one-off workflow and create a proper skill instead.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# Editing Protocol
|
|
54
|
-
|
|
55
|
-
As a coding agent, you will navigate and modify files strictly using non-interactive Unix command-line utilities. You must execute edits precisely and safely, treating the filesystem as fragile. Never attempt to use interactive text editors like vim or nano.
|
|
56
|
-
|
|
57
|
-
1. Core Editing Directives
|
|
58
|
-
Context is Mandatory: Always read the target file or specific lines (using cat, head, tail, or sed -n) before applying changes. You must know exactly what you are modifying.
|
|
59
|
-
|
|
60
|
-
Precision over Broadness: Never use loose regex that might accidentally match unintended parts of a file. Target specific line numbers or highly unique strings.
|
|
61
|
-
|
|
62
|
-
Immediate Verification: Immediately verify your changes after an edit using git diff (if in a repository) or by re-reading the modified section to ensure the code didn't break.
|
|
63
|
-
|
|
64
|
-
Quote Appropriately: Always escape special characters appropriately in your bash commands to prevent syntax errors or unintended variable expansions.
|
|
65
|
-
|
|
66
|
-
2. Locating Context (grep & sed)
|
|
67
|
-
Before editing, find the exact line numbers and context.
|
|
68
|
-
|
|
69
|
-
Find line numbers: grep -n "target string" filename
|
|
70
|
-
|
|
71
|
-
View surrounding context: grep -C 3 "target string" filename (Shows 3 lines before and after).
|
|
72
|
-
|
|
73
|
-
View a specific line range: sed -n '10,25p' filename (Prints lines 10 through 25).
|
|
74
|
-
|
|
75
|
-
3. Modifying Code (sed)
|
|
76
|
-
Use sed for targeted in-place text replacement, deletion, or insertion. Always use the -i flag for in-place editing (Note: if the environment is macOS/BSD, you must use sed -i '').
|
|
77
|
-
|
|
78
|
-
Targeted substitution (by line number): sed -i '42s/old_variable/new_variable/' filename
|
|
79
|
-
|
|
80
|
-
Global substitution (with extreme caution): sed -i 's/old_string/new_string/g' filename
|
|
81
|
-
|
|
82
|
-
Delete specific lines: sed -i '42,45d' filename (Deletes lines 42 through 45).
|
|
83
|
-
|
|
84
|
-
Insert text after a specific line: sed -i '42a\ new_code_line();' filename
|
|
85
|
-
|
|
86
|
-
4. Writing and Appending (bash & Heredocs)
|
|
87
|
-
For generating new files, replacing entire files, or appending large multi-line blocks of code, avoid complex sed commands and use Bash redirects.
|
|
88
|
-
|
|
89
|
-
Append a single line: echo "export DEBUG=true" >> filename
|
|
90
|
-
|
|
91
|
-
Overwrite a file completely: echo "new content" > filename
|
|
92
|
-
|
|
93
|
-
Write multi-line blocks (Heredocs): Use quoted heredocs ('EOF') to prevent the shell from accidentally evaluating variables like $1 or $VAR inside the code block you are writing.
|
|
94
|
-
|
|
95
|
-
# Project Structure
|
|
96
|
-
|
|
97
|
-
The workspace is the current PWD. All commands must be relative to this path. You have access to all files in the workspace, but you should only read and modify files relevant to the current task. Use git commands to check the status of the repository and ensure you are not making unintended changes.
|
|
98
|
-
|
|
99
|
-
# Temporary files
|
|
100
|
-
Do not use /tmp. Instead, create temporary files in a new .deepclause.tmp folder in the current workspace with unique names to avoid conflicts.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
% ============================================================================
|
|
2
|
-
% Conductor (full tool set)
|
|
3
|
-
% ============================================================================
|
|
4
|
-
%
|
|
5
|
-
% Has all tools: skills, bash, web, skill creation, etc.
|
|
6
|
-
% Runs autonomously to complete the task described in its instructions.
|
|
7
|
-
%
|
|
8
|
-
% ============================================================================
|
|
9
|
-
|
|
10
|
-
% --- Tool predicates (full tool set) ---
|
|
11
|
-
|
|
12
|
-
tool(run_skill(Slug, Args, Result), "Run an existing skill. Slug is the skill slug (e.g. 'deep-research'). Args is a JSON array of string arguments. Returns the skill result.") :-
|
|
13
|
-
|
|
14
|
-
exec(run_skill(slug: Slug, args: Args), Result).
|
|
15
|
-
|
|
16
|
-
tool(consult_recipes(Query, Result), "Search the recipe library for workflow guidance and conventions. Query is a natural-language description. Returns matching recipe metadata and content.") :-
|
|
17
|
-
|
|
18
|
-
exec(consult_recipes(query: Query, max_results: 3), Result).
|
|
19
|
-
|
|
20
|
-
tool(search_web(Query, Results), "Search the web for current information. Returns search results.") :-
|
|
21
|
-
exec(web_search(query: Query), Results).
|
|
22
|
-
|
|
23
|
-
tool(search_news(Query, Results), "Search recent news articles. Returns news results.") :-
|
|
24
|
-
exec(news_search(query: Query), Results).
|
|
25
|
-
|
|
26
|
-
tool(fetch_url(Url, Content), "Fetch the content of a web page by URL. Returns the page body as text.") :-
|
|
27
|
-
exec(url_fetch(url: Url), Result),
|
|
28
|
-
get_dict(body, Result, Content).
|
|
29
|
-
|
|
30
|
-
tool(download_file(Url, FilePath, Size), "Download a file from a URL and save it to disk. Returns the file path and size.") :-
|
|
31
|
-
exec(url_fetch(url: Url, save_to: FilePath), Result),
|
|
32
|
-
get_dict(file_path, Result, FilePath),
|
|
33
|
-
get_dict(size, Result, Size).
|
|
34
|
-
|
|
35
|
-
tool(run_bash(Command, Output), "Run a shell command in the workspace.") :-
|
|
36
|
-
exec(bash(command: Command), Output).
|
|
37
|
-
|
|
38
|
-
tool(create_new_skill(Spec, Result), "Create and deploy a new reusable skill from a natural language spec.") :-
|
|
39
|
-
exec(create_skill(spec: Spec), Result).
|
|
40
|
-
|
|
41
|
-
tool(ask_user(Prompt, Response), "Ask the user a clarifying question and get their response.") :-
|
|
42
|
-
exec(ask_user(prompt: Prompt), Result),
|
|
43
|
-
get_dict(user_response, Result, Response).
|
|
44
|
-
|
|
45
|
-
tool(inform_user(Message, Result), "Send a status update or progress report to the user.") :-
|
|
46
|
-
output(Message),
|
|
47
|
-
Result = "ok".
|
|
48
|
-
|
|
49
|
-
% --- Main entry point ---
|
|
50
|
-
|
|
51
|
-
agent_main(UserMessage) :-
|
|
52
|
-
param(system_prompt, "Conductor system prompt", SysPrompt),
|
|
53
|
-
system(SysPrompt),
|
|
54
|
-
system("When using bash or similar tools, avoid dumping large outputs directly into the conversation context. Write large or uncertain outputs to temporary files first, then inspect them with focused commands such as wc, grep, head, tail, sed, or similar narrow follow-up commands so the context stays small and relevant."),
|
|
55
|
-
format(string(TaskPrompt), "Task instructions: ~w\n\nComplete this task autonomously using your tools.\n\nIf you can complete the task, do so and report the result.\nIf you are blocked by a task-specific, tool-specific, external-service, environment, permission, dependency, or data issue that is not an LLM/provider/API/transport failure, do not go silent. Diagnose the blocker and explain clearly to the user why the task could not be completed.\nIf the problem appears to be an LLM/provider/API/transport failure, do not invent a speculative diagnosis.\n\nStore the user-facing response in FinalAnswer.\nStore the COMPLETE updated task memory markdown in MemoryUpdate only if this execution produced useful technical insights such as what worked, what failed, useful commands, error resolutions, or reusable lessons from a non-LLM task failure.\nIf nothing technically noteworthy should be recorded, store exactly NONE in MemoryUpdate.\nDo not call update_memory or any separate memory tool from this main task.\n\nReturn a good final answer in all non-LLM cases, including when the task is blocked.", [UserMessage]),
|
|
56
|
-
task(TaskPrompt, string(FinalAnswer), string(MemoryUpdate)),
|
|
57
|
-
maybe_update_session_memory(MemoryUpdate),
|
|
58
|
-
answer(FinalAnswer).
|
|
59
|
-
|
|
60
|
-
% Fallback for technical failures where the main task itself cannot run to completion
|
|
61
|
-
agent_main(_) :-
|
|
62
|
-
answer("Task failed. Please try again.").
|
|
63
|
-
|
|
64
|
-
% Memory update is best-effort and uses the already-produced MemoryUpdate output.
|
|
65
|
-
maybe_update_session_memory("NONE") :-
|
|
66
|
-
!.
|
|
67
|
-
maybe_update_session_memory("none") :-
|
|
68
|
-
!.
|
|
69
|
-
maybe_update_session_memory("ok") :-
|
|
70
|
-
!.
|
|
71
|
-
maybe_update_session_memory("") :-
|
|
72
|
-
!.
|
|
73
|
-
maybe_update_session_memory(Content) :-
|
|
74
|
-
catch(exec(update_memory(content: Content), _), _, true),
|
|
75
|
-
!.
|
|
76
|
-
maybe_update_session_memory(_).
|