@nklisch/pi-agile-workflow 0.15.3
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/plugin.json +10 -0
- package/.codex-plugin/plugin.json +28 -0
- package/CHANGELOG.md +591 -0
- package/README.md +107 -0
- package/docs/ARCHITECTURE.md +716 -0
- package/docs/MIGRATION.md +419 -0
- package/docs/PRINCIPLES.md +464 -0
- package/docs/ROADMAP.md +95 -0
- package/docs/SPEC.md +855 -0
- package/docs/VISION.md +106 -0
- package/extensions/agile-workflow.test.ts +419 -0
- package/extensions/agile-workflow.ts +467 -0
- package/hooks/hooks.json +52 -0
- package/hooks/scripts/prompt-context.py +628 -0
- package/hooks/scripts/substrate-maintainer.py +359 -0
- package/hooks/scripts/test_prompt_context.py +757 -0
- package/package.json +30 -0
- package/scripts/install-work-view.sh +165 -0
- package/scripts/tests/agent-metadata.test.sh +75 -0
- package/scripts/tests/bump-version.test.sh +552 -0
- package/scripts/tests/channel-parity.test.sh +117 -0
- package/scripts/tests/convert-content-integrity.test.sh +246 -0
- package/scripts/tests/convert-install-routing.test.sh +159 -0
- package/scripts/tests/install-work-view.test.sh +411 -0
- package/scripts/tests/pi-package-metadata.test.sh +119 -0
- package/scripts/tests/work-board-shim.test.sh +239 -0
- package/scripts/tests/work-view-dist-version.test.sh +105 -0
- package/scripts/work-board.sh +64 -0
- package/scripts/work-view.sh +423 -0
- package/skills/autopilot/SKILL.md +330 -0
- package/skills/autopilot/agents/openai.yaml +6 -0
- package/skills/board/SKILL.md +62 -0
- package/skills/board/agents/openai.yaml +6 -0
- package/skills/bold-refactor/SKILL.md +244 -0
- package/skills/bold-refactor/agents/openai.yaml +6 -0
- package/skills/bug-scan/SKILL.md +378 -0
- package/skills/bug-scan/agents/openai.yaml +6 -0
- package/skills/bug-scan/references/async-promises.md +119 -0
- package/skills/bug-scan/references/concurrency-races.md +148 -0
- package/skills/bug-scan/references/data-layer.md +167 -0
- package/skills/bug-scan/references/error-handling.md +197 -0
- package/skills/bug-scan/references/gate-item-template.md +94 -0
- package/skills/bug-scan/references/language-footguns.md +219 -0
- package/skills/bug-scan/references/parked-item-template.md +103 -0
- package/skills/bug-scan/references/report-template.md +115 -0
- package/skills/bug-scan/references/resource-leaks.md +199 -0
- package/skills/bug-scan/references/state-closures.md +148 -0
- package/skills/bug-scan/references/time-numbers.md +158 -0
- package/skills/convert/SKILL.md +1463 -0
- package/skills/convert/agents/openai.yaml +6 -0
- package/skills/convert/references/legacy-overlap-migration.md +179 -0
- package/skills/deep-code-scan/SKILL.md +378 -0
- package/skills/deep-code-scan/agents/openai.yaml +6 -0
- package/skills/deep-code-scan/references/artifact-ledger.md +148 -0
- package/skills/deep-code-scan/references/consolidation.md +91 -0
- package/skills/deep-code-scan/references/decomposition.md +127 -0
- package/skills/deep-code-scan/references/item-templates.md +263 -0
- package/skills/deep-code-scan/references/lane-catalog.md +129 -0
- package/skills/deep-code-scan/references/review-gauntlet.md +108 -0
- package/skills/deep-code-scan/references/scanner-brief.md +152 -0
- package/skills/e2e-test-design/SKILL.md +517 -0
- package/skills/e2e-test-design/references/anti-tautology.md +261 -0
- package/skills/e2e-test-design/references/service-mocks.md +234 -0
- package/skills/e2e-test-design/references/test-taxonomy.md +211 -0
- package/skills/epic-design/SKILL.md +476 -0
- package/skills/epicize/SKILL.md +210 -0
- package/skills/epicize/agents/openai.yaml +6 -0
- package/skills/feature-design/SKILL.md +472 -0
- package/skills/fix/SKILL.md +173 -0
- package/skills/gate-cruft/SKILL.md +258 -0
- package/skills/gate-docs/SKILL.md +278 -0
- package/skills/gate-patterns/SKILL.md +389 -0
- package/skills/gate-refactor/SKILL.md +408 -0
- package/skills/gate-security/SKILL.md +275 -0
- package/skills/gate-tests/SKILL.md +367 -0
- package/skills/groom/SKILL.md +162 -0
- package/skills/groom/agents/openai.yaml +6 -0
- package/skills/ideate/SKILL.md +185 -0
- package/skills/ideate/agents/openai.yaml +6 -0
- package/skills/implement/SKILL.md +288 -0
- package/skills/implement-orchestrator/SKILL.md +604 -0
- package/skills/park/SKILL.md +111 -0
- package/skills/perf-design/SKILL.md +427 -0
- package/skills/perf-scout/SKILL.md +404 -0
- package/skills/perf-scout/agents/openai.yaml +6 -0
- package/skills/perf-scout/references/algorithmic-and-data-structures.md +126 -0
- package/skills/perf-scout/references/approximation-and-precomputation.md +136 -0
- package/skills/perf-scout/references/caching-and-memoization.md +123 -0
- package/skills/perf-scout/references/compiler-runtime-and-language.md +136 -0
- package/skills/perf-scout/references/database-and-storage-internals.md +144 -0
- package/skills/perf-scout/references/distributed-systems.md +150 -0
- package/skills/perf-scout/references/game-engine-and-realtime.md +136 -0
- package/skills/perf-scout/references/gpu-and-accelerators.md +130 -0
- package/skills/perf-scout/references/idea-ranking.md +75 -0
- package/skills/perf-scout/references/io-and-batching.md +135 -0
- package/skills/perf-scout/references/memory-and-data-locality.md +137 -0
- package/skills/perf-scout/references/parallelism-and-vectorization.md +126 -0
- package/skills/perf-scout/references/parked-item-template.md +117 -0
- package/skills/perf-scout/references/peer-review-pass.md +150 -0
- package/skills/perf-scout/references/report-template.md +148 -0
- package/skills/principles/SKILL.md +678 -0
- package/skills/principles/references/models.md +191 -0
- package/skills/principles/references/subagents.md +158 -0
- package/skills/prose-author/SKILL.md +185 -0
- package/skills/refactor-conventions-creator/SKILL.md +359 -0
- package/skills/refactor-conventions-creator/agents/openai.yaml +6 -0
- package/skills/refactor-conventions-creator/references/common-structures.md +91 -0
- package/skills/refactor-conventions-creator/references/common-styles.md +90 -0
- package/skills/refactor-design/SKILL.md +384 -0
- package/skills/release-deploy/SKILL.md +667 -0
- package/skills/release-deploy/agents/openai.yaml +6 -0
- package/skills/research/SKILL.md +166 -0
- package/skills/research/agents/openai.yaml +6 -0
- package/skills/review/SKILL.md +267 -0
- package/skills/review/references/deep-review.md +98 -0
- package/skills/review/references/review-lenses.md +68 -0
- package/skills/review/references/substrate-side-effects.md +161 -0
- package/skills/review/references/target-resolution.md +52 -0
- package/skills/scope/SKILL.md +486 -0
- package/work-view/Cargo.lock +486 -0
- package/work-view/Cargo.toml +9 -0
- package/work-view/crates/cli/.work-view-version +1 -0
- package/work-view/crates/cli/Cargo.toml +18 -0
- package/work-view/crates/cli/src/actionable.rs +500 -0
- package/work-view/crates/cli/src/args.rs +792 -0
- package/work-view/crates/cli/src/board/assets/board.css +855 -0
- package/work-view/crates/cli/src/board/assets/board.js +259 -0
- package/work-view/crates/cli/src/board/assets/card.js +139 -0
- package/work-view/crates/cli/src/board/assets/components.css +290 -0
- package/work-view/crates/cli/src/board/assets/dependency.js +1193 -0
- package/work-view/crates/cli/src/board/assets/detail.js +256 -0
- package/work-view/crates/cli/src/board/assets/filters.js +389 -0
- package/work-view/crates/cli/src/board/assets/index.html +77 -0
- package/work-view/crates/cli/src/board/assets/kanban.js +231 -0
- package/work-view/crates/cli/src/board/assets/markdown.js +260 -0
- package/work-view/crates/cli/src/board/assets/motion.css +131 -0
- package/work-view/crates/cli/src/board/assets/state.js +245 -0
- package/work-view/crates/cli/src/board/assets/table.js +304 -0
- package/work-view/crates/cli/src/board/assets/tokens.css +602 -0
- package/work-view/crates/cli/src/board/assets/views.js +41 -0
- package/work-view/crates/cli/src/board/assets.rs +162 -0
- package/work-view/crates/cli/src/board/feed.rs +204 -0
- package/work-view/crates/cli/src/board/mod.rs +246 -0
- package/work-view/crates/cli/src/board/open.rs +144 -0
- package/work-view/crates/cli/src/board/server.rs +407 -0
- package/work-view/crates/cli/src/main.rs +195 -0
- package/work-view/crates/cli/src/render.rs +354 -0
- package/work-view/crates/cli/src/scope.rs +157 -0
- package/work-view/crates/cli/src/stale.rs +581 -0
- package/work-view/crates/cli/tests/board-js/dependency-table.test.mjs +64 -0
- package/work-view/crates/cli/tests/board-js/expanded-browsing.test.mjs +79 -0
- package/work-view/crates/cli/tests/board-js/harness-smoke.test.mjs +11 -0
- package/work-view/crates/cli/tests/board-js/harness.mjs +437 -0
- package/work-view/crates/cli/tests/board-js/kanban-detail.test.mjs +75 -0
- package/work-view/crates/cli/tests/board-js/markdown-filter.test.mjs +60 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/CONVENTIONS.md +3 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/epics/epic-alpha.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-a.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-b.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-alpha-1.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-research-1.md +19 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-done.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-shipped.md +18 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/backlog/idea-backlog.md +7 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/CONVENTIONS.md +6 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-dep-done.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-design-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-impl-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/stories/story-review-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/CONVENTIONS.md +4 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/epics/malformed-no-closing-fence.md +8 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/features/good-item.md +16 -0
- package/work-view/crates/cli/tests/integration.rs +2833 -0
- package/work-view/crates/core/Cargo.toml +13 -0
- package/work-view/crates/core/src/error.rs +61 -0
- package/work-view/crates/core/src/filter.rs +804 -0
- package/work-view/crates/core/src/graph.rs +324 -0
- package/work-view/crates/core/src/index.rs +590 -0
- package/work-view/crates/core/src/lib.rs +54 -0
- package/work-view/crates/core/src/model.rs +202 -0
- package/work-view/crates/core/src/parse.rs +494 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/CONVENTIONS.md +15 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/epics/epic-core.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-parser.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-query.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/malformed-no-id.md +15 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-parse-unit.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-security-gate.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-old.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-parser.md +17 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/backlog/idea-future-board.md +7 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/CONVENTIONS.md +10 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/archive/dup-item.md +18 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/releases/v2.0/dup-item.md +18 -0
- package/work-view/crates/core/tests/integration.rs +541 -0
- package/work-view/dist/.gitattributes +1 -0
- package/work-view/dist/README.md +42 -0
- package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
- package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
- package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
- package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nklisch/pi-agile-workflow",
|
|
3
|
+
"version": "0.15.3",
|
|
4
|
+
"description": "Markdown-based work-tracking substrate for AI-driven projects.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "nklisch"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/nklisch/skills.git",
|
|
11
|
+
"directory": "plugins/agile-workflow"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"pi-package",
|
|
19
|
+
"agent-skills",
|
|
20
|
+
"agile-workflow"
|
|
21
|
+
],
|
|
22
|
+
"pi": {
|
|
23
|
+
"extensions": [
|
|
24
|
+
"./extensions"
|
|
25
|
+
],
|
|
26
|
+
"skills": [
|
|
27
|
+
"./skills"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# install-work-view.sh — install work-view into $PWD/.work/bin/work-view.
|
|
3
|
+
#
|
|
4
|
+
# Usage:
|
|
5
|
+
# bash install-work-view.sh
|
|
6
|
+
#
|
|
7
|
+
# Environment:
|
|
8
|
+
# PLUGIN_ROOT — path to the agile-workflow plugin tree (preferred)
|
|
9
|
+
# CLAUDE_PLUGIN_ROOT — fallback if PLUGIN_ROOT is unset
|
|
10
|
+
#
|
|
11
|
+
# Exits 0 on success, 1 on failure.
|
|
12
|
+
# Prints a single status line to stdout:
|
|
13
|
+
# "installed prebuilt <target-triple> (work-view <semver>)"
|
|
14
|
+
# "installed bash fallback (work-view <semver>)"
|
|
15
|
+
# Errors go to stderr.
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
PLUGIN_ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
|
|
20
|
+
|
|
21
|
+
plugin_version() {
|
|
22
|
+
local pj="${PLUGIN_ROOT}/.claude-plugin/plugin.json"
|
|
23
|
+
local version
|
|
24
|
+
|
|
25
|
+
[ -f "$pj" ] || return 1
|
|
26
|
+
version="$(sed -n 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$pj" | head -n 1)" || return 1
|
|
27
|
+
[ -n "$version" ] || return 1
|
|
28
|
+
printf '%s\n' "$version"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
candidate_is_current() {
|
|
32
|
+
local cand="$1"
|
|
33
|
+
local want="$2"
|
|
34
|
+
local out tok
|
|
35
|
+
|
|
36
|
+
[ -n "$want" ] || return 1
|
|
37
|
+
out="$("$cand" --version 2>/dev/null)" || return 1
|
|
38
|
+
[ -n "$out" ] || return 1
|
|
39
|
+
tok="${out##* }"
|
|
40
|
+
[ -n "$tok" ] && [ "$tok" = "$want" ]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
target_triple() {
|
|
44
|
+
local uname_s uname_m
|
|
45
|
+
uname_s="${WORK_VIEW_UNAME_S:-$(uname -s 2>/dev/null || printf unknown)}"
|
|
46
|
+
uname_m="${WORK_VIEW_UNAME_M:-$(uname -m 2>/dev/null || printf unknown)}"
|
|
47
|
+
|
|
48
|
+
case "${uname_s}:${uname_m}" in
|
|
49
|
+
Linux:x86_64|Linux:amd64)
|
|
50
|
+
printf '%s\n' "x86_64-unknown-linux-musl"
|
|
51
|
+
;;
|
|
52
|
+
Linux:aarch64|Linux:arm64)
|
|
53
|
+
printf '%s\n' "aarch64-unknown-linux-musl"
|
|
54
|
+
;;
|
|
55
|
+
Darwin:x86_64|Darwin:amd64)
|
|
56
|
+
printf '%s\n' "x86_64-apple-darwin"
|
|
57
|
+
;;
|
|
58
|
+
Darwin:arm64|Darwin:aarch64)
|
|
59
|
+
printf '%s\n' "aarch64-apple-darwin"
|
|
60
|
+
;;
|
|
61
|
+
*)
|
|
62
|
+
return 1
|
|
63
|
+
;;
|
|
64
|
+
esac
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# install_and_verify <src> <want> [require_board]
|
|
68
|
+
# Copies src to .work/bin/work-view.tmp, chmod +x, smoke-tests --help, verifies
|
|
69
|
+
# the candidate reports the plugin version, then atomically moves it into place.
|
|
70
|
+
install_and_verify() {
|
|
71
|
+
local src="$1"
|
|
72
|
+
local want="$2"
|
|
73
|
+
local require_board="${3:-no}"
|
|
74
|
+
local dest=".work/bin/work-view"
|
|
75
|
+
local tmp=".work/bin/work-view.tmp"
|
|
76
|
+
|
|
77
|
+
if [ ! -f "$src" ]; then
|
|
78
|
+
echo "install-work-view: candidate '${src}' does not exist" >&2
|
|
79
|
+
return 1
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
if [ -d "$dest" ]; then
|
|
83
|
+
echo "install-work-view: destination '${dest}' is a directory, not a file; refusing to install" >&2
|
|
84
|
+
return 1
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
mkdir -p .work/bin || return 1
|
|
88
|
+
rm -f "$tmp"
|
|
89
|
+
cp "$src" "$tmp" || { rm -f "$tmp"; return 1; }
|
|
90
|
+
chmod +x "$tmp" || { rm -f "$tmp"; return 1; }
|
|
91
|
+
|
|
92
|
+
if ! "$tmp" --help >/dev/null 2>&1; then
|
|
93
|
+
echo "install-work-view: candidate '${src}' failed --help smoke test" >&2
|
|
94
|
+
rm -f "$tmp"
|
|
95
|
+
return 1
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
if ! candidate_is_current "$tmp" "$want"; then
|
|
99
|
+
echo "install-work-view: candidate '${src}' does not report plugin version ${want}" >&2
|
|
100
|
+
rm -f "$tmp"
|
|
101
|
+
return 1
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
if [ "$require_board" = "yes" ] && ! "$tmp" board --help >/dev/null 2>&1; then
|
|
105
|
+
echo "install-work-view: candidate '${src}' does not support work-view board" >&2
|
|
106
|
+
rm -f "$tmp"
|
|
107
|
+
return 1
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
mv "$tmp" "$dest" || { rm -f "$tmp"; return 1; }
|
|
111
|
+
if [ ! -f "$dest" ] || [ ! -x "$dest" ]; then
|
|
112
|
+
echo "install-work-view: post-install sanity check failed on '${dest}'" >&2
|
|
113
|
+
return 1
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
return 0
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
main() {
|
|
120
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
121
|
+
echo "install-work-view: PLUGIN_ROOT and CLAUDE_PLUGIN_ROOT are both unset" >&2
|
|
122
|
+
return 1
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
local want fallback dest triple prebuilt
|
|
126
|
+
want="$(plugin_version)" || {
|
|
127
|
+
echo "install-work-view: failed to read plugin version from ${PLUGIN_ROOT}/.claude-plugin/plugin.json" >&2
|
|
128
|
+
return 1
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
fallback="${PLUGIN_ROOT}/scripts/work-view.sh"
|
|
132
|
+
dest=".work/bin/work-view"
|
|
133
|
+
|
|
134
|
+
if triple="$(target_triple)"; then
|
|
135
|
+
prebuilt="${PLUGIN_ROOT}/work-view/dist/${triple}/work-view"
|
|
136
|
+
if ! install_and_verify "$prebuilt" "$want" yes; then
|
|
137
|
+
echo "install-work-view: failed to install prebuilt work-view for ${triple} from ${prebuilt}" >&2
|
|
138
|
+
return 1
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
if ! candidate_is_current "$dest" "$want"; then
|
|
142
|
+
echo "install-work-view: installed copy does not report plugin version ${want}" >&2
|
|
143
|
+
return 1
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
echo "installed prebuilt ${triple} (work-view ${want})"
|
|
147
|
+
return 0
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
if ! install_and_verify "$fallback" "$want"; then
|
|
151
|
+
echo "install-work-view: failed to install bash fallback from ${fallback}" >&2
|
|
152
|
+
return 1
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
if ! candidate_is_current "$dest" "$want"; then
|
|
156
|
+
echo "install-work-view: installed copy does not report plugin version ${want}" >&2
|
|
157
|
+
return 1
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
echo "installed bash fallback (work-view ${want})"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
|
|
164
|
+
main "$@"
|
|
165
|
+
fi
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# agent-metadata.test.sh - guard agile-workflow's no-shipped-agents posture.
|
|
3
|
+
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../.." && pwd)"
|
|
8
|
+
PLUGIN_ROOT="${REPO_ROOT}/plugins/agile-workflow"
|
|
9
|
+
|
|
10
|
+
PASS=0
|
|
11
|
+
FAIL=0
|
|
12
|
+
ERRORS=()
|
|
13
|
+
|
|
14
|
+
assert_true() {
|
|
15
|
+
local label="$1"
|
|
16
|
+
if eval "$2"; then
|
|
17
|
+
echo " PASS: $label"
|
|
18
|
+
((PASS++))
|
|
19
|
+
else
|
|
20
|
+
echo " FAIL: $label"
|
|
21
|
+
echo " condition false: $2"
|
|
22
|
+
((FAIL++))
|
|
23
|
+
ERRORS+=("$label")
|
|
24
|
+
fi
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
assert_eq() {
|
|
28
|
+
local label="$1" expected="$2" actual="$3"
|
|
29
|
+
if [ "$expected" = "$actual" ]; then
|
|
30
|
+
echo " PASS: $label"
|
|
31
|
+
((PASS++))
|
|
32
|
+
else
|
|
33
|
+
echo " FAIL: $label"
|
|
34
|
+
echo " expected: $(printf '%q' "$expected")"
|
|
35
|
+
echo " actual: $(printf '%q' "$actual")"
|
|
36
|
+
((FAIL++))
|
|
37
|
+
ERRORS+=("$label")
|
|
38
|
+
fi
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
echo ""
|
|
42
|
+
echo "=== Agile-workflow agent metadata ==="
|
|
43
|
+
|
|
44
|
+
assert_true "Agile-workflow ships no custom agent directory" \
|
|
45
|
+
"[ ! -d '${PLUGIN_ROOT}/agents' ]"
|
|
46
|
+
assert_eq "Claude manifest agents absent" "null" \
|
|
47
|
+
"$(jq -c '.agents // null' "${PLUGIN_ROOT}/.claude-plugin/plugin.json")"
|
|
48
|
+
assert_eq "Pi package subagents absent" "null" \
|
|
49
|
+
"$(jq -c '.pi.subagents // null' "${PLUGIN_ROOT}/package.json")"
|
|
50
|
+
assert_eq "Codex manifest agents absent" "null" \
|
|
51
|
+
"$(jq -c '.agents // null' "${PLUGIN_ROOT}/.codex-plugin/plugin.json")"
|
|
52
|
+
assert_true "Dynamic subagent reference exists" \
|
|
53
|
+
"[ -f '${PLUGIN_ROOT}/skills/principles/references/subagents.md' ]"
|
|
54
|
+
assert_true "Dynamic subagent reference names general-purpose posture" \
|
|
55
|
+
"grep -q 'generic/general-purpose subagent' '${PLUGIN_ROOT}/skills/principles/references/subagents.md'"
|
|
56
|
+
assert_true "Dynamic subagent reference rejects shipped role names" \
|
|
57
|
+
"grep -Eq 'does .{0,8}not.{0,8} ship custom subagent definitions' '${PLUGIN_ROOT}/skills/principles/references/subagents.md'"
|
|
58
|
+
|
|
59
|
+
assert_true "Skills do not reference removed shipped scanner role" \
|
|
60
|
+
"! grep -R 'shipped agile-workflow.*scanner' '${PLUGIN_ROOT}/skills' >/dev/null"
|
|
61
|
+
assert_true "Skills do not reference removed role definitions" \
|
|
62
|
+
"! grep -R 'role definitions are available' '${PLUGIN_ROOT}/skills' >/dev/null"
|
|
63
|
+
|
|
64
|
+
echo ""
|
|
65
|
+
echo "============================================================"
|
|
66
|
+
echo "Results: ${PASS} passed, ${FAIL} failed"
|
|
67
|
+
if [ ${#ERRORS[@]} -gt 0 ]; then
|
|
68
|
+
echo "Failed tests:"
|
|
69
|
+
for e in "${ERRORS[@]}"; do
|
|
70
|
+
echo " - $e"
|
|
71
|
+
done
|
|
72
|
+
fi
|
|
73
|
+
echo "============================================================"
|
|
74
|
+
|
|
75
|
+
[ "$FAIL" -eq 0 ] || exit 1
|