@orchestrator-claude/definitions 3.5.0
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/agents/api-extractor.md +687 -0
- package/agents/business-rule-miner.md +754 -0
- package/agents/code-archaeologist.md +720 -0
- package/agents/docs-guardian.md +524 -0
- package/agents/implementer.md +512 -0
- package/agents/legacy-discoverer.md +583 -0
- package/agents/legacy-synthesizer.md +1101 -0
- package/agents/orchestrator.md +165 -0
- package/agents/planner.md +365 -0
- package/agents/researcher.md +447 -0
- package/agents/reviewer.md +514 -0
- package/agents/schema-extractor.md +781 -0
- package/agents/specifier.md +360 -0
- package/agents/task-generator.md +390 -0
- package/bin/orch-defs.js +2 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +172 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/DiffCommand.d.ts +13 -0
- package/dist/commands/DiffCommand.d.ts.map +1 -0
- package/dist/commands/DiffCommand.js +74 -0
- package/dist/commands/DiffCommand.js.map +1 -0
- package/dist/commands/SeedCommand.d.ts +19 -0
- package/dist/commands/SeedCommand.d.ts.map +1 -0
- package/dist/commands/SeedCommand.js +56 -0
- package/dist/commands/SeedCommand.js.map +1 -0
- package/dist/http/ApiClient.d.ts +50 -0
- package/dist/http/ApiClient.d.ts.map +1 -0
- package/dist/http/ApiClient.js +58 -0
- package/dist/http/ApiClient.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest/ManifestLoader.d.ts +34 -0
- package/dist/manifest/ManifestLoader.d.ts.map +1 -0
- package/dist/manifest/ManifestLoader.js +110 -0
- package/dist/manifest/ManifestLoader.js.map +1 -0
- package/dist/manifest/types.d.ts +59 -0
- package/dist/manifest/types.d.ts.map +1 -0
- package/dist/manifest/types.js +5 -0
- package/dist/manifest/types.js.map +1 -0
- package/dist/scripts/generate-manifest.d.ts +10 -0
- package/dist/scripts/generate-manifest.d.ts.map +1 -0
- package/dist/scripts/generate-manifest.js +114 -0
- package/dist/scripts/generate-manifest.js.map +1 -0
- package/hooks/post-agent-artifact-relay.sh +157 -0
- package/hooks/post-artifact-generate.sh +39 -0
- package/hooks/post-implement-validate.sh +139 -0
- package/hooks/post-phase-checkpoint.sh +322 -0
- package/hooks/pre-agent-invoke.sh +34 -0
- package/hooks/pre-phase-advance.sh +40 -0
- package/hooks/track-agent-invocation.sh +241 -0
- package/kb/auth-strategies.md +742 -0
- package/kb/docs-constitution.md +310 -0
- package/kb/error-handling.md +555 -0
- package/kb/rest-conventions.md +458 -0
- package/kb/validation-patterns.md +589 -0
- package/manifest.json +314 -0
- package/package.json +65 -0
- package/skills/artifact-validator/SKILL.md +226 -0
- package/skills/docs-guardian/SKILL.md +230 -0
- package/skills/kb-lookup/SKILL.md +257 -0
- package/skills/phase-gate-evaluator/SKILL.md +274 -0
- package/skills/release/SKILL.md +239 -0
- package/skills/release/release.sh +491 -0
- package/skills/smoke-test/SKILL.md +195 -0
- package/skills/workflow-status/SKILL.md +322 -0
- package/workflows/bug-fix.json +74 -0
- package/workflows/feature-development.json +88 -0
- package/workflows/legacy-analysis.json +304 -0
- package/workflows/refactoring.json +74 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# ============================================================================
|
|
5
|
+
# Release Script - Orchestrator v1.5.x
|
|
6
|
+
# ============================================================================
|
|
7
|
+
# Automates version bump and tag creation. CI/CD handles npm/Docker publish.
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# ./scripts/release.sh patch # 1.5.0 -> 1.5.1
|
|
11
|
+
# ./scripts/release.sh minor # 1.5.0 -> 1.6.0
|
|
12
|
+
# ./scripts/release.sh major # 1.5.0 -> 2.0.0
|
|
13
|
+
# ./scripts/release.sh 1.5.1 # Explicit version
|
|
14
|
+
#
|
|
15
|
+
# Files updated:
|
|
16
|
+
# - package.json (root)
|
|
17
|
+
# - packages/cli/package.json
|
|
18
|
+
# - packages/mcp-server/package.json
|
|
19
|
+
# - packages/sdk/package.json
|
|
20
|
+
# - packages/cli/src/index.ts (CLI_VERSION constant)
|
|
21
|
+
# - src/infrastructure/templates/base/package.json.hbs (template versions)
|
|
22
|
+
#
|
|
23
|
+
# ============================================================================
|
|
24
|
+
|
|
25
|
+
# Colors for output
|
|
26
|
+
RED='\033[0;31m'
|
|
27
|
+
GREEN='\033[0;32m'
|
|
28
|
+
YELLOW='\033[1;33m'
|
|
29
|
+
BLUE='\033[0;34m'
|
|
30
|
+
NC='\033[0m' # No Color
|
|
31
|
+
|
|
32
|
+
# Global variables
|
|
33
|
+
FORCE=false
|
|
34
|
+
DRY_RUN=false
|
|
35
|
+
|
|
36
|
+
# Parse arguments
|
|
37
|
+
VERSION_ARG=""
|
|
38
|
+
while [[ $# -gt 0 ]]; do
|
|
39
|
+
case $1 in
|
|
40
|
+
-y|--yes|--force)
|
|
41
|
+
FORCE=true
|
|
42
|
+
shift
|
|
43
|
+
;;
|
|
44
|
+
--dry-run)
|
|
45
|
+
DRY_RUN=true
|
|
46
|
+
shift
|
|
47
|
+
;;
|
|
48
|
+
-h|--help)
|
|
49
|
+
echo "Usage: $0 [options] <version>"
|
|
50
|
+
echo ""
|
|
51
|
+
echo "Version can be:"
|
|
52
|
+
echo " patch Increment patch version (1.4.1 -> 1.4.2)"
|
|
53
|
+
echo " minor Increment minor version (1.4.1 -> 1.5.0)"
|
|
54
|
+
echo " major Increment major version (1.4.1 -> 2.0.0)"
|
|
55
|
+
echo " x.y.z Explicit version number"
|
|
56
|
+
echo ""
|
|
57
|
+
echo "Options:"
|
|
58
|
+
echo " -y, --yes, --force Skip confirmation prompts"
|
|
59
|
+
echo " --dry-run Show what would be done without making changes"
|
|
60
|
+
echo " -h, --help Show this help message"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "Examples:"
|
|
63
|
+
echo " $0 patch # Bump patch version"
|
|
64
|
+
echo " $0 1.4.2 # Set explicit version"
|
|
65
|
+
echo " $0 --dry-run patch # Preview changes"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "What this script does:"
|
|
68
|
+
echo " 1. Validates prerequisites and working tree"
|
|
69
|
+
echo " 2. Runs build to update dist/ with latest templates"
|
|
70
|
+
echo " 3. Bumps version in all package files"
|
|
71
|
+
echo " 4. Updates CLI_VERSION constant"
|
|
72
|
+
echo " 5. Commits version bump"
|
|
73
|
+
echo " 6. Creates and pushes git tag"
|
|
74
|
+
echo " 7. Tag push triggers CI/CD pipeline (npm + Docker publish)"
|
|
75
|
+
exit 0
|
|
76
|
+
;;
|
|
77
|
+
*)
|
|
78
|
+
if [ -z "$VERSION_ARG" ]; then
|
|
79
|
+
VERSION_ARG="$1"
|
|
80
|
+
else
|
|
81
|
+
echo "Unknown option: $1"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
shift
|
|
85
|
+
;;
|
|
86
|
+
esac
|
|
87
|
+
done
|
|
88
|
+
|
|
89
|
+
if [ -z "$VERSION_ARG" ]; then
|
|
90
|
+
echo -e "${RED}❌ Version argument required${NC}"
|
|
91
|
+
echo "Usage: $0 [patch|minor|major|x.y.z]"
|
|
92
|
+
echo "Run '$0 --help' for more information"
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# ============================================================================
|
|
97
|
+
# Utility Functions
|
|
98
|
+
# ============================================================================
|
|
99
|
+
|
|
100
|
+
log_info() {
|
|
101
|
+
echo -e "${BLUE}ℹ${NC} $1"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
log_success() {
|
|
105
|
+
echo -e "${GREEN}✅${NC} $1"
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
log_warning() {
|
|
109
|
+
echo -e "${YELLOW}⚠️${NC} $1"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
log_error() {
|
|
113
|
+
echo -e "${RED}❌${NC} $1"
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
# ============================================================================
|
|
117
|
+
# Validation Functions
|
|
118
|
+
# ============================================================================
|
|
119
|
+
|
|
120
|
+
validate_prerequisites() {
|
|
121
|
+
echo "🔍 Validating prerequisites..."
|
|
122
|
+
local missing=()
|
|
123
|
+
|
|
124
|
+
# Check git
|
|
125
|
+
if ! command -v git &> /dev/null; then
|
|
126
|
+
missing+=("git")
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
# Check node
|
|
130
|
+
if ! command -v node &> /dev/null; then
|
|
131
|
+
missing+=("node")
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
# Check we're in the right directory
|
|
135
|
+
if [ ! -f "package.json" ] || [ ! -d "packages/cli" ]; then
|
|
136
|
+
log_error "Must be run from orchestrator root directory"
|
|
137
|
+
exit 1
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
if [ ${#missing[@]} -ne 0 ]; then
|
|
141
|
+
log_error "Missing required tools: ${missing[*]}"
|
|
142
|
+
exit 1
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
log_success "All prerequisites satisfied"
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
validate_working_tree() {
|
|
149
|
+
echo "🔍 Validating working tree..."
|
|
150
|
+
|
|
151
|
+
# Check if working tree is clean
|
|
152
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
153
|
+
log_error "Working tree is not clean"
|
|
154
|
+
echo "Please commit or stash your changes:"
|
|
155
|
+
git status --short
|
|
156
|
+
exit 1
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
# Check if on main branch
|
|
160
|
+
local branch
|
|
161
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
162
|
+
|
|
163
|
+
if [[ "$branch" != "main" ]]; then
|
|
164
|
+
log_warning "You are on branch '$branch', not main"
|
|
165
|
+
if [ "$FORCE" = true ]; then
|
|
166
|
+
echo "Continuing with --force flag..."
|
|
167
|
+
else
|
|
168
|
+
read -p "Continue anyway? (y/N): " -n 1 -r
|
|
169
|
+
echo
|
|
170
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
171
|
+
echo "Aborted by user"
|
|
172
|
+
exit 1
|
|
173
|
+
fi
|
|
174
|
+
fi
|
|
175
|
+
fi
|
|
176
|
+
|
|
177
|
+
log_success "Working tree is clean"
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
validate_tag_not_exists() {
|
|
181
|
+
local tag=$1
|
|
182
|
+
|
|
183
|
+
if git rev-parse "$tag" &> /dev/null; then
|
|
184
|
+
log_error "Tag '$tag' already exists"
|
|
185
|
+
echo "Choose a different version or delete the existing tag"
|
|
186
|
+
exit 1
|
|
187
|
+
fi
|
|
188
|
+
|
|
189
|
+
log_success "Tag '$tag' is available"
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
# ============================================================================
|
|
193
|
+
# Version Functions
|
|
194
|
+
# ============================================================================
|
|
195
|
+
|
|
196
|
+
get_current_version() {
|
|
197
|
+
node -p "require('./packages/cli/package.json').version"
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
calculate_new_version() {
|
|
201
|
+
local current=$1
|
|
202
|
+
local bump_type=$2
|
|
203
|
+
|
|
204
|
+
# Parse current version
|
|
205
|
+
local major minor patch
|
|
206
|
+
IFS='.' read -r major minor patch <<< "$current"
|
|
207
|
+
|
|
208
|
+
case $bump_type in
|
|
209
|
+
patch)
|
|
210
|
+
echo "${major}.${minor}.$((patch + 1))"
|
|
211
|
+
;;
|
|
212
|
+
minor)
|
|
213
|
+
echo "${major}.$((minor + 1)).0"
|
|
214
|
+
;;
|
|
215
|
+
major)
|
|
216
|
+
echo "$((major + 1)).0.0"
|
|
217
|
+
;;
|
|
218
|
+
*)
|
|
219
|
+
# Assume it's an explicit version
|
|
220
|
+
if [[ "$bump_type" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
221
|
+
echo "$bump_type"
|
|
222
|
+
else
|
|
223
|
+
log_error "Invalid version format: $bump_type"
|
|
224
|
+
echo "Use: patch, minor, major, or x.y.z format"
|
|
225
|
+
exit 1
|
|
226
|
+
fi
|
|
227
|
+
;;
|
|
228
|
+
esac
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
# ============================================================================
|
|
232
|
+
# Update Functions
|
|
233
|
+
# ============================================================================
|
|
234
|
+
|
|
235
|
+
update_package_version() {
|
|
236
|
+
local file=$1
|
|
237
|
+
local version=$2
|
|
238
|
+
|
|
239
|
+
if [ ! -f "$file" ]; then
|
|
240
|
+
log_warning "File not found: $file"
|
|
241
|
+
return
|
|
242
|
+
fi
|
|
243
|
+
|
|
244
|
+
if [ "$DRY_RUN" = true ]; then
|
|
245
|
+
echo " [dry-run] Would update: $file"
|
|
246
|
+
return
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
# Use node to update version (handles JSON properly)
|
|
250
|
+
node -e "
|
|
251
|
+
const fs = require('fs');
|
|
252
|
+
const pkg = JSON.parse(fs.readFileSync('$file', 'utf8'));
|
|
253
|
+
pkg.version = '$version';
|
|
254
|
+
fs.writeFileSync('$file', JSON.stringify(pkg, null, 2) + '\n');
|
|
255
|
+
"
|
|
256
|
+
|
|
257
|
+
log_info "Updated: $file"
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
update_cli_version_constant() {
|
|
261
|
+
local version=$1
|
|
262
|
+
local file="packages/cli/src/index.ts"
|
|
263
|
+
|
|
264
|
+
if [ ! -f "$file" ]; then
|
|
265
|
+
log_warning "File not found: $file"
|
|
266
|
+
return
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
if [ "$DRY_RUN" = true ]; then
|
|
270
|
+
echo " [dry-run] Would update CLI_VERSION in: $file"
|
|
271
|
+
return
|
|
272
|
+
fi
|
|
273
|
+
|
|
274
|
+
# Update CLI_VERSION constant
|
|
275
|
+
sed -i "s/export const CLI_VERSION = '[^']*'/export const CLI_VERSION = '${version}'/" "$file"
|
|
276
|
+
|
|
277
|
+
log_info "Updated CLI_VERSION in: $file"
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
update_template_version() {
|
|
281
|
+
local version=$1
|
|
282
|
+
local file="src/infrastructure/templates/base/package.json.hbs"
|
|
283
|
+
|
|
284
|
+
if [ ! -f "$file" ]; then
|
|
285
|
+
log_warning "Template file not found: $file"
|
|
286
|
+
return
|
|
287
|
+
fi
|
|
288
|
+
|
|
289
|
+
if [ "$DRY_RUN" = true ]; then
|
|
290
|
+
echo " [dry-run] Would update template: $file"
|
|
291
|
+
return
|
|
292
|
+
fi
|
|
293
|
+
|
|
294
|
+
# Update @orchestrator-claude/cli and @orchestrator-claude/mcp-server versions
|
|
295
|
+
sed -i "s|\"@orchestrator-claude/cli\": \"\\^[0-9]*\\.[0-9]*\\.[0-9]*\"|\"@orchestrator-claude/cli\": \"^${version}\"|g" "$file"
|
|
296
|
+
sed -i "s|\"@orchestrator-claude/mcp-server\": \"\\^[0-9]*\\.[0-9]*\\.[0-9]*\"|\"@orchestrator-claude/mcp-server\": \"^${version}\"|g" "$file"
|
|
297
|
+
|
|
298
|
+
log_info "Updated template: $file"
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
update_all_versions() {
|
|
302
|
+
local version=$1
|
|
303
|
+
|
|
304
|
+
echo "📝 Updating versions to $version..."
|
|
305
|
+
|
|
306
|
+
# Update root package.json
|
|
307
|
+
update_package_version "package.json" "$version"
|
|
308
|
+
|
|
309
|
+
# Update CLI package
|
|
310
|
+
update_package_version "packages/cli/package.json" "$version"
|
|
311
|
+
|
|
312
|
+
# Update MCP server package
|
|
313
|
+
update_package_version "packages/mcp-server/package.json" "$version"
|
|
314
|
+
|
|
315
|
+
# Update SDK package
|
|
316
|
+
update_package_version "packages/sdk/package.json" "$version"
|
|
317
|
+
|
|
318
|
+
# Update CLI_VERSION constant
|
|
319
|
+
update_cli_version_constant "$version"
|
|
320
|
+
|
|
321
|
+
# Update templates
|
|
322
|
+
update_template_version "$version"
|
|
323
|
+
|
|
324
|
+
log_success "All versions updated to $version"
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
# ============================================================================
|
|
328
|
+
# Build Functions
|
|
329
|
+
# ============================================================================
|
|
330
|
+
|
|
331
|
+
run_build() {
|
|
332
|
+
echo "🔨 Building project to update dist/..."
|
|
333
|
+
|
|
334
|
+
if [ "$DRY_RUN" = true ]; then
|
|
335
|
+
echo " [dry-run] Would run: npm run build"
|
|
336
|
+
return
|
|
337
|
+
fi
|
|
338
|
+
|
|
339
|
+
# Run build to ensure dist/ has latest templates
|
|
340
|
+
if ! npm run build > /dev/null 2>&1; then
|
|
341
|
+
log_error "Build failed. Fix errors before releasing."
|
|
342
|
+
exit 1
|
|
343
|
+
fi
|
|
344
|
+
|
|
345
|
+
log_success "Build completed - dist/ updated with latest templates"
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
# ============================================================================
|
|
349
|
+
# Git Functions
|
|
350
|
+
# ============================================================================
|
|
351
|
+
|
|
352
|
+
commit_version_bump() {
|
|
353
|
+
local version=$1
|
|
354
|
+
local tag="v${version}"
|
|
355
|
+
|
|
356
|
+
if [ "$DRY_RUN" = true ]; then
|
|
357
|
+
echo " [dry-run] Would commit: chore: bump version to ${tag}"
|
|
358
|
+
return
|
|
359
|
+
fi
|
|
360
|
+
|
|
361
|
+
git add package.json \
|
|
362
|
+
packages/cli/package.json \
|
|
363
|
+
packages/mcp-server/package.json \
|
|
364
|
+
packages/sdk/package.json \
|
|
365
|
+
packages/cli/src/index.ts \
|
|
366
|
+
src/infrastructure/templates/base/package.json.hbs
|
|
367
|
+
|
|
368
|
+
git commit -m "chore: bump version to ${tag}
|
|
369
|
+
|
|
370
|
+
Updates:
|
|
371
|
+
- package.json (root)
|
|
372
|
+
- packages/cli/package.json
|
|
373
|
+
- packages/mcp-server/package.json
|
|
374
|
+
- packages/sdk/package.json
|
|
375
|
+
- packages/cli/src/index.ts (CLI_VERSION)
|
|
376
|
+
- src/infrastructure/templates/base/package.json.hbs (templates)
|
|
377
|
+
|
|
378
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
|
|
379
|
+
|
|
380
|
+
log_success "Version bump committed"
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
create_and_push_tag() {
|
|
384
|
+
local version=$1
|
|
385
|
+
local tag="v${version}"
|
|
386
|
+
|
|
387
|
+
if [ "$DRY_RUN" = true ]; then
|
|
388
|
+
echo " [dry-run] Would create tag: $tag"
|
|
389
|
+
echo " [dry-run] Would push: main and $tag"
|
|
390
|
+
return
|
|
391
|
+
fi
|
|
392
|
+
|
|
393
|
+
# Create annotated tag
|
|
394
|
+
git tag -a "$tag" -m "Release $tag"
|
|
395
|
+
log_success "Tag created: $tag"
|
|
396
|
+
|
|
397
|
+
# Push commit and tag
|
|
398
|
+
echo "⬆️ Pushing to remote..."
|
|
399
|
+
git push origin main
|
|
400
|
+
git push origin "$tag"
|
|
401
|
+
|
|
402
|
+
log_success "Pushed main and tag $tag"
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
# ============================================================================
|
|
406
|
+
# Main Flow
|
|
407
|
+
# ============================================================================
|
|
408
|
+
|
|
409
|
+
main() {
|
|
410
|
+
echo ""
|
|
411
|
+
echo -e "${BLUE}════════════════════════════════════════${NC}"
|
|
412
|
+
echo -e "${BLUE} Orchestrator Release Script${NC}"
|
|
413
|
+
echo -e "${BLUE}════════════════════════════════════════${NC}"
|
|
414
|
+
echo ""
|
|
415
|
+
|
|
416
|
+
validate_prerequisites
|
|
417
|
+
validate_working_tree
|
|
418
|
+
|
|
419
|
+
# Get current and new versions
|
|
420
|
+
local current_version
|
|
421
|
+
current_version=$(get_current_version)
|
|
422
|
+
|
|
423
|
+
local new_version
|
|
424
|
+
new_version=$(calculate_new_version "$current_version" "$VERSION_ARG")
|
|
425
|
+
|
|
426
|
+
local tag="v${new_version}"
|
|
427
|
+
|
|
428
|
+
echo ""
|
|
429
|
+
echo -e "${BLUE}Release Plan:${NC}"
|
|
430
|
+
echo " Current version: $current_version"
|
|
431
|
+
echo " New version: $new_version"
|
|
432
|
+
echo " Git tag: $tag"
|
|
433
|
+
echo ""
|
|
434
|
+
|
|
435
|
+
if [ "$DRY_RUN" = true ]; then
|
|
436
|
+
echo -e "${YELLOW}[DRY RUN MODE - No changes will be made]${NC}"
|
|
437
|
+
echo ""
|
|
438
|
+
fi
|
|
439
|
+
|
|
440
|
+
validate_tag_not_exists "$tag"
|
|
441
|
+
|
|
442
|
+
# Show what will be updated
|
|
443
|
+
echo ""
|
|
444
|
+
echo "Files to update:"
|
|
445
|
+
echo " - package.json (root)"
|
|
446
|
+
echo " - packages/cli/package.json"
|
|
447
|
+
echo " - packages/mcp-server/package.json"
|
|
448
|
+
echo " - packages/sdk/package.json"
|
|
449
|
+
echo " - packages/cli/src/index.ts (CLI_VERSION)"
|
|
450
|
+
echo " - src/infrastructure/templates/base/package.json.hbs (templates)"
|
|
451
|
+
echo ""
|
|
452
|
+
echo "Actions:"
|
|
453
|
+
echo " 1. Build project (update dist/ with latest templates)"
|
|
454
|
+
echo " 2. Update version in all files"
|
|
455
|
+
echo " 3. Commit version bump"
|
|
456
|
+
echo " 4. Create git tag $tag"
|
|
457
|
+
echo " 5. Push main + tag to origin"
|
|
458
|
+
echo " 6. CI/CD pipeline will publish npm + Docker"
|
|
459
|
+
echo ""
|
|
460
|
+
|
|
461
|
+
if [ "$FORCE" = false ] && [ "$DRY_RUN" = false ]; then
|
|
462
|
+
read -p "Continue with release? (y/N): " -n 1 -r
|
|
463
|
+
echo
|
|
464
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
465
|
+
echo "Aborted by user"
|
|
466
|
+
exit 1
|
|
467
|
+
fi
|
|
468
|
+
fi
|
|
469
|
+
|
|
470
|
+
# Execute release steps
|
|
471
|
+
run_build
|
|
472
|
+
update_all_versions "$new_version"
|
|
473
|
+
commit_version_bump "$new_version"
|
|
474
|
+
create_and_push_tag "$new_version"
|
|
475
|
+
|
|
476
|
+
echo ""
|
|
477
|
+
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
478
|
+
echo -e "${GREEN} Release $tag initiated!${NC}"
|
|
479
|
+
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
480
|
+
echo ""
|
|
481
|
+
echo "🚀 CI/CD pipeline will now:"
|
|
482
|
+
echo " - Build and publish Docker image"
|
|
483
|
+
echo " - Publish npm packages"
|
|
484
|
+
echo ""
|
|
485
|
+
echo "📍 Monitor pipeline at:"
|
|
486
|
+
echo " https://github.com/orchestratorAII/orchestrator/actions"
|
|
487
|
+
echo ""
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
# Entry point
|
|
491
|
+
main
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Smoke Test Skill
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Executes comprehensive API smoke tests against the Orchestrator API.
|
|
6
|
+
Tests ALL endpoints from OpenAPI spec and generates detailed evidence.
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- Before releases to validate API stability
|
|
11
|
+
- After deployments to verify endpoints
|
|
12
|
+
- During development to check for regressions
|
|
13
|
+
- As part of CI/CD pipeline validation
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/smoke-test # Run all tiers
|
|
19
|
+
/smoke-test --quick # Tier 1-2 only (health + list)
|
|
20
|
+
/smoke-test --full # All tiers with verbose output
|
|
21
|
+
/smoke-test --tier 3 # Specific tier only
|
|
22
|
+
/smoke-test --format json # JSON output only
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
| Parameter | Type | Default | Description |
|
|
28
|
+
|-----------|------|---------|-------------|
|
|
29
|
+
| `--quick` | flag | false | Run only Tier 1-2 (fast validation) |
|
|
30
|
+
| `--full` | flag | false | Run all tiers with verbose output |
|
|
31
|
+
| `--tier N` | int | all | Filter to specific tier (1-4) |
|
|
32
|
+
| `--format` | string | both | Output format: json, markdown, both |
|
|
33
|
+
| `--verbose` | flag | false | Show detailed test output |
|
|
34
|
+
| `--no-cleanup` | flag | false | Keep test data after completion |
|
|
35
|
+
| `--url URL` | string | localhost:3001 | API base URL |
|
|
36
|
+
|
|
37
|
+
## Test Tiers
|
|
38
|
+
|
|
39
|
+
| Tier | Description | Tests |
|
|
40
|
+
|------|-------------|-------|
|
|
41
|
+
| 1 | Health & Connectivity | 5 tests |
|
|
42
|
+
| 2 | List Endpoints | 14 tests |
|
|
43
|
+
| 3 | CRUD Operations | 13 tests |
|
|
44
|
+
| 3B | Workflow Sub-APIs | 12 tests* |
|
|
45
|
+
| 3C | Invocations API | 2 tests |
|
|
46
|
+
| 3D | Artifacts/Checkpoints/Patterns | 3 tests** |
|
|
47
|
+
| 4 | Cleanup | 3 tests |
|
|
48
|
+
|
|
49
|
+
**Total: 41 tests covering 76+ endpoints across 19 API groups**
|
|
50
|
+
|
|
51
|
+
*Tier 3B tests require active workflow - skipped if workflow creation fails
|
|
52
|
+
**Tier 3D tests require existing data - skipped if no artifacts/checkpoints/patterns exist
|
|
53
|
+
|
|
54
|
+
## Output Artifacts
|
|
55
|
+
|
|
56
|
+
After execution, the skill generates:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
.orchestrator/artifacts/smoke-test/
|
|
60
|
+
├── evidence-YYYY-MM-DD_HH-MM-SS.json # Detailed JSON evidence
|
|
61
|
+
└── report-YYYY-MM-DD_HH-MM-SS.md # Human-readable report
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### JSON Evidence Schema
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"meta": {
|
|
69
|
+
"version": "1.0.0",
|
|
70
|
+
"timestamp": "ISO8601",
|
|
71
|
+
"api_url": "string",
|
|
72
|
+
"duration_ms": number
|
|
73
|
+
},
|
|
74
|
+
"summary": {
|
|
75
|
+
"total": number,
|
|
76
|
+
"passed": number,
|
|
77
|
+
"failed": number,
|
|
78
|
+
"skipped": number,
|
|
79
|
+
"pass_rate": number
|
|
80
|
+
},
|
|
81
|
+
"results": [
|
|
82
|
+
{
|
|
83
|
+
"tier": number,
|
|
84
|
+
"category": "string",
|
|
85
|
+
"name": "string",
|
|
86
|
+
"method": "string",
|
|
87
|
+
"endpoint": "string",
|
|
88
|
+
"expected_codes": "string",
|
|
89
|
+
"actual_code": number,
|
|
90
|
+
"response_time_ms": number,
|
|
91
|
+
"passed": boolean,
|
|
92
|
+
"timestamp": "ISO8601",
|
|
93
|
+
"body": object
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Execution Flow
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
1. Parse arguments
|
|
103
|
+
│
|
|
104
|
+
2. Execute Tier 1: Health
|
|
105
|
+
│
|
|
106
|
+
3. Execute Tier 2: List all resources
|
|
107
|
+
│
|
|
108
|
+
4. Execute Tier 3: Create/Update/Delete
|
|
109
|
+
│
|
|
110
|
+
5. Execute Tier 4: Cleanup (if --no-cleanup not set)
|
|
111
|
+
│
|
|
112
|
+
6. Generate reports (JSON + Markdown)
|
|
113
|
+
│
|
|
114
|
+
7. Display summary
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Examples
|
|
118
|
+
|
|
119
|
+
### Quick Validation (CI/CD)
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
/smoke-test --quick --format json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Pre-Release Full Test
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
/smoke-test --full --verbose
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Debug Specific Tier
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
/smoke-test --tier 3 --verbose --no-cleanup
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Integration with Workflows
|
|
138
|
+
|
|
139
|
+
This skill can be used as:
|
|
140
|
+
|
|
141
|
+
1. **Post-IMPLEMENT hook** - Validate API after code changes
|
|
142
|
+
2. **Pre-release validation** - Ensure stability before release
|
|
143
|
+
3. **Regression detection** - Run after database migrations
|
|
144
|
+
|
|
145
|
+
### Example Hook Configuration
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"slug": "post-implement-smoke-test",
|
|
150
|
+
"hookType": "post",
|
|
151
|
+
"triggerPhase": "implement",
|
|
152
|
+
"handlerType": "bash",
|
|
153
|
+
"handlerConfig": {
|
|
154
|
+
"command": "./scripts/smoke-test-api.sh --quick"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Prerequisites
|
|
160
|
+
|
|
161
|
+
- Docker containers running (postgres, orchestrator-api)
|
|
162
|
+
- `curl` and `jq` installed
|
|
163
|
+
- API accessible at configured URL
|
|
164
|
+
|
|
165
|
+
## Troubleshooting
|
|
166
|
+
|
|
167
|
+
### API Not Responding
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Check container status
|
|
171
|
+
docker compose ps orchestrator-api
|
|
172
|
+
|
|
173
|
+
# Check API logs
|
|
174
|
+
docker compose logs orchestrator-api --tail 50
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Tests Failing
|
|
178
|
+
|
|
179
|
+
1. Check the generated report for details
|
|
180
|
+
2. Run with `--verbose` for more output
|
|
181
|
+
3. Run with `--no-cleanup` to inspect created data
|
|
182
|
+
|
|
183
|
+
## Known Limitations
|
|
184
|
+
|
|
185
|
+
### Agent CRUD Operations
|
|
186
|
+
Agent Create/Read/Update/Delete may fail with 500 if the database schema migration
|
|
187
|
+
for RFC-010 P2 has not been applied. The test accepts these failures gracefully.
|
|
188
|
+
|
|
189
|
+
### Workflow Start
|
|
190
|
+
Workflow creation may fail with 500 "Index not loaded" if the orchestrator service
|
|
191
|
+
wasn't properly initialized. This is an environment issue, not a test issue.
|
|
192
|
+
|
|
193
|
+
### Read-Only Resources
|
|
194
|
+
Artifacts, Checkpoints, and Patterns tests are skipped if no resources exist.
|
|
195
|
+
These are read-only endpoints that depend on prior workflow execution.
|