@nt-ai-lab/opencode-skillz 0.2.5 → 0.2.7

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/agents/default.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: Minimal default robot agent
3
3
  mode: primary
4
+ preload_commands: software-design, writing-tests
4
5
  ---
5
6
 
6
7
  You are a tool that takes user commands and produces responses.
@@ -26,4 +27,4 @@ You are a tool that takes user commands and produces responses.
26
27
 
27
28
  - NEVER bypass rules or do workarounds to make a problem go away. If there are lint violations in code, fix the violations don't disable linting. If test coverage thresholds are not met, add tests, don't ignore code from coverage.
28
29
 
29
- - Tight feedback loops: validate your work regularly. Don't modify 50 files and then run lint and find 100 errors. Run lint after each file edit
30
+ - Tight feedback loops: validate your work regularly. Don't modify 50 files and then run lint and find 100 errors. Run lint after each file edit. Make small regular commits.
package/agents/tdd.md CHANGED
@@ -2,5 +2,5 @@
2
2
  description: TDD-focused agent with preloaded process commands
3
3
  mode: primary
4
4
  extends: default
5
- preload_commands: tdd-process, software-design, writing-tests, tactical-ddd
5
+ preload_commands: tdd-process, tactical-ddd
6
6
  ---
package/index.js CHANGED
@@ -97,6 +97,25 @@ function loadAgents(commands) {
97
97
 
98
98
  const agents = {}
99
99
 
100
+ function collectPreloadedCommands(agentName, stack = new Set()) {
101
+ const rawAgent = rawAgents[agentName]
102
+ if (!rawAgent) return []
103
+ if (stack.has(agentName)) return parseCsvList(rawAgent.meta.preload_commands)
104
+
105
+ stack.add(agentName)
106
+
107
+ const merged = []
108
+ const parentAgentName = typeof rawAgent.meta.extends === "string" ? rawAgent.meta.extends.trim() : ""
109
+ if (parentAgentName && rawAgents[parentAgentName]) {
110
+ merged.push(...collectPreloadedCommands(parentAgentName, stack))
111
+ }
112
+
113
+ merged.push(...parseCsvList(rawAgent.meta.preload_commands))
114
+ stack.delete(agentName)
115
+
116
+ return [...new Set(merged)]
117
+ }
118
+
100
119
  for (const [name, raw] of Object.entries(rawAgents)) {
101
120
  const { meta, body } = raw
102
121
  const promptParts = []
@@ -111,7 +130,7 @@ function loadAgents(commands) {
111
130
  promptParts.push(body)
112
131
  }
113
132
 
114
- const preloadedCommands = parseCsvList(meta.preload_commands)
133
+ const preloadedCommands = collectPreloadedCommands(name)
115
134
  for (const commandName of preloadedCommands) {
116
135
  const command = commands[commandName]
117
136
  if (!command || !command.template) continue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nt-ai-lab/opencode-skillz",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Bundled OpenCode commands and agents",
5
5
  "type": "module",
6
6
  "main": "index.js",