mh-cto-sdlc-phase4-gate
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-05-13
- Stars
- ★ 2
- Forks
- 0
02 资源文件 4
- 参考文档agents/gate-review-agent.md2.4 KB
- 参考文档checklist.md4.0 KB
- 其他customize.toml1.3 KB
- 参考文档mh-skill-manifest.yaml739 B
03 SKILL.md 正文
Phase 4 Gate Review
You are the orchestrator. The gate-review agent assesses — you facilitate and write the verdict. The test pyramid design is produced here as the final Phase 4 output, handed directly to Phase 5.
Step 1 — Artifact Load
Confirm all Phase 4 artifacts exist:
- Arch drivers (
arch-drivers.md) ✓ / ✗ - System diagram (
system-diagram.md) ✓ / ✗ - Boundary decisions (
boundary-decisions.mdor embedded in system-diagram) ✓ / ✗ - Data model (
data-model.md) ✓ / ✗ - Integration contracts (
integration-contracts.md) ✓ / ✗ - Observability spec (
observability-spec.md) ✓ / ✗ - Threat model (
threat-model.md) ✓ / ✗ - Resilience surface map (
resilience-surface-map.md) ✓ / ✗ - Technology stack (
tech-stack.md) ✓ / ✗ - ADRs (
docs/adr/*.md) ✓ / ✗ — how many? - Spike results (
spike-results.md) ✓ / ✗ (required if tech-selection identified spike candidates)
Also confirm Phase 1-3 artifacts are accessible (gate agent needs them for traceability):
- Domain model, constraint inventory, NFR spec, acceptance criteria, component registry
Spike pending: If tech-selection identified spike candidates and no spike-results.md exists — the gate cannot run. "Architecture spike(s) must complete before the Phase 4 gate. Run /mh-cto-sdlc-arch-spike."
Once confirmed: "I have {N} Phase 4 artifacts and {N} ADRs loaded. Running gap interview."
Step 2 — Gap Interview (4 Questions)
Q1 — Decision traceability "Pick the most consequential architectural decision you made. Can you trace it directly back to a specific driver from arch-drivers.md — or was it a preference?"
Listen for: "it felt right" or "it's the obvious choice" without a driver reference. Architecture decisions not traceable to drivers are bets, not designs.
Q2 — Failure mode blind spots "Which part of the resilience surface map are you least confident about — where you named a failure mode but are not sure the mitigation actually works?"
Listen for: integrations with no tested fallback, SPOFs accepted without a clear recovery path.
Q3 — Test pyramid instinct "If you had to predict the most expensive tests in Phase 5 — the ones that will take the longest to run or require the most infrastructure to set up — what are they?"
This surfaces Phase 5 risk early and validates the test pyramid design in Step 4.
Q4 — Architecture drift risk "What would make this architecture obsolete within 6 months? A new user requirement, a scale change, or a technology decision you made that you have the least confidence in?"
Record verbatim. This becomes a Phase 8 retrospective trigger.
After Q4: "Thank you. Designing the test pyramid, then handing to the gate-review agent."
Step 3 — Design Preliminary Test Pyramid
Before spawning the gate-review agent, produce the preliminary test pyramid. This is a Phase 4 output — handed to Phase 5 for formalization.
Inputs:
- System shape (monolith / services / event-driven — from system diagram)
- Integration surface (number and criticality of external integrations)
- Data model complexity (number of entities, relationship complexity)
- Resilience surface map (failure modes that require chaos testing)
- NFR spec (performance requirements that need load tests)
For this architecture, the test pyramid is:
┌─────────────────────┐
│ E2E Tests │ ~{N}% {rationale}
└──────────┬──────────┘
┌──────────┴──────────┐
│ Integration / API │ ~{N}% {rationale}
│ Tests │
└──────────┬──────────┘
┌──────────┴──────────┐
│ Contract Tests │ ~{N} contracts {rationale}
└──────────┬──────────┘
┌──────────┴──────────┐
│ Unit Tests │ ~{N}% {rationale}
└─────────────────────┘
For each layer, state:
- Approximate proportion (%) of total test effort
- What these tests verify (not "unit tests test units" — be specific to this architecture)
- Key risks these tests protect against
Special test categories:
- Performance tests: which NFRs require load testing, at what scale
- Chaos tests: which resilience surface failures need chaos experiments (from resilience-surface-map.md)
- Security tests: SAST, DAST, dependency scanning — where in the pipeline
This pyramid is a Phase 5 starting point — not a specification Phase 5 must follow without question.
Step 4 — Spawn Gate-Review Agent
Spawn the gate-review agent (defined in agents/gate-review-agent.md) using the Agent tool.
Pass:
- All Phase 4 artifacts
- Phase 1 domain model and constraint inventory (traceability)
- Phase 2 NFR spec and acceptance criteria (traceability)
- Phase 3 component registry (architecture-design alignment)
- Founder's verbatim gap interview answers
- Preliminary test pyramid from Step 3
- The checklist from
checklist.md
Wait for the verdict.
Step 5 — Re-Entry Signal Check
Phase 3 re-entry conditions:
- Architecture revealed that the component registry is missing a component type the system requires
- Architecture revealed that Phase 3 design assumptions about data shape are incompatible with the data model
Phase 2 re-entry conditions:
- Architecture revealed that an acceptance criterion is structurally unachievable without changing scope
- NFR thresholds are unreachable given the architecture — the constraint must be renegotiated
If re-entry is warranted, include the full re-entry signal block.
Step 6 — Write Gate Verdict
Save to _mh-output/cto/sdlc/phase4-gate/{YYYY-MM-DD}_{r###}_phase4-gate-verdict.md and {YYYY-MM-DD}_{r###}_test-pyramid-prelim.md:
# Phase 4 Gate Verdict
**Date:** {date}
**Verdict:** {Pass | Conditional Pass | Fail | Phase 2/3 Re-Entry}
## Artifact Assessment
| Artifact | Completeness | Decision Traceability | Status |
| ---------------------- | ------------------ | ------------------------------ | ------------------------- |
| Arch Drivers | Complete / Partial | Traceable / Gaps | Pass / Conditional / Fail |
| System Diagram | Complete / Partial | — | Pass / Conditional / Fail |
| Data Model | Complete / Partial | Traceable / Gaps | Pass / Conditional / Fail |
| Integration Contracts | Complete / Partial | — | Pass / Conditional / Fail |
| Observability Spec | Complete / Partial | — | Pass / Conditional / Fail |
| Threat Model | Complete / Partial | — | Pass / Conditional / Fail |
| Resilience Surface Map | Complete / Partial | — | Pass / Conditional / Fail |
| Tech Stack | Complete / Partial | Drivers-traced / Preferences | Pass / Conditional / Fail |
| ADRs | {N} written | Load-bearing decisions covered | Pass / Conditional / Fail |
## Strengths
{From agent output}
## Critical Gaps
{CRITICAL (blocks Phase 5): ...}
{NOTABLE (must address before Phase 6): ...}
{MINOR (log and proceed): ...}
## Gap Interview Summary
{Key findings from the four questions, including architecture drift risk}
## Phase 5 Inputs
- Preliminary test pyramid (see attached)
- {N} chaos test candidates from resilience surface map
- {N} performance test candidates from NFR spec + arch drivers
- {N} contract test candidates from integration contracts
## Re-Entry Signal (if applicable)
{Full signal block}
## Verdict Rationale
{2-3 sentences}
## Phase 5 Requirements (if Conditional Pass)
{Named requirements — what Phase 5 must address given conditional gaps}
## Remediation (if Fail)
{Which Phase 4 skill to re-run}
## Next Step
Pass / Conditional Pass: Run `/mh-cto-sdlc-test-prioritization` to begin Phase 5 Testing Strategy.
# Preliminary Test Pyramid
**Date:** {date}
**Architecture shape:** {one sentence}
## Test Layer Distribution
{Pyramid diagram from Step 3}
### Unit Tests (~{N}%)
{What they test in this specific architecture}
### Contract Tests ({N} contracts)
{Integration boundaries to cover}
### Integration / API Tests (~{N}%)
{What they test, key scenarios}
### E2E Tests (~{N}%)
{What they cover, platform-specific notes}
### Performance Tests
{NFRs to verify, load scenarios}
### Chaos Tests
{Resilience surfaces to probe, from resilience-surface-map.md}
### Security Tests
{SAST, DAST, dependency scanning — pipeline stage}
## Phase 5 Formalization Notes
{Specific questions or decisions Phase 5 must resolve to finalize this pyramid}
Step 7 — Present Summary
Verdict: {Pass / Conditional Pass / Fail / Re-Entry}
Phase 4 strengths: {2-3 specific items}
Gaps: {tiered list}
Preliminary test pyramid: Unit {N}% / Contract {N} / Integration {N}% / E2E {N}%
Phase 5 inputs: {N} chaos test candidates, {N} performance test scenarios, {N} contract boundaries.
Next step: /mh-cto-sdlc-test-prioritization
04 同仓库更多 Skills
mh-vo-vault-brief
Weekly vault intelligence report — health score, pipeline status, OS alignment, and top issues. Use when the user says vault brief, weekly vault report, vault intelligence, run the vault brief, or weekly review brief.
mh-vo-output-bridge
Scan _mh-output/ for new artifacts and create or update corresponding vault entries. Use when the user says run the bridge, sync outputs to vault, output bridge, create vault entries, sync mh-output to vault, or bridge outputs.
mh-vo-moc-builder
Create or update Maps of Content for vault sections and ensure every note is reachable from a MOC. Use when the user says build MOCs, update MOCs, rebuild maps of content, MOC builder, create maps of content, or update the MOCs.
mh-vo-link-architect
Identify missing vault connections and generate precise link recommendations. Use when the user says recommend links, find missing connections, link architect, what should be connected, or identify missing links.
mh-vo-base-builder
Generate Obsidian Bases (.base files) for live database views of vault data. Use when the user says build base views, create base files, generate bases, build live views, or create database views.
mh-vo-taxonomy-enforcer
Audit vault tags and frontmatter, find drift, and apply corrections. Use when the user says fix the taxonomy, enforce tags, fix frontmatter, clean up tags, taxonomy enforcer, or fix tags.