Skip to content

Commit 533afe8

Browse files
📝[Enhancement]: Add structured reporting during the process (#197)
## Description This pull request updates the workflow prompts for the GitHub automation scripts to improve user communication and reporting. The main change is that each major phase (specification, clarification, planning, task generation, and analysis) now posts a clear status comment to the GitHub issue, summarizing progress and next steps for users. Additionally, the analysis and clarification steps now produce more structured, readable markdown reports. Key improvements include: **User Communication Enhancements:** * Each major workflow step (`specify`, `clarify`, `plan`, `tasks`, `analyze`) now posts a standardized status comment to the issue, clearly indicating completion and next recommended actions. [[1]](diffhunk://#diff-fa401fef0198b14e6b962bab378aefea7dac6156cbe91dc0ccf1f4de2a56e0fdL140-R142) [[2]](diffhunk://#diff-c0d19cb5a033f16f5989ac19b6c95af3bce61c8e84952ffb48009ed901264115L145-R162) [[3]](diffhunk://#diff-68a2c56959d80cc612e224742a5036c1110c7d7242c7970cea384847a63d2f74L141-R144) [[4]](diffhunk://#diff-dae60ede84de8dbfbeaa4633505d0c420ce25288ca04d74ac85b28454fad0734L112-R114) [[5]](diffhunk://#diff-149f5825020c21985a8967be1c77807826b4c395a3153ee54414ad90b862ffbbL97-R136) **Analysis and Clarification Reporting:** * The analysis step now posts a detailed markdown comment with tables grouped by severity, a summary, and explicit next actions, making findings easier to review and act upon. * The clarification step now posts a markdown summary table of questions and answers if any were asked, improving traceability of clarifications. **Process and Flow Improvements:** * The planning step now checks for clarifications before proceeding, pausing if ambiguous areas remain and instructing the user on how to resolve them. * Each phase's reporting is reorganized to ensure the status comment is posted before the detailed completion report, improving user guidance and flow. [[1]](diffhunk://#diff-fa401fef0198b14e6b962bab378aefea7dac6156cbe91dc0ccf1f4de2a56e0fdL140-R142) [[2]](diffhunk://#diff-68a2c56959d80cc612e224742a5036c1110c7d7242c7970cea384847a63d2f74L141-R144) [[3]](diffhunk://#diff-dae60ede84de8dbfbeaa4633505d0c420ce25288ca04d74ac85b28454fad0734L112-R114) These changes collectively make the workflow more transparent, actionable, and user-friendly. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 0b6bdd2 commit 533afe8

File tree

8 files changed

+93
-26
lines changed

8 files changed

+93
-26
lines changed

.github/instructions/md.instructions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Markdown style guidelines for consistency across documentation.
55

66
# Markdown Style Guidelines
77

8-
This document defines the markdown style guidelines for all markdown files in this repository. These rules follow common markdown linter best practices and ensure consistency across documentation.
8+
This document defines the Markdown style guidelines for all Markdown files in this repository. These rules follow common Markdown linter best practices and ensure consistency across documentation.
99

1010
## Headings
1111

@@ -110,7 +110,7 @@ No blank lines before/after code blocks.
110110
- Always provide link text in square brackets: `[text](url)`
111111
- Do not use bare URLs (wrap them: `<https://example.com>`)
112112
- For internal repository links, use relative paths starting with `./` or `../`
113-
- Use `.md` extension for links to markdown files
113+
- Use `.md` extension for links to Markdown files
114114

115115
**Good:**
116116

@@ -252,13 +252,13 @@ See the [logo][logo-img] above.
252252

253253
### HTML
254254

255-
- Avoid HTML in markdown when possible
256-
- Use HTML only for features not supported by markdown
255+
- Avoid HTML in Markdown when possible
256+
- Use HTML only for features not supported by Markdown
257257
- Close all HTML tags properly
258258

259-
### File Names
259+
### Filenames
260260

261-
- Use lowercase for markdown file names
261+
- Use lowercase for Markdown filenames
262262
- Use hyphens (`-`) not underscores (`_`) to separate words
263263
- Use `.md` extension (not `.markdown`)
264264

@@ -269,7 +269,7 @@ See the [logo][logo-img] above.
269269

270270
## Linting
271271

272-
To validate markdown files against these guidelines, use a markdown linter such as:
272+
To validate Markdown files against these guidelines, use a Markdown linter such as:
273273

274274
- [markdownlint](https://github.com/DavidAnson/markdownlint)
275275
- [remark-lint](https://github.com/remarkjs/remark-lint)

.github/instructions/pwsh.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ Get-ChildItem -Path 'C:\Temp' -Filter '*.txt' -Recurse $true -ErrorAction 'Stop'
629629

630630
- Use PowerShell comparison operators (`-eq`, `-ne`, `-gt`, `-lt`, `-ge`, `-le`)
631631
- Don't use C-style operators (`==`, `!=`, `>`, `<`)
632-
- Use `-like` for wildcard matching, `-match` for regex
632+
- Use `-like` for wildcard matching, `-match` for regular expression
633633
- Use `-contains` for collection membership, not `-eq`
634634
- Add `-i` prefix for case-insensitive (default) or `-c` for case-sensitive
635635
- Caution with $null comparisons. Comparison order is important depending if the variable is a single item or a collection.

.github/prompts/analyze.prompt.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,46 @@ Execution steps:
9494
* Duplication Count
9595
* Critical Issues Count
9696

97-
7. At end of report, output a concise Next Actions block:
97+
7. **Post issue comment** with analysis results organized by severity:
98+
- Post a comment to the GitHub issue with the analysis findings
99+
- Format the comment with separate tables for each severity level (only include levels that have findings):
100+
```markdown
101+
## Analysis Report
102+
103+
### Summary
104+
- Total Requirements: X
105+
- Total Tasks: Y
106+
- Coverage: Z%
107+
- Issues Found: N (A critical, B high, C medium, D low)
108+
109+
### Critical Issues
110+
| ID | Category | Location(s) | Summary | Recommendation |
111+
|----|----------|-------------|---------|----------------|
112+
| C1 | ... | ... | ... | ... |
113+
114+
### High Priority Issues
115+
| ID | Category | Location(s) | Summary | Recommendation |
116+
|----|----------|-------------|---------|----------------|
117+
| H1 | ... | ... | ... | ... |
118+
119+
### Medium Priority Issues
120+
| ID | Category | Location(s) | Summary | Recommendation |
121+
|----|----------|-------------|---------|----------------|
122+
| M1 | ... | ... | ... | ... |
123+
124+
### Low Priority Issues
125+
| ID | Category | Location(s) | Summary | Recommendation |
126+
|----|----------|-------------|---------|----------------|
127+
| L1 | ... | ... | ... | ... |
128+
129+
### Next Actions
130+
- [Recommendation based on findings]
131+
```
132+
- Keep tables concise, limit to 20 findings per severity level
133+
- If more than 20 findings in a category, add a note: "_(Additional N issues not shown - see full report)_"
134+
- Include the complete "Next Actions" block with specific recommendations
135+
136+
8. At end of report, output a concise Next Actions block:
98137
- If CRITICAL issues exist: Recommend resolving them before `/implement`.
99138
- If only LOW/MEDIUM issues: User may proceed, but provide improvement suggestions.
100139
- Provide explicit command suggestions: e.g., "Run /specify with refinement", "Run /plan to adjust architecture", or "Manually edit tasks.md to add coverage for 'performance-metrics'".

.github/prompts/clarify.prompt.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,24 @@ Execution steps:
142142

143143
7. Write the updated spec back to `FEATURE_SPEC`.
144144

145-
8. Report completion (after questioning loop ends or early termination):
145+
8. **Post issue comment** with clarification summary (only if questions were asked and answered):
146+
- Post a comment to the GitHub issue summarizing the clarifications
147+
- Format the comment as:
148+
```markdown
149+
## Clarification Session (YYYY-MM-DD)
150+
151+
| # | Question | Answer |
152+
|---|----------|--------|
153+
| 1 | <question text> | <answer text> |
154+
| 2 | <question text> | <answer text> |
155+
| ... | ... | ... |
156+
157+
_All clarifications have been integrated into the specification._
158+
```
159+
- Keep the table concise and readable
160+
- Include all questions asked and answers received during this session (up to 5)
161+
162+
9. Report completion (after questioning loop ends or early termination):
146163
- Number of questions asked & answered.
147164
- Path to updated spec.
148165
- Sections touched (list names).

.github/prompts/constitution.prompt.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ Follow this execution flow:
6464

6565
3. Draft / Merge updated constitution content:
6666
- In Iteration Mode, integrate new principles/sections with minimal disruption:
67-
* Retain stable identifiers (e.g., keep existing principle numbering unless renumbering is explicitly required or gaps introduced by removals).
68-
* When replacing, either (a) fully substitute content if user confirmed or (b) append revised content and mark old with `DEPRECATED:` prefix plus TODO for removal in a future major version.
69-
- Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
70-
- Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
71-
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
72-
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
67+
* Retain stable identifiers (e.g., keep existing principle numbering unless renumbering is explicitly required or gaps introduced by removals).
68+
* When replacing, either (a) fully substitute content if user confirmed or (b) append revised content and mark old with `DEPRECATED:` prefix plus TODO for removal in a future major version.
69+
- Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
70+
- Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
71+
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
72+
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
7373

7474
4. Consistency propagation checklist (convert prior checklist into active validations):
7575
- Read [`.specify/templates/plan-template.md`](../../.specify/templates/plan-template.md) and ensure any "Constitution Check" or rules align with updated principles.

.github/prompts/plan.prompt.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Given the implementation details provided as an argument, do this:
2323
- **If exists**: You are ITERATING on an existing plan. User input should guide refinements/additions to the existing plan content.
2424
- **If not exists**: You are CREATING a new plan from scratch.
2525
- BEFORE proceeding, inspect FEATURE_SPEC for a `## Clarifications` section with at least one `Session` subheading. If missing or clearly ambiguous areas remain (vague adjectives, unresolved critical choices), PAUSE and instruct the user to run `/clarify` first to reduce rework. Only continue if: (a) Clarifications exist OR (b) an explicit user override is provided (e.g., "proceed without clarification"). Do not attempt to fabricate clarifications yourself.
26+
2627
2. Read and analyze the feature specification to understand:
2728
- The feature requirements and user stories
2829
- Functional and non-functional requirements
@@ -138,6 +139,8 @@ Given the implementation details provided as an argument, do this:
138139
gh issue edit <issue-number> --remove-label "Specification" --add-label "Plan"
139140
```
140141

141-
9. Report results with branch name, PR URL, file paths, and generated artifacts.
142+
9. **Post final status comment**: "✅ Planning complete. Ready for task generation with `/tasks` or analysis with `/analyze`."
143+
144+
10. Report results with branch name, PR URL, file paths, and generated artifacts.
142145

143146
Use absolute paths with the repository root for all file operations to avoid path issues.

.github/prompts/specify.prompt.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Given that feature description, do this:
3030
If detected, extract the upstream repository information (owner/repo).
3131

3232
**If fork contribution is detected but information is incomplete**, prompt the user:
33-
```
33+
34+
```text
3435
Fork contribution detected. Please provide the following information:
3536
- Upstream organization/owner name (e.g., "microsoft", "PSModule")
3637
- Upstream repository name (e.g., "vscode", "PSModule")
@@ -51,12 +52,15 @@ Given that feature description, do this:
5152
- Examples: "user-authentication", "merge-workflows", "api-rate-limiting", "fix-memory-leak"
5253

5354
3. Run the script [`.specify/scripts/powershell/create-new-feature.ps1 -Json -FeatureDescription "$ARGUMENTS" -BranchName "<your-generated-name>"`](../../.specify/scripts/powershell/create-new-feature.ps1) from repo root and parse its JSON output for BRANCH_NAME, SPEC_FILE, and IS_EXISTING_BRANCH. All file paths must be absolute.
54-
**IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for.
55-
**NOTE**
56-
- The script will prepend an auto-incremented feature number (e.g., `003-`) to your branch name.
57-
- If you're currently on `main` branch, a new feature branch will be created.
58-
- If you're already on a feature branch (starts with 3 digits like `001-`, `002-`, etc.), you'll stay on that branch to iterate on the existing feature.
59-
- This allows you to refine specifications without creating multiple branches for the same feature.
55+
56+
**IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for.
57+
58+
**NOTE**
59+
60+
- The script will prepend an auto-incremented feature number (e.g., `003-`) to your branch name.
61+
- If you're currently on `main` branch, a new feature branch will be created.
62+
- If you're already on a feature branch (starts with 3 digits like `001-`, `002-`, etc.), you'll stay on that branch to iterate on the existing feature.
63+
- This allows you to refine specifications without creating multiple branches for the same feature.
6064

6165
4. **Store fork information (if detected in step 1)**:
6266
- If the user indicated this is a fork contribution, create a `.fork-info.json` file in the feature directory (same location as SPEC_FILE)
@@ -137,6 +141,8 @@ Given that feature description, do this:
137141
gh issue edit <issue-number> --body-file <SPEC_FILE>
138142
```
139143

140-
8. Report completion with branch name, spec file path, whether it's a new or updated feature, issue number, target repository (if fork), and readiness for the next phase.
144+
8. **Post final status comment**: "✅ Specification complete. Ready for clarification with `/clarify` or planning with `/plan`."
145+
146+
9. Report completion with branch name, spec file path, whether it's a new or updated feature, issue number, target repository (if fork), and readiness for the next phase.
141147

142148
Note: The script handles branch creation/reuse and initializes the spec file before writing.

.github/prompts/tasks.prompt.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ $ARGUMENTS
109109
rm temp_body.md
110110
```
111111

112-
9. Report completion with task count, file path, and PR update status.
112+
9. **Post final status comment**: "✅ Task list ready. Run `/analyze` for quality check or `/implement` to begin execution."
113+
114+
10. Report completion with task count, file path, and PR update status.
113115

114116
Context for task generation: $ARGUMENTS
115117

0 commit comments

Comments
 (0)