@nt-ai-lab/opencode-skillz 0.3.10 → 0.3.12

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.
@@ -0,0 +1,155 @@
1
+ ---
2
+ description: Create a draft pull request with semantic commits, source-of-truth references, and check monitoring
3
+ ---
4
+
5
+ Create a draft pull request for the current branch.
6
+
7
+ ## Stop and ask the user if any of the following are true
8
+
9
+ - The source of truth is missing or unclear
10
+ - The ticket, plan, or design document cannot be found
11
+ - The acceptance criteria cannot be copied from the source material
12
+ - The branch contains unrelated changes that do not belong in the same pull request
13
+ - The base branch is unclear
14
+ - The change requires assumptions about user value, scope, or design intent
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
+
17
+ ## Required context gathering
18
+
19
+ Before creating commits or a pull request:
20
+
21
+ 1. Review the current git status
22
+ 2. Review staged and unstaged diffs
23
+ 3. Review the branch divergence from the base branch
24
+ 4. Review every commit that will be included in the pull request
25
+ 5. Review the source-of-truth materials for the change:
26
+ - ticket, such as JIRA
27
+ - plan
28
+ - design document
29
+ - any linked supporting document required to understand the change
30
+
31
+ Do not create the pull request until the change scope and source documents are understood.
32
+
33
+ ## Local changes before pull request creation
34
+
35
+ The pull request must not be created with uncommitted local changes.
36
+
37
+ If local changes exist:
38
+
39
+ 1. Group them into coherent commits
40
+ 2. Create the required semantic commits
41
+ 3. Verify the working tree is clean
42
+
43
+ Do not create the pull request until `git status` is clean.
44
+
45
+ ## Commit title rules
46
+
47
+ Every commit included in the pull request must use the commit title format defined below.
48
+
49
+ Use semantic commit types:
50
+
51
+ - `feat`
52
+ - `fix`
53
+ - `refactor`
54
+ - `perf`
55
+ - `docs`
56
+ - `test`
57
+ - `build`
58
+ - `ci`
59
+ - `release`
60
+ - `chore`
61
+
62
+ Rules:
63
+
64
+ - Never use `chore` when the change includes a version bump or release preparation
65
+ - Use `release` for version bumps or release preparation work
66
+ - Use the smallest accurate scope
67
+ - The commit subject must describe the user-facing change or the real engineering outcome
68
+ - Commit bodies are optional
69
+ - Do not require existing commits to contain body sections
70
+
71
+ Commit title format:
72
+
73
+ `<type>(<scope>): <short summary>`
74
+
75
+ ## Pull request title
76
+
77
+ Use a clear title that matches the real change. Reuse the best semantic commit subject when that is the best title.
78
+
79
+ ## Pull request description
80
+
81
+ The pull request description must contain these sections in this order:
82
+
83
+ - `## Problem`
84
+ - `## Solution`
85
+ - `## Acceptance Criteria`
86
+ - `## Architecture and software design`
87
+
88
+ ### `## Problem`
89
+
90
+ Include:
91
+
92
+ - all relevant source-of-truth references
93
+ - the actual user problem, business problem, or operational problem
94
+ - the value of solving it
95
+
96
+ ### `## Solution`
97
+
98
+ Include:
99
+
100
+ - the selected solution
101
+ - why this approach solves the problem
102
+ - important constraints or tradeoffs that matter to reviewers
103
+
104
+ ### `## Acceptance Criteria`
105
+
106
+ Rules:
107
+
108
+ - copy the acceptance criteria from the source ticket or plan
109
+ - do not invent new criteria without stating that they are additional reviewer notes
110
+ - do not paraphrase loosely if exact wording exists in the source material
111
+
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.
113
+
114
+ ### `## Architecture and software design`
115
+
116
+ Describe major architectural changes like:
117
+
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
123
+
124
+ ## Execution steps
125
+
126
+ 1. Confirm the branch is ready for a pull request
127
+ 2. If local changes exist, stage the relevant changes and create the required semantic commits until the working tree is clean
128
+ 3. Verify every commit included in the pull request complies with the required commit title format
129
+ 4. Push the branch if needed
130
+ 5. Create a draft pull request with the required description format
131
+ 6. Return the pull request URL
132
+ 7. Wait for pull request checks to complete
133
+ 8. Report the final status
134
+
135
+ Create the pull request as a draft.
136
+
137
+ ## Check monitoring
138
+
139
+ After creating the draft pull request:
140
+
141
+ - wait for the pull request checks to finish
142
+ - do not report success before the checks complete
143
+ - if checks fail, report the failing checks and their status
144
+ - if checks pass, report that the draft pull request is ready for review
145
+ - do not merge unless the user explicitly asks for a merge
146
+
147
+ ## Output
148
+
149
+ At the end, provide:
150
+
151
+ - the commit messages used for commits created during this command
152
+ - the pull request title
153
+ - the pull request URL
154
+ - the final check status
155
+ - any blockers that still require user action
@@ -1,42 +1,82 @@
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
9
 
10
- Ensure all new and modified code complies with `/nt-skillz:software-design`
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:
11
30
 
12
- Leave in-line feedback on the PR for lines that do not comply. Prefix messages with [Software Design]
31
+ - the resolved PR identifier
32
+ - the changed file list
33
+ - the changed diff context
13
34
 
14
- ## Test Quality
15
35
 
16
- Ensure all new and modified tests comply with `/nt-skillz-writing-tests`
36
+ ### Test Quality
17
37
 
18
- Leave in-line feedback on the PR for lines that do not comply. Prefix messages with [Test Quality]
38
+ Invoke the default subagent with a task prompt that requires it to:
19
39
 
20
- ## Test Coverage Analysis
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.
45
+
46
+ Provide the subagent with:
47
+
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
+ ## Final Report
74
+
75
+ Report only:
76
+
77
+ - software design inline findings count
78
+ - software design summary findings count
79
+ - test quality inline findings count
80
+ - test quality summary findings count
81
+ - coverage block update status
82
+ - 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.10",
3
+ "version": "0.3.12",
4
4
  "description": "Bundled OpenCode commands and agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",