Skip to content

Commit ce3ab41

Browse files
committed
feat(v6.2.0): Review Gate Engine - Complete Implementation
MUSUBI v6.2.0 Review Gate Engine の完全実装 ## New Features - Review Gate Engine (Requirements, Design, Implementation gates) - Workflow Dashboard with progress visualization - Traceability auto-extraction and gap detection - Constitutional Compliance with Phase -1 Gate - Error Recovery Handler - Rollback Manager (4 granularity levels) - CI Reporter for GitHub Actions - Steering Sync for version updates - Experiment Report Generator - Tech Article Generator (Qiita, Zenn, Medium, Dev.to) ## New Prompts - #sdd-review-requirements <feature> - #sdd-review-design <feature> - #sdd-review-implementation <feature> - #sdd-review-all <feature> ## Test Results - 4,827 tests passing - 159 test suites - All 26 implementation tasks completed ## Documentation - User Guide (Japanese) - API Reference - ADR documents Constitutional: Article III (Test-First), Article VI (Traceability) Requirement: IMP-6.2-001 through IMP-6.2-008
1 parent d289e36 commit ce3ab41

49 files changed

Lines changed: 17434 additions & 144 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# MUSUBI Constitutional Compliance Check
2+
#
3+
# This workflow runs Constitutional compliance checks on pull requests
4+
# to enforce MUSUBI's governance rules.
5+
#
6+
# Requirement: IMP-6.2-005-03
7+
8+
name: Constitutional Compliance
9+
10+
on:
11+
pull_request:
12+
branches: [main, develop]
13+
push:
14+
branches: [main, develop]
15+
16+
jobs:
17+
constitutional-check:
18+
name: Constitutional Check
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
33+
- name: Install Dependencies
34+
run: npm ci
35+
36+
- name: Get Changed Files
37+
id: changed-files
38+
uses: tj-actions/changed-files@v45
39+
with:
40+
files: |
41+
src/**/*.js
42+
src/**/*.ts
43+
lib/**/*.js
44+
lib/**/*.ts
45+
46+
- name: Run Constitutional Check
47+
if: steps.changed-files.outputs.any_changed == 'true'
48+
id: constitutional
49+
run: |
50+
node -e "
51+
const { CIReporter, OUTPUT_FORMAT } = require('./src/constitutional');
52+
const reporter = new CIReporter({ format: 'github' });
53+
const files = '${{ steps.changed-files.outputs.all_changed_files }}'.split(' ').filter(f => f);
54+
if (files.length === 0) {
55+
console.log('No files to check');
56+
process.exit(0);
57+
}
58+
reporter.runAndReport(files, { format: OUTPUT_FORMAT.GITHUB })
59+
.then(result => {
60+
console.log(result.report);
61+
process.exit(result.exitCode);
62+
})
63+
.catch(err => {
64+
console.error('Error:', err);
65+
process.exit(2);
66+
});
67+
"
68+
69+
- name: No Files Changed
70+
if: steps.changed-files.outputs.any_changed != 'true'
71+
run: echo "No source files changed, skipping constitutional check"
72+
73+
- name: Upload Report
74+
if: always() && steps.changed-files.outputs.any_changed == 'true'
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: constitutional-report
78+
path: storage/constitutional/
79+
if-no-files-found: ignore
80+
81+
phase-minus-one-gate:
82+
name: Phase -1 Gate Check
83+
needs: constitutional-check
84+
if: failure()
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v4
90+
91+
- name: Setup Node.js
92+
uses: actions/setup-node@v4
93+
with:
94+
node-version: '20'
95+
cache: 'npm'
96+
97+
- name: Install Dependencies
98+
run: npm ci
99+
100+
- name: Create Phase -1 Gate Issue
101+
uses: actions/github-script@v7
102+
with:
103+
script: |
104+
const title = `Phase -1 Gate Review Required: PR #${context.payload.pull_request?.number || 'N/A'}`;
105+
const body = `
106+
## Phase -1 Gate Review Required
107+
108+
Constitutional violations were detected in this PR that require System Architect review.
109+
110+
**PR:** #${context.payload.pull_request?.number || 'N/A'}
111+
**Branch:** ${context.ref}
112+
**Author:** @${context.actor}
113+
114+
### Required Actions
115+
1. Review the Constitutional violations in the workflow logs
116+
2. Either approve the changes with justification, or request changes
117+
118+
### Reviewers
119+
Please assign a System Architect to review this gate.
120+
121+
---
122+
*This issue was automatically created by MUSUBI Constitutional Compliance Check*
123+
`;
124+
125+
// Only create issue on actual PRs
126+
if (context.payload.pull_request) {
127+
await github.rest.issues.create({
128+
owner: context.repo.owner,
129+
repo: context.repo.repo,
130+
title,
131+
body,
132+
labels: ['phase-minus-one', 'constitutional-review', 'needs-review']
133+
});
134+
}

AGENTS.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ This project uses **MUSUBI** (Ultimate Specification Driven Development).
1616
- `#sdd-implement <feature>` - Execute implementation
1717
- `#sdd-validate <feature>` - Validate constitutional compliance
1818

19+
### Review Prompts (v6.2.0)
20+
21+
- `#sdd-review-requirements <feature>` - Review requirements document (EARS format, stakeholder coverage, acceptance criteria)
22+
- `#sdd-review-design <feature>` - Review design document (C4 model, ADR, Constitutional Articles)
23+
- `#sdd-review-implementation <feature>` - Review implementation (test coverage, code quality, traceability)
24+
- `#sdd-review-all <feature>` - Full review cycle (requirements → design → implementation)
25+
1926
### Project Memory
2027

2128
- `steering/structure.md` - Architecture patterns
@@ -32,5 +39,5 @@ This project uses **MUSUBI** (Ultimate Specification Driven Development).
3239
---
3340

3441
**Agent**: GitHub Copilot
35-
**Initialized**: 2025-12-24
36-
**MUSUBI Version**: 0.1.0
42+
**Initialized**: 2025-12-26
43+
**MUSUBI Version**: 6.2.0

CHANGELOG.md

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,106 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [6.2.0] - 2025-12-27
8+
## [6.2.0] - 2025-12-31
99

1010
### Added
1111

12+
#### Review Gate Engine (Phase 1 - Sprint 9)
13+
14+
- **Review Gate Library** (`lib/musubi-review-gate`):
15+
- TypeScript library for managing review workflows
16+
- GATE_TYPE enum: requirements, design, implementation, release
17+
- GATE_STATUS: pending, approved, rejected, waived
18+
- REVIEW_DECISION: approve, reject, request_changes, waive
19+
- Approval rules with minimum approvers and required roles
20+
- Auto-expiration support for pending reviews
21+
22+
- **Review Gate Store**:
23+
- In-memory storage with save/load persistence
24+
- Filter and query capabilities
25+
- Automatic ID generation
26+
27+
#### Dashboard & Traceability (Phase 2 - Sprint 10)
28+
29+
- **Workflow Dashboard** (`src/dashboard/workflow-dashboard.js`):
30+
- Real-time workflow state tracking
31+
- Feature lifecycle management (requirements → design → tasks → implement → validate)
32+
- Progress calculation and visualization
33+
- Blocker management with priority levels
34+
- Timeline event tracking
35+
36+
- **Traceability Engine** (`src/traceability/traceability-engine.js`):
37+
- Requirement ID pattern extraction (REQ-XXX-NNN format)
38+
- Bidirectional link management (forward/backward)
39+
- Coverage matrix generation
40+
- Orphan detection for unlinked items
41+
- Source type support: requirement, design, task, code, test
42+
43+
- **CLI Review Command** (`src/cli/review-commands.js`):
44+
- `musubi review create` - Create review gates
45+
- `musubi review submit` - Submit reviews
46+
- `musubi review status` - Check gate status
47+
- `musubi review list` - List gates with filters
48+
49+
#### Constitutional Compliance (Phase 3 - Sprint 11)
50+
51+
- **Constitutional Checker** (`src/constitutional/checker.js`):
52+
- Article I-IX compliance validation
53+
- Severity levels: CRITICAL, HIGH, MEDIUM, LOW
54+
- File-level and project-level checking
55+
- Block decision logic for Phase -1 Gate trigger
56+
- Configurable thresholds (maxFileLines, maxFunctionLines, maxDependencies)
57+
58+
- **Phase -1 Gate** (`src/constitutional/phase-minus-one.js`):
59+
- Automatic trigger for Article VII/VIII violations
60+
- Multi-reviewer workflow (required + optional reviewers)
61+
- Waiver support with justification
62+
- Notification generation for reviewers
63+
64+
- **Steering Sync** (`src/constitutional/steering-sync.js`):
65+
- Auto-sync steering files on version updates
66+
- Consistency checking between files
67+
- Backup before updates
68+
- Version tracking in project.yml, product.md, tech.md, structure.md
69+
70+
- **CI Reporter** (`src/constitutional/ci-reporter.js`):
71+
- OUTPUT_FORMAT: TEXT, JSON, GITHUB, JUNIT
72+
- GitHub Actions annotations support
73+
- Exit codes: SUCCESS (0), WARNINGS (0), FAILURES (1), ERROR (2)
74+
75+
- **GitHub Actions Workflow** (`.github/workflows/constitutional-check.yml`):
76+
- PR and push triggered constitutional checks
77+
- Automatic Phase -1 Gate issue creation on violations
78+
79+
#### Enterprise Features (Phase 4 - Sprint 12)
80+
81+
- **Experiment Report Generator** (`src/enterprise/experiment-report.js`):
82+
- Generate reports from Jest test results
83+
- REPORT_FORMAT: MARKDOWN, HTML, JSON
84+
- Performance metrics extraction
85+
- Observations and conclusions support
86+
87+
- **Tech Article Generator** (`src/enterprise/tech-article.js`):
88+
- Multi-platform support: Qiita, Zenn, Medium, Dev.to
89+
- Front matter generation per platform
90+
- Code examples with syntax highlighting
91+
- Table of contents generation
92+
- Word count and reading time estimation
93+
94+
- **Error Recovery Handler** (`src/enterprise/error-recovery.js`):
95+
- ERROR_CATEGORY: test-failure, validation-error, build-error, etc.
96+
- RECOVERY_ACTION: fix-code, update-test, install-deps, rollback
97+
- Root cause analysis with pattern matching
98+
- Remediation step generation
99+
100+
- **Rollback Manager** (`src/enterprise/rollback-manager.js`):
101+
- ROLLBACK_LEVEL: file, commit, stage, sprint
102+
- Checkpoint creation with file backup
103+
- Confirmation workflow support
104+
- Git integration (optional)
105+
106+
### Enhanced
107+
12108
- **Requirements Reviewer Skill** (`requirements-reviewer`):
13109
- Systematic requirements review using Fagan Inspection (6-phase formal review)
14110
- Perspective-Based Reading (PBR) with 5 perspectives: User, Developer, Tester, Architect, Security

0 commit comments

Comments
 (0)