From 9e76353dda9a067e49888827a10f4df2418e1ab0 Mon Sep 17 00:00:00 2001 From: Richard Hightower Date: Wed, 28 Jan 2026 15:43:06 -0600 Subject: [PATCH 1/2] Develop deploy (#80) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * feat(governance): Phase 2.1 Core Governance Implementation (#71) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold (#72) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold Phase 2.2: Enhanced Logging - Decision enum, LogEntry governance fields, logs filtering Phase 2.3: CLI Enhancements - explain rule command with stats, JSON output, rules listing Phase 2.4: Trust Levels - TrustLevel enum, run action trust field, logging RuleZ UI: Milestone 1 Project Setup - Tauri 2.0 + React 18 + TypeScript scaffold - Dual-mode architecture, layout components, theming 68 tests passing, cargo fmt/clippy clean. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * docs(speckit): update project status for Phase 2 and RuleZ UI M1 completion (#74) - Mark phase2-governance as Complete (all P2.1-P2.4 implemented) - Mark rulez-ui M1 (Project Setup) as complete - Update all user story checkboxes in features.md - Update all checklist items in phase2-governance-checklist.md - Update rulez-ui-checklist.md with M1 completion - Update plan.md files with completion status and PR references - Add git workflow note: develop is the working branch Co-authored-by: Claude Opus 4.5 * fix(cch): align Event struct with Claude Code hook protocol (#75) * fix(cch): align Event struct with Claude Code hook protocol CCH was completely non-functional as a Claude Code hook because it expected `event_type` but Claude Code sends `hook_event_name`. This commit fixes three critical issues: 1. Event struct: rename `event_type` to `hook_event_name` with `#[serde(alias = "event_type")]` for backward compat. Add missing fields (transcript_path, cwd, permission_mode, tool_use_id). Make timestamp default to Utc::now() since Claude Code doesn't send it. 2. EventType enum: add Stop, PostToolUseFailure, SubagentStart, SubagentStop, Notification, Setup variants. 3. Response struct: add `#[serde(rename = "continue")]` so it serializes as "continue" not "continue_". Also fixes install.rs to generate correct PascalCase settings.json with nested matcher/hooks structure, and updates all speckit specs and mastering-hooks skill docs to reflect the actual protocol. Co-Authored-By: Claude Opus 4.5 * fix: use event cwd for config loading instead of current_dir() When Claude Code invokes CCH as a hook, the working directory may not be the project directory. Claude Code sends the project path as `cwd` in the event JSON. CCH now uses this field to locate the correct project's hooks.yaml, falling back to current_dir() when cwd is absent. Co-Authored-By: Claude Opus 4.5 * style: fix cargo fmt formatting and bump version to 1.0.2 Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * test: add e2e integration tests for git push block via Claude Code protocol (#76) 8 new tests verifying: - Git push blocked using hook_event_name (Claude Code format) - CWD-based config loading (CCH invoked from wrong directory) - Various git push variants all blocked - Non-push git commands allowed - Response JSON format (continue not continue_) - No-config fail-open behavior - CWD push variants from wrong directory Co-authored-by: Claude Opus 4.5 * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol (#77) * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol Claude Code hooks protocol requires exit code 2 (not exit 0 with continue:false) to actually block a tool call. Exit 0 with continue:false only stops Claude's conversation but does NOT prevent the tool from executing. This was why git push went through despite the hook firing. - main.rs: exit(2) with reason on stderr when blocking - Updated e2e, OQ-US1, and OQ-US3 tests to expect exit code 2 + stderr Co-Authored-By: Claude Opus 4.5 * fix(tests): guard against divide-by-zero in memory stability test On Linux CI, the process exits before memory can be measured, resulting in first_avg=0. This caused a divide-by-zero panic at line 362. Now skips the comparison when memory measurement returns 0. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * feat(rulez-ui): implement M2-M8 milestones with accessibility fixes (#79) * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol Claude Code hooks protocol requires exit code 2 (not exit 0 with continue:false) to actually block a tool call. Exit 0 with continue:false only stops Claude's conversation but does NOT prevent the tool from executing. This was why git push went through despite the hook firing. - main.rs: exit(2) with reason on stderr when blocking - Updated e2e, OQ-US1, and OQ-US3 tests to expect exit code 2 + stderr Co-Authored-By: Claude Opus 4.5 * fix(tests): guard against divide-by-zero in memory stability test On Linux CI, the process exits before memory can be measured, resulting in first_avg=0. This caused a divide-by-zero panic at line 362. Now skips the comparison when memory measurement returns 0. Co-Authored-By: Claude Opus 4.5 * feat(rulez-ui): implement M2-M8 milestones with accessibility fixes - M2: Integrate Monaco Editor with YAML language support - Add YamlEditor component with @monaco-editor/react - Add EditorToolbar with undo/redo/format/wrap/minimap controls - Wire cursor position tracking to editorStore - M3: Schema validation with monaco-yaml - Add JSON Schema for hooks.yaml validation - Configure monaco-yaml for inline error markers - Add ValidationPanel with click-to-jump navigation - M4: Complete file operations - Add ConfirmDialog for unsaved changes prompt - Wire save/discard/cancel flow in FileTabBar - M5: Rule Tree View - Add RuleTreeView with collapsible Settings/Rules sections - Add RuleCard with action badges and tool chips - Add yaml-utils for YAML parsing with line positions - M6: Debug Simulator UI - Add EventForm with 7 event types - Add ResultView with outcome badges - Add EvaluationTrace with per-rule match details - Wire to runDebug Tauri command with mock fallback - M7: Monaco theming - Add light/dark Monaco themes matching app theme - Wire theme switching to uiStore - M8: Expand E2E tests - Add editor.spec.ts, simulator.spec.ts, tree-view.spec.ts - Add file-ops.spec.ts for tab management tests Accessibility fixes: - Add aria-hidden="true" to decorative SVGs - Add type="button" to all non-submit buttons - Add htmlFor/id to associate labels with form inputs - Restructure FileTabBar with semantic button elements Fix Tailwind CSS 4 migration: - Install @tailwindcss/postcss for PostCSS 8 compatibility - Replace custom theme colors with built-in colors in @apply Co-Authored-By: Claude Opus 4.5 * added claude files --------- Co-authored-by: Claude Opus 4.5 * feat: wiki sync setup and PR #80 merge fix (#81) * Release: v0.1.0 - Two-Tier CI with IQ/OQ/PQ Validation (#70) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * Develop (#73) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * feat(governance): Phase 2.1 Core Governance Implementation (#71) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold (#72) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold Phase 2.2: Enhanced Logging - Decision enum, LogEntry governance fields, logs filtering Phase 2.3: CLI Enhancements - explain rule command with stats, JSON output, rules listing Phase 2.4: Trust Levels - TrustLevel enum, run action trust field, logging RuleZ UI: Milestone 1 Project Setup - Tauri 2.0 + React 18 + TypeScript scaffold - Dual-mode architecture, layout components, theming 68 tests passing, cargo fmt/clippy clean. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * Develop, release (#78) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * feat(governance): Phase 2.1 Core Governance Implementation (#71) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold (#72) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold Phase 2.2: Enhanced Logging - Decision enum, LogEntry governance fields, logs filtering Phase 2.3: CLI Enhancements - explain rule command with stats, JSON output, rules listing Phase 2.4: Trust Levels - TrustLevel enum, run action trust field, logging RuleZ UI: Milestone 1 Project Setup - Tauri 2.0 + React 18 + TypeScript scaffold - Dual-mode architecture, layout components, theming 68 tests passing, cargo fmt/clippy clean. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * docs(speckit): update project status for Phase 2 and RuleZ UI M1 completion (#74) - Mark phase2-governance as Complete (all P2.1-P2.4 implemented) - Mark rulez-ui M1 (Project Setup) as complete - Update all user story checkboxes in features.md - Update all checklist items in phase2-governance-checklist.md - Update rulez-ui-checklist.md with M1 completion - Update plan.md files with completion status and PR references - Add git workflow note: develop is the working branch Co-authored-by: Claude Opus 4.5 * fix(cch): align Event struct with Claude Code hook protocol (#75) * fix(cch): align Event struct with Claude Code hook protocol CCH was completely non-functional as a Claude Code hook because it expected `event_type` but Claude Code sends `hook_event_name`. This commit fixes three critical issues: 1. Event struct: rename `event_type` to `hook_event_name` with `#[serde(alias = "event_type")]` for backward compat. Add missing fields (transcript_path, cwd, permission_mode, tool_use_id). Make timestamp default to Utc::now() since Claude Code doesn't send it. 2. EventType enum: add Stop, PostToolUseFailure, SubagentStart, SubagentStop, Notification, Setup variants. 3. Response struct: add `#[serde(rename = "continue")]` so it serializes as "continue" not "continue_". Also fixes install.rs to generate correct PascalCase settings.json with nested matcher/hooks structure, and updates all speckit specs and mastering-hooks skill docs to reflect the actual protocol. Co-Authored-By: Claude Opus 4.5 * fix: use event cwd for config loading instead of current_dir() When Claude Code invokes CCH as a hook, the working directory may not be the project directory. Claude Code sends the project path as `cwd` in the event JSON. CCH now uses this field to locate the correct project's hooks.yaml, falling back to current_dir() when cwd is absent. Co-Authored-By: Claude Opus 4.5 * style: fix cargo fmt formatting and bump version to 1.0.2 Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * test: add e2e integration tests for git push block via Claude Code protocol (#76) 8 new tests verifying: - Git push blocked using hook_event_name (Claude Code format) - CWD-based config loading (CCH invoked from wrong directory) - Various git push variants all blocked - Non-push git commands allowed - Response JSON format (continue not continue_) - No-config fail-open behavior - CWD push variants from wrong directory Co-authored-by: Claude Opus 4.5 * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol (#77) * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol Claude Code hooks protocol requires exit code 2 (not exit 0 with continue:false) to actually block a tool call. Exit 0 with continue:false only stops Claude's conversation but does NOT prevent the tool from executing. This was why git push went through despite the hook firing. - main.rs: exit(2) with reason on stderr when blocking - Updated e2e, OQ-US1, and OQ-US3 tests to expect exit code 2 + stderr Co-Authored-By: Claude Opus 4.5 * fix(tests): guard against divide-by-zero in memory stability test On Linux CI, the process exits before memory can be measured, resulting in first_avg=0. This caused a divide-by-zero panic at line 362. Now skips the comparison when memory measurement returns 0. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * docs: add wiki synchronization configuration - Add wiki-mapping.yml for source-to-wiki page mapping - Add wiki-mapping-process.md with detailed sync instructions Maps 35+ documentation files to GitHub Wiki pages including: - Core docs (User Guide CLI/Skill, Backlog, Changelog) - DevOps docs (Branching, CI Tiers, Release Process) - PRDs (CLI, System, RuleZ UI, Phase2 Governance) - SpecKit features (specs, plans, tasks for all features) - Checklists (governance, RuleZ UI) Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * fix: resolve PR #80 conflicts (second merge from main) (#82) * Release: v0.1.0 - Two-Tier CI with IQ/OQ/PQ Validation (#70) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * Develop (#73) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * feat(governance): Phase 2.1 Core Governance Implementation (#71) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold (#72) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold Phase 2.2: Enhanced Logging - Decision enum, LogEntry governance fields, logs filtering Phase 2.3: CLI Enhancements - explain rule command with stats, JSON output, rules listing Phase 2.4: Trust Levels - TrustLevel enum, run action trust field, logging RuleZ UI: Milestone 1 Project Setup - Tauri 2.0 + React 18 + TypeScript scaffold - Dual-mode architecture, layout components, theming 68 tests passing, cargo fmt/clippy clean. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * Develop, release (#78) * feat(ci): implement two-tier CI with develop/main branching strategy (#67) Add CI/CD tiered approach to balance development velocity with release quality: Branching Model: - main: Production-ready, protected, requires Full Validation - develop: Integration branch (default), requires Fast CI - feature/*, fix/*: Working branches CI Tiers: - Fast CI (~2-3 min): fmt, clippy, unit tests, Linux IQ smoke test Triggers on: PRs to develop, pushes to feature branches - Full Validation (~10-15 min): IQ (4 platforms) + OQ + PQ + evidence Triggers on: PRs to main, release tags, manual dispatch Workflow Changes: - ci.yml: Converted to Fast CI, triggers on develop/feature branches - validation.yml: Full validation, only PRs to main and releases - iq-validation.yml: Manual-only for formal validation runs Documentation: - constitution.md: Added CI/CD Policy section - docs/devops/BRANCHING.md: Detailed branching workflows - docs/devops/CI_TIERS.md: CI tier explanation - docs/devops/RELEASE_PROCESS.md: Release and hotfix workflows - AGENTS.md: Updated with new workflow instructions Benefits: - Daily development: ~2-3 min feedback loop - Releases: Thorough ~10-15 min validation - Hotfixes: Direct to main with backport to develop * fix(ci): update macOS Intel runner from macos-13 to macos-15-intel (#69) macOS 13 runners were retired by GitHub in Jan 2026. Using macos-15-intel as the new x86_64 runner (supported until Aug 2027). Reference: actions/runner-images#13046 * feat(governance): Phase 2.1 Core Governance Implementation (#71) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold (#72) * feat(governance): add Phase 2 governance types and Rule extensions Implements P2.1-T01 through P2.1-T04: - PolicyMode enum (enforce, warn, audit) with default=enforce - Decision enum (allowed, blocked, warned, audited) for logging - GovernanceMetadata struct for rule provenance and documentation - Confidence enum (high, medium, low) - Rule struct extended with mode, priority, and governance fields - sort_rules_by_priority() function for priority-based ordering - Rule helper methods: effective_mode(), effective_priority(), is_enabled() All new fields are optional for backward compatibility. Existing v1.0 configs continue to work unchanged. Tests: 93 tests pass (added 20+ governance tests) Coverage: PolicyMode, Confidence, Decision, GovernanceMetadata parsing, Rule field defaults, priority sorting, YAML integration Refs: .speckit/features/phase2-governance/spec.md Closes: #38 #39 #40 #41 * feat(governance): implement mode-based action execution Implements P2.1-T05: Mode-based action execution Mode behavior: - Enforce: Normal execution (block, inject, run validators) - Warn: Never blocks, injects warning context instead - Audit: Logs only, no blocking or injection Changes: - hooks.rs: Added execute_rule_actions_with_mode() function - hooks.rs: Added execute_rule_actions_warn_mode() for warn mode - hooks.rs: Added merge_responses_with_mode() for mode awareness - hooks.rs: Added determine_decision() for logging decisions - config.rs: Updated enabled_rules() to use effective_priority() Tests: 101 tests pass (+8 new mode-based tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #42 * feat(governance): implement conflict resolution for multi-rule scenarios Implements P2.1-T06: Conflict resolution Resolution logic: - Enforce mode wins over warn and audit (regardless of priority) - Among same modes, higher priority wins - Multiple blocks: highest priority block message used - Warnings and injections are accumulated New functions: - mode_precedence(): Returns numeric precedence (enforce=3, warn=2, audit=1) - RuleConflictEntry: Struct for conflict resolution entries - resolve_conflicts(): Resolves conflicts between multiple matched rules - rule_takes_precedence(): Compares two rules for precedence Tests: 109 tests pass (+8 new conflict resolution tests) Refs: .speckit/features/phase2-governance/spec.md Closes: #43 * feat(governance): complete Phase 2.2-2.4 + RuleZ UI scaffold Phase 2.2: Enhanced Logging - Decision enum, LogEntry governance fields, logs filtering Phase 2.3: CLI Enhancements - explain rule command with stats, JSON output, rules listing Phase 2.4: Trust Levels - TrustLevel enum, run action trust field, logging RuleZ UI: Milestone 1 Project Setup - Tauri 2.0 + React 18 + TypeScript scaffold - Dual-mode architecture, layout components, theming 68 tests passing, cargo fmt/clippy clean. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * docs(speckit): update project status for Phase 2 and RuleZ UI M1 completion (#74) - Mark phase2-governance as Complete (all P2.1-P2.4 implemented) - Mark rulez-ui M1 (Project Setup) as complete - Update all user story checkboxes in features.md - Update all checklist items in phase2-governance-checklist.md - Update rulez-ui-checklist.md with M1 completion - Update plan.md files with completion status and PR references - Add git workflow note: develop is the working branch Co-authored-by: Claude Opus 4.5 * fix(cch): align Event struct with Claude Code hook protocol (#75) * fix(cch): align Event struct with Claude Code hook protocol CCH was completely non-functional as a Claude Code hook because it expected `event_type` but Claude Code sends `hook_event_name`. This commit fixes three critical issues: 1. Event struct: rename `event_type` to `hook_event_name` with `#[serde(alias = "event_type")]` for backward compat. Add missing fields (transcript_path, cwd, permission_mode, tool_use_id). Make timestamp default to Utc::now() since Claude Code doesn't send it. 2. EventType enum: add Stop, PostToolUseFailure, SubagentStart, SubagentStop, Notification, Setup variants. 3. Response struct: add `#[serde(rename = "continue")]` so it serializes as "continue" not "continue_". Also fixes install.rs to generate correct PascalCase settings.json with nested matcher/hooks structure, and updates all speckit specs and mastering-hooks skill docs to reflect the actual protocol. Co-Authored-By: Claude Opus 4.5 * fix: use event cwd for config loading instead of current_dir() When Claude Code invokes CCH as a hook, the working directory may not be the project directory. Claude Code sends the project path as `cwd` in the event JSON. CCH now uses this field to locate the correct project's hooks.yaml, falling back to current_dir() when cwd is absent. Co-Authored-By: Claude Opus 4.5 * style: fix cargo fmt formatting and bump version to 1.0.2 Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 * test: add e2e integration tests for git push block via Claude Code protocol (#76) 8 new tests verifying: - Git push blocked using hook_event_name (Claude Code format) - CWD-based config loading (CCH invoked from wrong directory) - Various git push variants all blocked - Non-push git commands allowed - Response JSON format (continue not continue_) - No-config fail-open behavior - CWD push variants from wrong directory Co-authored-by: Claude Opus 4.5 * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol (#77) * fix(cch): use exit code 2 to block tool calls per Claude Code hooks protocol Claude Code hooks protocol requires exit code 2 (not exit 0 with continue:false) to actually block a tool call. Exit 0 with continue:false only stops Claude's conversation but does NOT prevent the tool from executing. This was why git push went through despite the hook firing. - main.rs: exit(2) with reason on stderr when blocking - Updated e2e, OQ-US1, and OQ-US3 tests to expect exit code 2 + stderr Co-Authored-By: Claude Opus 4.5 * fix(tests): guard against divide-by-zero in memory stability test On Linux CI, the process exits before memory can be measured, resulting in first_avg=0. This caused a divide-by-zero panic at line 362. Now skips the comparison when memory measurement returns 0. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 --- .claude/commands/speckit.analyze.md | 184 ++ .claude/commands/speckit.checklist.md | 294 +++ .claude/commands/speckit.clarify.md | 181 ++ .claude/commands/speckit.constitution.md | 82 + .claude/commands/speckit.implement.md | 135 ++ .claude/commands/speckit.plan.md | 89 + .claude/commands/speckit.specify.md | 258 +++ .claude/commands/speckit.tasks.md | 137 ++ .claude/commands/speckit.taskstoissues.md | 30 + .claude/context/explain-command.md | 17 + .claude/hooks.yaml | 79 + .claude/settings.local.json | 58 + .claude/skills/architect-agent/.gitignore | 8 + .../architect-agent/.skilz-manifest.yaml | 8 + .claude/skills/architect-agent/CLAUDE.md | 130 ++ .../skills/architect-agent/CONTRIBUTING.md | 492 +++++ .claude/skills/architect-agent/README.md | 354 ++++ .claude/skills/architect-agent/SKILL.md | 216 ++ .claude/skills/architect-agent/SPEC.md | 1861 +++++++++++++++++ .../opencode-integration-test/README.md | 371 ++++ .../expected-outputs/basic-log-sample.md | 19 + .../test-scenarios/01-basic-logging.sh | 168 ++ .../architect-agent/evaluation-report.md | 589 ++++++ .../human-instructions/BAD-vague-summary.md | 110 + .../GOOD-database-migration.md | 269 +++ .../GOOD-parallel-worktrees.md | 308 +++ .../examples/human-instructions/README.md | 67 + .../skills/architect-agent/guides/README.md | 59 + .../guides/workflows/create-instructions.md | 192 ++ .../guides/workflows/grade-work.md | 172 ++ .../guides/workflows/initialize-workspace.md | 87 + .../guides/workflows/send-instructions.md | 113 + .../architect-agent/references/README.md | 278 +++ .../references/agent_specialization.md | 492 +++++ .../claude_vs_opencode_comparison.md | 551 +++++ .../references/code_agent_agents_template.md | 651 ++++++ .../references/code_agent_claude_template.md | 322 +++ .../references/decision_types.md | 242 +++ .../architect-agent/references/file_naming.md | 55 + .../references/get_unstuck_protocol.md | 575 +++++ .../references/git_pr_management.md | 136 ++ .../references/grading_rubrics.md | 333 +++ .../references/hook_configuration_critical.md | 502 +++++ .../references/hook_logger_enhancements.md | 672 ++++++ .../references/human_instruction_structure.md | 279 +++ .../hybrid_logging_migration_guide.md | 478 +++++ .../references/hybrid_logging_protocol.md | 583 ++++++ .../references/installation.md | 136 ++ .../instruction_grading_workflow.md | 608 ++++++ .../references/instruction_structure.md | 550 +++++ .../references/logging_protocol.md | 413 ++++ .../opencode_integration_quickstart.md | 263 +++ .../references/opencode_logging_protocol.md | 763 +++++++ .../references/opencode_migration_guide.md | 653 ++++++ .../references/opencode_setup_guide.md | 639 ++++++ .../references/opencode_wrapper_setup.md | 665 ++++++ .../references/permissions_setup_protocol.md | 1597 ++++++++++++++ .../references/pre_work_checklist.md | 243 +++ .../architect-agent/references/quick_start.md | 288 +++ .../references/resilience_protocol.md | 172 ++ .../references/testing_protocol.md | 451 ++++ .../ticket_tracking_pr_management.md | 630 ++++++ .../architect-agent/references/upgrade.md | 369 ++++ .../references/workspace_setup_complete.md | 1051 ++++++++++ .../workspace_verification_protocol.md | 788 +++++++ .../architect-agent/templates/README.md | 271 +++ .../.opencode/command/instruct.md | 31 + .../.opencode/command/send.md | 36 + .../.opencode/opencode.json | 3 + .../templates/architect-workspace/CLAUDE.md | 106 + .../architect-workspace/analysis/README.md | 68 + .../docs/critical_protocols.md | 382 ++++ .../docs/hybrid_logging.md | 99 + .../docs/technology_adaptations.md | 303 +++ .../architect-workspace/docs/workflow.md | 324 +++ .../architect-workspace/grades/README.md | 67 + .../architect-workspace/human/README.md | 54 + .../instructions/README.md | 36 + .../scripts/tail-code-agent-logs.sh | 204 ++ .../ticket/current_ticket.md | 66 + .../.claude/hook-logger.py | 188 ++ .../.claude/settings.json | 112 + .../.opencode/command/check.md | 41 + .../.opencode/command/instruct.md | 44 + .../.opencode/command/log-checkpoint.md | 35 + .../.opencode/command/log-complete.md | 33 + .../.opencode/command/log-start.md | 27 + .../.opencode/command/run.md | 13 + .../.opencode/opencode.json | 4 + .../.opencode/package.json | 5 + .../.opencode/plugin/logger.js | 347 +++ .../templates/code-agent-workspace/CLAUDE.md | 130 ++ .../code-agent-workspace/src/example.ts | 92 + .../templates/setup-workspace.sh | 214 ++ .../templates/verify-workspace.sh | 261 +++ .claude/skills/aws-cdk/SKILL.md | 16 + .claude/skills/design-doc-mermaid/.gitignore | 0 .../design-doc-mermaid/.skilz-manifest.yaml | 8 + .../HIGH_CONTRAST_UPDATE.md | 203 ++ .claude/skills/design-doc-mermaid/README.md | 357 ++++ .claude/skills/design-doc-mermaid/SKILL.md | 498 +++++ .../assets/api-design-template.md | 556 +++++ .../assets/architecture-design-template.md | 411 ++++ .../assets/database-design-template.md | 610 ++++++ .../assets/feature-design-template.md | 574 +++++ .../assets/system-design-template.md | 736 +++++++ .../examples/fastapi/README.md | 672 ++++++ .../examples/java-webapp/README.md | 1213 +++++++++++ .../examples/node-webapp/README.md | 741 +++++++ .../examples/python-etl/README.md | 820 ++++++++ .../examples/react/README.md | 652 ++++++ .../examples/spring-boot/README.md | 465 ++++ .../guides/code-to-diagram/README.md | 871 ++++++++ .../guides/diagrams/activity-diagrams.md | 478 +++++ .../guides/diagrams/architecture-diagrams.md | 997 +++++++++ .../guides/diagrams/deployment-diagrams.md | 621 ++++++ .../guides/diagrams/sequence-diagrams.md | 867 ++++++++ .../references/guides/resilient-workflow.md | 634 ++++++ .../references/guides/troubleshooting.md | 890 ++++++++ .../guides/unicode-symbols/guide.md | 474 +++++ .../references/mermaid-diagram-guide.md | 668 ++++++ .../scripts/extract_mermaid.py | 310 +++ .../scripts/mermaid_to_image.py | 335 +++ .../scripts/resilient_diagram.py | 684 ++++++ .../documentation-specialist/.gitignore | 75 + .../.skilz-manifest.yaml | 8 + .../EXAMPLES_CREATION_SUMMARY.md | 295 +++ .../PDA_COMPLETE_SUMMARY.md | 341 +++ .../PDA_REORGANIZATION_PLAN.md | 346 +++ .../skills/documentation-specialist/README.md | 544 +++++ .../RELEASE_NOTES_v2.1.0.md | 442 ++++ .../RELEASE_NOTES_v3.0.0.md | 216 ++ .../skills/documentation-specialist/SKILL.md | 139 ++ .../documentation-specialist/USER_GUIDE.md | 1084 ++++++++++ .../references/examples/TOC.md | 200 ++ .../brownfield/database-failover-runbook.md | 359 ++++ .../examples/greenfield/adr-microservices.md | 204 ++ .../examples/greenfield/billing-srs.md | 379 ++++ .../greenfield/cli-getting-started.md | 442 ++++ .../examples/greenfield/collaboration-prd.md | 398 ++++ .../examples/greenfield/rest-api-tutorial.md | 575 +++++ .../examples/greenfield/task-api-openapi.yaml | 703 +++++++ .../greenfield/taskmanager-user-manual.md | 309 +++ .../references/guides/requirements/README.md | 106 + .../mappings/backend/fastapi-mapping.yaml | 324 +++ .../mappings/backend/spring-boot-mapping.yaml | 746 +++++++ .../references/reference/01-philosophy.md | 56 + .../reference/02-requirements-srs-vs-prd.md | 43 + .../reference/02-requirements-traceability.md | 53 + .../reference/02-requirements-writing.md | 58 + .../references/reference/03-design-adrs.md | 81 + .../references/reference/03-design-arc42.md | 55 + .../03-design-requirements-matrix.md | 39 + .../reference/04-diagrams-c4-hierarchy.md | 81 + .../reference/04-diagrams-selection.md | 51 + .../04-diagrams-state-vs-activity.md | 96 + .../references/reference/05-api-checklist.md | 67 + .../references/reference/05-api-openapi.md | 147 ++ .../reference/05-api-stripe-gold-standard.md | 73 + .../reference/06-deployment-diagrams.md | 89 + .../reference/06-deployment-documentation.md | 136 ++ .../reference/06-deployment-runbooks.md | 100 + .../reference/06-operational-docs.md | 112 + .../reference/07-user-kb-approach.md | 80 + .../reference/07-user-kb-template.md | 136 ++ .../reference/07-user-writing-style.md | 97 + .../references/reference/08-agile-process.md | 122 ++ .../reference/08-tutorial-writing.md | 323 +++ .../reference/09-code-to-docs-detection.md | 98 + .../reference/09-code-to-docs-example.md | 148 ++ .../reference/09-code-to-docs-when.md | 68 + .../reference/09-code-to-docs-workflow.md | 92 + .../reference/10-quality-bonsai-pruning.md | 103 + .../reference/10-quality-checklist.md | 106 + .../reference/10-quality-metrics.md | 137 ++ .../reference/comprehensive-guide.md | 182 ++ .../templates/markdown/api-openapi.yaml | 659 ++++++ .../templates/markdown/developer-tutorial.md | 331 +++ .../templates/markdown/getting-started.md | 358 ++++ .../templates/markdown/howto-guide.md | 224 ++ .../templates/markdown/requirements-prd.md | 338 +++ .../templates/markdown/requirements-srs.md | 553 +++++ .../references/templates/markdown/runbook.md | 404 ++++ .../templates/markdown/user-manual.md | 231 ++ .../references/workflows/TOC.md | 42 + .../references/workflows/audit-workflow.md | 104 + .../workflows/brownfield-workflow.md | 120 ++ .../workflows/brownfield/fastapi-guide.md | 81 + .../workflows/brownfield/pulumi-guide.md | 84 + .../workflows/brownfield/springboot-guide.md | 86 + .../references/workflows/convert-workflow.md | 75 + .../references/workflows/diagram-workflow.md | 86 + .../workflows/greenfield-workflow.md | 110 + .../workflows/greenfield/advanced.md | 90 + .../workflows/greenfield/openapi-guide.md | 123 ++ .../workflows/greenfield/prd-guide.md | 76 + .../workflows/greenfield/srs-guide.md | 72 + .../references/workflows/runbook-workflow.md | 111 + .../references/workflows/tutorial-workflow.md | 89 + .../workflows/user-docs-workflow.md | 88 + .../mastering-git-cli/.skilz-manifest.yaml | 8 + .claude/skills/mastering-git-cli/SKILL.md | 427 ++++ .../references/advanced-operations.md | 316 +++ .../references/daily-usage.md | 256 +++ .../references/foundations.md | 271 +++ .../references/git-2025-features.md | 489 +++++ .../references/large-repos.md | 479 +++++ .../references/merge-operations.md | 477 +++++ .../mastering-git-cli/references/recovery.md | 306 +++ .../references/submodules.md | 440 ++++ .../mastering-git-cli/references/worktrees.md | 365 ++++ .../scripts/cleanup-agent-worktrees.sh | 181 ++ .../scripts/git-health-check.sh | 305 +++ .../scripts/setup-agent-worktrees.sh | 115 + .../scripts/submodule-report.sh | 237 +++ .../skills/mastering-github-cli/.gitignore | 23 + .../mastering-github-cli/.skilz-manifest.yaml | 8 + .claude/skills/mastering-github-cli/README.md | 173 ++ .claude/skills/mastering-github-cli/SKILL.md | 244 +++ .../mastering-github-cli/references/api.md | 459 ++++ .../references/automation.md | 763 +++++++ .../references/monitoring.md | 493 +++++ .../references/resources.md | 569 +++++ .../mastering-github-cli/references/search.md | 442 ++++ .../references/workflow-authoring.md | 1596 ++++++++++++++ .../scripts/batch-search.sh | 179 ++ .../scripts/find-repos-with-path.sh | 109 + .../scripts/wait-for-run.sh | 146 ++ .../.skilz-manifest.yaml | 8 + .../skills/mastering-python-skill/SKILL.md | 137 ++ .claude/skills/mastering-python-skill/TOC.md | 152 ++ .../references/foundations/code-quality.md | 613 ++++++ .../foundations/project-structure.md | 625 ++++++ .../foundations/syntax-essentials.md | 751 +++++++ .../references/foundations/type-systems.md | 582 ++++++ .../references/packaging/docker-deployment.md | 794 +++++++ .../references/packaging/poetry-workflow.md | 618 ++++++ .../references/packaging/pyproject-config.md | 598 ++++++ .../references/patterns/async-programming.md | 545 +++++ .../references/patterns/context-managers.md | 832 ++++++++ .../references/patterns/decorators.md | 792 +++++++ .../references/patterns/error-handling.md | 719 +++++++ .../references/patterns/generators.md | 811 +++++++ .../references/production/ci-cd-pipelines.md | 651 ++++++ .../references/production/monitoring.md | 894 ++++++++ .../references/production/security.md | 1141 ++++++++++ .../references/testing/mocking-strategies.md | 1014 +++++++++ .../references/testing/property-testing.md | 1036 +++++++++ .../references/testing/pytest-essentials.md | 756 +++++++ .../references/web-apis/database-access.md | 984 +++++++++ .../references/web-apis/fastapi-patterns.md | 684 ++++++ .../web-apis/pydantic-validation.md | 836 ++++++++ .../sample-cli/README.md | 173 ++ .../sample-cli/async_fetcher.py | 266 +++ .../sample-cli/code_validator.py | 320 +++ .../sample-cli/config_loader.py | 348 +++ .../sample-cli/db_cli.py | 453 ++++ .../mastering-typescript/.skilz-manifest.yaml | 8 + .claude/skills/mastering-typescript/SKILL.md | 441 ++++ .../assets/eslint-template.js | 89 + .../assets/tsconfig-template.json | 45 + .../references/enterprise-patterns.md | 536 +++++ .../references/generics.md | 499 +++++ .../references/nestjs-integration.md | 591 ++++++ .../references/react-integration.md | 618 ++++++ .../references/toolchain.md | 546 +++++ .../references/type-system.md | 478 +++++ .../scripts/validate-setup.sh | 192 ++ .claude/skills/plantuml/.skilz-manifest.yaml | 8 + .claude/skills/plantuml/CHANGELOG.md | 212 ++ .claude/skills/plantuml/FINAL_SUMMARY.md | 538 +++++ .../plantuml/PDA_OPTIMIZATION_SUMMARY.md | 521 +++++ .claude/skills/plantuml/README.md | 506 +++++ .claude/skills/plantuml/SKILL-PDA.md | 424 ++++ .claude/skills/plantuml/SKILL.md | 324 +++ .../plantuml/examples/fastapi/README.md | 63 + .../examples/fastapi/deployment-diagram.puml | 217 ++ .../python-etl/architecture-diagram.puml | 261 +++ .../plantuml/examples/spring-boot/README.md | 49 + .../spring-boot/component-diagram.puml | 178 ++ .../spring-boot/deployment-diagram.puml | 130 ++ .../spring-boot/sequence-diagram.puml | 196 ++ .../plantuml/examples/test_linked_puml.md | 71 + .../plantuml/examples/test_resilient.md | 45 + .../plantuml/references/activity_diagrams.md | 134 ++ .../plantuml/references/archimate_diagrams.md | 23 + .../plantuml/references/class_diagrams.md | 642 ++++++ .../plantuml/references/common_format.md | 677 ++++++ .../references/common_syntax_errors.md | 1755 ++++++++++++++++ .../plantuml/references/component_diagrams.md | 55 + .../references/deployment_diagrams.md | 46 + .../plantuml/references/ditaa_diagrams.md | 34 + .../skills/plantuml/references/er_diagrams.md | 570 +++++ .../plantuml/references/gantt_diagrams.md | 39 + .../plantuml/references/json_yaml_diagrams.md | 44 + .../plantuml/references/mindmap_diagrams.md | 40 + .../plantuml/references/network_diagrams.md | 43 + .../plantuml/references/object_diagrams.md | 41 + .../plantuml/references/plantuml_reference.md | 619 ++++++ .../plantuml/references/sequence_diagrams.md | 540 +++++ .../plantuml/references/state_diagrams.md | 97 + .../plantuml/references/styling_guide.md | 1489 +++++++++++++ .../plantuml/references/timeline_diagrams.md | 28 + .../plantuml/references/timing_diagrams.md | 52 + .claude/skills/plantuml/references/toc.md | 158 ++ .../activity_diagrams_guide.md | 902 ++++++++ .../arrows_relationships_guide.md | 932 +++++++++ .../troubleshooting/class_diagrams_guide.md | 867 ++++++++ .../troubleshooting/er_diagrams_guide.md | 931 +++++++++ .../troubleshooting/general_syntax_guide.md | 907 ++++++++ .../troubleshooting/image_generation_guide.md | 819 ++++++++ .../installation_setup_guide.md | 769 +++++++ .../troubleshooting/performance_guide.md | 942 +++++++++ .../preprocessor_includes_guide.md | 883 ++++++++ .../sequence_diagrams_guide.md | 883 ++++++++ .../troubleshooting/styling_themes_guide.md | 964 +++++++++ .../troubleshooting/text_labels_guide.md | 863 ++++++++ .../references/troubleshooting/toc.md | 149 ++ .../plantuml/references/unicode_symbols.md | 412 ++++ .../plantuml/references/use_case_diagrams.md | 93 + .../plantuml/references/wbs_diagrams.md | 38 + .../plantuml/references/wireframes_salt.md | 46 + .../workflows/resilient-execution-guide.md | 294 +++ .../skills/plantuml/scripts/check_setup.py | 113 + .../skills/plantuml/scripts/convert_puml.py | 160 ++ .../scripts/extract_and_convert_puml.py | 196 ++ .../plantuml/scripts/process_markdown_puml.py | 394 ++++ .../plantuml/scripts/resilient_processor.py | 638 ++++++ .claude/skills/pr-reviewer/.gitignore | 53 + .../skills/pr-reviewer/.skilz-manifest.yaml | 8 + .claude/skills/pr-reviewer/README.md | 428 ++++ .claude/skills/pr-reviewer/SKILL.md | 378 ++++ .../pr-reviewer/references/gh_cli_guide.md | 368 ++++ .../pr-reviewer/references/review_criteria.md | 345 +++ .../pr-reviewer/references/scenarios.md | 71 + .../pr-reviewer/references/troubleshooting.md | 55 + .../pr-reviewer/scripts/add_inline_comment.py | 163 ++ .../pr-reviewer/scripts/fetch_pr_data.py | 327 +++ .../scripts/generate_review_files.py | 480 +++++ .../project-memory/.skilz-manifest.yaml | 8 + .claude/skills/project-memory/README.md | 687 ++++++ .claude/skills/project-memory/SKILL.md | 298 +++ .../references/bugs_template.md | 41 + .../references/decisions_template.md | 92 + .../references/issues_template.md | 76 + .../references/key_facts_template.md | 158 ++ .../react-best-practices/.skilz-manifest.yaml | 8 + .claude/skills/react-best-practices/README.md | 123 ++ .claude/skills/react-best-practices/SKILL.md | 136 ++ .../skills/react-best-practices/metadata.json | 15 + .../react-best-practices/rules/_sections.md | 46 + .../react-best-practices/rules/_template.md | 28 + .../rules/advanced-event-handler-refs.md | 55 + .../rules/advanced-init-once.md | 42 + .../rules/advanced-use-latest.md | 39 + .../rules/async-api-routes.md | 38 + .../rules/async-defer-await.md | 80 + .../rules/async-dependencies.md | 51 + .../rules/async-parallel.md | 28 + .../rules/async-suspense-boundaries.md | 99 + .../rules/bundle-barrel-imports.md | 59 + .../rules/bundle-conditional.md | 31 + .../rules/bundle-defer-third-party.md | 49 + .../rules/bundle-dynamic-imports.md | 35 + .../rules/bundle-preload.md | 50 + .../rules/client-event-listeners.md | 74 + .../rules/client-localstorage-schema.md | 71 + .../rules/client-passive-event-listeners.md | 48 + .../rules/client-swr-dedup.md | 56 + .../rules/js-batch-dom-css.md | 107 + .../rules/js-cache-function-results.md | 80 + .../rules/js-cache-property-access.md | 28 + .../rules/js-cache-storage.md | 70 + .../rules/js-combine-iterations.md | 32 + .../rules/js-early-exit.md | 50 + .../rules/js-hoist-regexp.md | 45 + .../rules/js-index-maps.md | 37 + .../rules/js-length-check-first.md | 49 + .../rules/js-min-max-loop.md | 82 + .../rules/js-set-map-lookups.md | 24 + .../rules/js-tosorted-immutable.md | 57 + .../rules/rendering-activity.md | 26 + .../rules/rendering-animate-svg-wrapper.md | 47 + .../rules/rendering-conditional-render.md | 40 + .../rules/rendering-content-visibility.md | 38 + .../rules/rendering-hoist-jsx.md | 46 + .../rules/rendering-hydration-no-flicker.md | 82 + .../rendering-hydration-suppress-warning.md | 30 + .../rules/rendering-svg-precision.md | 28 + .../rules/rendering-usetransition-loading.md | 75 + .../rules/rerender-defer-reads.md | 39 + .../rules/rerender-dependencies.md | 45 + .../rules/rerender-derived-state-no-effect.md | 40 + .../rules/rerender-derived-state.md | 29 + .../rules/rerender-functional-setstate.md | 74 + .../rules/rerender-lazy-state-init.md | 58 + .../rules/rerender-memo-with-default-value.md | 38 + .../rules/rerender-memo.md | 44 + .../rules/rerender-move-effect-to-event.md | 45 + .../rerender-simple-expression-in-memo.md | 35 + .../rules/rerender-transitions.md | 40 + .../rerender-use-ref-transient-values.md | 73 + .../rules/server-after-nonblocking.md | 73 + .../rules/server-auth-actions.md | 96 + .../rules/server-cache-lru.md | 41 + .../rules/server-cache-react.md | 76 + .../rules/server-dedup-props.md | 65 + .../rules/server-parallel-fetching.md | 83 + .../rules/server-serialization.md | 38 + .claude/skills/release-cch/README.md | 80 +- .claude/skills/release-cch/SKILL.md | 255 +-- .../release-cch/references/hotfix-workflow.md | 116 +- .../references/release-workflow.md | 26 - .../release-cch/references/troubleshooting.md | 146 +- .../release-cch/scripts/generate-changelog.sh | 13 +- .../release-cch/scripts/preflight-check.sh | 19 +- .../release-cch/scripts/read-version.sh | 2 +- .../release-cch/scripts/verify-release.sh | 7 - .../release-cch/templates/changelog-entry.md | 27 - .../skills/release-cch/templates/pr-body.md | 4 - .claude/skills/sdd/.gitignore | 1 + .claude/skills/sdd/.skilz-manifest.yaml | 8 + .claude/skills/sdd/README.md | 186 ++ .claude/skills/sdd/package-lock.json | 63 + .claude/skills/sdd/package.json | 6 + .claude/skills/sdd/references/brownfield.md | 1361 ++++++++++++ .../sdd/references/feature_management.md | 688 ++++++ .claude/skills/sdd/references/greenfield.md | 506 +++++ .claude/skills/sdd/references/sdd_install.md | 143 ++ .../skills/sdd/scripts/analyze-edge-cases.py | 74 + .../sdd/scripts/analyze-requirements.py | 137 ++ .../sdd/scripts/analyze-success-criteria.py | 83 + .claude/skills/sdd/scripts/phase_summary.sh | 179 ++ .claude/skills/sdd/skill.json | 42 + .claude/skills/sdd/skill.md | 658 ++++++ .claude/validators/no-console-log.py | 27 + .claude/validators/slow-validator.py | 8 + .../.claude/hook-logger.py | 188 ++ .../.claude/settings.json | 112 + .../react-best-practices/.skilz-manifest.yaml | 8 + .../skill/react-best-practices/README.md | 123 ++ .opencode/skill/react-best-practices/SKILL.md | 136 ++ .../skill/react-best-practices/metadata.json | 15 + .../react-best-practices/rules/_sections.md | 46 + .../react-best-practices/rules/_template.md | 28 + .../rules/advanced-event-handler-refs.md | 55 + .../rules/advanced-init-once.md | 42 + .../rules/advanced-use-latest.md | 39 + .../rules/async-api-routes.md | 38 + .../rules/async-defer-await.md | 80 + .../rules/async-dependencies.md | 51 + .../rules/async-parallel.md | 28 + .../rules/async-suspense-boundaries.md | 99 + .../rules/bundle-barrel-imports.md | 59 + .../rules/bundle-conditional.md | 31 + .../rules/bundle-defer-third-party.md | 49 + .../rules/bundle-dynamic-imports.md | 35 + .../rules/bundle-preload.md | 50 + .../rules/client-event-listeners.md | 74 + .../rules/client-localstorage-schema.md | 71 + .../rules/client-passive-event-listeners.md | 48 + .../rules/client-swr-dedup.md | 56 + .../rules/js-batch-dom-css.md | 107 + .../rules/js-cache-function-results.md | 80 + .../rules/js-cache-property-access.md | 28 + .../rules/js-cache-storage.md | 70 + .../rules/js-combine-iterations.md | 32 + .../rules/js-early-exit.md | 50 + .../rules/js-hoist-regexp.md | 45 + .../rules/js-index-maps.md | 37 + .../rules/js-length-check-first.md | 49 + .../rules/js-min-max-loop.md | 82 + .../rules/js-set-map-lookups.md | 24 + .../rules/js-tosorted-immutable.md | 57 + .../rules/rendering-activity.md | 26 + .../rules/rendering-animate-svg-wrapper.md | 47 + .../rules/rendering-conditional-render.md | 40 + .../rules/rendering-content-visibility.md | 38 + .../rules/rendering-hoist-jsx.md | 46 + .../rules/rendering-hydration-no-flicker.md | 82 + .../rendering-hydration-suppress-warning.md | 30 + .../rules/rendering-svg-precision.md | 28 + .../rules/rendering-usetransition-loading.md | 75 + .../rules/rerender-defer-reads.md | 39 + .../rules/rerender-dependencies.md | 45 + .../rules/rerender-derived-state-no-effect.md | 40 + .../rules/rerender-derived-state.md | 29 + .../rules/rerender-functional-setstate.md | 74 + .../rules/rerender-lazy-state-init.md | 58 + .../rules/rerender-memo-with-default-value.md | 38 + .../rules/rerender-memo.md | 44 + .../rules/rerender-move-effect-to-event.md | 45 + .../rerender-simple-expression-in-memo.md | 35 + .../rules/rerender-transitions.md | 40 + .../rerender-use-ref-transient-values.md | 73 + .../rules/server-after-nonblocking.md | 73 + .../rules/server-auth-actions.md | 96 + .../rules/server-cache-lru.md | 41 + .../rules/server-cache-react.md | 76 + .../rules/server-dedup-props.md | 65 + .../rules/server-parallel-fetching.md | 83 + .../rules/server-serialization.md | 38 + .../.claude/hook-logger.py | 188 ++ .../.claude/settings.json | 112 + docs/wiki-mapping-process.md | 330 +++ docs/wiki-mapping.yml | 116 + rulez_ui/biome.json | 8 +- rulez_ui/bun.lock | 474 +++++ rulez_ui/package.json | 4 +- rulez_ui/postcss.config.js | 2 +- rulez_ui/public/schema/hooks-schema.json | 299 +++ .../src/components/editor/EditorToolbar.tsx | 188 ++ rulez_ui/src/components/editor/RuleCard.tsx | 105 + .../src/components/editor/RuleTreeView.tsx | 158 ++ .../src/components/editor/ValidationPanel.tsx | 132 ++ rulez_ui/src/components/editor/YamlEditor.tsx | 156 ++ rulez_ui/src/components/files/FileTabBar.tsx | 145 +- rulez_ui/src/components/layout/AppShell.tsx | 4 +- rulez_ui/src/components/layout/Header.tsx | 13 +- .../src/components/layout/MainContent.tsx | 36 +- rulez_ui/src/components/layout/RightPanel.tsx | 94 +- rulez_ui/src/components/layout/Sidebar.tsx | 33 +- rulez_ui/src/components/layout/StatusBar.tsx | 23 +- .../components/simulator/DebugSimulator.tsx | 58 + .../components/simulator/EvaluationTrace.tsx | 112 + .../src/components/simulator/EventForm.tsx | 124 ++ .../src/components/simulator/ResultView.tsx | 36 + rulez_ui/src/components/ui/ConfirmDialog.tsx | 71 + rulez_ui/src/components/ui/ThemeToggle.tsx | 27 +- rulez_ui/src/lib/schema.ts | 22 + rulez_ui/src/lib/tauri.test.ts | 5 +- rulez_ui/src/lib/tauri.ts | 10 +- rulez_ui/src/lib/yaml-utils.ts | 199 ++ rulez_ui/src/main.tsx | 4 +- rulez_ui/src/stores/configStore.ts | 2 +- rulez_ui/src/stores/editorStore.ts | 8 +- rulez_ui/src/styles/globals.css | 6 +- rulez_ui/src/styles/monaco-theme.ts | 48 + rulez_ui/tests/app.spec.ts | 2 +- rulez_ui/tests/editor.spec.ts | 57 + rulez_ui/tests/file-ops.spec.ts | 85 + rulez_ui/tests/simulator.spec.ts | 71 + rulez_ui/tests/tree-view.spec.ts | 50 + rulez_ui/vite.config.ts | 4 +- .../01-block-force-push/.claude/hooks.yaml | 26 + .../.claude/context/cdk-best-practices.md | 28 + .../02-context-injection/.claude/hooks.yaml | 27 + .../03-session-logging/.claude/hooks.yaml | 24 + .../context/bash-permission-context.md | 30 + .../context/write-permission-context.md | 30 + .../.claude/hooks.yaml | 27 + 551 files changed, 134367 insertions(+), 816 deletions(-) create mode 100644 .claude/commands/speckit.analyze.md create mode 100644 .claude/commands/speckit.checklist.md create mode 100644 .claude/commands/speckit.clarify.md create mode 100644 .claude/commands/speckit.constitution.md create mode 100644 .claude/commands/speckit.implement.md create mode 100644 .claude/commands/speckit.plan.md create mode 100644 .claude/commands/speckit.specify.md create mode 100644 .claude/commands/speckit.tasks.md create mode 100644 .claude/commands/speckit.taskstoissues.md create mode 100644 .claude/context/explain-command.md create mode 100644 .claude/hooks.yaml create mode 100644 .claude/settings.local.json create mode 100644 .claude/skills/architect-agent/.gitignore create mode 100644 .claude/skills/architect-agent/.skilz-manifest.yaml create mode 100644 .claude/skills/architect-agent/CLAUDE.md create mode 100644 .claude/skills/architect-agent/CONTRIBUTING.md create mode 100644 .claude/skills/architect-agent/README.md create mode 100644 .claude/skills/architect-agent/SKILL.md create mode 100644 .claude/skills/architect-agent/SPEC.md create mode 100644 .claude/skills/architect-agent/docs/testing/opencode-integration-test/README.md create mode 100644 .claude/skills/architect-agent/docs/testing/opencode-integration-test/expected-outputs/basic-log-sample.md create mode 100755 .claude/skills/architect-agent/docs/testing/opencode-integration-test/test-scenarios/01-basic-logging.sh create mode 100644 .claude/skills/architect-agent/evaluation-report.md create mode 100644 .claude/skills/architect-agent/examples/human-instructions/BAD-vague-summary.md create mode 100644 .claude/skills/architect-agent/examples/human-instructions/GOOD-database-migration.md create mode 100644 .claude/skills/architect-agent/examples/human-instructions/GOOD-parallel-worktrees.md create mode 100644 .claude/skills/architect-agent/examples/human-instructions/README.md create mode 100644 .claude/skills/architect-agent/guides/README.md create mode 100644 .claude/skills/architect-agent/guides/workflows/create-instructions.md create mode 100644 .claude/skills/architect-agent/guides/workflows/grade-work.md create mode 100644 .claude/skills/architect-agent/guides/workflows/initialize-workspace.md create mode 100644 .claude/skills/architect-agent/guides/workflows/send-instructions.md create mode 100644 .claude/skills/architect-agent/references/README.md create mode 100644 .claude/skills/architect-agent/references/agent_specialization.md create mode 100644 .claude/skills/architect-agent/references/claude_vs_opencode_comparison.md create mode 100644 .claude/skills/architect-agent/references/code_agent_agents_template.md create mode 100644 .claude/skills/architect-agent/references/code_agent_claude_template.md create mode 100644 .claude/skills/architect-agent/references/decision_types.md create mode 100644 .claude/skills/architect-agent/references/file_naming.md create mode 100644 .claude/skills/architect-agent/references/get_unstuck_protocol.md create mode 100644 .claude/skills/architect-agent/references/git_pr_management.md create mode 100644 .claude/skills/architect-agent/references/grading_rubrics.md create mode 100644 .claude/skills/architect-agent/references/hook_configuration_critical.md create mode 100644 .claude/skills/architect-agent/references/hook_logger_enhancements.md create mode 100644 .claude/skills/architect-agent/references/human_instruction_structure.md create mode 100644 .claude/skills/architect-agent/references/hybrid_logging_migration_guide.md create mode 100644 .claude/skills/architect-agent/references/hybrid_logging_protocol.md create mode 100644 .claude/skills/architect-agent/references/installation.md create mode 100644 .claude/skills/architect-agent/references/instruction_grading_workflow.md create mode 100644 .claude/skills/architect-agent/references/instruction_structure.md create mode 100644 .claude/skills/architect-agent/references/logging_protocol.md create mode 100644 .claude/skills/architect-agent/references/opencode_integration_quickstart.md create mode 100644 .claude/skills/architect-agent/references/opencode_logging_protocol.md create mode 100644 .claude/skills/architect-agent/references/opencode_migration_guide.md create mode 100644 .claude/skills/architect-agent/references/opencode_setup_guide.md create mode 100644 .claude/skills/architect-agent/references/opencode_wrapper_setup.md create mode 100644 .claude/skills/architect-agent/references/permissions_setup_protocol.md create mode 100644 .claude/skills/architect-agent/references/pre_work_checklist.md create mode 100644 .claude/skills/architect-agent/references/quick_start.md create mode 100644 .claude/skills/architect-agent/references/resilience_protocol.md create mode 100644 .claude/skills/architect-agent/references/testing_protocol.md create mode 100644 .claude/skills/architect-agent/references/ticket_tracking_pr_management.md create mode 100644 .claude/skills/architect-agent/references/upgrade.md create mode 100644 .claude/skills/architect-agent/references/workspace_setup_complete.md create mode 100644 .claude/skills/architect-agent/references/workspace_verification_protocol.md create mode 100644 .claude/skills/architect-agent/templates/README.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/.opencode/command/instruct.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/.opencode/command/send.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/.opencode/opencode.json create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/CLAUDE.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/analysis/README.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/docs/critical_protocols.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/docs/hybrid_logging.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/docs/technology_adaptations.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/docs/workflow.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/grades/README.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/human/README.md create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/instructions/README.md create mode 100755 .claude/skills/architect-agent/templates/architect-workspace/scripts/tail-code-agent-logs.sh create mode 100644 .claude/skills/architect-agent/templates/architect-workspace/ticket/current_ticket.md create mode 100755 .claude/skills/architect-agent/templates/code-agent-workspace/.claude/hook-logger.py create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.claude/settings.json create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/check.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/instruct.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/log-checkpoint.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/log-complete.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/log-start.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/command/run.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/opencode.json create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/package.json create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/.opencode/plugin/logger.js create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/CLAUDE.md create mode 100644 .claude/skills/architect-agent/templates/code-agent-workspace/src/example.ts create mode 100755 .claude/skills/architect-agent/templates/setup-workspace.sh create mode 100755 .claude/skills/architect-agent/templates/verify-workspace.sh create mode 100644 .claude/skills/aws-cdk/SKILL.md create mode 100644 .claude/skills/design-doc-mermaid/.gitignore create mode 100644 .claude/skills/design-doc-mermaid/.skilz-manifest.yaml create mode 100644 .claude/skills/design-doc-mermaid/HIGH_CONTRAST_UPDATE.md create mode 100644 .claude/skills/design-doc-mermaid/README.md create mode 100644 .claude/skills/design-doc-mermaid/SKILL.md create mode 100644 .claude/skills/design-doc-mermaid/assets/api-design-template.md create mode 100644 .claude/skills/design-doc-mermaid/assets/architecture-design-template.md create mode 100644 .claude/skills/design-doc-mermaid/assets/database-design-template.md create mode 100644 .claude/skills/design-doc-mermaid/assets/feature-design-template.md create mode 100644 .claude/skills/design-doc-mermaid/assets/system-design-template.md create mode 100644 .claude/skills/design-doc-mermaid/examples/fastapi/README.md create mode 100644 .claude/skills/design-doc-mermaid/examples/java-webapp/README.md create mode 100644 .claude/skills/design-doc-mermaid/examples/node-webapp/README.md create mode 100644 .claude/skills/design-doc-mermaid/examples/python-etl/README.md create mode 100644 .claude/skills/design-doc-mermaid/examples/react/README.md create mode 100644 .claude/skills/design-doc-mermaid/examples/spring-boot/README.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/code-to-diagram/README.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/diagrams/activity-diagrams.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/diagrams/architecture-diagrams.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/diagrams/deployment-diagrams.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/diagrams/sequence-diagrams.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/resilient-workflow.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/troubleshooting.md create mode 100644 .claude/skills/design-doc-mermaid/references/guides/unicode-symbols/guide.md create mode 100644 .claude/skills/design-doc-mermaid/references/mermaid-diagram-guide.md create mode 100755 .claude/skills/design-doc-mermaid/scripts/extract_mermaid.py create mode 100755 .claude/skills/design-doc-mermaid/scripts/mermaid_to_image.py create mode 100755 .claude/skills/design-doc-mermaid/scripts/resilient_diagram.py create mode 100644 .claude/skills/documentation-specialist/.gitignore create mode 100644 .claude/skills/documentation-specialist/.skilz-manifest.yaml create mode 100644 .claude/skills/documentation-specialist/EXAMPLES_CREATION_SUMMARY.md create mode 100644 .claude/skills/documentation-specialist/PDA_COMPLETE_SUMMARY.md create mode 100644 .claude/skills/documentation-specialist/PDA_REORGANIZATION_PLAN.md create mode 100644 .claude/skills/documentation-specialist/README.md create mode 100644 .claude/skills/documentation-specialist/RELEASE_NOTES_v2.1.0.md create mode 100644 .claude/skills/documentation-specialist/RELEASE_NOTES_v3.0.0.md create mode 100644 .claude/skills/documentation-specialist/SKILL.md create mode 100644 .claude/skills/documentation-specialist/USER_GUIDE.md create mode 100644 .claude/skills/documentation-specialist/references/examples/TOC.md create mode 100644 .claude/skills/documentation-specialist/references/examples/brownfield/database-failover-runbook.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/adr-microservices.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/billing-srs.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/cli-getting-started.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/collaboration-prd.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/rest-api-tutorial.md create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/task-api-openapi.yaml create mode 100644 .claude/skills/documentation-specialist/references/examples/greenfield/taskmanager-user-manual.md create mode 100644 .claude/skills/documentation-specialist/references/guides/requirements/README.md create mode 100644 .claude/skills/documentation-specialist/references/mappings/backend/fastapi-mapping.yaml create mode 100644 .claude/skills/documentation-specialist/references/mappings/backend/spring-boot-mapping.yaml create mode 100644 .claude/skills/documentation-specialist/references/reference/01-philosophy.md create mode 100644 .claude/skills/documentation-specialist/references/reference/02-requirements-srs-vs-prd.md create mode 100644 .claude/skills/documentation-specialist/references/reference/02-requirements-traceability.md create mode 100644 .claude/skills/documentation-specialist/references/reference/02-requirements-writing.md create mode 100644 .claude/skills/documentation-specialist/references/reference/03-design-adrs.md create mode 100644 .claude/skills/documentation-specialist/references/reference/03-design-arc42.md create mode 100644 .claude/skills/documentation-specialist/references/reference/03-design-requirements-matrix.md create mode 100644 .claude/skills/documentation-specialist/references/reference/04-diagrams-c4-hierarchy.md create mode 100644 .claude/skills/documentation-specialist/references/reference/04-diagrams-selection.md create mode 100644 .claude/skills/documentation-specialist/references/reference/04-diagrams-state-vs-activity.md create mode 100644 .claude/skills/documentation-specialist/references/reference/05-api-checklist.md create mode 100644 .claude/skills/documentation-specialist/references/reference/05-api-openapi.md create mode 100644 .claude/skills/documentation-specialist/references/reference/05-api-stripe-gold-standard.md create mode 100644 .claude/skills/documentation-specialist/references/reference/06-deployment-diagrams.md create mode 100644 .claude/skills/documentation-specialist/references/reference/06-deployment-documentation.md create mode 100644 .claude/skills/documentation-specialist/references/reference/06-deployment-runbooks.md create mode 100644 .claude/skills/documentation-specialist/references/reference/06-operational-docs.md create mode 100644 .claude/skills/documentation-specialist/references/reference/07-user-kb-approach.md create mode 100644 .claude/skills/documentation-specialist/references/reference/07-user-kb-template.md create mode 100644 .claude/skills/documentation-specialist/references/reference/07-user-writing-style.md create mode 100644 .claude/skills/documentation-specialist/references/reference/08-agile-process.md create mode 100644 .claude/skills/documentation-specialist/references/reference/08-tutorial-writing.md create mode 100644 .claude/skills/documentation-specialist/references/reference/09-code-to-docs-detection.md create mode 100644 .claude/skills/documentation-specialist/references/reference/09-code-to-docs-example.md create mode 100644 .claude/skills/documentation-specialist/references/reference/09-code-to-docs-when.md create mode 100644 .claude/skills/documentation-specialist/references/reference/09-code-to-docs-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/reference/10-quality-bonsai-pruning.md create mode 100644 .claude/skills/documentation-specialist/references/reference/10-quality-checklist.md create mode 100644 .claude/skills/documentation-specialist/references/reference/10-quality-metrics.md create mode 100644 .claude/skills/documentation-specialist/references/reference/comprehensive-guide.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/api-openapi.yaml create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/developer-tutorial.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/getting-started.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/howto-guide.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/requirements-prd.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/requirements-srs.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/runbook.md create mode 100644 .claude/skills/documentation-specialist/references/templates/markdown/user-manual.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/TOC.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/audit-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/brownfield-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/brownfield/fastapi-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/brownfield/pulumi-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/brownfield/springboot-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/convert-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/diagram-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/greenfield-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/greenfield/advanced.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/greenfield/openapi-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/greenfield/prd-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/greenfield/srs-guide.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/runbook-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/tutorial-workflow.md create mode 100644 .claude/skills/documentation-specialist/references/workflows/user-docs-workflow.md create mode 100644 .claude/skills/mastering-git-cli/.skilz-manifest.yaml create mode 100644 .claude/skills/mastering-git-cli/SKILL.md create mode 100644 .claude/skills/mastering-git-cli/references/advanced-operations.md create mode 100644 .claude/skills/mastering-git-cli/references/daily-usage.md create mode 100644 .claude/skills/mastering-git-cli/references/foundations.md create mode 100644 .claude/skills/mastering-git-cli/references/git-2025-features.md create mode 100644 .claude/skills/mastering-git-cli/references/large-repos.md create mode 100644 .claude/skills/mastering-git-cli/references/merge-operations.md create mode 100644 .claude/skills/mastering-git-cli/references/recovery.md create mode 100644 .claude/skills/mastering-git-cli/references/submodules.md create mode 100644 .claude/skills/mastering-git-cli/references/worktrees.md create mode 100755 .claude/skills/mastering-git-cli/scripts/cleanup-agent-worktrees.sh create mode 100755 .claude/skills/mastering-git-cli/scripts/git-health-check.sh create mode 100755 .claude/skills/mastering-git-cli/scripts/setup-agent-worktrees.sh create mode 100755 .claude/skills/mastering-git-cli/scripts/submodule-report.sh create mode 100644 .claude/skills/mastering-github-cli/.gitignore create mode 100644 .claude/skills/mastering-github-cli/.skilz-manifest.yaml create mode 100644 .claude/skills/mastering-github-cli/README.md create mode 100644 .claude/skills/mastering-github-cli/SKILL.md create mode 100644 .claude/skills/mastering-github-cli/references/api.md create mode 100644 .claude/skills/mastering-github-cli/references/automation.md create mode 100644 .claude/skills/mastering-github-cli/references/monitoring.md create mode 100644 .claude/skills/mastering-github-cli/references/resources.md create mode 100644 .claude/skills/mastering-github-cli/references/search.md create mode 100644 .claude/skills/mastering-github-cli/references/workflow-authoring.md create mode 100755 .claude/skills/mastering-github-cli/scripts/batch-search.sh create mode 100755 .claude/skills/mastering-github-cli/scripts/find-repos-with-path.sh create mode 100755 .claude/skills/mastering-github-cli/scripts/wait-for-run.sh create mode 100644 .claude/skills/mastering-python-skill/.skilz-manifest.yaml create mode 100644 .claude/skills/mastering-python-skill/SKILL.md create mode 100644 .claude/skills/mastering-python-skill/TOC.md create mode 100644 .claude/skills/mastering-python-skill/references/foundations/code-quality.md create mode 100644 .claude/skills/mastering-python-skill/references/foundations/project-structure.md create mode 100644 .claude/skills/mastering-python-skill/references/foundations/syntax-essentials.md create mode 100644 .claude/skills/mastering-python-skill/references/foundations/type-systems.md create mode 100644 .claude/skills/mastering-python-skill/references/packaging/docker-deployment.md create mode 100644 .claude/skills/mastering-python-skill/references/packaging/poetry-workflow.md create mode 100644 .claude/skills/mastering-python-skill/references/packaging/pyproject-config.md create mode 100644 .claude/skills/mastering-python-skill/references/patterns/async-programming.md create mode 100644 .claude/skills/mastering-python-skill/references/patterns/context-managers.md create mode 100644 .claude/skills/mastering-python-skill/references/patterns/decorators.md create mode 100644 .claude/skills/mastering-python-skill/references/patterns/error-handling.md create mode 100644 .claude/skills/mastering-python-skill/references/patterns/generators.md create mode 100644 .claude/skills/mastering-python-skill/references/production/ci-cd-pipelines.md create mode 100644 .claude/skills/mastering-python-skill/references/production/monitoring.md create mode 100644 .claude/skills/mastering-python-skill/references/production/security.md create mode 100644 .claude/skills/mastering-python-skill/references/testing/mocking-strategies.md create mode 100644 .claude/skills/mastering-python-skill/references/testing/property-testing.md create mode 100644 .claude/skills/mastering-python-skill/references/testing/pytest-essentials.md create mode 100644 .claude/skills/mastering-python-skill/references/web-apis/database-access.md create mode 100644 .claude/skills/mastering-python-skill/references/web-apis/fastapi-patterns.md create mode 100644 .claude/skills/mastering-python-skill/references/web-apis/pydantic-validation.md create mode 100644 .claude/skills/mastering-python-skill/sample-cli/README.md create mode 100644 .claude/skills/mastering-python-skill/sample-cli/async_fetcher.py create mode 100644 .claude/skills/mastering-python-skill/sample-cli/code_validator.py create mode 100644 .claude/skills/mastering-python-skill/sample-cli/config_loader.py create mode 100644 .claude/skills/mastering-python-skill/sample-cli/db_cli.py create mode 100644 .claude/skills/mastering-typescript/.skilz-manifest.yaml create mode 100644 .claude/skills/mastering-typescript/SKILL.md create mode 100644 .claude/skills/mastering-typescript/assets/eslint-template.js create mode 100644 .claude/skills/mastering-typescript/assets/tsconfig-template.json create mode 100644 .claude/skills/mastering-typescript/references/enterprise-patterns.md create mode 100644 .claude/skills/mastering-typescript/references/generics.md create mode 100644 .claude/skills/mastering-typescript/references/nestjs-integration.md create mode 100644 .claude/skills/mastering-typescript/references/react-integration.md create mode 100644 .claude/skills/mastering-typescript/references/toolchain.md create mode 100644 .claude/skills/mastering-typescript/references/type-system.md create mode 100755 .claude/skills/mastering-typescript/scripts/validate-setup.sh create mode 100644 .claude/skills/plantuml/.skilz-manifest.yaml create mode 100644 .claude/skills/plantuml/CHANGELOG.md create mode 100644 .claude/skills/plantuml/FINAL_SUMMARY.md create mode 100644 .claude/skills/plantuml/PDA_OPTIMIZATION_SUMMARY.md create mode 100644 .claude/skills/plantuml/README.md create mode 100644 .claude/skills/plantuml/SKILL-PDA.md create mode 100644 .claude/skills/plantuml/SKILL.md create mode 100644 .claude/skills/plantuml/examples/fastapi/README.md create mode 100644 .claude/skills/plantuml/examples/fastapi/deployment-diagram.puml create mode 100644 .claude/skills/plantuml/examples/python-etl/architecture-diagram.puml create mode 100644 .claude/skills/plantuml/examples/spring-boot/README.md create mode 100644 .claude/skills/plantuml/examples/spring-boot/component-diagram.puml create mode 100644 .claude/skills/plantuml/examples/spring-boot/deployment-diagram.puml create mode 100644 .claude/skills/plantuml/examples/spring-boot/sequence-diagram.puml create mode 100644 .claude/skills/plantuml/examples/test_linked_puml.md create mode 100644 .claude/skills/plantuml/examples/test_resilient.md create mode 100644 .claude/skills/plantuml/references/activity_diagrams.md create mode 100644 .claude/skills/plantuml/references/archimate_diagrams.md create mode 100644 .claude/skills/plantuml/references/class_diagrams.md create mode 100644 .claude/skills/plantuml/references/common_format.md create mode 100644 .claude/skills/plantuml/references/common_syntax_errors.md create mode 100644 .claude/skills/plantuml/references/component_diagrams.md create mode 100644 .claude/skills/plantuml/references/deployment_diagrams.md create mode 100644 .claude/skills/plantuml/references/ditaa_diagrams.md create mode 100644 .claude/skills/plantuml/references/er_diagrams.md create mode 100644 .claude/skills/plantuml/references/gantt_diagrams.md create mode 100644 .claude/skills/plantuml/references/json_yaml_diagrams.md create mode 100644 .claude/skills/plantuml/references/mindmap_diagrams.md create mode 100644 .claude/skills/plantuml/references/network_diagrams.md create mode 100644 .claude/skills/plantuml/references/object_diagrams.md create mode 100644 .claude/skills/plantuml/references/plantuml_reference.md create mode 100644 .claude/skills/plantuml/references/sequence_diagrams.md create mode 100644 .claude/skills/plantuml/references/state_diagrams.md create mode 100644 .claude/skills/plantuml/references/styling_guide.md create mode 100644 .claude/skills/plantuml/references/timeline_diagrams.md create mode 100644 .claude/skills/plantuml/references/timing_diagrams.md create mode 100644 .claude/skills/plantuml/references/toc.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/activity_diagrams_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/arrows_relationships_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/class_diagrams_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/er_diagrams_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/general_syntax_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/image_generation_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/installation_setup_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/performance_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/preprocessor_includes_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/sequence_diagrams_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/styling_themes_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/text_labels_guide.md create mode 100644 .claude/skills/plantuml/references/troubleshooting/toc.md create mode 100644 .claude/skills/plantuml/references/unicode_symbols.md create mode 100644 .claude/skills/plantuml/references/use_case_diagrams.md create mode 100644 .claude/skills/plantuml/references/wbs_diagrams.md create mode 100644 .claude/skills/plantuml/references/wireframes_salt.md create mode 100644 .claude/skills/plantuml/references/workflows/resilient-execution-guide.md create mode 100755 .claude/skills/plantuml/scripts/check_setup.py create mode 100755 .claude/skills/plantuml/scripts/convert_puml.py create mode 100755 .claude/skills/plantuml/scripts/extract_and_convert_puml.py create mode 100644 .claude/skills/plantuml/scripts/process_markdown_puml.py create mode 100755 .claude/skills/plantuml/scripts/resilient_processor.py create mode 100644 .claude/skills/pr-reviewer/.gitignore create mode 100644 .claude/skills/pr-reviewer/.skilz-manifest.yaml create mode 100644 .claude/skills/pr-reviewer/README.md create mode 100644 .claude/skills/pr-reviewer/SKILL.md create mode 100644 .claude/skills/pr-reviewer/references/gh_cli_guide.md create mode 100644 .claude/skills/pr-reviewer/references/review_criteria.md create mode 100644 .claude/skills/pr-reviewer/references/scenarios.md create mode 100644 .claude/skills/pr-reviewer/references/troubleshooting.md create mode 100755 .claude/skills/pr-reviewer/scripts/add_inline_comment.py create mode 100755 .claude/skills/pr-reviewer/scripts/fetch_pr_data.py create mode 100755 .claude/skills/pr-reviewer/scripts/generate_review_files.py create mode 100644 .claude/skills/project-memory/.skilz-manifest.yaml create mode 100644 .claude/skills/project-memory/README.md create mode 100644 .claude/skills/project-memory/SKILL.md create mode 100644 .claude/skills/project-memory/references/bugs_template.md create mode 100644 .claude/skills/project-memory/references/decisions_template.md create mode 100644 .claude/skills/project-memory/references/issues_template.md create mode 100644 .claude/skills/project-memory/references/key_facts_template.md create mode 100644 .claude/skills/react-best-practices/.skilz-manifest.yaml create mode 100644 .claude/skills/react-best-practices/README.md create mode 100644 .claude/skills/react-best-practices/SKILL.md create mode 100644 .claude/skills/react-best-practices/metadata.json create mode 100644 .claude/skills/react-best-practices/rules/_sections.md create mode 100644 .claude/skills/react-best-practices/rules/_template.md create mode 100644 .claude/skills/react-best-practices/rules/advanced-event-handler-refs.md create mode 100644 .claude/skills/react-best-practices/rules/advanced-init-once.md create mode 100644 .claude/skills/react-best-practices/rules/advanced-use-latest.md create mode 100644 .claude/skills/react-best-practices/rules/async-api-routes.md create mode 100644 .claude/skills/react-best-practices/rules/async-defer-await.md create mode 100644 .claude/skills/react-best-practices/rules/async-dependencies.md create mode 100644 .claude/skills/react-best-practices/rules/async-parallel.md create mode 100644 .claude/skills/react-best-practices/rules/async-suspense-boundaries.md create mode 100644 .claude/skills/react-best-practices/rules/bundle-barrel-imports.md create mode 100644 .claude/skills/react-best-practices/rules/bundle-conditional.md create mode 100644 .claude/skills/react-best-practices/rules/bundle-defer-third-party.md create mode 100644 .claude/skills/react-best-practices/rules/bundle-dynamic-imports.md create mode 100644 .claude/skills/react-best-practices/rules/bundle-preload.md create mode 100644 .claude/skills/react-best-practices/rules/client-event-listeners.md create mode 100644 .claude/skills/react-best-practices/rules/client-localstorage-schema.md create mode 100644 .claude/skills/react-best-practices/rules/client-passive-event-listeners.md create mode 100644 .claude/skills/react-best-practices/rules/client-swr-dedup.md create mode 100644 .claude/skills/react-best-practices/rules/js-batch-dom-css.md create mode 100644 .claude/skills/react-best-practices/rules/js-cache-function-results.md create mode 100644 .claude/skills/react-best-practices/rules/js-cache-property-access.md create mode 100644 .claude/skills/react-best-practices/rules/js-cache-storage.md create mode 100644 .claude/skills/react-best-practices/rules/js-combine-iterations.md create mode 100644 .claude/skills/react-best-practices/rules/js-early-exit.md create mode 100644 .claude/skills/react-best-practices/rules/js-hoist-regexp.md create mode 100644 .claude/skills/react-best-practices/rules/js-index-maps.md create mode 100644 .claude/skills/react-best-practices/rules/js-length-check-first.md create mode 100644 .claude/skills/react-best-practices/rules/js-min-max-loop.md create mode 100644 .claude/skills/react-best-practices/rules/js-set-map-lookups.md create mode 100644 .claude/skills/react-best-practices/rules/js-tosorted-immutable.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-activity.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-conditional-render.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-content-visibility.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-hoist-jsx.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-svg-precision.md create mode 100644 .claude/skills/react-best-practices/rules/rendering-usetransition-loading.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-defer-reads.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-dependencies.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-derived-state-no-effect.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-derived-state.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-functional-setstate.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-lazy-state-init.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-memo-with-default-value.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-memo.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-move-effect-to-event.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-transitions.md create mode 100644 .claude/skills/react-best-practices/rules/rerender-use-ref-transient-values.md create mode 100644 .claude/skills/react-best-practices/rules/server-after-nonblocking.md create mode 100644 .claude/skills/react-best-practices/rules/server-auth-actions.md create mode 100644 .claude/skills/react-best-practices/rules/server-cache-lru.md create mode 100644 .claude/skills/react-best-practices/rules/server-cache-react.md create mode 100644 .claude/skills/react-best-practices/rules/server-dedup-props.md create mode 100644 .claude/skills/react-best-practices/rules/server-parallel-fetching.md create mode 100644 .claude/skills/react-best-practices/rules/server-serialization.md create mode 100644 .claude/skills/sdd/.gitignore create mode 100644 .claude/skills/sdd/.skilz-manifest.yaml create mode 100644 .claude/skills/sdd/README.md create mode 100644 .claude/skills/sdd/package-lock.json create mode 100644 .claude/skills/sdd/package.json create mode 100644 .claude/skills/sdd/references/brownfield.md create mode 100644 .claude/skills/sdd/references/feature_management.md create mode 100644 .claude/skills/sdd/references/greenfield.md create mode 100644 .claude/skills/sdd/references/sdd_install.md create mode 100755 .claude/skills/sdd/scripts/analyze-edge-cases.py create mode 100755 .claude/skills/sdd/scripts/analyze-requirements.py create mode 100755 .claude/skills/sdd/scripts/analyze-success-criteria.py create mode 100755 .claude/skills/sdd/scripts/phase_summary.sh create mode 100644 .claude/skills/sdd/skill.json create mode 100644 .claude/skills/sdd/skill.md create mode 100755 .claude/validators/no-console-log.py create mode 100755 .claude/validators/slow-validator.py create mode 100755 .opencode/skill/architect-agent/templates/code-agent-workspace/.claude/hook-logger.py create mode 100644 .opencode/skill/architect-agent/templates/code-agent-workspace/.claude/settings.json create mode 100644 .opencode/skill/react-best-practices/.skilz-manifest.yaml create mode 100644 .opencode/skill/react-best-practices/README.md create mode 100644 .opencode/skill/react-best-practices/SKILL.md create mode 100644 .opencode/skill/react-best-practices/metadata.json create mode 100644 .opencode/skill/react-best-practices/rules/_sections.md create mode 100644 .opencode/skill/react-best-practices/rules/_template.md create mode 100644 .opencode/skill/react-best-practices/rules/advanced-event-handler-refs.md create mode 100644 .opencode/skill/react-best-practices/rules/advanced-init-once.md create mode 100644 .opencode/skill/react-best-practices/rules/advanced-use-latest.md create mode 100644 .opencode/skill/react-best-practices/rules/async-api-routes.md create mode 100644 .opencode/skill/react-best-practices/rules/async-defer-await.md create mode 100644 .opencode/skill/react-best-practices/rules/async-dependencies.md create mode 100644 .opencode/skill/react-best-practices/rules/async-parallel.md create mode 100644 .opencode/skill/react-best-practices/rules/async-suspense-boundaries.md create mode 100644 .opencode/skill/react-best-practices/rules/bundle-barrel-imports.md create mode 100644 .opencode/skill/react-best-practices/rules/bundle-conditional.md create mode 100644 .opencode/skill/react-best-practices/rules/bundle-defer-third-party.md create mode 100644 .opencode/skill/react-best-practices/rules/bundle-dynamic-imports.md create mode 100644 .opencode/skill/react-best-practices/rules/bundle-preload.md create mode 100644 .opencode/skill/react-best-practices/rules/client-event-listeners.md create mode 100644 .opencode/skill/react-best-practices/rules/client-localstorage-schema.md create mode 100644 .opencode/skill/react-best-practices/rules/client-passive-event-listeners.md create mode 100644 .opencode/skill/react-best-practices/rules/client-swr-dedup.md create mode 100644 .opencode/skill/react-best-practices/rules/js-batch-dom-css.md create mode 100644 .opencode/skill/react-best-practices/rules/js-cache-function-results.md create mode 100644 .opencode/skill/react-best-practices/rules/js-cache-property-access.md create mode 100644 .opencode/skill/react-best-practices/rules/js-cache-storage.md create mode 100644 .opencode/skill/react-best-practices/rules/js-combine-iterations.md create mode 100644 .opencode/skill/react-best-practices/rules/js-early-exit.md create mode 100644 .opencode/skill/react-best-practices/rules/js-hoist-regexp.md create mode 100644 .opencode/skill/react-best-practices/rules/js-index-maps.md create mode 100644 .opencode/skill/react-best-practices/rules/js-length-check-first.md create mode 100644 .opencode/skill/react-best-practices/rules/js-min-max-loop.md create mode 100644 .opencode/skill/react-best-practices/rules/js-set-map-lookups.md create mode 100644 .opencode/skill/react-best-practices/rules/js-tosorted-immutable.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-activity.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-animate-svg-wrapper.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-conditional-render.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-content-visibility.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-hoist-jsx.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-hydration-no-flicker.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-hydration-suppress-warning.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-svg-precision.md create mode 100644 .opencode/skill/react-best-practices/rules/rendering-usetransition-loading.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-defer-reads.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-dependencies.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-derived-state-no-effect.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-derived-state.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-functional-setstate.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-lazy-state-init.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-memo-with-default-value.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-memo.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-move-effect-to-event.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-simple-expression-in-memo.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-transitions.md create mode 100644 .opencode/skill/react-best-practices/rules/rerender-use-ref-transient-values.md create mode 100644 .opencode/skill/react-best-practices/rules/server-after-nonblocking.md create mode 100644 .opencode/skill/react-best-practices/rules/server-auth-actions.md create mode 100644 .opencode/skill/react-best-practices/rules/server-cache-lru.md create mode 100644 .opencode/skill/react-best-practices/rules/server-cache-react.md create mode 100644 .opencode/skill/react-best-practices/rules/server-dedup-props.md create mode 100644 .opencode/skill/react-best-practices/rules/server-parallel-fetching.md create mode 100644 .opencode/skill/react-best-practices/rules/server-serialization.md create mode 100755 .skilz/skills/architect-agent/templates/code-agent-workspace/.claude/hook-logger.py create mode 100644 .skilz/skills/architect-agent/templates/code-agent-workspace/.claude/settings.json create mode 100644 docs/wiki-mapping-process.md create mode 100644 docs/wiki-mapping.yml create mode 100644 rulez_ui/bun.lock create mode 100644 rulez_ui/public/schema/hooks-schema.json create mode 100644 rulez_ui/src/components/editor/EditorToolbar.tsx create mode 100644 rulez_ui/src/components/editor/RuleCard.tsx create mode 100644 rulez_ui/src/components/editor/RuleTreeView.tsx create mode 100644 rulez_ui/src/components/editor/ValidationPanel.tsx create mode 100644 rulez_ui/src/components/editor/YamlEditor.tsx create mode 100644 rulez_ui/src/components/simulator/DebugSimulator.tsx create mode 100644 rulez_ui/src/components/simulator/EvaluationTrace.tsx create mode 100644 rulez_ui/src/components/simulator/EventForm.tsx create mode 100644 rulez_ui/src/components/simulator/ResultView.tsx create mode 100644 rulez_ui/src/components/ui/ConfirmDialog.tsx create mode 100644 rulez_ui/src/lib/schema.ts create mode 100644 rulez_ui/src/lib/yaml-utils.ts create mode 100644 rulez_ui/src/styles/monaco-theme.ts create mode 100644 rulez_ui/tests/editor.spec.ts create mode 100644 rulez_ui/tests/file-ops.spec.ts create mode 100644 rulez_ui/tests/simulator.spec.ts create mode 100644 rulez_ui/tests/tree-view.spec.ts create mode 100644 test/integration/use-cases/01-block-force-push/.claude/hooks.yaml create mode 100644 test/integration/use-cases/02-context-injection/.claude/context/cdk-best-practices.md create mode 100644 test/integration/use-cases/02-context-injection/.claude/hooks.yaml create mode 100644 test/integration/use-cases/03-session-logging/.claude/hooks.yaml create mode 100644 test/integration/use-cases/04-permission-explanations/.claude/context/bash-permission-context.md create mode 100644 test/integration/use-cases/04-permission-explanations/.claude/context/write-permission-context.md create mode 100644 test/integration/use-cases/04-permission-explanations/.claude/hooks.yaml diff --git a/.claude/commands/speckit.analyze.md b/.claude/commands/speckit.analyze.md new file mode 100644 index 0000000..98b04b0 --- /dev/null +++ b/.claude/commands/speckit.analyze.md @@ -0,0 +1,184 @@ +--- +description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation. +--- + +## User Input + +```text +$ARGUMENTS +``` + +You **MUST** consider the user input before proceeding (if not empty). + +## Goal + +Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`. + +## Operating Constraints + +**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually). + +**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit.analyze`. + +## Execution Steps + +### 1. Initialize Analysis Context + +Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths: + +- SPEC = FEATURE_DIR/spec.md +- PLAN = FEATURE_DIR/plan.md +- TASKS = FEATURE_DIR/tasks.md + +Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command). +For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). + +### 2. Load Artifacts (Progressive Disclosure) + +Load only the minimal necessary context from each artifact: + +**From spec.md:** + +- Overview/Context +- Functional Requirements +- Non-Functional Requirements +- User Stories +- Edge Cases (if present) + +**From plan.md:** + +- Architecture/stack choices +- Data Model references +- Phases +- Technical constraints + +**From tasks.md:** + +- Task IDs +- Descriptions +- Phase grouping +- Parallel markers [P] +- Referenced file paths + +**From constitution:** + +- Load `.specify/memory/constitution.md` for principle validation + +### 3. Build Semantic Models + +Create internal representations (do not include raw artifacts in output): + +- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`) +- **User story/action inventory**: Discrete user actions with acceptance criteria +- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases) +- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements + +### 4. Detection Passes (Token-Efficient Analysis) + +Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary. + +#### A. Duplication Detection + +- Identify near-duplicate requirements +- Mark lower-quality phrasing for consolidation + +#### B. Ambiguity Detection + +- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria +- Flag unresolved placeholders (TODO, TKTK, ???, ``, etc.) + +#### C. Underspecification + +- Requirements with verbs but missing object or measurable outcome +- User stories missing acceptance criteria alignment +- Tasks referencing files or components not defined in spec/plan + +#### D. Constitution Alignment + +- Any requirement or plan element conflicting with a MUST principle +- Missing mandated sections or quality gates from constitution + +#### E. Coverage Gaps + +- Requirements with zero associated tasks +- Tasks with no mapped requirement/story +- Non-functional requirements not reflected in tasks (e.g., performance, security) + +#### F. Inconsistency + +- Terminology drift (same concept named differently across files) +- Data entities referenced in plan but absent in spec (or vice versa) +- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note) +- Conflicting requirements (e.g., one requires Next.js while other specifies Vue) + +### 5. Severity Assignment + +Use this heuristic to prioritize findings: + +- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality +- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion +- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case +- **LOW**: Style/wording improvements, minor redundancy not affecting execution order + +### 6. Produce Compact Analysis Report + +Output a Markdown report (no file writes) with the following structure: + +## Specification Analysis Report + +| ID | Category | Severity | Location(s) | Summary | Recommendation | +|----|----------|----------|-------------|---------|----------------| +| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version | + +(Add one row per finding; generate stable IDs prefixed by category initial.) + +**Coverage Summary Table:** + +| Requirement Key | Has Task? | Task IDs | Notes | +|-----------------|-----------|----------|-------| + +**Constitution Alignment Issues:** (if any) + +**Unmapped Tasks:** (if any) + +**Metrics:** + +- Total Requirements +- Total Tasks +- Coverage % (requirements with >=1 task) +- Ambiguity Count +- Duplication Count +- Critical Issues Count + +### 7. Provide Next Actions + +At end of report, output a concise Next Actions block: + +- If CRITICAL issues exist: Recommend resolving before `/speckit.implement` +- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions +- Provide explicit command suggestions: e.g., "Run /speckit.specify with refinement", "Run /speckit.plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'" + +### 8. Offer Remediation + +Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.) + +## Operating Principles + +### Context Efficiency + +- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation +- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis +- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow +- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts + +### Analysis Guidelines + +- **NEVER modify files** (this is read-only analysis) +- **NEVER hallucinate missing sections** (if absent, report them accurately) +- **Prioritize constitution violations** (these are always CRITICAL) +- **Use examples over exhaustive rules** (cite specific instances, not generic patterns) +- **Report zero issues gracefully** (emit success report with coverage statistics) + +## Context + +$ARGUMENTS diff --git a/.claude/commands/speckit.checklist.md b/.claude/commands/speckit.checklist.md new file mode 100644 index 0000000..970e6c9 --- /dev/null +++ b/.claude/commands/speckit.checklist.md @@ -0,0 +1,294 @@ +--- +description: Generate a custom checklist for the current feature based on user requirements. +--- + +## Checklist Purpose: "Unit Tests for English" + +**CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain. + +**NOT for verification/testing**: + +- ❌ NOT "Verify the button clicks correctly" +- ❌ NOT "Test error handling works" +- ❌ NOT "Confirm the API returns 200" +- ❌ NOT checking if code/implementation matches the spec + +**FOR requirements quality validation**: + +- ✅ "Are visual hierarchy requirements defined for all card types?" (completeness) +- ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity) +- ✅ "Are hover state requirements consistent across all interactive elements?" (consistency) +- ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage) +- ✅ "Does the spec define what happens when logo image fails to load?" (edge cases) + +**Metaphor**: If your spec is code written in English, the checklist is its unit test suite. You're testing whether the requirements are well-written, complete, unambiguous, and ready for implementation - NOT whether the implementation works. + +## User Input + +```text +$ARGUMENTS +``` + +You **MUST** consider the user input before proceeding (if not empty). + +## Execution Steps + +1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list. + - All file paths must be absolute. + - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). + +2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST: + - Be generated from the user's phrasing + extracted signals from spec/plan/tasks + - Only ask about information that materially changes checklist content + - Be skipped individually if already unambiguous in `$ARGUMENTS` + - Prefer precision over breadth + + Generation algorithm: + 1. Extract signals: feature domain keywords (e.g., auth, latency, UX, API), risk indicators ("critical", "must", "compliance"), stakeholder hints ("QA", "review", "security team"), and explicit deliverables ("a11y", "rollback", "contracts"). + 2. Cluster signals into candidate focus areas (max 4) ranked by relevance. + 3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit. + 4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria. + 5. Formulate questions chosen from these archetypes: + - Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?") + - Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?") + - Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?") + - Audience framing (e.g., "Will this be used by the author only or peers during PR review?") + - Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?") + - Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?") + + Question formatting rules: + - If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters + - Limit to A–E options maximum; omit table if a free-form answer is clearer + - Never ask the user to restate what they already said + - Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope." + + Defaults when interaction impossible: + - Depth: Standard + - Audience: Reviewer (PR) if code-related; Author otherwise + - Focus: Top 2 relevance clusters + + Output the questions (label Q1/Q2/Q3). After answers: if ≥2 scenario classes (Alternate / Exception / Recovery / Non-Functional domain) remain unclear, you MAY ask up to TWO more targeted follow‑ups (Q4/Q5) with a one-line justification each (e.g., "Unresolved recovery path risk"). Do not exceed five total questions. Skip escalation if user explicitly declines more. + +3. **Understand user request**: Combine `$ARGUMENTS` + clarifying answers: + - Derive checklist theme (e.g., security, review, deploy, ux) + - Consolidate explicit must-have items mentioned by user + - Map focus selections to category scaffolding + - Infer any missing context from spec/plan/tasks (do NOT hallucinate) + +4. **Load feature context**: Read from FEATURE_DIR: + - spec.md: Feature requirements and scope + - plan.md (if exists): Technical details, dependencies + - tasks.md (if exists): Implementation tasks + + **Context Loading Strategy**: + - Load only necessary portions relevant to active focus areas (avoid full-file dumping) + - Prefer summarizing long sections into concise scenario/requirement bullets + - Use progressive disclosure: add follow-on retrieval only if gaps detected + - If source docs are large, generate interim summary items instead of embedding raw text + +5. **Generate checklist** - Create "Unit Tests for Requirements": + - Create `FEATURE_DIR/checklists/` directory if it doesn't exist + - Generate unique checklist filename: + - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`) + - Format: `[domain].md` + - If file exists, append to existing file + - Number items sequentially starting from CHK001 + - Each `/speckit.checklist` run creates a NEW file (never overwrites existing checklists) + + **CORE PRINCIPLE - Test the Requirements, Not the Implementation**: + Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for: + - **Completeness**: Are all necessary requirements present? + - **Clarity**: Are requirements unambiguous and specific? + - **Consistency**: Do requirements align with each other? + - **Measurability**: Can requirements be objectively verified? + - **Coverage**: Are all scenarios/edge cases addressed? + + **Category Structure** - Group items by requirement quality dimensions: + - **Requirement Completeness** (Are all necessary requirements documented?) + - **Requirement Clarity** (Are requirements specific and unambiguous?) + - **Requirement Consistency** (Do requirements align without conflicts?) + - **Acceptance Criteria Quality** (Are success criteria measurable?) + - **Scenario Coverage** (Are all flows/cases addressed?) + - **Edge Case Coverage** (Are boundary conditions defined?) + - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?) + - **Dependencies & Assumptions** (Are they documented and validated?) + - **Ambiguities & Conflicts** (What needs clarification?) + + **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**: + + ❌ **WRONG** (Testing implementation): + - "Verify landing page displays 3 episode cards" + - "Test hover states work on desktop" + - "Confirm logo click navigates home" + + ✅ **CORRECT** (Testing requirements quality): + - "Are the exact number and layout of featured episodes specified?" [Completeness] + - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity] + - "Are hover state requirements consistent across all interactive elements?" [Consistency] + - "Are keyboard navigation requirements defined for all interactive UI?" [Coverage] + - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases] + - "Are loading states defined for asynchronous episode data?" [Completeness] + - "Does the spec define visual hierarchy for competing UI elements?" [Clarity] + + **ITEM STRUCTURE**: + Each item should follow this pattern: + - Question format asking about requirement quality + - Focus on what's WRITTEN (or not written) in the spec/plan + - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.] + - Reference spec section `[Spec §X.Y]` when checking existing requirements + - Use `[Gap]` marker when checking for missing requirements + + **EXAMPLES BY QUALITY DIMENSION**: + + Completeness: + - "Are error handling requirements defined for all API failure modes? [Gap]" + - "Are accessibility requirements specified for all interactive elements? [Completeness]" + - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]" + + Clarity: + - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]" + - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]" + - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]" + + Consistency: + - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]" + - "Are card component requirements consistent between landing and detail pages? [Consistency]" + + Coverage: + - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]" + - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]" + - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]" + + Measurability: + - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]" + - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]" + + **Scenario Classification & Coverage** (Requirements Quality Focus): + - Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios + - For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?" + - If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]" + - Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]" + + **Traceability Requirements**: + - MINIMUM: ≥80% of items MUST include at least one traceability reference + - Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]` + - If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]" + + **Surface & Resolve Issues** (Requirements Quality Problems): + Ask questions about the requirements themselves: + - Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]" + - Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]" + - Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]" + - Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]" + - Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]" + + **Content Consolidation**: + - Soft cap: If raw candidate items > 40, prioritize by risk/impact + - Merge near-duplicates checking the same requirement aspect + - If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]" + + **🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test: + - ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior + - ❌ References to code execution, user actions, system behavior + - ❌ "Displays correctly", "works properly", "functions as expected" + - ❌ "Click", "navigate", "render", "load", "execute" + - ❌ Test cases, test plans, QA procedures + - ❌ Implementation details (frameworks, APIs, algorithms) + + **✅ REQUIRED PATTERNS** - These test requirements quality: + - ✅ "Are [requirement type] defined/specified/documented for [scenario]?" + - ✅ "Is [vague term] quantified/clarified with specific criteria?" + - ✅ "Are requirements consistent between [section A] and [section B]?" + - ✅ "Can [requirement] be objectively measured/verified?" + - ✅ "Are [edge cases/scenarios] addressed in requirements?" + - ✅ "Does the spec define [missing aspect]?" + +6. **Structure Reference**: Generate the checklist following the canonical template in `.specify/templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### ` lines with globally incrementing IDs starting at CHK001. + +7. **Report**: Output full path to created checklist, item count, and remind user that each run creates a new file. Summarize: + - Focus areas selected + - Depth level + - Actor/timing + - Any explicit user-specified must-have items incorporated + +**Important**: Each `/speckit.checklist` command invocation creates a checklist file using short, descriptive names unless file already exists. This allows: + +- Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`) +- Simple, memorable filenames that indicate checklist purpose +- Easy identification and navigation in the `checklists/` folder + +To avoid clutter, use descriptive types and clean up obsolete checklists when done. + +## Example Checklist Types & Sample Items + +**UX Requirements Quality:** `ux.md` + +Sample items (testing the requirements, NOT the implementation): + +- "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]" +- "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]" +- "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]" +- "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]" +- "Is fallback behavior defined when images fail to load? [Edge Case, Gap]" +- "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]" + +**API Requirements Quality:** `api.md` + +Sample items: + +- "Are error response formats specified for all failure scenarios? [Completeness]" +- "Are rate limiting requirements quantified with specific thresholds? [Clarity]" +- "Are authentication requirements consistent across all endpoints? [Consistency]" +- "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]" +- "Is versioning strategy documented in requirements? [Gap]" + +**Performance Requirements Quality:** `performance.md` + +Sample items: + +- "Are performance requirements quantified with specific metrics? [Clarity]" +- "Are performance targets defined for all critical user journeys? [Coverage]" +- "Are performance requirements under different load conditions specified? [Completeness]" +- "Can performance requirements be objectively measured? [Measurability]" +- "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]" + +**Security Requirements Quality:** `security.md` + +Sample items: + +- "Are authentication requirements specified for all protected resources? [Coverage]" +- "Are data protection requirements defined for sensitive information? [Completeness]" +- "Is the threat model documented and requirements aligned to it? [Traceability]" +- "Are security requirements consistent with compliance obligations? [Consistency]" +- "Are security failure/breach response requirements defined? [Gap, Exception Flow]" + +## Anti-Examples: What NOT To Do + +**❌ WRONG - These test implementation, not requirements:** + +```markdown +- [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001] +- [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003] +- [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010] +- [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005] +``` + +**✅ CORRECT - These test requirements quality:** + +```markdown +- [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001] +- [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003] +- [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010] +- [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005] +- [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap] +- [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001] +``` + +**Key Differences:** + +- Wrong: Tests if the system works correctly +- Correct: Tests if the requirements are written correctly +- Wrong: Verification of behavior +- Correct: Validation of requirement quality +- Wrong: "Does it do X?" +- Correct: "Is X clearly specified?" diff --git a/.claude/commands/speckit.clarify.md b/.claude/commands/speckit.clarify.md new file mode 100644 index 0000000..6b28dae --- /dev/null +++ b/.claude/commands/speckit.clarify.md @@ -0,0 +1,181 @@ +--- +description: Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec. +handoffs: + - label: Build Technical Plan + agent: speckit.plan + prompt: Create a plan for the spec. I am building with... +--- + +## User Input + +```text +$ARGUMENTS +``` + +You **MUST** consider the user input before proceeding (if not empty). + +## Outline + +Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file. + +Note: This clarification workflow is expected to run (and be completed) BEFORE invoking `/speckit.plan`. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases. + +Execution steps: + +1. Run `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` from repo root **once** (combined `--json --paths-only` mode / `-Json -PathsOnly`). Parse minimal JSON payload fields: + - `FEATURE_DIR` + - `FEATURE_SPEC` + - (Optionally capture `IMPL_PLAN`, `TASKS` for future chained flows.) + - If JSON parsing fails, abort and instruct user to re-run `/speckit.specify` or verify feature branch environment. + - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot"). + +2. Load the current spec file. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked). + + Functional Scope & Behavior: + - Core user goals & success criteria + - Explicit out-of-scope declarations + - User roles / personas differentiation + + Domain & Data Model: + - Entities, attributes, relationships + - Identity & uniqueness rules + - Lifecycle/state transitions + - Data volume / scale assumptions + + Interaction & UX Flow: + - Critical user journeys / sequences + - Error/empty/loading states + - Accessibility or localization notes + + Non-Functional Quality Attributes: + - Performance (latency, throughput targets) + - Scalability (horizontal/vertical, limits) + - Reliability & availability (uptime, recovery expectations) + - Observability (logging, metrics, tracing signals) + - Security & privacy (authN/Z, data protection, threat assumptions) + - Compliance / regulatory constraints (if any) + + Integration & External Dependencies: + - External services/APIs and failure modes + - Data import/export formats + - Protocol/versioning assumptions + + Edge Cases & Failure Handling: + - Negative scenarios + - Rate limiting / throttling + - Conflict resolution (e.g., concurrent edits) + + Constraints & Tradeoffs: + - Technical constraints (language, storage, hosting) + - Explicit tradeoffs or rejected alternatives + + Terminology & Consistency: + - Canonical glossary terms + - Avoided synonyms / deprecated terms + + Completion Signals: + - Acceptance criteria testability + - Measurable Definition of Done style indicators + + Misc / Placeholders: + - TODO markers / unresolved decisions + - Ambiguous adjectives ("robust", "intuitive") lacking quantification + + For each category with Partial or Missing status, add a candidate question opportunity unless: + - Clarification would not materially change implementation or validation strategy + - Information is better deferred to planning phase (note internally) + +3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints: + - Maximum of 10 total questions across the whole session. + - Each question must be answerable with EITHER: + - A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR + - A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words"). + - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation. + - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved. + - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness). + - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests. + - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic. + +4. Sequential questioning loop (interactive): + - Present EXACTLY ONE question at a time. + - For multiple‑choice questions: + - **Analyze all options** and determine the **most suitable option** based on: + - Best practices for the project type + - Common patterns in similar implementations + - Risk reduction (security, performance, maintainability) + - Alignment with any explicit project goals or constraints visible in the spec + - Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice). + - Format as: `**Recommended:** Option [X] - ` + - Then render all options as a Markdown table: + + | Option | Description | + |--------|-------------| + | A |