mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-19 21:19:28 +00:00
chore(skills): apply the 2026-10-02 review -- current CLI and evidence, merges, removals, steering names
openultrasast-scan: evidence ladder as verification.py defines it, with the levels nothing produces today; --mode prerequisites, --fail-on, recorded degradations, run artifacts, ousast mcp; retired [evidence] threshold language removed. openultrasast-triage: reasons verified against calibration.py; deterministic fusion; adjudications as labels, plane verdicts as features, rule changes through improve or a registered experiment; fix-audit merged as a fix-and-re-scan section. kiro: spec-quick and spec-batch removed; validate-gap and validate-design merged into spec-design (--gap, --review; the review gate stays); steering-custom merged into steering; core steering names overview.md, roadmap.md, safety-net.md; instrument rule in debug and verify-completion; repo gates named in validate-impl. AGENTS.md, README skills paragraph and tests/test_agent_skills.py (.agents/skills, two product skills, drift tests) updated. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
5010b15ffc
commit
16d9ef7110
@@ -1,13 +1,18 @@
|
||||
---
|
||||
name: kiro-spec-design
|
||||
description: Create comprehensive technical design for a specification
|
||||
description: Create comprehensive technical design for a specification; optionally run the implementation gap analysis first (--gap) or an interactive design review of an existing design (--review)
|
||||
metadata:
|
||||
shared-rules: "design-principles.md, design-discovery-full.md, design-discovery-light.md, design-synthesis.md, design-review-gate.md"
|
||||
shared-rules: "design-principles.md, design-discovery-full.md, design-discovery-light.md, design-synthesis.md, design-review-gate.md, gap-analysis.md, design-review.md"
|
||||
---
|
||||
|
||||
|
||||
# Technical Design Generator
|
||||
|
||||
**Arguments**: `$1` is the feature. `$2` may be `-y` (auto-approve requirements), `--gap` (run the
|
||||
optional gap analysis of Step 1b before designing) or `--review` (run only the optional interactive
|
||||
design review of Step 7 on an existing `design.md`). The design review gate of Step 5 always runs
|
||||
when a design is generated; the optional steps never replace it.
|
||||
|
||||
<background_information>
|
||||
- **Success Criteria**:
|
||||
- All requirements mapped to technical components with clear interfaces
|
||||
@@ -24,8 +29,8 @@ metadata:
|
||||
|
||||
**Read all necessary context**:
|
||||
- `.kiro/specs/$1/spec.json`, `requirements.md`, `design.md` (if exists)
|
||||
- `.kiro/specs/$1/research.md` (if exists, contains gap analysis from `/kiro-validate-gap`)
|
||||
- Core steering context: `product.md`, `tech.md`, `structure.md`
|
||||
- `.kiro/specs/$1/research.md` (if exists, contains the gap analysis from Step 1b or an earlier run)
|
||||
- Core steering context: `overview.md`, `roadmap.md`, `safety-net.md` (this repository's core steering; custom steering files may also exist in `.kiro/steering/`)
|
||||
- Additional steering files only when directly relevant to requirement coverage, architecture boundaries, integrations, runtime prerequisites, security/performance constraints, or team conventions that affect implementation readiness
|
||||
- `.kiro/settings/templates/specs/design.md` for document structure
|
||||
- Read `rules/design-principles.md` from this skill's directory for design principles
|
||||
@@ -35,6 +40,16 @@ metadata:
|
||||
- If `-y` flag provided ($2 == "-y"): Auto-approve requirements in spec.json
|
||||
- Otherwise: Verify approval status (stop if unapproved, see Safety & Fallback)
|
||||
|
||||
### Step 1b (optional, `--gap`): Implementation Gap Analysis
|
||||
|
||||
Recommended for brownfield features; skip for greenfield. Analyze the gap between the approved requirements and the existing codebase to inform the design, following `rules/gap-analysis.md` from this skill's directory.
|
||||
|
||||
1. Read `rules/gap-analysis.md` for the analysis framework.
|
||||
2. Research in parallel where possible (sub-agents if available, otherwise sequentially): existing implementations, architecture patterns, integration points and extension possibilities; external dependency compatibility and version constraints when needed; the requirements, core steering, task-relevant extra steering and relevant local agent skills or playbooks.
|
||||
3. Execute the gap analysis: Grep and Read the codebase, use WebSearch/WebFetch for external dependencies if needed, evaluate multiple implementation approaches (extend / new / hybrid) with trade-offs, flag areas needing further research. Provide information and options, not final implementation choices.
|
||||
4. Write the analysis to `.kiro/specs/$1/research.md` (append after a `---` rule if the file exists; never overwrite earlier research) and read it back to verify the write. Use the language specified in spec.json.
|
||||
5. Unapproved requirements are a warning here, not a stop: gap analysis can inform requirement revisions. Then continue with Step 2, or stop and report if the user asked for the gap analysis alone.
|
||||
|
||||
### Step 2: Discovery & Analysis
|
||||
|
||||
**Critical: This phase ensures design is based on complete, accurate information.**
|
||||
@@ -137,6 +152,15 @@ After all findings return, synthesize in main context before proceeding.
|
||||
- Set `approvals.requirements.approved: true`
|
||||
- Update `updated_at` timestamp
|
||||
|
||||
### Step 7 (optional, `--review`): Interactive Design Review
|
||||
|
||||
A human-paced quality review of an existing `.kiro/specs/$1/design.md`, in addition to the automatic gate of Step 5. Follow `rules/design-review.md` from this skill's directory.
|
||||
|
||||
1. Gather context: spec.json, requirements.md, design.md, core steering, review-relevant extra steering and local playbooks; survey existing codebase patterns, naming conventions and component structure for reference (parallel sub-agents if available).
|
||||
2. Review: Analysis -> Critical Issues -> Strengths -> GO/NO-GO. Limit to the 3 most important concerns; recognize 1-2 strengths; engage interactively (clarifying questions, alternatives); leverage conversation history for requirements context and user intent. Quality assurance, not perfection seeking; accept acceptable risk; every suggestion must be implementable.
|
||||
3. Decide: a clear GO/NO-GO with rationale. GO: `/kiro-spec-tasks $1` (or `-y`). NO-GO: address the critical issues, re-run `/kiro-spec-design $1`, then `/kiro-spec-design $1 --review` again.
|
||||
4. If design.md does not exist, stop: "Run `/kiro-spec-design $1` first to generate design document". If the design phase is not marked generated in spec.json, warn but proceed.
|
||||
|
||||
## Critical Constraints
|
||||
- **Type Safety**:
|
||||
- Enforce strong typing aligned with the project's technology stack.
|
||||
@@ -199,7 +223,7 @@ Provide brief summary in the language specified in spec.json:
|
||||
|
||||
**If Design Approved**:
|
||||
- Review generated design at `.kiro/specs/$1/design.md`
|
||||
- **Optional**: Run `/kiro-validate-design $1` for interactive quality review
|
||||
- **Optional**: Run `/kiro-spec-design $1 --review` for the interactive quality review (Step 7)
|
||||
- Then `/kiro-spec-tasks $1 -y` to generate implementation tasks
|
||||
|
||||
**If Modifications Needed**:
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
# Design Review Process
|
||||
|
||||
## Objective
|
||||
Conduct interactive quality review of technical design documents to ensure they are solid enough to proceed to implementation with acceptable risk.
|
||||
|
||||
## Review Philosophy
|
||||
- **Quality assurance, not perfection seeking**
|
||||
- **Critical focus**: Limit to 3 most important concerns
|
||||
- **Interactive dialogue**: Engage with designer, not one-way evaluation
|
||||
- **Balanced assessment**: Recognize strengths and weaknesses
|
||||
- **Clear decision**: Definitive GO/NO-GO with rationale
|
||||
|
||||
## Scope & Non-Goals
|
||||
|
||||
- Scope: Evaluate the quality of the design document against project context and standards to decide GO/NO-GO.
|
||||
- Non-Goals: Do not perform implementation-level design, deep technology research, or finalize technology choices. Defer such items to the design phase iteration.
|
||||
|
||||
## Core Review Criteria
|
||||
|
||||
### 1. Existing Architecture Alignment (Critical)
|
||||
- Integration with existing system boundaries and layers
|
||||
- Consistency with established architectural patterns
|
||||
- Proper dependency direction and coupling management
|
||||
- Alignment with current module organization
|
||||
|
||||
### 2. Design Consistency & Standards
|
||||
- Adherence to project naming conventions and code standards
|
||||
- Consistent error handling and logging strategies
|
||||
- Uniform configuration and dependency management
|
||||
- Alignment with established data modeling patterns
|
||||
|
||||
### 3. Extensibility & Maintainability
|
||||
- Design flexibility for future requirements
|
||||
- Clear separation of concerns and single responsibility
|
||||
- Testability and debugging considerations
|
||||
- Appropriate complexity for requirements
|
||||
|
||||
### 4. Type Safety & Interface Design
|
||||
- Proper type definitions and interface contracts
|
||||
- Avoidance of unsafe patterns (e.g., `any` in TypeScript)
|
||||
- Clear API boundaries and data structures
|
||||
- Input validation and error handling coverage
|
||||
|
||||
## Review Process
|
||||
|
||||
### Step 1: Analyze
|
||||
Analyze design against all review criteria, focusing on critical issues impacting integration, maintainability, complexity, and requirements fulfillment.
|
||||
|
||||
### Step 2: Identify Critical Issues (≤3)
|
||||
For each issue:
|
||||
```
|
||||
🔴 **Critical Issue [1-3]**: [Brief title]
|
||||
**Concern**: [Specific problem]
|
||||
**Impact**: [Why it matters]
|
||||
**Suggestion**: [Concrete improvement]
|
||||
**Traceability**: [Requirement ID/section from requirements.md]
|
||||
**Evidence**: [Design doc section/heading]
|
||||
```
|
||||
|
||||
### Step 3: Recognize Strengths
|
||||
Acknowledge 1-2 strong aspects to maintain balanced feedback.
|
||||
|
||||
### Step 4: Decide GO/NO-GO
|
||||
- **GO**: No critical architectural misalignment, requirements addressed, clear implementation path, acceptable risks
|
||||
- **NO-GO**: Fundamental conflicts, critical gaps, high failure risk, disproportionate complexity
|
||||
|
||||
## Traceability & Evidence
|
||||
|
||||
- Link each critical issue to the relevant requirement(s) from `requirements.md` (ID or section).
|
||||
- Cite evidence locations in the design document (section/heading, diagram, or artifact) to support the assessment.
|
||||
- When applicable, reference constraints from steering context to justify the issue.
|
||||
|
||||
## Output Format
|
||||
|
||||
### Design Review Summary
|
||||
2-3 sentences on overall quality and readiness.
|
||||
|
||||
### Critical Issues (≤3)
|
||||
For each: Issue, Impact, Recommendation, Traceability (e.g., 1.1, 1.2), Evidence (design.md section).
|
||||
|
||||
### Design Strengths
|
||||
1-2 positive aspects.
|
||||
|
||||
### Final Assessment
|
||||
Decision (GO/NO-GO), Rationale (1-2 sentences), Next Steps.
|
||||
|
||||
### Interactive Discussion
|
||||
Engage on designer's perspective, alternatives, clarifications, and necessary changes.
|
||||
|
||||
## Length & Focus
|
||||
|
||||
- Summary: 2–3 sentences
|
||||
- Each critical issue: 5–7 lines total (including Issue/Impact/Recommendation/Traceability/Evidence)
|
||||
- Overall review: keep concise (~400 words guideline)
|
||||
|
||||
## Review Guidelines
|
||||
|
||||
1. **Critical Focus**: Only flag issues that significantly impact success
|
||||
2. **Constructive Tone**: Provide solutions, not just criticism
|
||||
3. **Interactive Approach**: Engage in dialogue rather than one-way evaluation
|
||||
4. **Balanced Assessment**: Recognize both strengths and weaknesses
|
||||
5. **Clear Decision**: Make definitive GO/NO-GO recommendation
|
||||
6. **Actionable Feedback**: Ensure all suggestions are implementable
|
||||
|
||||
## Final Checklist
|
||||
|
||||
- **Critical Issues ≤ 3** and each includes Impact and Recommendation
|
||||
- **Traceability**: Each issue references requirement ID/section
|
||||
- **Evidence**: Each issue cites design doc location
|
||||
- **Decision**: GO/NO-GO with clear rationale and next steps
|
||||
@@ -0,0 +1,144 @@
|
||||
# Gap Analysis Process
|
||||
|
||||
## Objective
|
||||
Analyze the gap between requirements and existing codebase to inform implementation strategy decisions.
|
||||
|
||||
## Analysis Framework
|
||||
|
||||
### 1. Current State Investigation
|
||||
|
||||
- Scan for domain-related assets:
|
||||
- Key files/modules and directory layout
|
||||
- Reusable components/services/utilities
|
||||
- Dominant architecture patterns and constraints
|
||||
|
||||
- Extract conventions:
|
||||
- Naming, layering, dependency direction
|
||||
- Import/export patterns and dependency hotspots
|
||||
- Testing placement and approach
|
||||
|
||||
- Note integration surfaces:
|
||||
- Data models/schemas, API clients, auth mechanisms
|
||||
|
||||
### 2. Requirements Feasibility Analysis
|
||||
|
||||
- From EARS requirements, list technical needs:
|
||||
- Data models, APIs/services, UI/components
|
||||
- Business rules/validation
|
||||
- Non-functionals: security, performance, scalability, reliability
|
||||
|
||||
- Identify gaps and constraints:
|
||||
- Missing capabilities in current codebase
|
||||
- Unknowns to be researched later (mark as "Research Needed")
|
||||
- Constraints from existing architecture and patterns
|
||||
|
||||
- Note complexity signals:
|
||||
- Simple CRUD / algorithmic logic / workflows / external integrations
|
||||
|
||||
### 3. Implementation Approach Options
|
||||
|
||||
#### Option A: Extend Existing Components
|
||||
**When to consider**: Feature fits naturally into existing structure
|
||||
|
||||
- **Which files/modules to extend**:
|
||||
- Identify specific files requiring changes
|
||||
- Assess impact on existing functionality
|
||||
- Evaluate backward compatibility concerns
|
||||
|
||||
- **Compatibility assessment**:
|
||||
- Check if extension respects existing interfaces
|
||||
- Verify no breaking changes to consumers
|
||||
- Assess test coverage impact
|
||||
|
||||
- **Complexity and maintainability**:
|
||||
- Evaluate cognitive load of additional functionality
|
||||
- Check if single responsibility principle is maintained
|
||||
- Assess if file size remains manageable
|
||||
|
||||
**Trade-offs**:
|
||||
- ✅ Minimal new files, faster initial development
|
||||
- ✅ Leverages existing patterns and infrastructure
|
||||
- ❌ Risk of bloating existing components
|
||||
- ❌ May complicate existing logic
|
||||
|
||||
#### Option B: Create New Components
|
||||
**When to consider**: Feature has distinct responsibility or existing components are already complex
|
||||
|
||||
- **Rationale for new creation**:
|
||||
- Clear separation of concerns justifies new file
|
||||
- Existing components are already complex
|
||||
- Feature has distinct lifecycle or dependencies
|
||||
|
||||
- **Integration points**:
|
||||
- How new components connect to existing system
|
||||
- APIs or interfaces exposed
|
||||
- Dependencies on existing components
|
||||
|
||||
- **Responsibility boundaries**:
|
||||
- Clear definition of what new component owns
|
||||
- Interfaces with existing components
|
||||
- Data flow and control flow
|
||||
|
||||
**Trade-offs**:
|
||||
- ✅ Clean separation of concerns
|
||||
- ✅ Easier to test in isolation
|
||||
- ✅ Reduces complexity in existing components
|
||||
- ❌ More files to navigate
|
||||
- ❌ Requires careful interface design
|
||||
|
||||
#### Option C: Hybrid Approach
|
||||
**When to consider**: Complex features requiring both extension and new creation
|
||||
|
||||
- **Combination strategy**:
|
||||
- Which parts extend existing components
|
||||
- Which parts warrant new components
|
||||
- How they interact
|
||||
|
||||
- **Phased implementation**:
|
||||
- Initial phase: minimal viable changes
|
||||
- Subsequent phases: refactoring or new components
|
||||
- Migration strategy if needed
|
||||
|
||||
- **Risk mitigation**:
|
||||
- Incremental rollout approach
|
||||
- Feature flags or configuration
|
||||
- Rollback strategy
|
||||
|
||||
**Trade-offs**:
|
||||
- ✅ Balanced approach for complex features
|
||||
- ✅ Allows iterative refinement
|
||||
- ❌ More complex planning required
|
||||
- ❌ Potential for inconsistency if not well-coordinated
|
||||
### 4. Out-of-Scope for Gap Analysis
|
||||
|
||||
- Defer deep research activities to the design phase.
|
||||
- Record unknowns as concise "Research Needed" items only.
|
||||
|
||||
### 5. Implementation Complexity & Risk
|
||||
|
||||
- Effort:
|
||||
- S (1–3 days): existing patterns, minimal deps, straightforward integration
|
||||
- M (3–7 days): some new patterns/integrations, moderate complexity
|
||||
- L (1–2 weeks): significant functionality, multiple integrations or workflows
|
||||
- XL (2+ weeks): architectural changes, unfamiliar tech, broad impact
|
||||
- Risk:
|
||||
- High: unknown tech, complex integrations, architectural shifts, unclear perf/security path
|
||||
- Medium: new patterns with guidance, manageable integrations, known perf solutions
|
||||
- Low: extend established patterns, familiar tech, clear scope, minimal integration
|
||||
|
||||
### Output Checklist
|
||||
|
||||
- Requirement-to-Asset Map with gaps tagged (Missing / Unknown / Constraint)
|
||||
- Options A/B/C with short rationale and trade-offs
|
||||
- Effort (S/M/L/XL) and Risk (High/Medium/Low) with one-line justification each
|
||||
- Recommendations for design phase:
|
||||
- Preferred approach and key decisions
|
||||
- Research items to carry forward
|
||||
|
||||
## Principles
|
||||
|
||||
- **Information over decisions**: Provide analysis and options, not final choices
|
||||
- **Multiple viable options**: Offer credible alternatives when applicable
|
||||
- **Explicit gaps and assumptions**: Flag unknowns and constraints clearly
|
||||
- **Context-aware**: Align with existing patterns and architecture limits
|
||||
- **Transparent effort and risk**: Justify labels succinctly
|
||||
Reference in New Issue
Block a user