guild-agents 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/bin/guild.js +7 -7
- package/package.json +4 -3
- package/src/commands/__tests__/new-agent.test.js +3 -3
- package/src/commands/__tests__/status.test.js +2 -2
- package/src/commands/init.js +44 -44
- package/src/commands/new-agent.js +37 -37
- package/src/commands/status.js +11 -11
- package/src/templates/agents/advisor.md +29 -29
- package/src/templates/agents/bugfix.md +32 -32
- package/src/templates/agents/code-reviewer.md +32 -32
- package/src/templates/agents/db-migration.md +32 -32
- package/src/templates/agents/developer.md +32 -32
- package/src/templates/agents/platform-expert.md +36 -36
- package/src/templates/agents/product-owner.md +32 -32
- package/src/templates/agents/qa.md +31 -31
- package/src/templates/agents/tech-lead.md +32 -32
- package/src/templates/skills/build-feature/SKILL.md +85 -85
- package/src/templates/skills/council/SKILL.md +68 -68
- package/src/templates/skills/dev-flow/SKILL.md +31 -31
- package/src/templates/skills/guild-specialize/SKILL.md +68 -68
- package/src/templates/skills/new-feature/SKILL.md +34 -34
- package/src/templates/skills/qa-cycle/SKILL.md +39 -39
- package/src/templates/skills/review/SKILL.md +35 -35
- package/src/templates/skills/session-end/SKILL.md +33 -33
- package/src/templates/skills/session-start/SKILL.md +32 -32
- package/src/templates/skills/status/SKILL.md +33 -33
- package/src/utils/generators.js +47 -47
- package/src/utils/github.js +20 -20
package/src/utils/github.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* github.js —
|
|
2
|
+
* github.js — GitHub CLI (gh) integration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Guild
|
|
4
|
+
* Requires the user to have gh installed and authenticated.
|
|
5
|
+
* All operations are non-blocking — if gh is not available,
|
|
6
|
+
* Guild works normally without GitHub integration.
|
|
7
7
|
*
|
|
8
8
|
* Uses execFileSync with array-based arguments to prevent shell injection
|
|
9
9
|
* through user-controlled strings (issue titles, bodies, labels).
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
import { execFileSync } from 'node:child_process';
|
|
13
13
|
|
|
14
14
|
const LABELS = [
|
|
15
|
-
{ name: 'backlog', color: '8E8E8E', description: '
|
|
16
|
-
{ name: 'in-progress', color: '0075CA', description: '
|
|
17
|
-
{ name: 'in-review', color: 'E4A800', description: '
|
|
18
|
-
{ name: 'done', color: '2EA44F', description: '
|
|
19
|
-
{ name: 'bug', color: 'D73A4A', description: 'Bug
|
|
20
|
-
{ name: 'blocked', color: 'E99695', description: '
|
|
15
|
+
{ name: 'backlog', color: '8E8E8E', description: 'Documented task, pending start' },
|
|
16
|
+
{ name: 'in-progress', color: '0075CA', description: 'In implementation' },
|
|
17
|
+
{ name: 'in-review', color: 'E4A800', description: 'In QA validation' },
|
|
18
|
+
{ name: 'done', color: '2EA44F', description: 'Completed and merged' },
|
|
19
|
+
{ name: 'bug', color: 'D73A4A', description: 'Bug reported by QA' },
|
|
20
|
+
{ name: 'blocked', color: 'E99695', description: 'Blocked by dependency' },
|
|
21
21
|
];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Checks if gh CLI is installed and authenticated.
|
|
25
25
|
*/
|
|
26
26
|
export function isGhAvailable() {
|
|
27
27
|
try {
|
|
@@ -33,11 +33,11 @@ export function isGhAvailable() {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Configures status labels in the GitHub repository.
|
|
37
37
|
*/
|
|
38
38
|
export async function setupGithubLabels(repoUrl) {
|
|
39
39
|
if (!isGhAvailable()) {
|
|
40
|
-
console.warn('gh CLI
|
|
40
|
+
console.warn('gh CLI not available — skipping label configuration.');
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -54,13 +54,13 @@ export async function setupGithubLabels(repoUrl) {
|
|
|
54
54
|
'--force',
|
|
55
55
|
], { stdio: 'ignore' });
|
|
56
56
|
} catch {
|
|
57
|
-
// Label
|
|
57
|
+
// Label already exists or non-critical error
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Assigns an issue to @me and changes its status label.
|
|
64
64
|
*/
|
|
65
65
|
export function assignIssue(issueNumber, fromLabel, toLabel) {
|
|
66
66
|
if (!isGhAvailable()) return;
|
|
@@ -80,7 +80,7 @@ export function assignIssue(issueNumber, fromLabel, toLabel) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Adds a comment to an issue.
|
|
84
84
|
*/
|
|
85
85
|
export function commentIssue(issueNumber, body) {
|
|
86
86
|
if (!isGhAvailable()) return;
|
|
@@ -95,7 +95,7 @@ export function commentIssue(issueNumber, body) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Closes an issue with a comment.
|
|
99
99
|
*/
|
|
100
100
|
export function closeIssue(issueNumber, comment) {
|
|
101
101
|
if (!isGhAvailable()) return;
|
|
@@ -110,7 +110,7 @@ export function closeIssue(issueNumber, comment) {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Creates a bug issue referencing a parent task.
|
|
114
114
|
*/
|
|
115
115
|
export function createBugIssue(title, body, parentIssueNumber) {
|
|
116
116
|
if (!isGhAvailable()) return null;
|
|
@@ -126,7 +126,7 @@ export function createBugIssue(title, body, parentIssueNumber) {
|
|
|
126
126
|
const issueNumber = issueUrl.split('/').pop();
|
|
127
127
|
|
|
128
128
|
if (parentIssueNumber) {
|
|
129
|
-
commentIssue(parentIssueNumber, `Bug
|
|
129
|
+
commentIssue(parentIssueNumber, `Bug found: ${issueUrl}`);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
return { number: issueNumber, url: issueUrl };
|
|
@@ -136,7 +136,7 @@ export function createBugIssue(title, body, parentIssueNumber) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* Extracts "owner/repo" from a GitHub URL.
|
|
140
140
|
*/
|
|
141
141
|
function extractRepoFromUrl(url) {
|
|
142
142
|
const match = url.match(/github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?$/);
|