|
62 | 62 | (types.addCheck localMcpServer (x: x ? command)) |
63 | 63 | (types.addCheck remoteMcpServer (x: x ? url)) |
64 | 64 | ]; |
| 65 | + |
| 66 | + promptCommand = types.submodule { |
| 67 | + options = { |
| 68 | + template = mkOption { |
| 69 | + description = "The command template itself. Can use $ARGUMENTS, $1, $2..."; |
| 70 | + type = types.str; |
| 71 | + }; |
| 72 | + |
| 73 | + description = mkOption { |
| 74 | + description = "Short explanation of what this prompt command does. Usually shown in help or autocompletion menu in the harness"; |
| 75 | + type = types.str; |
| 76 | + }; |
| 77 | + |
| 78 | + readDocsFirst = mkOption { |
| 79 | + description = "Add an instruction to read the riglet's doc first (if it is not eagerly disclosed and contains docs)"; |
| 80 | + type = types.bool; |
| 81 | + default = true; |
| 82 | + }; |
| 83 | + |
| 84 | + useSubAgent = mkOption { |
| 85 | + description = "Have a sub-agent read and run the command (`context: fork` in Claude Code, `subtask: true` in OpenCode). Support depends on harness"; |
| 86 | + type = types.bool; |
| 87 | + default = false; |
| 88 | + }; |
| 89 | + }; |
| 90 | + }; |
65 | 91 | in |
66 | 92 | { |
67 | 93 | options = { |
|
105 | 131 | # This is why promptCommands are scoped per riglet. |
106 | 132 | # WARNING: STILL EXPERIMENTAL. Schema for promptCommands is subject to change |
107 | 133 | promptCommands = mkOption { |
108 | | - description = ''Reusable prompt templates ("slash commands" for Claude Code, or simply "commands" for OpenCode)''; |
109 | | - type = types.attrsOf ( |
110 | | - types.submodule { |
111 | | - options = { |
112 | | - template = mkOption { |
113 | | - description = "The command template itself. Can use $ARGUMENTS, $1, $2..."; |
114 | | - type = types.str; |
115 | | - }; |
116 | | - |
117 | | - description = mkOption { |
118 | | - description = "Short explanation of what this prompt command does. Usually shown in help or autocompletion menu in the harness"; |
119 | | - type = types.str; |
120 | | - }; |
121 | | - |
122 | | - readDocsFirst = mkOption { |
123 | | - description = "Add an instruction to read the riglet's doc first (if it is not eagerly disclosed and contains docs)"; |
124 | | - type = types.bool; |
125 | | - default = true; |
126 | | - }; |
127 | | - |
128 | | - useSubAgent = mkOption { |
129 | | - description = "Have a sub-agent read and run the command (`context: fork` in Claude Code, `subtask: true` in OpenCode). Support depends on harness"; |
130 | | - type = types.bool; |
131 | | - default = false; |
132 | | - }; |
133 | | - }; |
134 | | - } |
135 | | - ); |
| 134 | + description = '' |
| 135 | + Reusable prompt templates ("slash commands" for Claude Code, or simply "commands" for OpenCode) |
| 136 | + ''; |
| 137 | + type = types.attrsOf promptCommand; |
136 | 138 | default = { }; |
137 | 139 | }; |
138 | 140 |
|
|
141 | 143 | type = types.submodule { |
142 | 144 | options = { |
143 | 145 | mainDocFile = mkOption { |
144 | | - description = "Path to the docs' main file (e.g. \"SKILL.md\", \"./files/index.md\"...), relative to 'docs' root"; |
| 146 | + description = '' |
| 147 | + Path to the docs' main file (e.g. "SKILL.md", "./files/index.md"...), relative to 'docs' root |
| 148 | + ''; |
145 | 149 | type = types.pathWith { |
146 | 150 | absolute = false; |
147 | 151 | }; |
|
182 | 186 | }; |
183 | 187 |
|
184 | 188 | whenToUse = mkOption { |
185 | | - description = "Situations when this riglet should be (at least partially) consulted. Empty list means IMMEDIATELY at startup"; |
| 189 | + description = '' |
| 190 | + Situations when this riglet should be (at least partially) consulted. |
| 191 | + Empty list means IMMEDIATELY at startup |
| 192 | + ''; |
186 | 193 | type = types.listOf types.singleLineStr; |
187 | 194 | default = [ ]; |
188 | 195 | }; |
|
0 commit comments