deepclause-sdk 0.0.68 → 0.0.70

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.
Files changed (66) hide show
  1. package/README.md +10 -2
  2. package/dist/agent.d.ts +1 -0
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +252 -67
  5. package/dist/agent.js.map +1 -1
  6. package/dist/cli/commands.d.ts.map +1 -1
  7. package/dist/cli/commands.js +64 -7
  8. package/dist/cli/commands.js.map +1 -1
  9. package/dist/cli/config.d.ts +15 -12
  10. package/dist/cli/config.d.ts.map +1 -1
  11. package/dist/cli/config.js +38 -5
  12. package/dist/cli/config.js.map +1 -1
  13. package/dist/cli/default-skills.d.ts +1 -0
  14. package/dist/cli/default-skills.d.ts.map +1 -1
  15. package/dist/cli/default-skills.js +31 -0
  16. package/dist/cli/default-skills.js.map +1 -1
  17. package/dist/cli/tui.d.ts +16 -1
  18. package/dist/cli/tui.d.ts.map +1 -1
  19. package/dist/cli/tui.js +293 -21
  20. package/dist/cli/tui.js.map +1 -1
  21. package/dist/prolog/bridge.d.ts +15 -0
  22. package/dist/prolog/bridge.d.ts.map +1 -1
  23. package/dist/prolog/bridge.js +68 -0
  24. package/dist/prolog/bridge.js.map +1 -1
  25. package/dist/prolog-src/deepclause_mi.pl +135 -7
  26. package/dist/runner.d.ts +8 -0
  27. package/dist/runner.d.ts.map +1 -1
  28. package/dist/runner.js +79 -0
  29. package/dist/runner.js.map +1 -1
  30. package/dist/system/assets/docs/DML_COMPILER_PROMPT.md +7 -3
  31. package/dist/system/assets/docs/DML_REFERENCE.md +656 -0
  32. package/dist/system/assets/docs/TASK_PROMPT.md +33 -0
  33. package/dist/system/assets/docs/TUI.md +11 -0
  34. package/dist/system/assets/index.d.ts +12 -9
  35. package/dist/system/assets/index.d.ts.map +1 -1
  36. package/dist/system/assets/index.js +38 -9
  37. package/dist/system/assets/index.js.map +1 -1
  38. package/dist/system/assets/recipes/deepclause-coding-workflow/SKILL.md +56 -1
  39. package/dist/system/assets/skills/plan.dml +259 -0
  40. package/dist/system/runtime/catalog-skills.d.ts +1 -1
  41. package/dist/system/runtime/catalog-skills.d.ts.map +1 -1
  42. package/dist/system/runtime/catalog-skills.js +19 -5
  43. package/dist/system/runtime/catalog-skills.js.map +1 -1
  44. package/dist/system/runtime/conductor.d.ts +5 -1
  45. package/dist/system/runtime/conductor.d.ts.map +1 -1
  46. package/dist/system/runtime/conductor.js +22 -0
  47. package/dist/system/runtime/conductor.js.map +1 -1
  48. package/dist/system/runtime/dml-executor.d.ts +1 -1
  49. package/dist/system/runtime/dml-executor.d.ts.map +1 -1
  50. package/dist/system/runtime/dml-executor.js +2 -14
  51. package/dist/system/runtime/dml-executor.js.map +1 -1
  52. package/dist/system/runtime/dml-params.d.ts +2 -2
  53. package/dist/system/runtime/dml-params.d.ts.map +1 -1
  54. package/dist/system/runtime/dml-params.js +3 -0
  55. package/dist/system/runtime/dml-params.js.map +1 -1
  56. package/dist/system/runtime/runtime-tools.d.ts +1 -0
  57. package/dist/system/runtime/runtime-tools.d.ts.map +1 -1
  58. package/dist/system/runtime/runtime-tools.js +95 -0
  59. package/dist/system/runtime/runtime-tools.js.map +1 -1
  60. package/dist/system/runtime/shell-manager.js +1 -1
  61. package/dist/system/runtime/shell-manager.js.map +1 -1
  62. package/dist/system/runtime/skill-creator.d.ts.map +1 -1
  63. package/dist/system/runtime/skill-creator.js +52 -21
  64. package/dist/system/runtime/skill-creator.js.map +1 -1
  65. package/package.json +4 -3
  66. package/src/prolog-src/deepclause_mi.pl +135 -7
@@ -11,6 +11,8 @@ The TUI is the operator interface around a single built-in agent: the conductor.
11
11
  - The upper-right pane shows live execution activity.
12
12
  - The lower-right pane shows context, token usage, system asset sources, and shell execution details.
13
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
+
14
16
  ## Command Bar
15
17
 
16
18
  The command bar accepts three main input styles plus direct skill execution:
@@ -18,6 +20,9 @@ The command bar accepts three main input styles plus direct skill execution:
18
20
  - Plain text sends a normal request to the conductor.
19
21
  - `/...` runs a built-in slash command.
20
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.
21
26
  - `!<command>` runs a shell command directly in the configured workspace shell.
22
27
 
23
28
  Examples:
@@ -26,6 +31,8 @@ Examples:
26
31
  summarize the latest test failures
27
32
  /sessions
28
33
  /set-model openai:gpt-4.1 --slot run
34
+ /plan create a simple repo cleanup workflow
35
+ /run plans/repo_cleanup.dml
29
36
  /compile create a skill that reviews changelogs
30
37
  /deep-research transformers scaling laws
31
38
  !git status
@@ -41,6 +48,8 @@ Common built-in slash commands:
41
48
  - `/new [title]` creates a new conductor session.
42
49
  - `/sessions` refreshes or switches sessions.
43
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.
44
53
  - `/compile <spec>` runs the skill creator.
45
54
  - `/skill-creator <spec>` is an alias for `/compile`.
46
55
  - `/cancel` aborts the current running task, skill, or shell command.
@@ -48,6 +57,7 @@ Common built-in slash commands:
48
57
  - `/quit` or `/exit` closes the TUI.
49
58
 
50
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.
51
61
 
52
62
  ## Direct Shell Mode
53
63
 
@@ -126,6 +136,7 @@ The conductor is not the same thing as a compiled skill.
126
136
 
127
137
  - The conductor handles freeform user requests and orchestration.
128
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.
129
140
  - `/set-model` updates the configured gateway, run, and compile model selection for future turns, or only one slot when `--slot` is provided.
130
141
  - `/compile` and `/skill-creator` use the skill creator to turn a spec into a validated local skill.
131
142
 
@@ -1,7 +1,11 @@
1
- export type SystemSkillAssetName = 'conductor' | 'skill-creator';
2
- export type SystemPromptAssetName = 'conductor' | 'skill-creator';
1
+ export type SystemSkillAssetName = 'conductor' | 'skill-creator' | 'plan';
2
+ export type SystemPromptAssetName = 'conductor' | 'skill-creator' | 'task';
3
3
  export type SystemCompactorAssetName = 'default-session-compactor' | 'default-loop-compactor';
4
- export type WorkspaceDocAssetName = 'tui';
4
+ export type WorkspaceDocAssetName = 'tui' | 'dml-reference';
5
+ interface SystemAssetLookupOptions {
6
+ workspaceRoot?: string;
7
+ workspacePath?: string;
8
+ }
5
9
  export declare function getSystemSkillAssetPath(name: SystemSkillAssetName): string;
6
10
  export declare function getSystemPromptAssetPath(name: SystemPromptAssetName): string;
7
11
  export declare function getSystemCompactorAssetPath(name: SystemCompactorAssetName): string;
@@ -11,13 +15,12 @@ export declare function getWorkspaceRecipeAssetsDir(workspaceRoot: string): stri
11
15
  export declare function getSystemAssetSourcePaths(workspaceRoot?: string): {
12
16
  conductorDml: string;
13
17
  conductorPrompt: string;
18
+ planDml: string;
14
19
  skillCreatorDml: string;
15
20
  skillCreatorPrompt: string;
21
+ taskPrompt: string;
16
22
  };
17
- export declare function readSystemSkillAsset(name: SystemSkillAssetName, options?: {
18
- workspaceRoot?: string;
19
- }): Promise<string>;
20
- export declare function readSystemPromptAsset(name: SystemPromptAssetName, options?: {
21
- workspaceRoot?: string;
22
- }): Promise<string>;
23
+ export declare function readSystemSkillAsset(name: SystemSkillAssetName, options?: SystemAssetLookupOptions): Promise<string>;
24
+ export declare function readSystemPromptAsset(name: SystemPromptAssetName, options?: SystemAssetLookupOptions): Promise<string>;
25
+ export {};
23
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/system/assets/index.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,eAAe,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,eAAe,CAAC;AAClE,MAAM,MAAM,wBAAwB,GAAG,2BAA2B,GAAG,wBAAwB,CAAC;AAC9F,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAqC1C,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAE1E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAE5E;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,wBAAwB,GAAG,MAAM,CAElF;AASD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAE5E;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzE;AAoED,wBAAgB,yBAAyB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAOA;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,oBAAoB,EAC1B,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GACvC,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,qBAAqB,EAC3B,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GACvC,OAAO,CAAC,MAAM,CAAC,CAEjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/system/assets/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AEjB"}
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { access, readFile } from 'fs/promises';
3
- import { dirname, join } from 'path';
3
+ import { dirname, join, resolve } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = dirname(__filename);
@@ -15,6 +15,8 @@ function getSystemSkillFileName(name) {
15
15
  return 'conductor.dml';
16
16
  case 'skill-creator':
17
17
  return 'skill-creator.dml';
18
+ case 'plan':
19
+ return 'plan.dml';
18
20
  }
19
21
  }
20
22
  function getSystemPromptFileName(name) {
@@ -23,6 +25,8 @@ function getSystemPromptFileName(name) {
23
25
  return 'CONDUCTOR_PROMPT.md';
24
26
  case 'skill-creator':
25
27
  return 'DML_COMPILER_PROMPT.md';
28
+ case 'task':
29
+ return 'TASK_PROMPT.md';
26
30
  }
27
31
  }
28
32
  function getSystemCompactorFileName(name) {
@@ -46,6 +50,8 @@ function getWorkspaceDocFileName(name) {
46
50
  switch (name) {
47
51
  case 'tui':
48
52
  return 'TUI.md';
53
+ case 'dml-reference':
54
+ return 'DML_REFERENCE.md';
49
55
  }
50
56
  }
51
57
  export function getWorkspaceDocAssetPath(name) {
@@ -60,9 +66,30 @@ export function getWorkspaceRecipeAssetsDir(workspaceRoot) {
60
66
  function getWorkspaceOverridePath(workspaceRoot, fileName) {
61
67
  return join(workspaceRoot, SYSTEM_OVERRIDE_DIR, fileName);
62
68
  }
63
- async function resolveSystemSkillAssetPath(name, workspaceRoot) {
64
- if (workspaceRoot) {
65
- const overridePath = getWorkspaceOverridePath(workspaceRoot, getSystemSkillFileName(name));
69
+ function findWorkspaceOverridePathSync(fileName, options = {}) {
70
+ if (options.workspaceRoot) {
71
+ const overridePath = getWorkspaceOverridePath(options.workspaceRoot, fileName);
72
+ return existsSync(overridePath) ? overridePath : null;
73
+ }
74
+ if (options.workspacePath) {
75
+ let current = resolve(options.workspacePath);
76
+ while (true) {
77
+ const overridePath = join(current, SYSTEM_OVERRIDE_DIR, fileName);
78
+ if (existsSync(overridePath)) {
79
+ return overridePath;
80
+ }
81
+ const parent = dirname(current);
82
+ if (parent === current) {
83
+ break;
84
+ }
85
+ current = parent;
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+ async function resolveSystemSkillAssetPath(name, options = {}) {
91
+ const overridePath = findWorkspaceOverridePathSync(getSystemSkillFileName(name), options);
92
+ if (overridePath) {
66
93
  try {
67
94
  await access(overridePath);
68
95
  return overridePath;
@@ -73,9 +100,9 @@ async function resolveSystemSkillAssetPath(name, workspaceRoot) {
73
100
  }
74
101
  return getSystemSkillAssetPath(name);
75
102
  }
76
- async function resolveSystemPromptAssetPath(name, workspaceRoot) {
77
- if (workspaceRoot) {
78
- const overridePath = getWorkspaceOverridePath(workspaceRoot, getSystemPromptFileName(name));
103
+ async function resolveSystemPromptAssetPath(name, options = {}) {
104
+ const overridePath = findWorkspaceOverridePathSync(getSystemPromptFileName(name), options);
105
+ if (overridePath) {
79
106
  try {
80
107
  await access(overridePath);
81
108
  return overridePath;
@@ -108,14 +135,16 @@ export function getSystemAssetSourcePaths(workspaceRoot) {
108
135
  return {
109
136
  conductorDml: resolveSystemSkillAssetPathSync('conductor', workspaceRoot),
110
137
  conductorPrompt: resolveSystemPromptAssetPathSync('conductor', workspaceRoot),
138
+ planDml: resolveSystemSkillAssetPathSync('plan', workspaceRoot),
111
139
  skillCreatorDml: resolveSystemSkillAssetPathSync('skill-creator', workspaceRoot),
112
140
  skillCreatorPrompt: resolveSystemPromptAssetPathSync('skill-creator', workspaceRoot),
141
+ taskPrompt: resolveSystemPromptAssetPathSync('task', workspaceRoot),
113
142
  };
114
143
  }
115
144
  export async function readSystemSkillAsset(name, options = {}) {
116
- return readFile(await resolveSystemSkillAssetPath(name, options.workspaceRoot), 'utf8');
145
+ return readFile(await resolveSystemSkillAssetPath(name, options), 'utf8');
117
146
  }
118
147
  export async function readSystemPromptAsset(name, options = {}) {
119
- return readFile(await resolveSystemPromptAssetPath(name, options.workspaceRoot), 'utf8');
148
+ return readFile(await resolveSystemPromptAssetPath(name, options), 'utf8');
120
149
  }
121
150
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/assets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAOpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC7C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACzC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAC/C,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAEjD,SAAS,sBAAsB,CAAC,IAA0B;IACxD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW;YACd,OAAO,eAAe,CAAC;QACzB,KAAK,eAAe;YAClB,OAAO,mBAAmB,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,SAAS,uBAAuB,CAAC,IAA2B;IAC1D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,wBAAwB,CAAC;IACpC,CAAC;AACH,CAAC;AAED,SAAS,0BAA0B,CAAC,IAA8B;IA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CAAC,CAAC;AACvC,CAAC;AAED,SAAS,gCAAgC,CACvC,IAA2B,EAC3B,aAAsB;IAEtB,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,YAAY,GAAG,wBAAwB,CAAC,aAAa,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5F,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAC7B,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,aAAsB;IAQ9D,OAAO;QACL,YAAY,EAAE,+BAA+B,CAAC,WAAW,EAAE,aAAa,CAAC;QACzE,eAAe,EAAE,gCAAgC,CAAC,WAAW,EAAE,aAAa,CAAC;QAC7E,OAAO,EAAE,+BAA+B,CAAC,MAAM,EAAE,aAAa,CAAC;QAC/D,eAAe,EAAE,+BAA+B,CAAC,eAAe,EAAE,aAAa,CAAC;QAChF,kBAAkB,EAAE,gCAAgC,CAAC,eAAe,EAAE,aAAa,CAAC;QACpF,UAAU,EAAE,gCAAgC,CAAC,MAAM,EAAE,aAAa,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAA0B,EAC1B,UAAoC,EAAE;IAEtC,OAAO,QAAQ,CAAC,MAAM,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAA2B,EAC3B,UAAoC,EAAE;IAEtC,OAAO,QAAQ,CAAC,MAAM,4BAA4B,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC"}
@@ -3,6 +3,11 @@ name: DeepClause Coding Workflow
3
3
  description: Guidance for implementing and validating local repository changes in a DeepClause workspace.
4
4
  tags: [coding, repository, tests, docs, deepclause]
5
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
6
11
  - implementing a feature or bug fix in the current repository
7
12
  - updating tests and documentation alongside code changes
8
13
  - debugging a local behavior before editing files
@@ -42,4 +47,54 @@ Do not use this recipe for pure research or when the right outcome is to create
42
47
 
43
48
  # Escalation
44
49
 
45
- 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.
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.
@@ -0,0 +1,259 @@
1
+ % Plan skill that writes a simple runnable DML file into plans/.
2
+
3
+ tool(consult_recipes(Query, Result),
4
+ "Search the recipe library for workflow guidance, conventions, and reusable approaches relevant to the requested plan.") :-
5
+ exec(consult_recipes(query: Query, max_results: 3), Result).
6
+
7
+ tool(search_web(Query, Results),
8
+ "Search the web for current documentation, examples, and implementation guidance relevant to the requested plan.") :-
9
+ exec(web_search(query: Query), Results).
10
+
11
+ tool(fetch_url(Url, Content),
12
+ "Fetch the text content of a web page by URL for focused documentation research.") :-
13
+ exec(url_fetch(url: Url), Result),
14
+ get_dict(body, Result, Content).
15
+
16
+ tool(download_file(Url, FilePath, Size), "Download a file from a URL and save it to disk. Returns the file path and size.") :-
17
+ exec(url_fetch(url: Url, save_to: FilePath), Result),
18
+ get_dict(file_path, Result, FilePath),
19
+ get_dict(size, Result, Size).
20
+
21
+ tool(run_bash(Command, Output), "Run a shell command in the workspace.") :-
22
+ exec(bash(command: Command), Output).
23
+
24
+ tool(list_skills(Skills),
25
+ "List reusable local skills in the current workspace catalog before reinventing an existing capability.") :-
26
+ exec(list_skills, Skills).
27
+
28
+ tool(run_skill(Slug, Args, Result),
29
+ "Run an existing local child skill when it can help produce a better plan. Args is a JSON array of arguments.") :-
30
+ exec(run_skill(slug: Slug, args: Args), Result).
31
+
32
+ tool(ask_user(Prompt, Response),
33
+ "Ask the user for clarification, plan preferences, revisions, or approval during plan creation.") :-
34
+ exec(ask_user(prompt: Prompt), Result),
35
+ get_dict(user_response, Result, Response).
36
+
37
+ agent_main(Request) :-
38
+ load_dml_reference(DmlReference),
39
+ load_dml_compiler_prompt(CompilerPrompt),
40
+ load_coding_workflow_recipe(CodingWorkflowRecipe),
41
+ format(string(SystemPrompt), "You create ordered execution plans for DeepClause.
42
+
43
+ Current user request:
44
+ ~w
45
+
46
+ - Do not write DML source.
47
+ - Do not write tool definitions.
48
+ - Before drafting the task list, consult recipes relevant to the request.
49
+ - First decide whether the current request is primarily a coding task, a non-coding task, or a mixed task.
50
+ - For coding tasks, prefer recipe guidance, existing local skills, and repository-aware implementation steps. Use web research only when the task depends on external documentation, APIs, libraries, or current behavior that is not already available locally.
51
+ - For non-coding tasks, prefer recipe guidance plus search_web/fetch_url for factual research, background gathering, comparison, or synthesis. Do not force code-editing steps when the request is not actually about changing code.
52
+ - For mixed tasks, combine both modes deliberately and keep the task list ordered so research informs the later implementation or delivery steps.
53
+ - Use list_skills/run_skill only when an existing local skill is clearly relevant to the request or can improve the resulting plan.
54
+ - Choose tools conservatively and intentionally; do not use web or child-skill tools unless they improve the plan quality.
55
+ - Return only an ordered list of 3 to 8 plain natural-language task strings.
56
+ - Each task string should describe one concrete execution step for fulfilling the user's request.
57
+ - Each task must be actionable, concise, and free of code, shell commands, JSON, XML, HTML, CSS, JavaScript, TypeScript, Python, DML, and Markdown fences.
58
+ - Plans should generally create or modify normal project files outside '.deepclause/'.
59
+ - Only target '.deepclause/' when the user explicitly asks for DeepClause internals, prompts, recipes, skills, or runtime configuration.
60
+ - Use the available recipe, research, and child-skill tools when they materially improve the task list.
61
+ - Consult the DML reference and compiler guidance below to understand the execution environment, but still return only the ordered list of task strings.
62
+
63
+ DML language reference loaded from .deepclause/docs/DML_REFERENCE.md:
64
+
65
+ ~s
66
+
67
+ DML compiler guidance loaded from .deepclause/system/DML_COMPILER_PROMPT.md:
68
+
69
+ ~s", [Request, DmlReference, CompilerPrompt]),
70
+ system(SystemPrompt),
71
+
72
+ task("Create a short file-safe slug for this request: '{Request}'.
73
+ Requirements:
74
+ - lowercase letters, digits, and underscores only
75
+ - 2 to 6 words when possible
76
+ - no file extension
77
+ Store only the slug in PlanSlug.", PlanSlug),
78
+
79
+ task("Classify this request for plan execution: '{Request}'.
80
+ Requirements:
81
+ - Return exactly one label: coding, non_coding, or mixed.
82
+ - Use coding when the request mainly requires editing code, configuration, tests, scripts, or other project files.
83
+ - Use non_coding when the request is mainly research, analysis, writing, planning, or information gathering without meaningful code changes.
84
+ - Use mixed when the request needs both substantial research or analysis and meaningful implementation or file changes.
85
+ Store only the label in PlanMode.", PlanModeRaw),
86
+
87
+ normalize_plan_mode(PlanModeRaw, PlanMode),
88
+
89
+ task("Break this request into 3 to 8 smaller execution tasks for a standalone DeepClause plan: '{Request}'.
90
+
91
+ If this is a coding task:
92
+ - First perform a review and analysis of the current code base relative to the request
93
+ - Use the results fo the analysis as a basis for your plan. The plan should be very specific.
94
+
95
+ General Requirements for the plan:
96
+ - Consult relevant recipes before finalizing PlanTasks.
97
+ - Decide whether the request is primarily coding, non-coding, or mixed, and shape the task list accordingly.
98
+ - For coding tasks, favor repository-aware implementation, verification, and delivery steps; use web research only when external documentation is genuinely needed.
99
+ - For non-coding tasks, favor research, synthesis, comparison, and delivery steps; do not invent unnecessary coding work.
100
+ - For mixed tasks, order the plan so discovery and research steps come before implementation or delivery steps that depend on them.
101
+ - Use list_skills/run_skill only when an existing local skill is clearly relevant.
102
+ - Return only the ordered list of task descriptions in PlanTasks.
103
+ - Each item must be a plain natural-language execution step, not code.
104
+ - Do not include numbering, bullets, code, shell commands, JSON, XML, HTML, CSS, JavaScript, TypeScript, Python, DML, or Markdown fences.
105
+ - Each task should be specific enough that a later agent task can execute it with the available conductor-style tools.
106
+ - The plan should generally create or modify normal project files outside '.deepclause/'.
107
+ - Consult recipes, web research, fetched URLs, or child skills when they would materially improve the plan.
108
+
109
+ Store only the ordered list in PlanTasks.", list(string(PlanTasks))),
110
+
111
+ derive_plan_system_prompt(Request, PlanMode, CodingWorkflowRecipe, PlanTasks, PlanSystemPrompt),
112
+
113
+ make_directory_path('plans'),
114
+ format(string(FilePath), "plans/~w.dml", [PlanSlug]),
115
+
116
+ build_plan_review_message(FilePath, PlanMode, PlanTasks, PlanReviewMessage),
117
+ output(PlanReviewMessage),
118
+
119
+ output("Assembling the deterministic plan file..."),
120
+ assemble_plan_dml(PlanSystemPrompt, PlanTasks, PlanDml),
121
+ exec(write_file(path: FilePath, content: PlanDml), _),
122
+ exec(validate_dml(dml_file: FilePath), ValidationResult),
123
+ finish_plan_creation(FilePath, PlanSlug, ValidationResult, PlanReviewMessage).
124
+
125
+ assemble_plan_dml(PlanSystemPrompt, PlanTasks, PlanDml) :-
126
+ conductor_tool_definitions(ToolBlock),
127
+ build_task_lines(PlanTasks, TaskLines),
128
+ format(string(PlanDml), "% Generated DeepClause plan.~n% This file was assembled deterministically from a task list.~n~n~s~n~nagent_main :-~n system(~q),~n output(\"Starting generated plan.\"),~n~s answer(\"Plan completed.\").~n~nagent_main :-~n answer(\"Plan failed. Please try again.\").~n", [ToolBlock, PlanSystemPrompt, TaskLines]).
129
+
130
+ derive_plan_system_prompt(Request, PlanMode, CodingWorkflowRecipe, PlanTasks, PlanSystemPrompt) :-
131
+ task("Create a concise system prompt for the generated DeepClause plan for this request: '{Request}'.
132
+ Plan mode: {PlanMode}.
133
+ DeepClause Coding Workflow recipe content:
134
+ {CodingWorkflowRecipe}
135
+
136
+ Planned steps: {PlanTasks}.
137
+
138
+ What to mention in the system prompt:
139
+ - State that the executor is carrying out a generated DeepClause plan.
140
+ - Include the DeepClause Coding Workflow recipe guidance below in the final system prompt so the generated plan always carries it forward.
141
+ - Reflect whether the work is coding, non-coding, or mixed.
142
+ - Tell the executor to consult recipes before substantive action.
143
+ - Tell the executor to choose tools deliberately.
144
+ - For coding tasks, prefer repository-aware and local tools first.
145
+ - For non-coding tasks, prefer research tools when the work is mainly investigation or synthesis.
146
+ - Explicitly say that discussions, questions, and clarifications are fine, and ask_user can be used when helpful.
147
+ - Keep the prompt concise and actionable.
148
+ Store only the final system prompt text in SystemPrompt.", string(SystemPrompt)),
149
+ load_coding_workflow_recipe(CodingWorkflowRecipe),
150
+ format(string(PlanSystemPrompt), "~w\n~w\n", [SystemPrompt, CodingWorkflowRecipe]).
151
+
152
+
153
+ load_coding_workflow_recipe(CodingWorkflowRecipe) :-
154
+ exec(consult_recipes(query: 'deepclause coding workflow', max_results: 3), Result),
155
+ get_dict(matches, Result, Matches),
156
+ Matches = [FirstMatch|_],
157
+ get_dict(content, FirstMatch, CodingWorkflowRecipe),
158
+ !.
159
+
160
+ load_coding_workflow_recipe("DeepClause Coding Workflow recipe unavailable. Follow standard DeepClause coding workflow guidance.").
161
+
162
+ build_plan_review_message(FilePath, PlanMode, PlanTasks, PlanReviewMessage) :-
163
+ build_step_review_lines(PlanTasks, 1, StepLines),
164
+ format(string(PlanReviewMessage), "Proposed plan overview\n- Output file: ~w\n- Plan mode: ~w\n\nPlanned steps:\n~s", [FilePath, PlanMode, StepLines]).
165
+
166
+ build_step_review_lines([], _, "").
167
+ build_step_review_lines([Task|RestTasks], StepNumber, StepLines) :-
168
+ format(string(CurrentStep), "~w. ~w\n", [StepNumber, Task]),
169
+ NextStepNumber is StepNumber + 1,
170
+ build_step_review_lines(RestTasks, NextStepNumber, RestStepLines),
171
+ string_concat(CurrentStep, RestStepLines, StepLines).
172
+
173
+ build_task_lines([], "").
174
+ build_task_lines([Task|Rest], TaskLines) :-
175
+ format(string(Line), " task(~q),~n", [Task]),
176
+ build_task_lines(Rest, RestLines),
177
+ string_concat(Line, RestLines, TaskLines).
178
+
179
+ normalize_plan_mode(PlanModeRaw, PlanMode) :-
180
+ format(string(PlanModeString), "~w", [PlanModeRaw]),
181
+ normalize_plan_mode_string(PlanModeString, PlanMode).
182
+
183
+ normalize_plan_mode_string("coding", "coding").
184
+ normalize_plan_mode_string("Coding", "coding").
185
+ normalize_plan_mode_string("non_coding", "non_coding").
186
+ normalize_plan_mode_string("Non_coding", "non_coding").
187
+ normalize_plan_mode_string("non-coding", "non_coding").
188
+ normalize_plan_mode_string("Non-coding", "non_coding").
189
+ normalize_plan_mode_string("mixed", "mixed").
190
+ normalize_plan_mode_string("Mixed", "mixed").
191
+ normalize_plan_mode_string(_, "mixed").
192
+
193
+ finish_plan_creation(FilePath, PlanSlug, ValidationResult, FinalPlanReview) :-
194
+ get_dict(valid, ValidationResult, true),
195
+ output("Deterministic plan validated successfully."),
196
+ format(string(Message), "I've created a new plan in ~w.\n\n~s\nRun it with /run ~w or /~w.", [FilePath, FinalPlanReview, FilePath, PlanSlug]),
197
+ answer(Message).
198
+
199
+ finish_plan_creation(FilePath, _, ValidationResult, _) :-
200
+ format(string(Message), "I wrote ~w, but the deterministic template failed validation: ~w", [FilePath, ValidationResult]),
201
+ answer(Message).
202
+
203
+ conductor_tool_definitions(ToolBlock) :-
204
+ atomics_to_string([
205
+ '% --- Tool predicates (full tool set) ---',
206
+ '',
207
+ '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.") :-',
208
+ '',
209
+ ' exec(run_skill(slug: Slug, args: Args), Result).',
210
+ '',
211
+ '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.") :-',
212
+ '',
213
+ ' exec(consult_recipes(query: Query, max_results: 3), Result).',
214
+ '',
215
+ 'tool(search_web(Query, Results), "Search the web for current information. Returns search results.") :-',
216
+ ' exec(web_search(query: Query), Results).',
217
+ '',
218
+ 'tool(search_news(Query, Results), "Search recent news articles. Returns news results.") :-',
219
+ ' exec(news_search(query: Query), Results).',
220
+ '',
221
+ 'tool(fetch_url(Url, Content), "Fetch the content of a web page by URL. Returns the page body as text.") :-',
222
+ ' exec(url_fetch(url: Url), Result),',
223
+ ' get_dict(body, Result, Content).',
224
+ '',
225
+ 'tool(download_file(Url, FilePath, Size), "Download a file from a URL and save it to disk. Returns the file path and size.") :-',
226
+ ' exec(url_fetch(url: Url, save_to: FilePath), Result),',
227
+ ' get_dict(file_path, Result, FilePath),',
228
+ ' get_dict(size, Result, Size).',
229
+ '',
230
+ 'tool(run_bash(Command, Output), "Run a shell command in the workspace.") :-',
231
+ ' exec(bash(command: Command), Output).',
232
+ '',
233
+ 'tool(create_new_skill(Spec, Result), "Create and deploy a new reusable skill from a natural language spec.") :-',
234
+ ' exec(create_skill(spec: Spec), Result).',
235
+ '',
236
+ 'tool(ask_user(Prompt, Response), "Ask the user a clarifying question and get their response.") :-',
237
+ ' exec(ask_user(prompt: Prompt), Result),',
238
+ ' get_dict(user_response, Result, Response).',
239
+ '',
240
+ 'tool(inform_user(Message, Result), "Send a status update or progress report to the user.") :-',
241
+ ' output(Message),',
242
+ ' Result = "ok".'
243
+ ], "\n", ToolBlock).
244
+
245
+ load_dml_reference(DmlReference) :-
246
+ ( exists_file('.deepclause/docs/DML_REFERENCE.md')
247
+ -> read_file('.deepclause/docs/DML_REFERENCE.md', DmlReference)
248
+ ; DmlReference = "DML reference unavailable. Use standard DeepClause DML conventions."
249
+ ).
250
+
251
+ load_dml_compiler_prompt(CompilerPrompt) :-
252
+ ( exists_file('.deepclause/system/DML_COMPILER_PROMPT.md')
253
+ -> read_file('.deepclause/system/DML_COMPILER_PROMPT.md', CompilerPrompt)
254
+ ; CompilerPrompt = "DML compiler guidance unavailable. Follow standard DeepClause DML conventions and keep plans simple."
255
+ ).
256
+
257
+ agent_main(Request) :-
258
+ format(string(Message), "I could not create a valid plan file for this request: ~w. Try simplifying the request or being more explicit about the steps and required tools.", [Request]),
259
+ answer(Message).
@@ -16,7 +16,7 @@ export interface LocalSkillCatalogEntry {
16
16
  export interface ExecuteNestedSkillRequest {
17
17
  slug: string;
18
18
  dmlCode: string;
19
- args: string[];
19
+ args: unknown[];
20
20
  params: Record<string, unknown>;
21
21
  currentSkillSlug: string;
22
22
  invocationStack: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-skills.d.ts","sourceRoot":"","sources":["../../../src/system/runtime/catalog-skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAe,KAAK,MAAM,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAIzF,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAYzC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,M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,mBAAmB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3F;AAED,wBAAsB,qBAAqB,CACzC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC1B,GACL,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAgBnC;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,+BAA+B,GACvC,wBAAwB,CAqD1B"}
@@ -44,7 +44,7 @@ export function createLocalSkillCatalogRuntime(options) {
44
44
  if (stack.length >= maxDepth) {
45
45
  throw new Error(`run_skill exceeded maximum depth of ${maxDepth}`);
46
46
  }
47
- const childArgs = normalizeStringArray(args.args);
47
+ const childArgs = normalizeRuntimeArgList(args.args);
48
48
  const { dmlCode, meta } = await loadSkillProgram(options.workspaceRoot, slug);
49
49
  const toolCheck = verifyRuntimeToolsAvailable(options.config, meta?.tools ?? []);
50
50
  if (!toolCheck.available) {
@@ -77,14 +77,28 @@ function getInvocationStack(currentSkillSlug, invocationStack) {
77
77
  function isSystemSkillSlug(slug) {
78
78
  return slug.startsWith('_');
79
79
  }
80
- function normalizeStringArray(value) {
81
- if (!value) {
80
+ function normalizeRuntimeArgList(value) {
81
+ if (value === undefined || value === null) {
82
82
  return [];
83
83
  }
84
84
  if (Array.isArray(value)) {
85
- return value.map(String);
85
+ return value;
86
86
  }
87
- return [String(value)];
87
+ if (typeof value === 'string') {
88
+ const trimmed = value.trim();
89
+ if ((trimmed.startsWith('[') && trimmed.endsWith(']'))
90
+ || (trimmed.startsWith('{') && trimmed.endsWith('}'))) {
91
+ try {
92
+ const parsed = JSON.parse(trimmed);
93
+ return Array.isArray(parsed) ? parsed : [parsed];
94
+ }
95
+ catch {
96
+ return [value];
97
+ }
98
+ }
99
+ return [value];
100
+ }
101
+ return [value];
88
102
  }
89
103
  async function loadSkillProgram(workspaceRoot, slug) {
90
104
  const toolsDir = getToolsDir(workspaceRoot);
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-skills.js","sourceRoot":"","sources":["../../../src/system/runtime/catalog-skills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAyC,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA0DzC,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,aAAqB,EACrB,UAGI,EAAE;IAEN,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC;IAC3F,OAAO,QAAQ;SACZ,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,mBAAmB,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACpF,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACjB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,WAAW;QACzB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,U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