specweave 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CLAUDE.md +205 -148
- package/README.md +0 -2
- package/bin/specweave.js +11 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/update-instructions.d.ts +16 -0
- package/dist/src/cli/commands/update-instructions.d.ts.map +1 -0
- package/dist/src/cli/commands/update-instructions.js +134 -0
- package/dist/src/cli/commands/update-instructions.js.map +1 -0
- package/dist/src/cli/helpers/init/directory-structure.d.ts +28 -1
- package/dist/src/cli/helpers/init/directory-structure.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/directory-structure.js +163 -33
- package/dist/src/cli/helpers/init/directory-structure.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +2 -1
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +3 -1
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/instruction-file-merger.d.ts +23 -0
- package/dist/src/cli/helpers/init/instruction-file-merger.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/instruction-file-merger.js +243 -0
- package/dist/src/cli/helpers/init/instruction-file-merger.js.map +1 -0
- package/dist/src/cli/helpers/init/plugin-installer.js +49 -0
- package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
- package/dist/src/config/types.d.ts +2 -2
- package/dist/src/core/living-docs/external-sync-orchestrator.d.ts +26 -0
- package/dist/src/core/living-docs/external-sync-orchestrator.d.ts.map +1 -1
- package/dist/src/core/living-docs/external-sync-orchestrator.js +61 -0
- package/dist/src/core/living-docs/external-sync-orchestrator.js.map +1 -1
- package/dist/src/core/living-docs/scaffolding/index.d.ts +12 -0
- package/dist/src/core/living-docs/scaffolding/index.d.ts.map +1 -0
- package/dist/src/core/living-docs/scaffolding/index.js +15 -0
- package/dist/src/core/living-docs/scaffolding/index.js.map +1 -0
- package/dist/src/core/living-docs/scaffolding/merger.d.ts +183 -0
- package/dist/src/core/living-docs/scaffolding/merger.d.ts.map +1 -0
- package/dist/src/core/living-docs/scaffolding/merger.js +523 -0
- package/dist/src/core/living-docs/scaffolding/merger.js.map +1 -0
- package/dist/src/core/living-docs/scaffolding/scaffold.d.ts +102 -0
- package/dist/src/core/living-docs/scaffolding/scaffold.d.ts.map +1 -0
- package/dist/src/core/living-docs/scaffolding/scaffold.js +346 -0
- package/dist/src/core/living-docs/scaffolding/scaffold.js.map +1 -0
- package/dist/src/core/living-docs/scaffolding/template-engine.d.ts +108 -0
- package/dist/src/core/living-docs/scaffolding/template-engine.d.ts.map +1 -0
- package/dist/src/core/living-docs/scaffolding/template-engine.js +204 -0
- package/dist/src/core/living-docs/scaffolding/template-engine.js.map +1 -0
- package/dist/src/core/living-docs/sync-helpers/generators.d.ts +38 -2
- package/dist/src/core/living-docs/sync-helpers/generators.d.ts.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/generators.js +65 -10
- package/dist/src/core/living-docs/sync-helpers/generators.js.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/index.d.ts +1 -1
- package/dist/src/core/living-docs/sync-helpers/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/sync-helpers/index.js.map +1 -1
- package/dist/src/core/tools/index.d.ts +11 -0
- package/dist/src/core/tools/index.d.ts.map +1 -0
- package/dist/src/core/tools/index.js +10 -0
- package/dist/src/core/tools/index.js.map +1 -0
- package/dist/src/core/tools/tool-event-bus.d.ts +33 -0
- package/dist/src/core/tools/tool-event-bus.d.ts.map +1 -0
- package/dist/src/core/tools/tool-event-bus.js +84 -0
- package/dist/src/core/tools/tool-event-bus.js.map +1 -0
- package/dist/src/core/tools/tool-index-builder.d.ts +27 -0
- package/dist/src/core/tools/tool-index-builder.d.ts.map +1 -0
- package/dist/src/core/tools/tool-index-builder.js +289 -0
- package/dist/src/core/tools/tool-index-builder.js.map +1 -0
- package/dist/src/core/tools/tool-registry.d.ts +51 -0
- package/dist/src/core/tools/tool-registry.d.ts.map +1 -0
- package/dist/src/core/tools/tool-registry.js +224 -0
- package/dist/src/core/tools/tool-registry.js.map +1 -0
- package/dist/src/core/tools/tool-search-engine.d.ts +22 -0
- package/dist/src/core/tools/tool-search-engine.d.ts.map +1 -0
- package/dist/src/core/tools/tool-search-engine.js +174 -0
- package/dist/src/core/tools/tool-search-engine.js.map +1 -0
- package/dist/src/core/tools/types/tool-registry-types.d.ts +112 -0
- package/dist/src/core/tools/types/tool-registry-types.d.ts.map +1 -0
- package/dist/src/core/tools/types/tool-registry-types.js +7 -0
- package/dist/src/core/tools/types/tool-registry-types.js.map +1 -0
- package/dist/src/init/compliance/types.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/hooks.json +3 -13
- package/plugins/specweave/hooks/lib/common-setup.sh +47 -321
- package/plugins/specweave/hooks/lib/migrate-increment-work.sh +5 -5
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +5 -5
- package/plugins/specweave/hooks/universal/dispatcher.mjs +4 -5
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +43 -296
- package/plugins/specweave/hooks/universal/hook-wrapper.sh +3 -1
- package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +2 -2
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +1 -10
- package/plugins/specweave/hooks/v2/guards/completion-guard.sh +12 -29
- package/plugins/specweave/hooks/v2/guards/increment-duplicate-guard.sh +27 -29
- package/plugins/specweave/hooks/v2/guards/metadata-json-guard.sh +10 -4
- package/plugins/specweave/hooks/v2/guards/spec-validation-guard.sh +139 -0
- package/plugins/specweave/hooks/v2/guards/task-ac-sync-guard.sh +4 -2
- package/plugins/specweave/hooks/v2/session-end.sh +3 -1
- package/plugins/specweave/hooks/v2/session-start.sh +3 -1
- package/plugins/specweave/skills/increment-planner/templates/plan.md +14 -0
- package/plugins/specweave/skills/update-instructions/SKILL.md +80 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh +1 -1
- package/plugins/specweave-mobile/README.md +55 -35
- package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +805 -329
- package/plugins/specweave-mobile/skills/expo-workflow/SKILL.md +226 -9
- package/plugins/specweave-mobile/skills/native-modules/SKILL.md +221 -20
- package/plugins/specweave-mobile/skills/performance-optimization/SKILL.md +186 -14
- package/plugins/specweave-mobile/skills/react-native-setup/SKILL.md +151 -54
- package/plugins/specweave-release/commands/npm.md +61 -17
- package/plugins/specweave-release/hooks/post-task-completion.sh +2 -3
- package/src/templates/AGENTS.md.template +34 -0
- package/src/templates/CLAUDE.md.template +121 -155
- package/plugins/specweave/hooks/config-env-separator.sh +0 -99
- package/plugins/specweave/hooks/github-metadata-guard.sh +0 -73
- package/plugins/specweave/hooks/lib/circuit-breaker.sh +0 -381
- package/plugins/specweave/hooks/lib/crash-prevention.sh +0 -336
- package/plugins/specweave/hooks/lib/logging.sh +0 -231
- package/plugins/specweave/hooks/lib/metrics.sh +0 -347
- package/plugins/specweave/hooks/lib/semaphore.sh +0 -216
- package/plugins/specweave/hooks/project-folder-guard.sh +0 -274
- package/plugins/specweave/hooks/spec-project-validator.sh +0 -210
- package/plugins/specweave/hooks/v2/guards/bash-file-guard.sh +0 -212
- package/plugins/specweave/hooks/v2/guards/bash-file-guard.test.sh +0 -163
- package/plugins/specweave/hooks/v2/guards/features-folder-guard.sh +0 -51
- package/plugins/specweave/hooks/v2/guards/increment-root-guard.sh +0 -63
- package/plugins/specweave/hooks/v2/guards/per-us-project-validator.sh +0 -335
- package/plugins/specweave/hooks/v2/guards/per-us-project-validator.test.sh +0 -406
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# spec-validation-guard.sh - Consolidated spec.md and living docs validation
|
|
3
|
+
#
|
|
4
|
+
# COMBINES (v0.35.4+):
|
|
5
|
+
# - per-us-project-validator.sh (deleted) - Per-US **Project**: validation
|
|
6
|
+
# - spec-project-validator.sh (deleted) - Placeholder detection
|
|
7
|
+
# - project-folder-guard.sh (deleted) - Living docs folder validation
|
|
8
|
+
#
|
|
9
|
+
# Activation:
|
|
10
|
+
# - tool_name: Write
|
|
11
|
+
# - file_path matches: .specweave/increments/*/spec.md OR .specweave/docs/internal/specs/*/
|
|
12
|
+
#
|
|
13
|
+
# Exit 0 = allow (with JSON), Exit 2 = block (with JSON)
|
|
14
|
+
#
|
|
15
|
+
# Bypasses:
|
|
16
|
+
# - SPECWEAVE_DISABLE_HOOKS=1 - Disable all hooks
|
|
17
|
+
# - SPECWEAVE_FORCE_PROJECT=1 - Skip project validation
|
|
18
|
+
# - SPECWEAVE_FORCE_METADATA=1 - Skip all spec validation
|
|
19
|
+
|
|
20
|
+
set +e # CRITICAL: Never use set -e in hooks
|
|
21
|
+
|
|
22
|
+
# Source shared library if available
|
|
23
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
24
|
+
LIB_DIR="${SCRIPT_DIR}/../../lib"
|
|
25
|
+
if [[ -f "$LIB_DIR/common-setup.sh" ]]; then
|
|
26
|
+
source "$LIB_DIR/common-setup.sh"
|
|
27
|
+
init_pretool_guard || exit 0
|
|
28
|
+
else
|
|
29
|
+
# Fallback inline implementation
|
|
30
|
+
[[ "${SPECWEAVE_DISABLE_HOOKS:-0}" == "1" ]] && echo '{"decision":"allow"}' && exit 0
|
|
31
|
+
HOOK_INPUT=$(cat 2>/dev/null || echo '{}')
|
|
32
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
33
|
+
echo '{"decision":"allow"}'
|
|
34
|
+
exit 0
|
|
35
|
+
fi
|
|
36
|
+
HOOK_TOOL_NAME=$(echo "$HOOK_INPUT" | jq -r '.tool_name // ""' 2>/dev/null || echo "")
|
|
37
|
+
HOOK_FILE_PATH=$(echo "$HOOK_INPUT" | jq -r '.tool_input.file_path // .file_path // ""' 2>/dev/null || echo "")
|
|
38
|
+
HOOK_CONTENT=$(echo "$HOOK_INPUT" | jq -r '.tool_input.content // .tool_input.new_string // ""' 2>/dev/null || echo "")
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Check bypass flags
|
|
42
|
+
[[ "$SPECWEAVE_FORCE_PROJECT" == "1" ]] && echo '{"decision":"allow","message":"Project validation bypassed"}' && exit 0
|
|
43
|
+
[[ "$SPECWEAVE_FORCE_METADATA" == "1" ]] && echo '{"decision":"allow","message":"Spec validation bypassed"}' && exit 0
|
|
44
|
+
|
|
45
|
+
# Only validate Write tool
|
|
46
|
+
[[ "$HOOK_TOOL_NAME" != "Write" ]] && echo '{"decision":"allow"}' && exit 0
|
|
47
|
+
|
|
48
|
+
# No file path = allow
|
|
49
|
+
[[ -z "$HOOK_FILE_PATH" ]] && echo '{"decision":"allow"}' && exit 0
|
|
50
|
+
|
|
51
|
+
# ============================================================================
|
|
52
|
+
# VALIDATION 1: spec.md placeholder detection
|
|
53
|
+
# ============================================================================
|
|
54
|
+
if [[ "$HOOK_FILE_PATH" =~ \.specweave/increments/[0-9]{3,4}E?-[^/]+/spec\.md$ ]]; then
|
|
55
|
+
|
|
56
|
+
# Check for unresolved {{...}} placeholders
|
|
57
|
+
if echo "$HOOK_CONTENT" | grep -qE '\{\{[A-Z_]+\}\}'; then
|
|
58
|
+
PLACEHOLDERS=$(echo "$HOOK_CONTENT" | grep -oE '\{\{[A-Z_]+\}\}' | sort -u | tr '\n' ', ' | sed 's/,$//')
|
|
59
|
+
printf '{"decision":"block","reason":"🚫 UNRESOLVED PLACEHOLDERS\\n\\nFound: %s\\n\\n🔧 FIX: Replace placeholders with actual values.\\nRun: specweave context projects\\nThen use values from the JSON output."}\n' "$PLACEHOLDERS"
|
|
60
|
+
exit 2
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Check for **Project**: field in User Stories (soft validation - warn, don't block)
|
|
64
|
+
# Pattern: ### US-XXX or #### US-XXX followed by **Project**:
|
|
65
|
+
US_COUNT=$(echo "$HOOK_CONTENT" | grep -cE '^#{3,4} US-' 2>/dev/null || echo "0")
|
|
66
|
+
PROJECT_COUNT=$(echo "$HOOK_CONTENT" | grep -cE '^\*\*Project\*\*:' 2>/dev/null || echo "0")
|
|
67
|
+
|
|
68
|
+
# Trim to just the number
|
|
69
|
+
US_COUNT="${US_COUNT//[^0-9]/}"
|
|
70
|
+
PROJECT_COUNT="${PROJECT_COUNT//[^0-9]/}"
|
|
71
|
+
[[ -z "$US_COUNT" ]] && US_COUNT=0
|
|
72
|
+
[[ -z "$PROJECT_COUNT" ]] && PROJECT_COUNT=0
|
|
73
|
+
|
|
74
|
+
# Only warn if there are User Stories but no Project fields
|
|
75
|
+
# Don't block - just allow with warning
|
|
76
|
+
if [[ "$US_COUNT" -gt 0 ]] && [[ "$PROJECT_COUNT" -eq 0 ]]; then
|
|
77
|
+
echo '{"decision":"allow","message":"⚠️ WARNING: No **Project**: fields found. Add **Project**: after each US heading for proper sync."}'
|
|
78
|
+
exit 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Check for comma-separated projects (forbidden - 1:1 mapping required)
|
|
82
|
+
if echo "$HOOK_CONTENT" | grep -qE '^\*\*Project\*\*:.*,'; then
|
|
83
|
+
printf '{"decision":"block","reason":"🚫 MULTIPLE PROJECTS IN ONE US\\n\\nEach User Story MUST map to exactly ONE project.\\n\\n🔧 FIX: Split cross-project features into separate User Stories:\\n\\nWRONG:\\n### US-001: OAuth Implementation\\n**Project**: frontend, backend\\n\\nCORRECT:\\n### US-001: OAuth Login Form\\n**Project**: frontend\\n\\n### US-002: OAuth API\\n**Project**: backend"}\n'
|
|
84
|
+
exit 2
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
echo '{"decision":"allow"}'
|
|
88
|
+
exit 0
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
# ============================================================================
|
|
92
|
+
# VALIDATION 2: Living docs folder validation
|
|
93
|
+
# ============================================================================
|
|
94
|
+
if [[ "$HOOK_FILE_PATH" =~ \.specweave/docs/internal/specs/([^/]+)/ ]]; then
|
|
95
|
+
PROJECT_NAME="${BASH_REMATCH[1]}"
|
|
96
|
+
|
|
97
|
+
# Skip README.md and _features/_archive special folders
|
|
98
|
+
[[ "$PROJECT_NAME" == "README.md" ]] && echo '{"decision":"allow"}' && exit 0
|
|
99
|
+
[[ "$PROJECT_NAME" == "_features" ]] && echo '{"decision":"allow"}' && exit 0
|
|
100
|
+
[[ "$PROJECT_NAME" == "_archive" ]] && echo '{"decision":"allow"}' && exit 0
|
|
101
|
+
|
|
102
|
+
# Check for template placeholders
|
|
103
|
+
if [[ "$PROJECT_NAME" =~ \{\{.*\}\} ]]; then
|
|
104
|
+
printf '{"decision":"block","reason":"🚫 UNRESOLVED PLACEHOLDER: %s\\n\\n🔧 FIX: Replace {{...}} with actual project name"}\n' "$PROJECT_NAME"
|
|
105
|
+
exit 2
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# Check for comma-separated (invalid)
|
|
109
|
+
if [[ "$PROJECT_NAME" =~ , ]]; then
|
|
110
|
+
printf '{"decision":"block","reason":"🚫 COMMA-SEPARATED PROJECTS: %s\\n\\nEach User Story = ONE project folder.\\n\\n🔧 FIX: Split into separate specs"}\n' "$PROJECT_NAME"
|
|
111
|
+
exit 2
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
# Check for common example/placeholder names
|
|
115
|
+
EXAMPLE_NAMES="frontend-app|backend-api|mobile-app|shared-lib|acme-corp|my-app|myapp|example-project|test-project"
|
|
116
|
+
if [[ "$PROJECT_NAME" =~ ^($EXAMPLE_NAMES)$ ]]; then
|
|
117
|
+
# Try to get valid projects from config
|
|
118
|
+
PROJECT_ROOT="${HOOK_FILE_PATH%%/.specweave/*}"
|
|
119
|
+
CONFIG_FILE="$PROJECT_ROOT/.specweave/config.json"
|
|
120
|
+
|
|
121
|
+
if [[ -f "$CONFIG_FILE" ]]; then
|
|
122
|
+
# Check if this example name is actually configured
|
|
123
|
+
IS_CONFIGURED=$(jq -r --arg name "$PROJECT_NAME" '.multiProject.projects[$name] // .project.name == $name' "$CONFIG_FILE" 2>/dev/null || echo "false")
|
|
124
|
+
|
|
125
|
+
if [[ "$IS_CONFIGURED" != "true" ]]; then
|
|
126
|
+
VALID_PROJECTS=$(jq -r '.multiProject.projects | keys | join(", ") // .project.name // "specweave"' "$CONFIG_FILE" 2>/dev/null || echo "specweave")
|
|
127
|
+
printf '{"decision":"block","reason":"🚫 EXAMPLE PROJECT NAME: %s\\n\\nThis looks like a placeholder/example name from documentation.\\n\\nConfigured projects: %s\\n\\n🔧 FIX: Edit spec.md and use a real project name"}\n' "$PROJECT_NAME" "$VALID_PROJECTS"
|
|
128
|
+
exit 2
|
|
129
|
+
fi
|
|
130
|
+
fi
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
echo '{"decision":"allow"}'
|
|
134
|
+
exit 0
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# Not a spec.md or living docs file - allow
|
|
138
|
+
echo '{"decision":"allow"}'
|
|
139
|
+
exit 0
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
# - Supports both - and * bullet formats
|
|
18
18
|
#
|
|
19
19
|
# CRITICAL: This hook must be NON-BLOCKING to prevent Claude Code crashes
|
|
20
|
+
# PostToolUse hooks run AFTER the tool completes, so they don't need JSON responses.
|
|
21
|
+
# However, they must NEVER crash or hang.
|
|
20
22
|
set +e
|
|
21
23
|
|
|
22
24
|
[[ "${SPECWEAVE_DISABLE_HOOKS:-0}" == "1" ]] && exit 0
|
|
@@ -43,8 +45,8 @@ LOGS_DIR="$PROJECT_ROOT/.specweave/logs"
|
|
|
43
45
|
DEBUG_LOG="$LOGS_DIR/task-ac-sync.log"
|
|
44
46
|
mkdir -p "$LOGS_DIR" 2>/dev/null || true
|
|
45
47
|
|
|
46
|
-
# Read stdin for tool input
|
|
47
|
-
INPUT=$(cat)
|
|
48
|
+
# Read stdin for tool input (with safe fallback to prevent hanging)
|
|
49
|
+
INPUT=$(cat 2>/dev/null || echo '{}')
|
|
48
50
|
|
|
49
51
|
# Extract file_path from tool input
|
|
50
52
|
FILE_PATH=$(echo "$INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"\([^"]*\)"/\1/')
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
#
|
|
5
5
|
# Triggered: When Claude Code session ends normally
|
|
6
6
|
# Purpose: Clean up session registry and child processes
|
|
7
|
+
#
|
|
8
|
+
# v0.35.3 - Fixed: use set +e for hook safety
|
|
7
9
|
|
|
8
|
-
set -
|
|
10
|
+
set +e # CRITICAL: Never use set -e in hooks (causes cascading failures)
|
|
9
11
|
|
|
10
12
|
PROJECT_ROOT="${PWD}"
|
|
11
13
|
LOG_DIR="${PROJECT_ROOT}/.specweave/logs/sessions"
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
#
|
|
5
5
|
# Triggered: When Claude Code session starts
|
|
6
6
|
# Purpose: Track session for zombie prevention
|
|
7
|
+
#
|
|
8
|
+
# v0.35.3 - Fixed: use set +e for hook safety
|
|
7
9
|
|
|
8
|
-
set -
|
|
10
|
+
set +e # CRITICAL: Never use set -e in hooks (causes cascading failures)
|
|
9
11
|
|
|
10
12
|
PROJECT_ROOT="${PWD}"
|
|
11
13
|
SESSION_ID="session-$$-$(date +%s)"
|
|
@@ -48,3 +48,17 @@
|
|
|
48
48
|
### Challenge 1: [Description]
|
|
49
49
|
**Solution**: [Approach]
|
|
50
50
|
**Risk**: [Mitigation]
|
|
51
|
+
|
|
52
|
+
## Recommended Agents
|
|
53
|
+
|
|
54
|
+
> **Tip**: Use specialized agents for domain expertise. See `plugins/PLUGINS-INDEX.md` for full catalog.
|
|
55
|
+
|
|
56
|
+
| Domain | Agent | When to Use |
|
|
57
|
+
|--------|-------|-------------|
|
|
58
|
+
| Architecture | `specweave:architect:architect` | System design, ADRs |
|
|
59
|
+
| Frontend | `specweave-frontend:frontend-architect:frontend-architect` | React/Vue/Next.js |
|
|
60
|
+
| Backend | `specweave-backend:database-optimizer:database-optimizer` | API, database |
|
|
61
|
+
| K8s | `specweave-kubernetes:kubernetes-architect:kubernetes-architect` | Manifests, GitOps |
|
|
62
|
+
| Infra | `specweave-infrastructure:devops:devops` | Terraform, CI/CD |
|
|
63
|
+
| Testing | `specweave-testing:qa-engineer:qa-engineer` | E2E, test strategy |
|
|
64
|
+
| Security | `specweave:security:security` | Security review |
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-instructions
|
|
3
|
+
description: Update CLAUDE.md and AGENTS.md instruction files with smart merge. Preserves user customizations while updating SpecWeave sections. Use after plugin refresh, version upgrade, or when instruction files need sync. Activates for: update instructions, refresh claude.md, merge agents.md, sync instruction files, upgrade specweave config.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Update Instructions Skill
|
|
7
|
+
|
|
8
|
+
Smart merge for CLAUDE.md and AGENTS.md instruction files.
|
|
9
|
+
|
|
10
|
+
## What It Does
|
|
11
|
+
|
|
12
|
+
1. **Reads existing instruction files** (if present)
|
|
13
|
+
2. **Parses SW-managed sections** (marked with `<!-- SW:SECTION:X -->`)
|
|
14
|
+
3. **Preserves user content** (anything between or after SW sections)
|
|
15
|
+
4. **Updates SW sections** with latest template content
|
|
16
|
+
5. **Writes merged result** back to file
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- After running `bash scripts/refresh-marketplace.sh`
|
|
21
|
+
- After upgrading SpecWeave version (`npm update specweave`)
|
|
22
|
+
- When CLAUDE.md or AGENTS.md seem outdated
|
|
23
|
+
- To sync instruction files with latest framework features
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/sw:update-instructions
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or via CLI:
|
|
32
|
+
```bash
|
|
33
|
+
npx specweave update-instructions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## How Merge Works
|
|
37
|
+
|
|
38
|
+
### Fresh Install (no existing file)
|
|
39
|
+
Creates new file with all SW sections + meta header
|
|
40
|
+
|
|
41
|
+
### Legacy File (no SW markers)
|
|
42
|
+
Prepends new SW content, preserves original below separator
|
|
43
|
+
|
|
44
|
+
### Marked File (has SW markers)
|
|
45
|
+
Updates SW sections in-place, preserves user content between sections
|
|
46
|
+
|
|
47
|
+
## Section Format
|
|
48
|
+
|
|
49
|
+
Template sections (in `.template` files):
|
|
50
|
+
```markdown
|
|
51
|
+
<!-- SECTION:rules required -->
|
|
52
|
+
## Rules
|
|
53
|
+
Content here...
|
|
54
|
+
<!-- /SECTION -->
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Generated sections (in output files):
|
|
58
|
+
```markdown
|
|
59
|
+
<!-- SW:META template="claude" version="1.0.0" sections="header,rules,..." -->
|
|
60
|
+
|
|
61
|
+
<!-- SW:SECTION:header version="1.0.0" -->
|
|
62
|
+
Content...
|
|
63
|
+
<!-- SW:END:header -->
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## User Customization
|
|
67
|
+
|
|
68
|
+
Add custom content **between** SW sections or **after** the last section:
|
|
69
|
+
```markdown
|
|
70
|
+
<!-- SW:END:docs -->
|
|
71
|
+
|
|
72
|
+
## My Custom Section
|
|
73
|
+
|
|
74
|
+
This will be preserved during updates!
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Files Affected
|
|
78
|
+
|
|
79
|
+
- `CLAUDE.md` - Claude Code instruction file
|
|
80
|
+
- `AGENTS.md` - Generic AI tool instruction file
|
|
@@ -1,45 +1,54 @@
|
|
|
1
1
|
# SpecWeave Mobile Plugin
|
|
2
2
|
|
|
3
|
-
Comprehensive React Native and Expo development support for SpecWeave. Streamlines mobile app development with expert guidance on setup, debugging, performance optimization, and testing.
|
|
3
|
+
Comprehensive **React Native 0.83+** and **Expo SDK 54+** development support for SpecWeave. Streamlines mobile app development with expert guidance on setup, debugging, performance optimization, and testing.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The SpecWeave Mobile plugin provides specialized skills and agents for React Native and Expo development, covering the entire mobile development lifecycle from environment setup to production deployment.
|
|
7
|
+
The SpecWeave Mobile plugin provides specialized skills and agents for modern React Native and Expo development, covering the entire mobile development lifecycle from environment setup to production deployment.
|
|
8
|
+
|
|
9
|
+
### What's New (December 2025)
|
|
10
|
+
|
|
11
|
+
- **React Native 0.83**: Zero breaking changes, React 19.2, Activity component, useEffectEvent
|
|
12
|
+
- **Expo SDK 54**: Native tabs, iOS Liquid Glass, Android edge-to-edge, expo-video/expo-audio
|
|
13
|
+
- **Hermes V1**: Next-generation JavaScript engine (experimental)
|
|
14
|
+
- **New Architecture**: Default since RN 0.76 - Turbo Modules, Fabric, JSI
|
|
15
|
+
- **Web APIs**: Intersection Observer (Canary), Web Performance APIs (Stable)
|
|
8
16
|
|
|
9
17
|
## Features
|
|
10
18
|
|
|
11
19
|
### 7 Specialized Skills
|
|
12
20
|
|
|
13
|
-
1. **react-native-setup** - Environment setup and configuration
|
|
14
|
-
- Node.js
|
|
15
|
-
- iOS simulators and Android emulators
|
|
16
|
-
- CocoaPods
|
|
17
|
-
-
|
|
21
|
+
1. **react-native-setup** - Environment setup and configuration (2025)
|
|
22
|
+
- Node.js 20+, Xcode 16.1+, Android Studio Ladybug
|
|
23
|
+
- iOS simulators (iOS 26 for Liquid Glass) and Android emulators (API 35)
|
|
24
|
+
- CocoaPods 1.15+, watchman, EAS Build setup
|
|
25
|
+
- New Architecture setup and troubleshooting
|
|
18
26
|
|
|
19
|
-
2. **expo-workflow** - Expo development workflows
|
|
27
|
+
2. **expo-workflow** - Expo SDK 54+ development workflows
|
|
20
28
|
- EAS Build and EAS Update
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
29
|
+
- Native tab navigation and Expo Router v6
|
|
30
|
+
- iOS Liquid Glass and Android edge-to-edge
|
|
31
|
+
- expo-video/expo-audio (replacing expo-av)
|
|
24
32
|
|
|
25
33
|
3. **mobile-debugging** - Debugging strategies
|
|
26
|
-
- React DevTools
|
|
34
|
+
- React DevTools Desktop App (RN 0.83)
|
|
35
|
+
- Flipper, Chrome DevTools
|
|
27
36
|
- Network request debugging
|
|
28
37
|
- Error boundaries and crash analysis
|
|
29
|
-
- Platform-specific debugging
|
|
30
38
|
|
|
31
|
-
4. **performance-optimization** -
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
39
|
+
4. **performance-optimization** - Modern performance tuning
|
|
40
|
+
- Hermes V1 experimental engine
|
|
41
|
+
- React 19.2 Activity component for state preservation
|
|
42
|
+
- Intersection Observer API for lazy loading
|
|
43
|
+
- Web Performance APIs (performance.now, User Timing)
|
|
44
|
+
- FlashList, expo-image v2
|
|
37
45
|
|
|
38
|
-
5. **native-modules** -
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
46
|
+
5. **native-modules** - New Architecture native integration
|
|
47
|
+
- Turbo Modules with Codegen
|
|
48
|
+
- Fabric components
|
|
49
|
+
- JSI for synchronous calls
|
|
50
|
+
- Expo config plugins
|
|
51
|
+
- Interop layer for legacy Bridge modules
|
|
43
52
|
|
|
44
53
|
6. **device-testing** - Testing strategies
|
|
45
54
|
- Jest unit and integration testing
|
|
@@ -53,18 +62,18 @@ The SpecWeave Mobile plugin provides specialized skills and agents for React Nat
|
|
|
53
62
|
- Bundle size analysis
|
|
54
63
|
- Cache management
|
|
55
64
|
- Monorepo configuration
|
|
56
|
-
-
|
|
65
|
+
- Hermes bytecode optimization
|
|
57
66
|
|
|
58
67
|
### Mobile Architect Agent
|
|
59
68
|
|
|
60
69
|
The `mobile-architect` agent specializes in:
|
|
61
|
-
- Application architecture design
|
|
62
|
-
- State management selection (
|
|
63
|
-
- Navigation
|
|
64
|
-
- Performance architecture
|
|
65
|
-
- Platform-specific strategies
|
|
70
|
+
- Application architecture design for RN 0.83+ / Expo SDK 54+
|
|
71
|
+
- State management selection (Zustand, TanStack Query v5, Jotai, Legend State)
|
|
72
|
+
- Navigation with Expo Router v6 and React Navigation v7
|
|
73
|
+
- Performance architecture with React 19.2 features
|
|
74
|
+
- Platform-specific strategies (iOS Liquid Glass, Android edge-to-edge)
|
|
66
75
|
- Testing architecture
|
|
67
|
-
- Build and deployment pipelines
|
|
76
|
+
- Build and deployment pipelines with EAS
|
|
68
77
|
|
|
69
78
|
## Installation
|
|
70
79
|
|
|
@@ -284,11 +293,13 @@ React Navigation with:
|
|
|
284
293
|
|
|
285
294
|
## Pro Tips
|
|
286
295
|
|
|
287
|
-
1. **Fast Device Testing**: Use
|
|
288
|
-
2. **Performance**: Enable Hermes for faster startup and smaller bundles
|
|
289
|
-
3. **Debugging**: Use
|
|
296
|
+
1. **Fast Device Testing**: Use development builds with EAS for custom native code
|
|
297
|
+
2. **Performance**: Enable Hermes V1 (experimental) for faster startup and smaller bundles
|
|
298
|
+
3. **Debugging**: Use the new React DevTools Desktop App (RN 0.83)
|
|
290
299
|
4. **Testing**: Start with React Native Testing Library, add Detox for critical paths
|
|
291
|
-
5. **Optimization**:
|
|
300
|
+
5. **Optimization**: Use Web Performance APIs (performance.now, User Timing) for profiling
|
|
301
|
+
6. **iOS**: Target iOS 26+ for Liquid Glass effects
|
|
302
|
+
7. **Android**: Use API 35 with edge-to-edge for modern UI
|
|
292
303
|
|
|
293
304
|
## Troubleshooting
|
|
294
305
|
|
|
@@ -316,6 +327,15 @@ To add new skills or improve existing ones:
|
|
|
316
327
|
|
|
317
328
|
## Version History
|
|
318
329
|
|
|
330
|
+
- **2.0.0** (December 2025)
|
|
331
|
+
- React Native 0.83 support (React 19.2, Activity component, useEffectEvent)
|
|
332
|
+
- Expo SDK 54 support (native tabs, Liquid Glass, edge-to-edge)
|
|
333
|
+
- Hermes V1 experimental engine support
|
|
334
|
+
- Turbo Modules with Codegen documentation
|
|
335
|
+
- Intersection Observer and Web Performance APIs
|
|
336
|
+
- expo-video/expo-audio (replacing expo-av)
|
|
337
|
+
- Updated all skills with 2025 requirements
|
|
338
|
+
|
|
319
339
|
- **1.0.0** (November 2024)
|
|
320
340
|
- Initial release
|
|
321
341
|
- 7 specialized skills
|