@nt-ai-lab/opencode-skillz 0.3.11 → 0.3.13

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.
@@ -77,7 +77,7 @@ The following guidelines should be applied when designing components.
77
77
 
78
78
  ### Layering
79
79
 
80
- Components should be put into the correct layer based on the type of logic they contain.
80
+ Components should be put into the correct layer based on the type of logic they contain. They MUST live in a folder (or sub folder) that represents their layer. Dumping everyting in the root of the module is forbidden (only entrypoints can live their like `index.ts` and `main.ts`)
81
81
 
82
82
  - `domain`: Business rules and domain logic. This should be kept pure and isolated from technical concerns like database transactions. A domain expert should be able to read it and understand it
83
83
 
@@ -85,7 +85,15 @@ Components should be put into the correct layer based on the type of logic they
85
85
 
86
86
  - `infra`: Technical capabilities live in here like database transactions, persistence, external service clients and so on. Use dedicated sub-folders to properly organize like `/persistence`, `/external-service`
87
87
 
88
- - `/infra/{gateway}`: This sub-layer handles receiving inputs from the outside world and returning responses to the outside world, like gateways sitting at the edge of the application. It's common to see http controllers and event handlers in this layer. Examples of `{gateway}` include `http`, `event-handlers`
88
+ - `/infra/{gateway}`: This sub-layer handles receiving inputs from the outside world and returning responses to the outside world, like gateways sitting at the edge of the application. It's common to see http controllers and event handlers in this layer. Examples of `{gateway}` include `http`, `event-handlers`. Everything inside this layer must live in a sub-folder to avoid the root becoming a dumping ground and hiding design issues.
89
+
90
+ The following folder names are baned because they are generic terms that become a dumping ground or workaround for bad design. Find a more precise name or ask for help.
91
+
92
+ - `utils`
93
+ - `helpers`
94
+ - `models`
95
+ - `core`
96
+ - `shared`
89
97
 
90
98
  Each codebase has it's own layering conventions that should be respected, but when no layering convention exists use the above as the default.
91
99
 
@@ -203,4 +211,6 @@ Before presenting the final design, review every component name against all rule
203
211
 
204
212
  If any name violates any naming rule, revise the design before presenting it.
205
213
 
214
+ Then review all components against all guidelines in Layering. If any components violates a layering rule, revise the design befor presenting it.
215
+
206
216
  Ask the user which option to approve, reject, or combine.
@@ -12,7 +12,7 @@ Create a draft pull request for the current branch.
12
12
  - The branch contains unrelated changes that do not belong in the same pull request
13
13
  - The base branch is unclear
14
14
  - The change requires assumptions about user value, scope, or design intent
15
- - An existing commit already on the branch does not comply with the required commit format and fixing it would require rewriting history
15
+ - An existing commit title already on the branch does not comply with the required commit title format and fixing it would require rewriting history
16
16
 
17
17
  ## Required context gathering
18
18
 
@@ -42,9 +42,9 @@ If local changes exist:
42
42
 
43
43
  Do not create the pull request until `git status` is clean.
44
44
 
45
- ## Commit rules
45
+ ## Commit title rules
46
46
 
47
- Every commit included in the pull request must use the full commit format defined below.
47
+ Every commit included in the pull request must use the commit title format defined below.
48
48
 
49
49
  Use semantic commit types:
50
50
 
@@ -65,43 +65,13 @@ Rules:
65
65
  - Use `release` for version bumps or release preparation work
66
66
  - Use the smallest accurate scope
67
67
  - The commit subject must describe the user-facing change or the real engineering outcome
68
- - The commit body must explain why the change exists, not list files changed
69
- - The commit body must reference all relevant source-of-truth materials
70
- - The acceptance criteria must be copied from the source material, not loosely rewritten
68
+ - Commit bodies are optional
69
+ - Do not require existing commits to contain body sections
71
70
 
72
- Commit subject format:
71
+ Commit title format:
73
72
 
74
73
  `<type>(<scope>): <short summary>`
75
74
 
76
- Commit body format:
77
-
78
- ```text
79
- <type>(<scope>): <short summary>
80
-
81
- ## Problem
82
-
83
- Source of truth:
84
- - Ticket: <ticket id or link>
85
- - Plan: <link>
86
- - Design: <link>
87
- - Additional references: <link if relevant>
88
-
89
- <Describe the actual user problem, business problem, or engineering risk being solved.
90
- Explain the user value or operational value.>
91
-
92
- ## Solution
93
-
94
- <Describe the chosen solution and why it solves the problem. Focus on outcome and approach, not file inventory.>
95
-
96
- ## Acceptance Criteria
97
-
98
- Source: copied from <ticket or plan reference>
99
-
100
- - <criterion 1>
101
- - <criterion 2>
102
- - <criterion 3>
103
- ```
104
-
105
75
  ## Pull request title
106
76
 
107
77
  Use a clear title that matches the real change. Reuse the best semantic commit subject when that is the best title.
@@ -139,39 +109,23 @@ Rules:
139
109
  - do not invent new criteria without stating that they are additional reviewer notes
140
110
  - do not paraphrase loosely if exact wording exists in the source material
141
111
 
142
- ### `## Architecture and software design`
143
-
144
- This section is free-form.
145
-
146
- Include the architectural and design details that matter most for review, based on the current change. Use judgment instead of rigid structure.
147
-
148
- Good topics to include when relevant:
112
+ Acceptance criteria describe verifiable outcomes like "Users can log i with their email address". An acceptance criteria is not an implementation instruction like "Add a script that accepts the same parameters". If you find yourself using workds like "add", "modify" in "acceptance criteria" stop and ask for help.
149
113
 
150
- - important new components that were added
151
- - important existing components that were modified
152
- - responsibility or boundary changes between components
153
- - meaningful flow changes through the system
154
- - changed persistence, messaging, API, or integration behavior
155
- - new or changed dependencies
156
- - contract changes between internal modules or external systems
157
- - how the implemented design maps back to the approved design or plan
158
-
159
- Avoid low-signal detail such as trivial renames, minor refactors, or file-by-file narration unless those details are central to the design review.
160
-
161
- Write this section as a reviewer-focused design summary.
162
-
163
- ## GitHub command authentication
114
+ ### `## Architecture and software design`
164
115
 
165
- Before a GitHub command that needs authentication:
116
+ Describe major architectural changes like:
166
117
 
167
- 1. Run `gh auth token`
168
- 2. Use the returned token inline as `GITHUB_TOKEN=<token>` on the next GitHub command
118
+ 1. Which packages / modules were added, removed, or impacted?
119
+ 2. Which components were added / modified inside each module and why?
120
+ 3. Are there any significant domain model changes (new concepts, changes to terminology)
121
+ 4. New or modified depeendecies between components
122
+ 5. New or modified dependencies on other services or libraries
169
123
 
170
124
  ## Execution steps
171
125
 
172
126
  1. Confirm the branch is ready for a pull request
173
127
  2. If local changes exist, stage the relevant changes and create the required semantic commits until the working tree is clean
174
- 3. Verify every commit included in the pull request complies with the required format
128
+ 3. Verify every commit included in the pull request complies with the required commit title format
175
129
  4. Push the branch if needed
176
130
  5. Create a draft pull request with the required description format
177
131
  6. Return the pull request URL
@@ -1,42 +1,90 @@
1
1
  ---
2
- description: Run Vitest coverage for a pull request and update the PR description coverage block
2
+ description: Review PR code quality, test quality, and coverage
3
3
  ---
4
4
 
5
- Review pull request coverage for:
5
+ Review pull request code quality, test quality, and coverage for:
6
6
  $ARGUMENTS
7
7
 
8
- ## Software Design Compliance
8
+ ## PR Resolution
9
+
10
+ 1. Resolve the pull request from `$ARGUMENTS`.
11
+ 2. If `$ARGUMENTS` does not identify a PR URL or PR number, stop and ask for one.
12
+ 3. Run `gh pr diff <pr> --name-only` to identify changed files.
13
+ 4. Fetch existing PR review comments and do not post the same comment twice on the same line.
14
+
15
+ ## Parallel Review Subtasks
16
+
17
+ The `Software Design Compliance` and `Test Quality` reviews should run in parallel.
18
+
19
+ ### Software Design Compliance
20
+
21
+ Invoke the default subagent with a task prompt that requires it to:
22
+
23
+ 1. Review new and modified production code against `/nt-skillz:software-design`.
24
+ 2. Leave inline feedback only on changed PR diff lines.
25
+ 3. Prefix every inline message with `[Software Design]`.
26
+ 4. If a finding cannot be attached to a changed diff line, return it as a summary finding instead of posting an inline comment.
27
+ 5. Return the count of inline findings and summary findings.
28
+
29
+ Provide the subagent with:
30
+
31
+ - the resolved PR identifier
32
+ - the changed file list
33
+ - the changed diff context
9
34
 
10
- Ensure all new and modified code complies with `/nt-skillz:software-design`
11
35
 
12
- Leave in-line feedback on the PR for lines that do not comply. Prefix messages with [Software Design]
36
+ ### Test Quality
13
37
 
14
- ## Test Quality
38
+ Invoke the default subagent with a task prompt that requires it to:
15
39
 
16
- Ensure all new and modified tests comply with `/nt-skillz-writing-tests`
40
+ 1. Review new and modified tests against `/nt-skillz:writing-tests`.
41
+ 2. Leave inline feedback only on changed PR diff lines.
42
+ 3. Prefix every inline message with `[Test Quality]`.
43
+ 4. If a finding cannot be attached to a changed diff line, return it as a summary finding instead of posting an inline comment.
44
+ 5. Return the count of inline findings and summary findings.
17
45
 
18
- Leave in-line feedback on the PR for lines that do not comply. Prefix messages with [Test Quality]
46
+ Provide the subagent with:
19
47
 
20
- ## Test Coverage Analysis
48
+ - the resolved PR identifier
49
+ - the changed file list
50
+ - the changed diff context
51
+
52
+ ## Test Coverage Analysis
21
53
 
22
54
  Add a test coverage analysis results section to the PR description:
23
55
 
24
- 1. Resolve the pull request from `$ARGUMENTS`.
25
- 2. If `$ARGUMENTS` does not identify a PR URL or PR number, stop and ask for one.
26
- 3. Run `gh pr diff <pr> --name-only`.
27
- 4. For each changed path from that output, run `/nt-skillz:vitest-coverage <file>`.
28
- 5. Ignore only runs that print a `SKIP:` line.
29
- 6. If every run prints a `SKIP:` line, use one fenced `text` block containing `No changed TypeScript source files.` as the coverage content.
30
- 7. Otherwise, build the PR coverage block in this exact shape:
56
+ 1. For each changed path from `gh pr diff <pr> --name-only`, run `/nt-skillz:vitest-coverage <file>`.
57
+ 2. Ignore only runs that print a `SKIP:` line.
58
+ 3. If every run prints a `SKIP:` line, use one fenced `text` block containing `No changed TypeScript source files.` as the coverage content.
59
+ 4. Otherwise, build the PR coverage block in this exact shape:
31
60
  - `<!-- nt-skillz-coverage:start -->`
32
61
  - `## Coverage`
33
62
  - one `### \`<file>\`` heading for each non-`SKIP:` file
34
63
  - one fenced `text` block containing the exact raw `/nt-skillz:vitest-coverage <file>` output directly under that file heading
35
64
  - `<!-- nt-skillz-coverage:end -->`
36
- 8. Run `gh pr view <pr> --json body --jq '.body'` and use the returned text as the current PR body.
37
- 9. If the current PR body already contains both marker lines, replace only the text from `<!-- nt-skillz-coverage:start -->` through `<!-- nt-skillz-coverage:end -->` with the new coverage block.
38
- 10. If the current PR body does not contain both marker lines, append the new coverage block to the end of the PR body separated by two newlines.
39
- 11. Write the updated PR body to a temporary file.
40
- 12. Run `gh pr edit <pr> --body-file <temporary-file>`.
41
- 13. Do not summarize, interpret, or paraphrase the coverage output.
42
- 14. Do not modify any other part of the PR body.
65
+ 5. Run `gh pr view <pr> --json body --jq '.body'` and use the returned text as the current PR body.
66
+ 6. If the current PR body already contains both marker lines, replace only the text from `<!-- nt-skillz-coverage:start -->` through `<!-- nt-skillz-coverage:end -->` with the new coverage block.
67
+ 7. If the current PR body does not contain both marker lines, append the new coverage block to the end of the PR body separated by two newlines.
68
+ 8. Write the updated PR body to a temporary file.
69
+ 9. Run `gh pr edit <pr> --body-file <temporary-file>`.
70
+ 10. Do not summarize, interpret, or paraphrase the coverage output.
71
+ 11. Do not modify any other part of the PR body.
72
+
73
+ ## Basic PR checks
74
+
75
+ Look for the following issues on the PR:
76
+
77
+ 1. Unnecessary noise: does the PR contains noise in the dif like unnecessary formatting changes? Those should be removed to make the reviewer's job easier unless they are enforced by the project conventions.
78
+
79
+ 2. Out of scope changes: does the PR contain modification to files that are not strictly necessary that add more unnecessary noise to the diff? Like refactoring existing code.
80
+
81
+ ## Final Report
82
+
83
+ Report only:
84
+
85
+ - software design inline findings count
86
+ - software design summary findings count
87
+ - test quality inline findings count
88
+ - test quality summary findings count
89
+ - coverage block update status
90
+ - blockers that require user action
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nt-ai-lab/opencode-skillz",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "Bundled OpenCode commands and agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",