5-phase-workflow 2.0.5 → 2.0.6
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/package.json
CHANGED
|
@@ -42,9 +42,12 @@ This is the stable entrypoint after `/5:review`.
|
|
|
42
42
|
- Invoke `/5:apply-review-findings {feature} --decisions .5/features/{feature}/review-decisions-{timestamp}.json` to apply approved local fixes.
|
|
43
43
|
3. GitHub mode or user-approved PR handling:
|
|
44
44
|
- Invoke `/5:triage-pr-comments {feature}` to fetch and classify compact PR comments.
|
|
45
|
+
- Parse the `---PR-TRIAGE---` block. If triage succeeded, continue even when there are zero actionable comments because duplicate, declined, or deferred comments may still need replies.
|
|
45
46
|
- Ask the user for decisions on actionable/manual comments.
|
|
46
47
|
- Invoke `/5:apply-review-findings {feature} --pr-approved` for approved PR fixes.
|
|
47
48
|
- Invoke `/5:reply-pr-comments {feature}` to post PR replies.
|
|
49
|
+
- Parse the `---PR-REPLIES---` block and include `POSTED`, `FAILED`, and `ERRORS` in the review summary.
|
|
50
|
+
- Do not proceed to final output in GitHub mode until `/5:reply-pr-comments` has either posted replies or returned an explicit `---PR-REPLIES---` failure/partial result. Reply failures are non-fatal, but silent omission of the reply step is not allowed.
|
|
48
51
|
4. Run post-fix verification. This is mandatory after any approved fix is applied.
|
|
49
52
|
- Read `.5/config.json`, project run skills, and common project manifests such as `package.json`, `Makefile`, `pyproject.toml`, `Cargo.toml`, and Gradle files only as needed to identify configured commands.
|
|
50
53
|
- Run every available configured command in these categories: `build`, `test`, `e2e`/`test:e2e`, and `lint`.
|
|
@@ -91,6 +94,7 @@ Review findings addressed: {yes/no}
|
|
|
91
94
|
|
|
92
95
|
Local findings: {summary}
|
|
93
96
|
PR comments: {summary}
|
|
97
|
+
PR replies: {posted/failed/skipped with reason}
|
|
94
98
|
Post-fix verification: {passed/failed}
|
|
95
99
|
Build: {passed/failed/skipped}
|
|
96
100
|
Tests: {passed/failed/skipped}
|
package/src/commands/5/commit.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 5:commit
|
|
3
3
|
description: Create a git commit using the configured commit message template from .5/config.json.
|
|
4
|
-
allowed-tools: Bash,
|
|
4
|
+
allowed-tools: Bash, AskUserQuestion
|
|
5
5
|
user-invocable: true
|
|
6
6
|
model: haiku
|
|
7
7
|
argument-hint: [short-description]
|
|
@@ -17,12 +17,11 @@ You do NOT modify files. You do NOT stage unrelated changes. After reporting the
|
|
|
17
17
|
## Inputs
|
|
18
18
|
|
|
19
19
|
- Optional short description from the command argument.
|
|
20
|
-
- Configuration from `.5/config.json`:
|
|
21
|
-
- `ticket.pattern`
|
|
22
|
-
- `ticket.extractFromBranch`
|
|
23
|
-
- `git.commitMessage.pattern` (default: `{ticket-id} {short-description}`)
|
|
24
20
|
|
|
25
21
|
Current branch: !`git branch --show-current 2>/dev/null || echo ""`
|
|
22
|
+
Commit message pattern: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));console.log(c?.git?.commitMessage?.pattern||'{ticket-id} {short-description}')}catch(e){console.log('{ticket-id} {short-description}')}" 2>/dev/null`
|
|
23
|
+
Ticket pattern: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));const p=c?.ticket?.pattern;console.log(p!=null?p:'(none)')}catch(e){console.log('(none)')}" 2>/dev/null`
|
|
24
|
+
Extract ticket from branch: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));console.log(c?.ticket?.extractFromBranch!==false)}catch(e){console.log(true)}" 2>/dev/null`
|
|
26
25
|
|
|
27
26
|
## Step 1: Inspect Changes
|
|
28
27
|
|
|
@@ -47,17 +46,15 @@ git diff --cached --name-only
|
|
|
47
46
|
|
|
48
47
|
If nothing is staged, tell the user "No staged changes to commit." and stop.
|
|
49
48
|
|
|
50
|
-
## Step 2:
|
|
49
|
+
## Step 2: Resolve Ticket ID
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
Use the injected values from the Inputs section:
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
- `pattern` = injected commit message pattern.
|
|
54
|
+
- `ticketPattern` = injected ticket pattern (`(none)` means no pattern configured).
|
|
55
|
+
- `extractFromBranch` = injected extract-ticket-from-branch flag.
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
2. `ticketPattern` = `ticket.pattern`, defaulting to null.
|
|
58
|
-
3. `extractFromBranch` = `ticket.extractFromBranch`, defaulting to true.
|
|
59
|
-
|
|
60
|
-
If `extractFromBranch` is true and `ticketPattern` is set, match `ticketPattern` against the current branch to get `{ticket-id}`. If no ticket is found, use an empty string.
|
|
57
|
+
If `extractFromBranch` is true and `ticketPattern` is not `(none)`, match `ticketPattern` against the injected current branch to get `{ticket-id}`. If no match, use an empty string.
|
|
61
58
|
|
|
62
59
|
## Step 3: Get Short Description
|
|
63
60
|
|
|
@@ -86,11 +83,10 @@ Apply the configured pattern:
|
|
|
86
83
|
Build a commit body from the staged diff when useful:
|
|
87
84
|
|
|
88
85
|
- Include 1-5 bullet points summarizing meaningful changes.
|
|
86
|
+
- If you know the reason for the change, for example based on the chat history, include the reason in the body.
|
|
89
87
|
- Skip the body for very small or self-explanatory commits.
|
|
90
88
|
- Do not include raw diff excerpts.
|
|
91
89
|
|
|
92
|
-
Show the final commit message and ask for confirmation before committing.
|
|
93
|
-
|
|
94
90
|
## Step 5: Commit
|
|
95
91
|
|
|
96
92
|
Create the commit using the final subject and optional body.
|
|
@@ -20,17 +20,19 @@ You are a PR Reply Poster. You post concise replies from recorded decisions and
|
|
|
20
20
|
|
|
21
21
|
## Process
|
|
22
22
|
|
|
23
|
-
1. Read decisions and
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
23
|
+
1. Read `.5/features/{feature}/pr-comment-decisions.json`. If it is missing or invalid, end with `STATUS: failed`, `POSTED: 0`, and a compact error. Do not claim success.
|
|
24
|
+
2. Skip only comments categorized as `skip`.
|
|
25
|
+
3. Resolve `{owner}`, `{repo}`, and PR number.
|
|
26
|
+
4. Build concise reply text:
|
|
26
27
|
- `fix`: `Applied fix: {description}. Will be included in the next push.` plus optional note.
|
|
27
28
|
- `wont_fix`: `Reviewed - not addressing: {user_note or "will handle separately"}`
|
|
28
29
|
- `wait`: `Noted for later: {user_note or "deferring for now"}`
|
|
29
30
|
- `duplicate`: `Covered by local review findings - {local_decision}`
|
|
30
|
-
|
|
31
|
+
5. Post replies:
|
|
31
32
|
- Inline: `gh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies --method POST --field body="{reply text}"`
|
|
32
33
|
- General: `gh api repos/{owner}/{repo}/issues/{number}/comments --method POST --field body="{reply text}"`
|
|
33
|
-
|
|
34
|
+
6. Log individual post failures and continue. Do not abort for reply failures.
|
|
35
|
+
7. If there are no non-skip decisions, return `STATUS: success`, `POSTED: 0`, `FAILED: 0`, and `ERRORS: none; no replyable decisions`.
|
|
34
36
|
|
|
35
37
|
## Output
|
|
36
38
|
|
|
@@ -38,6 +38,13 @@
|
|
|
38
38
|
|
|
39
39
|
- {file-path} ({N} fixes applied)
|
|
40
40
|
|
|
41
|
+
## PR Comment Replies
|
|
42
|
+
|
|
43
|
+
- **Posted:** {N}
|
|
44
|
+
- **Failed:** {N}
|
|
45
|
+
- **Skipped:** {N} - {reason}
|
|
46
|
+
- **Errors:** {none-or-summary}
|
|
47
|
+
|
|
41
48
|
## Post-Fix Verification
|
|
42
49
|
|
|
43
50
|
- **Build:** {passed/failed/skipped} - `{command-or-none}` - {one-line summary}
|