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,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Module architecture documentation and canonical references'
|
|
3
|
+
applyTo: 'src/**/*.ts,src/**/*.js,src/**/*.tsx,src/**/*.jsx'
|
|
4
|
+
---
|
|
5
|
+
<!--
|
|
6
|
+
Canonical Reference: .pi/github/instructions/architecture.instructions.md
|
|
7
|
+
Blueprint Source: Guardian Framework v1.2
|
|
8
|
+
DO NOT EDIT DIRECTLY - Source: .pi/architecture/modules/
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
# Architecture Implementation Guidelines
|
|
12
|
+
|
|
13
|
+
## Required Header Format
|
|
14
|
+
|
|
15
|
+
Every source file must include a canonical reference header:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
/**
|
|
19
|
+
* Canonical Reference: .pi/architecture/modules/[module-name].md#[section]
|
|
20
|
+
* Implements: [what this file implements from architecture]
|
|
21
|
+
* Module: [module this belongs to]
|
|
22
|
+
* Last Sync: [date from CHANGELOG.md]
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
// Rest of file...
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Architecture Module Reference
|
|
29
|
+
|
|
30
|
+
Before implementing, read the architecture module documentation:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# View architecture for a module
|
|
34
|
+
cat .pi/architecture/modules/[module-name].md
|
|
35
|
+
|
|
36
|
+
# Check for pending changes
|
|
37
|
+
grep "Status.*pending" .pi/architecture/CHANGELOG.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Module Structure
|
|
41
|
+
|
|
42
|
+
Each architecture module defines:
|
|
43
|
+
- **Components**: What files implement this module
|
|
44
|
+
- **Data Flow**: How data moves through the module
|
|
45
|
+
- **Dependencies**: What other modules it uses
|
|
46
|
+
- **Security**: Security considerations
|
|
47
|
+
- **Testing**: Test requirements
|
|
48
|
+
|
|
49
|
+
## Implementation Checklist
|
|
50
|
+
|
|
51
|
+
When implementing from architecture:
|
|
52
|
+
1. [ ] Read architecture module doc
|
|
53
|
+
2. [ ] Check CHANGELOG for pending changes
|
|
54
|
+
3. [ ] Add canonical reference header
|
|
55
|
+
4. [ ] Follow patterns from module doc
|
|
56
|
+
5. [ ] Implement security requirements
|
|
57
|
+
6. [ ] Add tests per requirements
|
|
58
|
+
7. [ ] Run validate-canonical.sh
|
|
59
|
+
|
|
60
|
+
## Validation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Check canonical reference coverage
|
|
64
|
+
bash .pi/scripts/validate-canonical.sh
|
|
65
|
+
|
|
66
|
+
# Expected: ≥50% coverage, all refs valid
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
*Reference: .pi/architecture/modules/*.md*
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Validation and quality gate requirements'
|
|
3
|
+
applyTo: '.pi/scripts/*.sh,tests/**/*,scripts/**/*'
|
|
4
|
+
---
|
|
5
|
+
<!--
|
|
6
|
+
Canonical Reference: .pi/github/instructions/validation.instructions.md
|
|
7
|
+
Blueprint Source: Guardian Framework v1.2
|
|
8
|
+
DO NOT EDIT DIRECTLY - Source: .pi/scripts/
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
# Validation Guidelines
|
|
12
|
+
|
|
13
|
+
## Scope-Based Validators
|
|
14
|
+
|
|
15
|
+
| Scope | Required Validators |
|
|
16
|
+
|-------|---------------------|
|
|
17
|
+
| Simple | CI + Canonical |
|
|
18
|
+
| Moderate | CI + Architecture + Canonical |
|
|
19
|
+
| Complex | CI + Architecture + Security + Canonical |
|
|
20
|
+
| Critical | All validators + human approval |
|
|
21
|
+
|
|
22
|
+
## Validator Scripts
|
|
23
|
+
|
|
24
|
+
### CI Validator (always required)
|
|
25
|
+
```bash
|
|
26
|
+
bash .pi/scripts/validate-ci.sh
|
|
27
|
+
```
|
|
28
|
+
Checks: Build, tests, lint, format, audit
|
|
29
|
+
|
|
30
|
+
### Architecture Validator (moderate+)
|
|
31
|
+
```bash
|
|
32
|
+
bash .pi/scripts/validate-architecture.sh
|
|
33
|
+
```
|
|
34
|
+
Checks: Layer structure, module boundaries, circular deps
|
|
35
|
+
|
|
36
|
+
### Security Validator (complex+)
|
|
37
|
+
```bash
|
|
38
|
+
bash .pi/scripts/validate-security.sh
|
|
39
|
+
```
|
|
40
|
+
Checks: Secrets, injection, path traversal
|
|
41
|
+
|
|
42
|
+
### Canonical Validator (always required)
|
|
43
|
+
```bash
|
|
44
|
+
bash .pi/scripts/validate-canonical.sh
|
|
45
|
+
```
|
|
46
|
+
Checks: Reference integrity, coverage ≥50%, architecture sync
|
|
47
|
+
|
|
48
|
+
## Validation Workflow
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Always run these
|
|
52
|
+
bash .pi/scripts/validate-ci.sh
|
|
53
|
+
bash .pi/scripts/validate-canonical.sh
|
|
54
|
+
|
|
55
|
+
# Scope determines additional validators
|
|
56
|
+
# Check scope: grep "scope:" .pi/INDEX.md
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Pre-Commit Checklist
|
|
60
|
+
|
|
61
|
+
- [ ] CI validator passes
|
|
62
|
+
- [ ] Canonical validator passes
|
|
63
|
+
- [ ] Coverage ≥50%
|
|
64
|
+
- [ ] Architecture CHANGELOG checked
|
|
65
|
+
- [ ] Scope-appropriate validators run
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
*Reference: .pi/scripts/validate-*.sh*
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Phase A: Planning Workflow
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Turn a goal into a bounded execution packet with validators and CI gates identified. This is the first workflow for every new epic.
|
|
5
|
+
|
|
6
|
+
## Primary Agent
|
|
7
|
+
- **Architecture Coordinator** (owner)
|
|
8
|
+
- **Architecture Validator** (mandatory review)
|
|
9
|
+
- **Security Validator** (conditional review)
|
|
10
|
+
- **Operations Validator** (conditional review)
|
|
11
|
+
|
|
12
|
+
## Workflow Steps
|
|
13
|
+
|
|
14
|
+
### Step 1: Stream Classification
|
|
15
|
+
Classify the goal into one of: **feature**, **hardening**, **migration**, or **control**.
|
|
16
|
+
|
|
17
|
+
### Step 2: Scope Boundaries
|
|
18
|
+
Define explicit in-scope and out-of-scope boundaries. List impacted layers/modules.
|
|
19
|
+
|
|
20
|
+
### Step 3: Dependency Graph
|
|
21
|
+
Map execution order. Identify blocked work, parallel-safe work, and the first issue.
|
|
22
|
+
|
|
23
|
+
### Step 4: Risk Classification
|
|
24
|
+
Assign low/medium/high with justification.
|
|
25
|
+
|
|
26
|
+
### Step 5: Validator Assignment
|
|
27
|
+
- Architecture Validator: always
|
|
28
|
+
- Security Validator: if security-impacting
|
|
29
|
+
- Operations Validator: if operations-impacting
|
|
30
|
+
|
|
31
|
+
### Step 6: CI Gate Selection
|
|
32
|
+
Select applicable gates: docs_policy, architecture_conformance, lint, static_analysis, unit, integration, security, migration_verify, release_readiness.
|
|
33
|
+
|
|
34
|
+
## Output: Planning Packet
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## Stream classification
|
|
38
|
+
## Scope summary
|
|
39
|
+
## In scope
|
|
40
|
+
## Out of scope
|
|
41
|
+
## Impacted layers
|
|
42
|
+
## Risk classification
|
|
43
|
+
## Dependency graph
|
|
44
|
+
## Mandatory validators
|
|
45
|
+
## Mandatory CI gates
|
|
46
|
+
## Forbidden shortcuts
|
|
47
|
+
## First implementation issue recommendation
|
|
48
|
+
## Open questions / escalation items
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Deterministic Validation
|
|
52
|
+
```bash
|
|
53
|
+
python scripts/ci/check_planning_packet.py --input=planning_packet.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Done Criteria
|
|
57
|
+
- [ ] Scope bounded and explicit
|
|
58
|
+
- [ ] All impacted layers identified
|
|
59
|
+
- [ ] Risk classification explicit
|
|
60
|
+
- [ ] Dependency graph clear
|
|
61
|
+
- [ ] Validators assigned
|
|
62
|
+
- [ ] CI gates identified
|
|
63
|
+
- [ ] First issue clear
|
|
64
|
+
- [ ] Deterministic validation passes
|
|
65
|
+
- [ ] Architecture validation passes
|
|
66
|
+
|
|
67
|
+
## Next Phase
|
|
68
|
+
**→ Phase B: Issue Generation** (Issue Factory)
|
|
69
|
+
|
|
70
|
+
## Related Documents
|
|
71
|
+
- `.pi/agents/architecture-coordinator.md`
|
|
72
|
+
- `.pi/agents/architecture-validator.md`
|
|
73
|
+
- `.pi/agents/security-validator.md`
|
|
74
|
+
- `.pi/agents/operations-validator.md`
|
|
75
|
+
- `.pi/context/domain-workflow.md`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Phase B: Issue Generation Workflow
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Convert an approved planning packet into an epic + issue set that are independently reviewable.
|
|
5
|
+
|
|
6
|
+
## Primary Agent
|
|
7
|
+
- **Issue Factory** (owner)
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
- Approved planning packet from Phase A
|
|
11
|
+
- Valid planning packet check: pass
|
|
12
|
+
- Architecture validation: pass
|
|
13
|
+
|
|
14
|
+
## Workflow Steps
|
|
15
|
+
|
|
16
|
+
### Step 1: Validate Planning Packet
|
|
17
|
+
Check scope is bounded, dependencies are clear, validators assigned, CI gates identified. If contradictions exist, return to Architecture Coordinator.
|
|
18
|
+
|
|
19
|
+
### Step 2: Create Issues
|
|
20
|
+
For each work unit, produce one issue with:
|
|
21
|
+
- Single outcome and owner
|
|
22
|
+
- Clear acceptance criteria
|
|
23
|
+
- Verification criteria
|
|
24
|
+
- Canonical references
|
|
25
|
+
|
|
26
|
+
**Issue breakdown pattern (feature stream):**
|
|
27
|
+
1. Contract issue — domain/API contracts first
|
|
28
|
+
2. Schema/Config issue — migrations, indexes, config
|
|
29
|
+
3. Service issue — repositories, adapters
|
|
30
|
+
4. Handler/Runtime issue — business logic, workers
|
|
31
|
+
5. Verification issue — tests, conformance
|
|
32
|
+
6. Rollout/Runbook issue — ops, monitoring
|
|
33
|
+
|
|
34
|
+
### Step 3: Dependency Ordering
|
|
35
|
+
Order by: contract → schema → service → handler → verification → rollout.
|
|
36
|
+
|
|
37
|
+
### Step 4: Issue Boundary Check
|
|
38
|
+
Each issue must have: one primary outcome, one owner, clear ACs, out-of-scope explicit, canonical references, independently reviewable.
|
|
39
|
+
|
|
40
|
+
## Output: Issue Set
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Issues (in dependency order)
|
|
44
|
+
- Issue 1: <title>
|
|
45
|
+
- Issue 2: <title>
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
## Labels
|
|
49
|
+
- risk::<level>
|
|
50
|
+
- layer::<layers>
|
|
51
|
+
- type::<feature|hardening|migration>
|
|
52
|
+
|
|
53
|
+
## First implementation issue
|
|
54
|
+
- Issue 1: <title>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Done Criteria
|
|
58
|
+
- [ ] All issues independently reviewable
|
|
59
|
+
- [ ] Acceptance criteria clear
|
|
60
|
+
- [ ] Verification criteria clear
|
|
61
|
+
- [ ] Dependency order correct
|
|
62
|
+
- [ ] First implementation issue identified
|
|
63
|
+
|
|
64
|
+
## Next Phase
|
|
65
|
+
**→ Phase C: Implementation** (Bootstrap Implementer)
|
|
66
|
+
|
|
67
|
+
## Related Documents
|
|
68
|
+
- `.pi/agents/issue-factory.md`
|
|
69
|
+
- `.pi/prompts/issue-template-set.md`
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Phase C: Implementation Workflow
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Execute ONE issue at a time with strict acceptance-criteria closure and minimal drift.
|
|
5
|
+
|
|
6
|
+
## Primary Agent
|
|
7
|
+
- **Bootstrap Implementer** (owner)
|
|
8
|
+
- **Architecture Validator** (post-implementation validation)
|
|
9
|
+
|
|
10
|
+
## Input
|
|
11
|
+
- Single assigned issue from Phase B
|
|
12
|
+
- Planning packet (scope context)
|
|
13
|
+
- Dependency status
|
|
14
|
+
|
|
15
|
+
## Workflow Steps
|
|
16
|
+
|
|
17
|
+
### Step 1: Readiness Check
|
|
18
|
+
Verify: epic exists, issue exists, dependencies satisfied, issue is implementation-ready.
|
|
19
|
+
|
|
20
|
+
### Step 2: Acceptance Criteria Trace Map
|
|
21
|
+
Before coding, create a trace map: each criterion → files to change → evidence → validation command.
|
|
22
|
+
|
|
23
|
+
### Step 3: Validation Path Selection
|
|
24
|
+
Classify the issue:
|
|
25
|
+
- **Config-only** — changes limited to config, CI wiring, or docs
|
|
26
|
+
- **Application** — any change to source code, contracts, or runtime behavior
|
|
27
|
+
- **Mixed** — both
|
|
28
|
+
|
|
29
|
+
Run the applicable validation path:
|
|
30
|
+
```bash
|
|
31
|
+
# Config-only path
|
|
32
|
+
bash scripts/ci/check_config.sh
|
|
33
|
+
|
|
34
|
+
# Application path
|
|
35
|
+
./scripts/ci/run_preflight.sh --staged --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Step 4: Implementation
|
|
39
|
+
For each acceptance criterion:
|
|
40
|
+
1. Create feature branch
|
|
41
|
+
2. Read canonical references
|
|
42
|
+
3. Implement minimum to satisfy AC
|
|
43
|
+
4. Write tests
|
|
44
|
+
5. Run validation command
|
|
45
|
+
|
|
46
|
+
### Step 5: Toolchain Validation
|
|
47
|
+
Run the blocking validation path selected in Step 3.
|
|
48
|
+
|
|
49
|
+
### Step 6: Evidence Collection
|
|
50
|
+
For each AC, collect: file paths changed, tests written/passed, commands run, output.
|
|
51
|
+
|
|
52
|
+
### Step 7: Implementation Report
|
|
53
|
+
Produce report with: readiness check, AC trace map, files changed, validation results, done/not-done per AC.
|
|
54
|
+
|
|
55
|
+
## Output: Implementation Report
|
|
56
|
+
- Readiness check
|
|
57
|
+
- Acceptance criteria trace map
|
|
58
|
+
- Files changed
|
|
59
|
+
- Tests and CI impacts
|
|
60
|
+
- Toolchain validation results
|
|
61
|
+
- Done / not done against acceptance criteria
|
|
62
|
+
- Evidence produced
|
|
63
|
+
|
|
64
|
+
## Done Criteria
|
|
65
|
+
- [ ] All acceptance criteria met
|
|
66
|
+
- [ ] Evidence collected for each AC
|
|
67
|
+
- [ ] Correct validation path selected
|
|
68
|
+
- [ ] Toolchain validation passes
|
|
69
|
+
- [ ] Tests written and passing
|
|
70
|
+
- [ ] Documentation updated
|
|
71
|
+
- [ ] Implementation report ready for validator
|
|
72
|
+
|
|
73
|
+
## Next Phase
|
|
74
|
+
**→ Phase D: Validation** (Architecture Validator)
|
|
75
|
+
**→ Next Issue** (if more issues in epic)
|
|
76
|
+
|
|
77
|
+
## Related Documents
|
|
78
|
+
- `.pi/agents/bootstrap-implementer.md`
|
|
79
|
+
- `.pi/agents/architecture-validator.md`
|
|
80
|
+
- `.pi/prompts/issue-template-set.md`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Phase D: Validation Workflow
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Verify issue/epic output against architecture and release policy before merge. Runs after each implemented issue and before epic close.
|
|
5
|
+
|
|
6
|
+
## Primary Agents
|
|
7
|
+
- **Architecture Validator** (owner)
|
|
8
|
+
- **Security Validator** (if security-impacting)
|
|
9
|
+
- **Operations Validator** (if operations-impacting)
|
|
10
|
+
|
|
11
|
+
## Workflow Steps
|
|
12
|
+
|
|
13
|
+
### Step 1: Validation Path Selection
|
|
14
|
+
Classify the issue (config-only / application / mixed) and run the applicable validation:
|
|
15
|
+
```bash
|
|
16
|
+
python scripts/ci/validate_agent_output.py --input=implementation_report.md --schema=architecture-validator
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Step 2: Read Implementation
|
|
20
|
+
Review: implementation diff, implementation report, acceptance criteria, canonical references, validation path evidence.
|
|
21
|
+
|
|
22
|
+
### Step 3: Architecture Validation
|
|
23
|
+
Check: artifact classification, section references, scope-fit, evidence precision, acceptance criteria evaluation, contradiction detection.
|
|
24
|
+
|
|
25
|
+
### Step 4: Security Validation (if applicable)
|
|
26
|
+
Check: tenant isolation preserved, auth boundaries maintained, secrets handled correctly, no security regressions.
|
|
27
|
+
|
|
28
|
+
### Step 5: Operations Validation (if applicable)
|
|
29
|
+
Check: observability added, runbooks updated, rollback path clear, SLOs defined.
|
|
30
|
+
|
|
31
|
+
### Step 6: CI Verification
|
|
32
|
+
Run applicable pipeline stages.
|
|
33
|
+
|
|
34
|
+
## Output: Validation Summary
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## Overall Validation Status
|
|
38
|
+
- pass | pass_with_recommendations | fail
|
|
39
|
+
|
|
40
|
+
## Validator Decisions
|
|
41
|
+
- Architecture: <decision>
|
|
42
|
+
- Security: <decision or N/A>
|
|
43
|
+
- Operations: <decision or N/A>
|
|
44
|
+
|
|
45
|
+
## Blocking Findings
|
|
46
|
+
## Non-Blocking Recommendations
|
|
47
|
+
## Required Follow-up
|
|
48
|
+
## Merge Authorization
|
|
49
|
+
- [ ] Architecture validator: APPROVED
|
|
50
|
+
- [ ] Security validator: APPROVED (if applicable)
|
|
51
|
+
- [ ] Operations validator: APPROVED (if applicable)
|
|
52
|
+
- [ ] CI pipeline: PASSED
|
|
53
|
+
- [ ] Ready to merge
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Done Criteria
|
|
57
|
+
- [ ] All validators pass
|
|
58
|
+
- [ ] Correct validation path selected
|
|
59
|
+
- [ ] All CI gates pass
|
|
60
|
+
- [ ] No blocking findings
|
|
61
|
+
- [ ] Follow-up issues created (if needed)
|
|
62
|
+
- [ ] Ready to merge
|
|
63
|
+
|
|
64
|
+
## Related Documents
|
|
65
|
+
- `.pi/agents/architecture-validator.md`
|
|
66
|
+
- `.pi/agents/security-validator.md`
|
|
67
|
+
- `.pi/agents/operations-validator.md`
|
|
68
|
+
- `scripts/ci/validate_agent_output.py`
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"timestamp": "2026-06-29T22:16:25Z",
|
|
3
|
+
"mode": "all",
|
|
4
|
+
"stages_run": [],
|
|
5
|
+
"summary": {
|
|
6
|
+
"total": 14,
|
|
7
|
+
"passed": 1,
|
|
8
|
+
"failed": 1,
|
|
9
|
+
"skipped": 12
|
|
10
|
+
},
|
|
11
|
+
"duration_seconds": 0,
|
|
12
|
+
"results": [
|
|
13
|
+
{
|
|
14
|
+
"name": "check_mr_traceability.sh",
|
|
15
|
+
"status": "skip",
|
|
16
|
+
"message": "script not found",
|
|
17
|
+
"duration": 0
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "check_docs_sync.sh",
|
|
21
|
+
"status": "skip",
|
|
22
|
+
"message": "script not found",
|
|
23
|
+
"duration": 0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "check_architecture_conformance.sh",
|
|
27
|
+
"status": "skip",
|
|
28
|
+
"message": "script not found",
|
|
29
|
+
"duration": 0
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "lint",
|
|
33
|
+
"status": "skip",
|
|
34
|
+
"message": "no project configuration found",
|
|
35
|
+
"duration": 0
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "type_check",
|
|
39
|
+
"status": "skip",
|
|
40
|
+
"message": "no type checker available",
|
|
41
|
+
"duration": 0
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "check_arch_sanity.sh",
|
|
45
|
+
"status": "skip",
|
|
46
|
+
"message": "script not found",
|
|
47
|
+
"duration": 0
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "check_import_boundaries.sh",
|
|
51
|
+
"status": "skip",
|
|
52
|
+
"message": "script not found",
|
|
53
|
+
"duration": 0
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "cargo test --lib",
|
|
57
|
+
"status": "fail",
|
|
58
|
+
"message": "unit test failures",
|
|
59
|
+
"duration": 0
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "integration",
|
|
63
|
+
"status": "skip",
|
|
64
|
+
"message": "PostgreSQL or Redis not available",
|
|
65
|
+
"duration": 0
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "secret_scan",
|
|
69
|
+
"status": "pass",
|
|
70
|
+
"message": "",
|
|
71
|
+
"duration": 0
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "dependency_audit",
|
|
75
|
+
"status": "skip",
|
|
76
|
+
"message": "no package manager audit tool found",
|
|
77
|
+
"duration": 0
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "migration_verify",
|
|
81
|
+
"status": "skip",
|
|
82
|
+
"message": "PostgreSQL not available",
|
|
83
|
+
"duration": 0
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "package_build",
|
|
87
|
+
"status": "skip",
|
|
88
|
+
"message": "no Dockerfile found",
|
|
89
|
+
"duration": 0
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "validate-architecture-readiness.sh",
|
|
93
|
+
"status": "skip",
|
|
94
|
+
"message": "script not found",
|
|
95
|
+
"duration": 0
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"status": "fail"
|
|
99
|
+
}
|