next-issue 16.12.1 → 17.0.1
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/dist/cli/skills.mjs +23 -1
- package/dist/shared/hunt.mjs +2 -2
- package/dist/shared/state.mjs +3 -0
- package/package.json +1 -1
package/dist/cli/skills.mjs
CHANGED
|
@@ -87,6 +87,22 @@ async function skillHash(folder) {
|
|
|
87
87
|
}
|
|
88
88
|
return hash.digest('hex');
|
|
89
89
|
}
|
|
90
|
+
async function isOwnSkill(folder) {
|
|
91
|
+
let text;
|
|
92
|
+
try {
|
|
93
|
+
text = await readFile(join(folder, 'SKILL.md'), 'utf8');
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
if (hasCode(error, 'ENOENT')) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
throw error;
|
|
100
|
+
}
|
|
101
|
+
const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text)?.[1] ?? '';
|
|
102
|
+
return frontmatter
|
|
103
|
+
.split(/\r?\n/)
|
|
104
|
+
.some((line) => line.startsWith('description:') && line.includes('next-issue'));
|
|
105
|
+
}
|
|
90
106
|
export async function refreshSkills(root) {
|
|
91
107
|
const folders = [
|
|
92
108
|
...new Set([join(homedir(), '.claude', 'skills'), join(root, '.claude', 'skills')]),
|
|
@@ -101,9 +117,15 @@ export async function refreshSkills(root) {
|
|
|
101
117
|
continue;
|
|
102
118
|
}
|
|
103
119
|
installed = true;
|
|
104
|
-
if (hash
|
|
120
|
+
if (hash === shipped) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (await isOwnSkill(join(folder, name))) {
|
|
105
124
|
notes.push(`updated ${await replaceSkill(folder, name)}`);
|
|
106
125
|
}
|
|
126
|
+
else {
|
|
127
|
+
notes.push(`kept ${join(folder, name)}: not a next-issue skill`);
|
|
128
|
+
}
|
|
107
129
|
}
|
|
108
130
|
if (!installed) {
|
|
109
131
|
notes.push(`wrote ${await replaceSkill(join(root, '.claude', 'skills'), name)}`);
|
package/dist/shared/hunt.mjs
CHANGED
|
@@ -10,8 +10,8 @@ import { withNotes } from './job.mjs';
|
|
|
10
10
|
import { oneAtATime } from './lock.mjs';
|
|
11
11
|
import { huntPrompt } from './prompts.mjs';
|
|
12
12
|
import { listedIssues, skipReason } from './skip.mjs';
|
|
13
|
+
import { huntInstructionsPath } from './state.mjs';
|
|
13
14
|
import { huntPath } from './worktree.mjs';
|
|
14
|
-
export const HUNT_FILE = 'next-issue.hunt.md';
|
|
15
15
|
const FILED = /^issue:[^\S\r\n]*(\S+)[^\S\r\n]*$/gm;
|
|
16
16
|
export async function huntWorktree(repo, base, remote) {
|
|
17
17
|
const path = huntPath(repo);
|
|
@@ -54,7 +54,7 @@ export async function hunt(context, count) {
|
|
|
54
54
|
await ports.ensureLabel(repo, label);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
const instructions = await readTextIfPresent(
|
|
57
|
+
const instructions = await readTextIfPresent(huntInstructionsPath(repo.root));
|
|
58
58
|
const result = await ports.runAgent(recorder, {
|
|
59
59
|
name: 'hunter',
|
|
60
60
|
cwd,
|
package/dist/shared/state.mjs
CHANGED
|
@@ -10,6 +10,9 @@ export function stateDir(root) {
|
|
|
10
10
|
export function notesPath(root) {
|
|
11
11
|
return join(stateDir(root), 'notes.md');
|
|
12
12
|
}
|
|
13
|
+
export function huntInstructionsPath(root) {
|
|
14
|
+
return join(stateDir(root), 'hunt.md');
|
|
15
|
+
}
|
|
13
16
|
export function runsDir(root) {
|
|
14
17
|
return join(stateDir(root), 'runs');
|
|
15
18
|
}
|