guardian-framework 0.1.0
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/LICENSE +21 -0
- package/README.md +463 -0
- package/dist/cli.js +12958 -0
- package/dist/exports.js +12765 -0
- package/package.json +61 -0
- package/templates/languages/go-patterns.md +411 -0
- package/templates/languages/java-patterns.md +545 -0
- package/templates/languages/python-patterns.md +312 -0
- package/templates/languages/rust-patterns.md +232 -0
- package/templates/languages/typescript-patterns.md +313 -0
- package/templates/pi/INDEX.md +437 -0
- package/templates/pi/agent/AGENTS.md +166 -0
- package/templates/pi/agents/architecture-coordinator.md +40 -0
- package/templates/pi/agents/architecture-validator.md +36 -0
- package/templates/pi/agents/bootstrap-implementer.md +37 -0
- package/templates/pi/agents/issue-factory.md +31 -0
- package/templates/pi/agents/operations-validator.md +32 -0
- package/templates/pi/agents/security-validator.md +33 -0
- package/templates/pi/architecture/CHANGELOG.md +78 -0
- package/templates/pi/architecture/decisions/ADR-template.md +76 -0
- package/templates/pi/architecture/diagrams/system-overview.md +159 -0
- package/templates/pi/architecture/modules/module-template.md +152 -0
- package/templates/pi/context/checklists.md +91 -0
- package/templates/pi/context/domain-workflow.md +180 -0
- package/templates/pi/context/output-formats.md +135 -0
- package/templates/pi/context/patterns-base.md +47 -0
- package/templates/pi/context/patterns.md +38 -0
- package/templates/pi/context/project.md +88 -0
- package/templates/pi/domain/exploration.md +93 -0
- package/templates/pi/domain/ubiquitous-language.md +24 -0
- package/templates/pi/extensions/architect-lib/generators.ts +528 -0
- package/templates/pi/extensions/architect-lib/helpers.ts +344 -0
- package/templates/pi/extensions/architect-lib/types.ts +117 -0
- package/templates/pi/extensions/architect.ts +1425 -0
- package/templates/pi/extensions/ask-user-question.ts +579 -0
- package/templates/pi/extensions/bash-guard.ts +556 -0
- package/templates/pi/extensions/config-reload.ts +115 -0
- package/templates/pi/extensions/coordinator.ts +304 -0
- package/templates/pi/extensions/curator.ts +543 -0
- package/templates/pi/extensions/domain-explorer.ts +990 -0
- package/templates/pi/extensions/filechanges.ts +656 -0
- package/templates/pi/extensions/goal-loop.ts +717 -0
- package/templates/pi/extensions/hooks.ts +452 -0
- package/templates/pi/extensions/kanban.ts +547 -0
- package/templates/pi/extensions/pipeline.ts +1246 -0
- package/templates/pi/extensions/plan-mode.ts +209 -0
- package/templates/pi/extensions/project-scaffolder.ts +284 -0
- package/templates/pi/extensions/read-only-mode.ts +192 -0
- package/templates/pi/extensions/redaction.ts +128 -0
- package/templates/pi/extensions/session-persistence.ts +174 -0
- package/templates/pi/extensions/slash-commands.ts +229 -0
- package/templates/pi/extensions/snippets.ts +201 -0
- package/templates/pi/extensions/validation-runner.ts +100 -0
- package/templates/pi/github/agents/architecture-coordinator.agent.md +27 -0
- package/templates/pi/github/agents/architecture-validator.agent.md +20 -0
- package/templates/pi/github/agents/bootstrap-implementer.agent.md +20 -0
- package/templates/pi/github/agents/epic-planner.agent.md +70 -0
- package/templates/pi/github/agents/issue-factory.agent.md +20 -0
- package/templates/pi/github/agents/operations-validator.agent.md +20 -0
- package/templates/pi/github/agents/security-validator.agent.md +20 -0
- package/templates/pi/github/copilot/settings.json +16 -0
- package/templates/pi/github/copilot-instructions.md +155 -0
- package/templates/pi/github/instructions/architecture.instructions.md +71 -0
- package/templates/pi/github/instructions/validation.instructions.md +69 -0
- package/templates/pi/github/workflows/01-planning-workflow.md +75 -0
- package/templates/pi/github/workflows/02-issue-generation-workflow.md +69 -0
- package/templates/pi/github/workflows/03-implementation-workflow.md +80 -0
- package/templates/pi/github/workflows/04-validation-workflow.md +68 -0
- package/templates/pi/preflight_report.json +99 -0
- package/templates/pi/prompts/blueprint-update.md +262 -0
- package/templates/pi/prompts/blueprint-validate.md +218 -0
- package/templates/pi/prompts/bug-fix.md +50 -0
- package/templates/pi/prompts/ci-blueprint.md +131 -0
- package/templates/pi/prompts/context-refresh.md +258 -0
- package/templates/pi/prompts/epic-plan.md +356 -0
- package/templates/pi/prompts/epic-template.md +186 -0
- package/templates/pi/prompts/feature-development.md +131 -0
- package/templates/pi/prompts/git-issues.md +243 -0
- package/templates/pi/prompts/hotfix.md +71 -0
- package/templates/pi/prompts/issue-closeout.md +342 -0
- package/templates/pi/prompts/issue-draft.md +218 -0
- package/templates/pi/prompts/issue-implementation-series.md +173 -0
- package/templates/pi/prompts/issue-merge.md +372 -0
- package/templates/pi/prompts/issue-template-set.md +392 -0
- package/templates/pi/prompts/issue-template.md +207 -0
- package/templates/pi/prompts/pattern-extract.md +269 -0
- package/templates/pi/prompts/plan-to-issues.md +430 -0
- package/templates/pi/prompts/refactoring.md +82 -0
- package/templates/pi/prompts/scope-analyzer.md +254 -0
- package/templates/pi/prompts/sync-check.md +230 -0
- package/templates/pi/scripts/categorize-issues.sh +171 -0
- package/templates/pi/scripts/ci/check_architecture_conformance.sh +748 -0
- package/templates/pi/scripts/ci/check_planning_packet.py +228 -0
- package/templates/pi/scripts/ci/run_hardening_stages.sh +264 -0
- package/templates/pi/scripts/ci/run_preflight.sh +649 -0
- package/templates/pi/scripts/ci/run_stage.sh +193 -0
- package/templates/pi/scripts/ci/stage_docs_policy.sh +82 -0
- package/templates/pi/scripts/ci/stage_integration.sh +3 -0
- package/templates/pi/scripts/ci/stage_lint.sh +130 -0
- package/templates/pi/scripts/ci/stage_migration_verify.sh +3 -0
- package/templates/pi/scripts/ci/stage_package_build.sh +3 -0
- package/templates/pi/scripts/ci/stage_release_readiness.sh +3 -0
- package/templates/pi/scripts/ci/stage_remaining.sh +242 -0
- package/templates/pi/scripts/ci/stage_security.sh +3 -0
- package/templates/pi/scripts/ci/stage_static_analysis.sh +114 -0
- package/templates/pi/scripts/ci/stage_unit.sh +119 -0
- package/templates/pi/scripts/ci/validate_agent_output.py +181 -0
- package/templates/pi/scripts/ci/validate_agent_output.sh +243 -0
- package/templates/pi/scripts/create-feature-branch.sh +136 -0
- package/templates/pi/scripts/create-mr.sh +117 -0
- package/templates/pi/scripts/fetch-issues.sh +131 -0
- package/templates/pi/scripts/generate-architecture.sh +161 -0
- package/templates/pi/scripts/git/close-epic.sh +69 -0
- package/templates/pi/scripts/git/close-issue.sh +35 -0
- package/templates/pi/scripts/git/create-tracking-issue.sh +174 -0
- package/templates/pi/scripts/git/link-issue-to-epic.sh +51 -0
- package/templates/pi/scripts/git/update-tracking-issue.sh +66 -0
- package/templates/pi/scripts/languages/go/validate-architecture.sh +139 -0
- package/templates/pi/scripts/languages/go/validate-canonical.sh +129 -0
- package/templates/pi/scripts/languages/go/validate-ci.sh +132 -0
- package/templates/pi/scripts/languages/go/validate-integration.sh +156 -0
- package/templates/pi/scripts/languages/go/validate-operations.sh +146 -0
- package/templates/pi/scripts/languages/go/validate-security.sh +135 -0
- package/templates/pi/scripts/languages/go/validate-tests.sh +125 -0
- package/templates/pi/scripts/languages/java/validate-annotations.sh +185 -0
- package/templates/pi/scripts/languages/java/validate-architecture.sh +159 -0
- package/templates/pi/scripts/languages/java/validate-canonical.sh +114 -0
- package/templates/pi/scripts/languages/java/validate-ci.sh +269 -0
- package/templates/pi/scripts/languages/java/validate-integration.sh +149 -0
- package/templates/pi/scripts/languages/java/validate-operations.sh +142 -0
- package/templates/pi/scripts/languages/java/validate-security.sh +174 -0
- package/templates/pi/scripts/languages/java/validate-spring-architecture.sh +227 -0
- package/templates/pi/scripts/languages/java/validate-tests.sh +159 -0
- package/templates/pi/scripts/languages/python/validate-architecture.sh +99 -0
- package/templates/pi/scripts/languages/python/validate-canonical.sh +124 -0
- package/templates/pi/scripts/languages/python/validate-ci.sh +130 -0
- package/templates/pi/scripts/languages/python/validate-integration.sh +119 -0
- package/templates/pi/scripts/languages/python/validate-operations.sh +107 -0
- package/templates/pi/scripts/languages/python/validate-security.sh +68 -0
- package/templates/pi/scripts/languages/python/validate-tests.sh +102 -0
- package/templates/pi/scripts/languages/rust/validate-architecture.sh +188 -0
- package/templates/pi/scripts/languages/rust/validate-canonical.sh +146 -0
- package/templates/pi/scripts/languages/rust/validate-ci.sh +147 -0
- package/templates/pi/scripts/languages/rust/validate-integration.sh +149 -0
- package/templates/pi/scripts/languages/rust/validate-operations.sh +154 -0
- package/templates/pi/scripts/languages/rust/validate-security.sh +153 -0
- package/templates/pi/scripts/languages/rust/validate-tests.sh +150 -0
- package/templates/pi/scripts/languages/typescript/validate-architecture.sh +157 -0
- package/templates/pi/scripts/languages/typescript/validate-canonical.sh +135 -0
- package/templates/pi/scripts/languages/typescript/validate-ci.sh +244 -0
- package/templates/pi/scripts/languages/typescript/validate-integration.sh +166 -0
- package/templates/pi/scripts/languages/typescript/validate-operations.sh +162 -0
- package/templates/pi/scripts/languages/typescript/validate-security.sh +169 -0
- package/templates/pi/scripts/languages/typescript/validate-tests.sh +158 -0
- package/templates/pi/scripts/merge-mr.sh +95 -0
- package/templates/pi/scripts/mr-validation.sh +228 -0
- package/templates/pi/scripts/validate-architecture-readiness.sh +153 -0
- package/templates/pi/scripts/validate-architecture.sh +22 -0
- package/templates/pi/scripts/validate-canonical.sh +22 -0
- package/templates/pi/scripts/validate-ci.sh +37 -0
- package/templates/pi/scripts/validate-integration.sh +22 -0
- package/templates/pi/scripts/validate-operations.sh +22 -0
- package/templates/pi/scripts/validate-security.sh +22 -0
- package/templates/pi/scripts/validate-tests.sh +22 -0
- package/templates/pi/scripts/validate-ubiquitous-language.sh +291 -0
- package/templates/pi/scripts/validation-cache.sh +139 -0
- package/templates/pi/skills/agents/architecture-coordinator.md +178 -0
- package/templates/pi/skills/agents/architecture-generator.md +79 -0
- package/templates/pi/skills/agents/architecture-validator.md +74 -0
- package/templates/pi/skills/agents/ci-mr-validator.md +46 -0
- package/templates/pi/skills/agents/code-developer.md +76 -0
- package/templates/pi/skills/agents/commit.md +46 -0
- package/templates/pi/skills/agents/curator.md +71 -0
- package/templates/pi/skills/agents/debug.md +59 -0
- package/templates/pi/skills/agents/documentation-maintainer.md +36 -0
- package/templates/pi/skills/agents/goal-loop.md +125 -0
- package/templates/pi/skills/agents/hooks.md +122 -0
- package/templates/pi/skills/agents/integration-validator.md +35 -0
- package/templates/pi/skills/agents/issue-creator.md +75 -0
- package/templates/pi/skills/agents/issue-factory.md +143 -0
- package/templates/pi/skills/agents/kanban.md +85 -0
- package/templates/pi/skills/agents/land.md +59 -0
- package/templates/pi/skills/agents/operations-validator.md +43 -0
- package/templates/pi/skills/agents/pipeline.md +113 -0
- package/templates/pi/skills/agents/plan-mode.md +77 -0
- package/templates/pi/skills/agents/pull.md +40 -0
- package/templates/pi/skills/agents/push.md +41 -0
- package/templates/pi/skills/agents/security-validator.md +85 -0
- package/templates/pi/skills/agents/session-persistence.md +119 -0
- package/templates/pi/skills/agents/slash-commands.md +117 -0
- package/templates/pi/skills/agents/snippets.md +99 -0
- package/templates/pi/skills/agents/subagent-registry.md +78 -0
- package/templates/pi/skills/agents/test-validator.md +42 -0
- package/templates/pi/skills/validators/architecture-validator.md +43 -0
- package/templates/pi/skills/validators/ci-validator.md +27 -0
- package/templates/pi/skills/validators/context-compaction.md +73 -0
- package/templates/pi/skills/validators/integration-validator.md +38 -0
- package/templates/pi/skills/validators/model-registry.md +96 -0
- package/templates/pi/skills/validators/operations-validator.md +34 -0
- package/templates/pi/skills/validators/security-guards.md +72 -0
- package/templates/pi/skills/validators/security-validator.md +41 -0
- package/templates/pi/skills/validators/system-prompt-tiers.md +69 -0
- package/templates/pi/skills/validators/test-validator.md +33 -0
- package/templates/pi/types.ts +62 -0
- package/templates/pi/validators/README.md +93 -0
- package/templates/pi/validators/default.toml +209 -0
- package/templates/pi/validators/spring.toml +142 -0
- package/templates/pi/workpad.md +53 -0
- package/templates/project/java/Dockerfile +14 -0
- package/templates/project/java/README.md +40 -0
- package/templates/project/java/pom.xml +132 -0
- package/templates/project/typescript/Dockerfile +15 -0
- package/templates/project/typescript/README.md +29 -0
- package/templates/project/typescript/package.json +23 -0
- package/templates/project/typescript/tsconfig.json +21 -0
- package/templates/workflow.md +123 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Issue Closeout Workflow
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
Canonical Reference: .pi/prompts/issue-closeout.md
|
|
5
|
+
Blueprint Source: Guardian Framework v1.2
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
**Purpose:** Verify all acceptance criteria are met, run validators (including canonical reference check), and create a compliance merge request (MR) with complete documentation.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Canonical Reference Requirement
|
|
13
|
+
|
|
14
|
+
**Before closeout, verify all implementation files reference architecture:**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bash .pi/scripts/validate-canonical.sh
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Files must include:**
|
|
21
|
+
```typescript
|
|
22
|
+
/**
|
|
23
|
+
* Canonical Reference: .pi/architecture/modules/[module].md#[section]
|
|
24
|
+
* Implements: [issue acceptance criteria]
|
|
25
|
+
* Issue: #[number]
|
|
26
|
+
*/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Architecture Sync Check:**
|
|
30
|
+
1. Check `.pi/architecture/CHANGELOG.md` for pending changes
|
|
31
|
+
2. Verify implementation matches current architecture spec
|
|
32
|
+
3. If CHANGELOG has pending changes for this module, note in MR
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Prerequisites
|
|
37
|
+
|
|
38
|
+
- Issue implementation completed
|
|
39
|
+
- All code changes committed to feature branch
|
|
40
|
+
- Issue number known
|
|
41
|
+
- Canonical references added to all modified files
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Workflow Steps
|
|
46
|
+
|
|
47
|
+
### 1. Verify Acceptance Criteria
|
|
48
|
+
|
|
49
|
+
Review the original issue and check each acceptance criterion:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# View original issue
|
|
53
|
+
{{REPOTOOL}} issue view [ISSUE_NUMBER]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Acceptance Criteria Checklist:**
|
|
57
|
+
|
|
58
|
+
| Criterion | Status | Evidence |
|
|
59
|
+
|-----------|--------|----------|
|
|
60
|
+
| [Criterion 1] | ✅/❌ | [How verified] |
|
|
61
|
+
| [Criterion 2] | ✅/❌ | [How verified] |
|
|
62
|
+
| [Criterion 3] | ✅/❌ | [How verified] |
|
|
63
|
+
|
|
64
|
+
**Verification Methods:**
|
|
65
|
+
- Manual testing: Describe test steps performed
|
|
66
|
+
- Automated tests: Reference passing test output
|
|
67
|
+
- Code review: Reference specific files changed
|
|
68
|
+
- Documentation: Reference docs updated
|
|
69
|
+
|
|
70
|
+
### 2. Run Validators
|
|
71
|
+
|
|
72
|
+
Execute all required validators based on issue scope:
|
|
73
|
+
|
|
74
|
+
**CI Validator (always required):**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bash .pi/scripts/validate-ci.sh
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Expected output:
|
|
81
|
+
```
|
|
82
|
+
✅ Build: Passed
|
|
83
|
+
✅ Tests: All passing
|
|
84
|
+
✅ Lint: No errors
|
|
85
|
+
✅ Format: Correct
|
|
86
|
+
✅ Audit: No vulnerabilities
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Test Validator (for moderate+ scope):**
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
bash .pi/scripts/validate-tests.sh
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Expected output:
|
|
96
|
+
```
|
|
97
|
+
✅ Unit tests: [X] tests passing
|
|
98
|
+
✅ Integration tests: [Y] tests passing
|
|
99
|
+
✅ Coverage: [Z]% (above threshold)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Security Validator (for complex+ scope):**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bash .pi/scripts/validate-security.sh
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Expected output:
|
|
109
|
+
```
|
|
110
|
+
✅ No hardcoded secrets
|
|
111
|
+
✅ No SQL injection patterns
|
|
112
|
+
✅ No path traversal vulnerabilities
|
|
113
|
+
✅ Input validation present
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Operations Validator (for production changes):**
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
bash .pi/scripts/validate-operations.sh
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Expected output:
|
|
123
|
+
```
|
|
124
|
+
✅ Tracing implemented
|
|
125
|
+
✅ Cancellation handling correct
|
|
126
|
+
✅ Atomic writes used
|
|
127
|
+
✅ Error handling complete
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Canonical Reference Validator (always required):**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
bash .pi/scripts/validate-canonical.sh
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Expected output:
|
|
137
|
+
```
|
|
138
|
+
✅ Implementation files have canonical references
|
|
139
|
+
✅ References point to valid blueprint sections
|
|
140
|
+
✅ Coverage ≥ 50%
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 3. Validator Results Recording
|
|
144
|
+
|
|
145
|
+
Document all validator results:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
## Validator Results
|
|
149
|
+
|
|
150
|
+
### CI Validation
|
|
151
|
+
- Status: ✅ PASSED
|
|
152
|
+
- Build: Success (output snippet)
|
|
153
|
+
- Tests: [N] tests passed
|
|
154
|
+
- Lint: 0 errors, 0 warnings
|
|
155
|
+
|
|
156
|
+
### Test Validation
|
|
157
|
+
- Status: ✅ PASSED
|
|
158
|
+
- Unit Tests: [N] passed
|
|
159
|
+
- Integration Tests: [N] passed
|
|
160
|
+
- Coverage: [X]%
|
|
161
|
+
|
|
162
|
+
### Security Validation
|
|
163
|
+
- Status: ✅ PASSED
|
|
164
|
+
- Secrets Check: No issues
|
|
165
|
+
- Injection Check: No issues
|
|
166
|
+
- Path Traversal: No issues
|
|
167
|
+
|
|
168
|
+
### Operations Validation
|
|
169
|
+
- Status: ✅ PASSED
|
|
170
|
+
- Tracing: Implemented in [files]
|
|
171
|
+
- Cancellation: Handled in [files]
|
|
172
|
+
- Atomic Writes: Used in [files]
|
|
173
|
+
|
|
174
|
+
### Canonical Reference Validation
|
|
175
|
+
- Status: ✅ PASSED
|
|
176
|
+
- Files with references: [X]/[Y]
|
|
177
|
+
- Coverage: [Z]% (above 50% threshold)
|
|
178
|
+
- All references valid
|
|
179
|
+
|
|
180
|
+
### Overall Validation Status: ✅ ALL PASSED
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 4. Create Compliance MR
|
|
184
|
+
|
|
185
|
+
Create a merge request with complete compliance documentation:
|
|
186
|
+
|
|
187
|
+
**MR Title Format:**
|
|
188
|
+
```
|
|
189
|
+
[Issue #X] Issue Title - [brief summary]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**MR Body Template:**
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
## Issue Closeout
|
|
196
|
+
|
|
197
|
+
Closes #[ISSUE_NUMBER]
|
|
198
|
+
|
|
199
|
+
### Summary
|
|
200
|
+
[Brief description of changes made]
|
|
201
|
+
|
|
202
|
+
### Acceptance Criteria Verification
|
|
203
|
+
|
|
204
|
+
| Criterion | Status | Evidence |
|
|
205
|
+
|-----------|--------|----------|
|
|
206
|
+
| [AC 1] | ✅ | [Evidence link/description] |
|
|
207
|
+
| [AC 2] | ✅ | [Evidence link/description] |
|
|
208
|
+
| [AC 3] | ✅ | [Evidence link/description] |
|
|
209
|
+
|
|
210
|
+
### Validator Results
|
|
211
|
+
|
|
212
|
+
| Validator | Status | Details |
|
|
213
|
+
|-----------|--------|---------|
|
|
214
|
+
| CI | ✅ PASSED | Build, tests, lint all passing |
|
|
215
|
+
| Test | ✅ PASSED | [N] tests, [X]% coverage |
|
|
216
|
+
| Security | ✅ PASSED | No vulnerabilities detected |
|
|
217
|
+
| Operations | ✅ PASSED | Production requirements met |
|
|
218
|
+
| Canonical | ✅ PASSED | [X]% coverage, all refs valid |
|
|
219
|
+
|
|
220
|
+
### Files Changed
|
|
221
|
+
|
|
222
|
+
| File | Change Type | Reason |
|
|
223
|
+
|------|-------------|--------|
|
|
224
|
+
| src/foo.ts | modified | [Reason] |
|
|
225
|
+
| tests/foo.test.ts | added | [Reason] |
|
|
226
|
+
| docs/foo.md | updated | [Reason] |
|
|
227
|
+
|
|
228
|
+
### Testing Evidence
|
|
229
|
+
|
|
230
|
+
**Unit Tests:**
|
|
231
|
+
```bash
|
|
232
|
+
[Test command output showing passes]
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Integration Tests:**
|
|
236
|
+
```bash
|
|
237
|
+
[Test command output showing passes]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Manual Testing Performed
|
|
241
|
+
|
|
242
|
+
- [Test case 1]: [Result]
|
|
243
|
+
- [Test case 2]: [Result]
|
|
244
|
+
|
|
245
|
+
### Documentation Updates
|
|
246
|
+
|
|
247
|
+
- [ ] API documentation updated
|
|
248
|
+
- [ ] README updated (if applicable)
|
|
249
|
+
- [ ] Inline comments added for complex logic
|
|
250
|
+
|
|
251
|
+
### Deployment Notes
|
|
252
|
+
|
|
253
|
+
- [Any special deployment considerations]
|
|
254
|
+
- [Database migrations required: Yes/No]
|
|
255
|
+
- [Configuration changes required: Yes/No]
|
|
256
|
+
|
|
257
|
+
### Rollback Plan
|
|
258
|
+
|
|
259
|
+
[How to rollback if issues arise]
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Compliance Checklist
|
|
264
|
+
|
|
265
|
+
- [ ] All acceptance criteria verified
|
|
266
|
+
- [ ] All validators passed
|
|
267
|
+
- [ ] Tests cover new functionality
|
|
268
|
+
- [ ] Documentation updated
|
|
269
|
+
- [ ] No secrets or sensitive data in code
|
|
270
|
+
- [ ] Branch up-to-date with main
|
|
271
|
+
- [ ] MR ready for review
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
🤖 Generated with Guardian compliance workflow
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### 5. Create MR in Repository
|
|
279
|
+
|
|
280
|
+
**For GitHub (gh):**
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
gh pr create \
|
|
284
|
+
--title "[Issue #X] Issue Title" \
|
|
285
|
+
--body "[MR_BODY_FROM_TEMPLATE]" \
|
|
286
|
+
--base main \
|
|
287
|
+
--head [feature-branch] \
|
|
288
|
+
--assignee @me \
|
|
289
|
+
--label "ready-for-review"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**For GitLab (glab):**
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
glab mr create \
|
|
296
|
+
--title "[Issue #X] Issue Title" \
|
|
297
|
+
--description "[MR_BODY_FROM_TEMPLATE]" \
|
|
298
|
+
--target-branch main \
|
|
299
|
+
--source-branch [feature-branch] \
|
|
300
|
+
--assignee @me \
|
|
301
|
+
--label "ready-for-review"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### 6. Link MR to Issue
|
|
305
|
+
|
|
306
|
+
**For GitHub:**
|
|
307
|
+
The MR body includes "Closes #X" which auto-links.
|
|
308
|
+
|
|
309
|
+
**For GitLab:**
|
|
310
|
+
```bash
|
|
311
|
+
glab api projects/:id/issues/[issue_iid] \
|
|
312
|
+
-f merge_request_id="[mr_id]"
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Error Handling
|
|
318
|
+
|
|
319
|
+
| Error | Solution |
|
|
320
|
+
|-------|----------|
|
|
321
|
+
| Validator failed | Fix issues, re-run validators |
|
|
322
|
+
| Acceptance criteria not met | Complete implementation, re-verify |
|
|
323
|
+
| Tests failing | Debug and fix tests |
|
|
324
|
+
| MR creation failed | Check branch exists and is pushed |
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Acceptance Criteria
|
|
329
|
+
|
|
330
|
+
- [ ] All original issue acceptance criteria verified
|
|
331
|
+
- [ ] All required validators passed
|
|
332
|
+
- [ ] Canonical reference validator passed (≥50% coverage)
|
|
333
|
+
- [ ] Compliance MR created with full documentation
|
|
334
|
+
- [ ] MR linked to original issue
|
|
335
|
+
- [ ] MR status: ready for review
|
|
336
|
+
- [ ] Ready for `/issue-merge` after CI pipeline passes
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Next Workflow
|
|
341
|
+
|
|
342
|
+
After CI pipeline is green and MR approved, run: `/issue-merge`
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Issue Draft Workflow
|
|
2
|
+
|
|
3
|
+
**Purpose:** Issue-creator agent reads the approved epic and creates draft GitHub/GitLab issues for review before publishing.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Epic proposal approved by all validators (from `/epic-plan`)
|
|
10
|
+
- Epic name and issue breakdown defined
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Workflow Steps
|
|
15
|
+
|
|
16
|
+
### 1. Read Epic Proposal
|
|
17
|
+
|
|
18
|
+
Load the approved epic proposal from previous workflow:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Check for epic proposal file (if saved)
|
|
22
|
+
cat .pi/context/epic-proposal.md # if exists
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or use the epic details from the `/epic-plan` output.
|
|
26
|
+
|
|
27
|
+
### 2. Create Issue Drafts
|
|
28
|
+
|
|
29
|
+
For each issue in the epic breakdown, create a detailed draft:
|
|
30
|
+
|
|
31
|
+
**Issue Template:**
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Issue: [ISSUE_TITLE]
|
|
35
|
+
|
|
36
|
+
### Epic: [EPIC_NAME]
|
|
37
|
+
|
|
38
|
+
### Type: [feature/bug/refactor/docs]
|
|
39
|
+
|
|
40
|
+
### Priority: [high/medium/low]
|
|
41
|
+
|
|
42
|
+
### Description
|
|
43
|
+
[Clear description of what needs to be done]
|
|
44
|
+
|
|
45
|
+
### Acceptance Criteria
|
|
46
|
+
- [ ] [Criterion 1 - specific and testable]
|
|
47
|
+
- [ ] [Criterion 2 - specific and testable]
|
|
48
|
+
- [ ] [Criterion 3 - specific and testable]
|
|
49
|
+
|
|
50
|
+
### Implementation Notes
|
|
51
|
+
- [Technical approach hints]
|
|
52
|
+
- [Files likely affected]
|
|
53
|
+
- [Patterns to follow from .pi/context/patterns.md]
|
|
54
|
+
|
|
55
|
+
### Dependencies
|
|
56
|
+
- [Depends on issue #X]
|
|
57
|
+
- [Blocks issue #Y]
|
|
58
|
+
|
|
59
|
+
### Estimated Scope
|
|
60
|
+
- Files: [X]
|
|
61
|
+
- Lines: [Y]
|
|
62
|
+
- Validator Scope: [simple/moderate/complex]
|
|
63
|
+
|
|
64
|
+
### Testing Requirements
|
|
65
|
+
- [Unit tests required for X]
|
|
66
|
+
- [Integration tests required for Y]
|
|
67
|
+
|
|
68
|
+
### Documentation Updates
|
|
69
|
+
- [API docs for X]
|
|
70
|
+
- [README section for Y]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. Epic Draft (GitHub/GitLab Milestone)
|
|
74
|
+
|
|
75
|
+
Create the epic/milestone draft:
|
|
76
|
+
|
|
77
|
+
**Epic Template (GitHub):**
|
|
78
|
+
```markdown
|
|
79
|
+
## Epic: [EPIC_NAME]
|
|
80
|
+
|
|
81
|
+
### Milestone Title: [EPIC_NAME]
|
|
82
|
+
|
|
83
|
+
### Description
|
|
84
|
+
[Summary from epic proposal]
|
|
85
|
+
|
|
86
|
+
### Goals
|
|
87
|
+
- [Goal 1]
|
|
88
|
+
- [Goal 2]
|
|
89
|
+
- [Goal 3]
|
|
90
|
+
|
|
91
|
+
### Issues Included
|
|
92
|
+
1. #[issue_number] - [Issue title]
|
|
93
|
+
2. #[issue_number] - [Issue title]
|
|
94
|
+
3. #[issue_number] - [Issue title]
|
|
95
|
+
|
|
96
|
+
### Tracking Issue
|
|
97
|
+
[Reference to tracking issue #X]
|
|
98
|
+
|
|
99
|
+
### Timeline
|
|
100
|
+
- Start: [date]
|
|
101
|
+
- Target Completion: [date]
|
|
102
|
+
|
|
103
|
+
### Success Metrics
|
|
104
|
+
- [Metric 1]
|
|
105
|
+
- [Metric 2]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Epic Template (GitLab):**
|
|
109
|
+
```markdown
|
|
110
|
+
## Epic: [EPIC_NAME]
|
|
111
|
+
|
|
112
|
+
### Labels: [epic, scope:X]
|
|
113
|
+
|
|
114
|
+
### Description
|
|
115
|
+
[Summary from epic proposal]
|
|
116
|
+
|
|
117
|
+
### Child Issues
|
|
118
|
+
- #[issue_number] - [Issue title]
|
|
119
|
+
- #[issue_number] - [Issue title]
|
|
120
|
+
|
|
121
|
+
### Related Epics
|
|
122
|
+
- #[epic_number] - [Related epic]
|
|
123
|
+
|
|
124
|
+
### Milestone
|
|
125
|
+
[Milestone name]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 4. Tracking Issue Draft
|
|
129
|
+
|
|
130
|
+
Create a tracking issue that monitors epic progress:
|
|
131
|
+
|
|
132
|
+
**Tracking Issue Template:**
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Tracking: [EPIC_NAME]
|
|
136
|
+
|
|
137
|
+
### Type: tracking
|
|
138
|
+
|
|
139
|
+
### Purpose
|
|
140
|
+
This issue tracks the overall progress of the [EPIC_NAME] epic.
|
|
141
|
+
|
|
142
|
+
### Issues Checklist
|
|
143
|
+
- [ ] #[issue_1] - [title] - Status: [open/in-progress/review/merged]
|
|
144
|
+
- [ ] #[issue_2] - [title] - Status: [open/in-progress/review/merged]
|
|
145
|
+
- [ ] #[issue_3] - [title] - Status: [open/in-progress/review/merged]
|
|
146
|
+
|
|
147
|
+
### Progress
|
|
148
|
+
- Total Issues: [N]
|
|
149
|
+
- Completed: 0/N (0%)
|
|
150
|
+
- In Progress: 0/N (0%)
|
|
151
|
+
|
|
152
|
+
### Dependencies
|
|
153
|
+
- [External dependency 1]
|
|
154
|
+
- [External dependency 2]
|
|
155
|
+
|
|
156
|
+
### Timeline
|
|
157
|
+
- Start: [date]
|
|
158
|
+
- Current: [date]
|
|
159
|
+
- Target: [date]
|
|
160
|
+
|
|
161
|
+
### Notes
|
|
162
|
+
- [Any important notes about epic execution]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 5. Review Drafts
|
|
166
|
+
|
|
167
|
+
Before creating in git, review all drafts:
|
|
168
|
+
|
|
169
|
+
**Review Checklist:**
|
|
170
|
+
- [ ] All issues have clear acceptance criteria
|
|
171
|
+
- [ ] Dependencies correctly mapped
|
|
172
|
+
- [ ] Scope estimates reasonable
|
|
173
|
+
- [ ] Testing requirements specified
|
|
174
|
+
- [ ] Documentation updates noted
|
|
175
|
+
- [ ] Tracking issue includes all issues
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Output Format
|
|
180
|
+
|
|
181
|
+
Save drafts for review:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
.pi/context/issue-drafts/
|
|
185
|
+
├── epic-draft.md
|
|
186
|
+
├── tracking-issue-draft.md
|
|
187
|
+
├── issue-1-draft.md
|
|
188
|
+
├── issue-2-draft.md
|
|
189
|
+
├── issue-3-draft.md
|
|
190
|
+
└── review-checklist.md
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Git Repository Tool
|
|
196
|
+
|
|
197
|
+
Using `{{REPOTOOL}}`:
|
|
198
|
+
|
|
199
|
+
| Tool | Command Preview |
|
|
200
|
+
|------|-----------------|
|
|
201
|
+
| **gh** | `gh issue create --title "[TITLE]" --body "[BODY]" --label "[LABELS]"` |
|
|
202
|
+
| **glab** | `glab issue create --title "[TITLE]" --description "[BODY]" --label "[LABELS]"` |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Acceptance Criteria
|
|
207
|
+
|
|
208
|
+
- [ ] All issue drafts created with full details
|
|
209
|
+
- [ ] Epic/milestone draft created
|
|
210
|
+
- [ ] Tracking issue draft created
|
|
211
|
+
- [ ] All drafts reviewed and approved
|
|
212
|
+
- [ ] Ready for `/git-issues`
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Next Workflow
|
|
217
|
+
|
|
218
|
+
After draft approval, run: `/git-issues` to create in repository.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Issue Implementation Series Workflow
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Workflow for implementing a series of existing GitHub issues with categorization, batching, and pipeline validation.
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
- GitHub CLI (`gh`) installed and authenticated
|
|
8
|
+
- Access to repository issues
|
|
9
|
+
|
|
10
|
+
## Phases
|
|
11
|
+
|
|
12
|
+
### Phase 1: Fetch Issues
|
|
13
|
+
**Script:** `.pi/scripts/fetch-issues.sh` (or `.pi/scripts/fetch-issues.sh`)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Fetch open issues sorted by priority
|
|
17
|
+
gh issue list --state open --limit 50 --json number,title,labels,body
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Output:** Issues list in `.claude/plans/issues-fetched.json`
|
|
21
|
+
|
|
22
|
+
### Phase 2: Categorize Issues
|
|
23
|
+
**Agent:** `@architecture-coordinator`
|
|
24
|
+
|
|
25
|
+
1. Analyze fetched issues
|
|
26
|
+
2. Group by:
|
|
27
|
+
- **Component:** Same module/files affected
|
|
28
|
+
- **Priority:** Critical > High > Medium > Low
|
|
29
|
+
- **Dependency:** Blocking/Blocked relationships
|
|
30
|
+
3. Create batch groups for feature branches
|
|
31
|
+
|
|
32
|
+
**Output:** `.claude/plans/issue-groups.md`
|
|
33
|
+
|
|
34
|
+
### Grouping Rules
|
|
35
|
+
|
|
36
|
+
| Group Type | Criteria | Branch Naming |
|
|
37
|
+
|------------|----------|---------------|
|
|
38
|
+
| Component batch | Same module (2-5 issues) | `feature/{component}-{issue-range}` |
|
|
39
|
+
| Priority batch | All Critical/High | `priority/critical-{date}` |
|
|
40
|
+
| Related batch | Dependencies linked | `feature/{feature-name}-issues` |
|
|
41
|
+
| Single | No grouping possible | `issue/{issue-number}` |
|
|
42
|
+
|
|
43
|
+
### Phase 3: Plan Batch Implementation
|
|
44
|
+
**Agent:** `@architecture-coordinator`
|
|
45
|
+
|
|
46
|
+
For each group:
|
|
47
|
+
1. Read all issue details
|
|
48
|
+
2. Create combined plan in `.claude/plans/{branch-name}.md`
|
|
49
|
+
3. Determine implementation order (dependencies first)
|
|
50
|
+
4. Define validation requirements per issue
|
|
51
|
+
|
|
52
|
+
### Phase 4: Create Feature Branch
|
|
53
|
+
**Script:** `.pi/scripts/create-feature-branch.sh`
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Create branch from group name
|
|
57
|
+
git checkout -b {branch-name}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Phase 5: Implement Issues (Sequential)
|
|
61
|
+
**Agent:** `@code-developer`
|
|
62
|
+
|
|
63
|
+
For each issue in batch order:
|
|
64
|
+
1. Read issue spec from plan
|
|
65
|
+
2. Implement changes
|
|
66
|
+
3. Run quick validation:
|
|
67
|
+
```bash
|
|
68
|
+
cargo build && cargo test --lib
|
|
69
|
+
```
|
|
70
|
+
4. Commit with reference:
|
|
71
|
+
```bash
|
|
72
|
+
git commit -m "feat: implement #123 - {description}"
|
|
73
|
+
```
|
|
74
|
+
5. Mark issue in progress: `gh issue comment {num} --body "Implementing in {branch}"`
|
|
75
|
+
|
|
76
|
+
### Phase 6: Pre-MR Validation
|
|
77
|
+
**Scripts:** Run automated validators
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Full validation before MR
|
|
81
|
+
.pi/scripts/validate-ci.sh
|
|
82
|
+
.pi/scripts/validate-tests.sh
|
|
83
|
+
.pi/scripts/validate-security.sh
|
|
84
|
+
.pi/scripts/validate-operations.sh
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Gate:** All scripts must PASS
|
|
88
|
+
|
|
89
|
+
### Phase 7: Create MR/PR
|
|
90
|
+
**Script:** `.pi/scripts/create-mr.sh`
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Push and create PR
|
|
94
|
+
git push -u origin {branch-name}
|
|
95
|
+
|
|
96
|
+
gh pr create \
|
|
97
|
+
--title "feat: implement issues {range}" \
|
|
98
|
+
--body "$(cat .claude/plans/{branch-name}-pr-body.md)" \
|
|
99
|
+
--base main
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Phase 8: MR Validation Workflow
|
|
103
|
+
**Agent:** `@architecture-coordinator`
|
|
104
|
+
|
|
105
|
+
Run MR validation sequence:
|
|
106
|
+
|
|
107
|
+
1. **Automated CI:** Wait for GitHub Actions to complete
|
|
108
|
+
2. **Architecture check:** Run architecture-validator
|
|
109
|
+
3. **Security check:** Run security-validator
|
|
110
|
+
4. **Integration check:** Run integration-validator
|
|
111
|
+
|
|
112
|
+
**Gate:** All checks green
|
|
113
|
+
|
|
114
|
+
### Phase 9: Address MR Feedback
|
|
115
|
+
If checks fail:
|
|
116
|
+
1. Read failure logs
|
|
117
|
+
2. Fix issues (not bypass)
|
|
118
|
+
3. Push fixes
|
|
119
|
+
4. Re-run validation
|
|
120
|
+
|
|
121
|
+
**Max retries:** 3
|
|
122
|
+
|
|
123
|
+
### Phase 10: Merge
|
|
124
|
+
**Script:** `.pi/scripts/merge-mr.sh`
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Merge when green
|
|
128
|
+
gh pr merge --squash --delete-branch
|
|
129
|
+
|
|
130
|
+
# Close implemented issues
|
|
131
|
+
for issue in {issue-list}; do
|
|
132
|
+
gh issue close $issue --comment "Implemented in #{pr-number}"
|
|
133
|
+
done
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Phase 11: Next Batch
|
|
137
|
+
Return to Phase 3 for next group.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Scripts Required
|
|
142
|
+
|
|
143
|
+
| Script | Purpose |
|
|
144
|
+
|--------|---------|
|
|
145
|
+
| `fetch-issues.sh` | Fetch open issues from GitHub |
|
|
146
|
+
| `categorize-issues.sh` | Group issues by component/priority |
|
|
147
|
+
| `create-feature-branch.sh` | Create branch from group |
|
|
148
|
+
| `create-mr.sh` | Create PR with body template |
|
|
149
|
+
| `merge-mr.sh` | Merge PR and close issues |
|
|
150
|
+
| `mr-validation.sh` | Run all MR checks |
|
|
151
|
+
|
|
152
|
+
## Issue Status Tracking
|
|
153
|
+
|
|
154
|
+
| State | Action |
|
|
155
|
+
|-------|--------|
|
|
156
|
+
| Open | Fetched, waiting implementation |
|
|
157
|
+
| In Progress | Comment added, branch created |
|
|
158
|
+
| Implemented | Code done, PR created |
|
|
159
|
+
| Closed | Merged, issue resolved |
|
|
160
|
+
|
|
161
|
+
## Deterministic Checks (Pipeline Must Be Green)
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Before MR
|
|
165
|
+
cargo build
|
|
166
|
+
cargo test --all
|
|
167
|
+
cargo clippy -- -D warnings
|
|
168
|
+
cargo fmt --check
|
|
169
|
+
cargo audit
|
|
170
|
+
|
|
171
|
+
# MR pipeline
|
|
172
|
+
.ci/pipeline.sh # or equivalent
|
|
173
|
+
```
|