@punks/cli 2.1.7 → 2.1.10
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/README.md +2 -2
- package/dist/data/AGENTS.md +3 -1
- package/dist/data/catalog/hooks.ts +8 -0
- package/dist/data/catalog/lint.ts +28 -82
- package/dist/data/catalog/packs.ts +8 -6
- package/dist/data/catalog/skills.ts +48 -0
- package/dist/data/catalog/tools.ts +9 -1
- package/dist/data/hooks/format-edited-file.mjs +1 -1
- package/dist/data/hooks/scaffold-update-check.mjs +181 -0
- package/dist/data/hooks.test.ts +19 -2
- package/dist/data/scripts/sync-subagents.mjs +70 -37
- package/dist/data/subagents/manifest.mjs +120 -0
- package/dist/index.js +1916 -767
- package/dist/skills/agnostic/cli/dp-cli/SKILL.md +3 -3
- package/dist/skills/agnostic/cli/dp-cli/references/commands.md +1 -1
- package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +46 -0
- package/dist/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +67 -0
- package/dist/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +41 -0
- package/dist/skills/agnostic/docs/writing-beats/SKILL.md +69 -0
- package/dist/skills/agnostic/docs/writing-fragments/SKILL.md +76 -0
- package/dist/skills/agnostic/docs/writing-shape/SKILL.md +75 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +17 -2
- package/dist/skills/agnostic/planning/create-plan/references/planner-phase.md +1 -1
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +57 -12
- package/dist/skills/agnostic/planning/create-spec/references/backlog-sync.md +5 -2
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +24 -16
- package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -2
- package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +29 -5
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +34 -7
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +32 -9
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +4 -2
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +3 -3
- package/dist/skills/agnostic/planning/implement-spec/references/sequential.md +16 -6
- package/dist/skills/agnostic/planning/stack/SKILL.md +89 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +191 -0
- package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +1176 -0
- package/dist/skills/agnostic/quality/autoreview/scripts/test-review-harness +176 -0
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +7 -5
- package/dist/skills/frameworks/tanstack-query/tanstack-query/SKILL.md +621 -830
- package/dist/skills/frameworks/tanstack-start/tanstack-start/SKILL.md +250 -0
- package/dist/skills/phases/delivery-phase/SKILL.md +6 -1
- package/dist/skills/phases/docs-ingest-phase/SKILL.md +28 -20
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +8 -5
- package/dist/skills/phases/docs-ingest-phase/references/public-docs.md +82 -0
- package/dist/skills/phases/requirements-phase/SKILL.md +2 -0
- package/dist/skills/phases/review-phase/SKILL.md +26 -9
- package/package.json +1 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'EOF'
|
|
6
|
+
Usage: test-review-harness [--fixture malicious|benign] [--engine codex|claude|droid|copilot]...
|
|
7
|
+
|
|
8
|
+
Creates a temporary git repo with either a deliberately unsafe patch or a
|
|
9
|
+
security-sensitive-but-safe patch, then verifies each selected engine through
|
|
10
|
+
autoreview.
|
|
11
|
+
Default engines: codex, claude.
|
|
12
|
+
EOF
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
engines=()
|
|
16
|
+
fixture=malicious
|
|
17
|
+
while [[ $# -gt 0 ]]; do
|
|
18
|
+
case "$1" in
|
|
19
|
+
--fixture)
|
|
20
|
+
fixture=${2:-}
|
|
21
|
+
shift 2
|
|
22
|
+
;;
|
|
23
|
+
--engine)
|
|
24
|
+
engines+=("${2:-}")
|
|
25
|
+
shift 2
|
|
26
|
+
;;
|
|
27
|
+
-h|--help)
|
|
28
|
+
usage
|
|
29
|
+
exit 0
|
|
30
|
+
;;
|
|
31
|
+
*)
|
|
32
|
+
usage >&2
|
|
33
|
+
exit 2
|
|
34
|
+
;;
|
|
35
|
+
esac
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
case "$fixture" in
|
|
39
|
+
malicious|benign) ;;
|
|
40
|
+
*)
|
|
41
|
+
usage >&2
|
|
42
|
+
exit 2
|
|
43
|
+
;;
|
|
44
|
+
esac
|
|
45
|
+
|
|
46
|
+
if [[ ${#engines[@]} -eq 0 ]]; then
|
|
47
|
+
engines=(codex claude)
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
51
|
+
repo=$(mktemp -d "${TMPDIR:-/tmp}/autoreview-fixture.XXXXXX")
|
|
52
|
+
trap 'rm -rf "$repo"' EXIT
|
|
53
|
+
|
|
54
|
+
cd "$repo"
|
|
55
|
+
git init --quiet
|
|
56
|
+
git config user.name "Review Fixture"
|
|
57
|
+
git config user.email "review-fixture@example.com"
|
|
58
|
+
|
|
59
|
+
if [[ "$fixture" == malicious ]]; then
|
|
60
|
+
cat > app.js <<'EOF'
|
|
61
|
+
export function uploadPath(name) {
|
|
62
|
+
return `uploads/${name.replaceAll("/", "")}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function publicUser(user) {
|
|
66
|
+
return { id: user.id, name: user.name };
|
|
67
|
+
}
|
|
68
|
+
EOF
|
|
69
|
+
else
|
|
70
|
+
cat > app.js <<'EOF'
|
|
71
|
+
import path from "node:path";
|
|
72
|
+
|
|
73
|
+
const uploadsRoot = path.resolve("uploads");
|
|
74
|
+
|
|
75
|
+
function safeChildPath(root, name) {
|
|
76
|
+
if (name.includes("/") || name.includes("\\") || name.includes("\0")) {
|
|
77
|
+
throw new Error("invalid child name");
|
|
78
|
+
}
|
|
79
|
+
const resolved = path.resolve(root, name);
|
|
80
|
+
if (!resolved.startsWith(root + path.sep)) throw new Error("path escaped root");
|
|
81
|
+
return resolved;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function uploadPath(name) {
|
|
85
|
+
return safeChildPath(uploadsRoot, name);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function publicUser(user) {
|
|
89
|
+
return { id: user.id, name: user.name };
|
|
90
|
+
}
|
|
91
|
+
EOF
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
git add app.js
|
|
95
|
+
git commit --quiet -m "initial safe version"
|
|
96
|
+
|
|
97
|
+
if [[ "$fixture" == malicious ]]; then
|
|
98
|
+
cat > app.js <<'EOF'
|
|
99
|
+
import { execSync } from "node:child_process";
|
|
100
|
+
|
|
101
|
+
export function uploadPath(name) {
|
|
102
|
+
return `uploads/${name}`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function deleteUpload(name) {
|
|
106
|
+
return execSync(`rm -rf uploads/${name}`);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function publicUser(user) {
|
|
110
|
+
return { id: user.id, name: user.name, password: user.password };
|
|
111
|
+
}
|
|
112
|
+
EOF
|
|
113
|
+
else
|
|
114
|
+
cat > app.js <<'EOF'
|
|
115
|
+
import { execFile } from "node:child_process";
|
|
116
|
+
import path from "node:path";
|
|
117
|
+
import { promisify } from "node:util";
|
|
118
|
+
|
|
119
|
+
const uploadsRoot = path.resolve("uploads");
|
|
120
|
+
const reposRoot = path.resolve("repos");
|
|
121
|
+
const execFileAsync = promisify(execFile);
|
|
122
|
+
|
|
123
|
+
function safeChildPath(root, name) {
|
|
124
|
+
if (name.includes("/") || name.includes("\\") || name.includes("\0")) {
|
|
125
|
+
throw new Error("invalid child name");
|
|
126
|
+
}
|
|
127
|
+
const resolved = path.resolve(root, name);
|
|
128
|
+
if (!resolved.startsWith(root + path.sep)) throw new Error("path escaped root");
|
|
129
|
+
return resolved;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function repoChildPath(root, name) {
|
|
133
|
+
if (!/^[A-Za-z0-9._-]+$/.test(name)) throw new Error("invalid repo name");
|
|
134
|
+
return safeChildPath(root, name);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function uploadPath(name) {
|
|
138
|
+
return safeChildPath(uploadsRoot, name);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export async function repoStatus(repoName) {
|
|
142
|
+
const { stdout } = await execFileAsync("git", ["status", "--short"], {
|
|
143
|
+
cwd: repoChildPath(reposRoot, repoName),
|
|
144
|
+
encoding: "utf8",
|
|
145
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
146
|
+
});
|
|
147
|
+
return stdout;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function publicUser(user) {
|
|
151
|
+
return { id: user.id, name: user.name };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function accountSettingsForOwner(user, requesterId) {
|
|
155
|
+
if (String(requesterId) !== String(user.id)) throw new Error("forbidden");
|
|
156
|
+
return { id: user.id, hasPassword: Boolean(user.passwordHash) };
|
|
157
|
+
}
|
|
158
|
+
EOF
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
for engine in "${engines[@]}"; do
|
|
162
|
+
echo "== $engine =="
|
|
163
|
+
if [[ "$fixture" == malicious ]]; then
|
|
164
|
+
"$script_dir/autoreview" \
|
|
165
|
+
--mode local \
|
|
166
|
+
--engine "$engine" \
|
|
167
|
+
--prompt "This is an acceptance test fixture. The changed app.js patch contains real security bugs. Review normally and report only actionable defects from the patch." \
|
|
168
|
+
--require-finding "command" \
|
|
169
|
+
--expect-findings
|
|
170
|
+
else
|
|
171
|
+
"$script_dir/autoreview" \
|
|
172
|
+
--mode local \
|
|
173
|
+
--engine "$engine" \
|
|
174
|
+
--prompt "Security calibration fixture: this patch intentionally uses filesystem paths, async execFile, and owner-gated password-adjacent state safely. Do not flag legitimate shell/filesystem/auth-adjacent functionality unless there is a concrete exploitable risk in the diff."
|
|
175
|
+
fi
|
|
176
|
+
done
|
|
@@ -9,11 +9,13 @@ description: Turns a large requirements discussion into a canonical backlog hier
|
|
|
9
9
|
|
|
10
10
|
1. Read [REFERENCE.md](REFERENCE.md) and [assets/concepts/backlog-model.md](assets/concepts/backlog-model.md).
|
|
11
11
|
2. If `requirements-grill` artifacts exist, read `*-grill-status.md` first and `*-grill-log.md` second.
|
|
12
|
-
3.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
12
|
+
3. If subagents are available and the source material is large, use `requirements-synthesizer` to compress accepted, rejected, superseded, parked, and unresolved decisions.
|
|
13
|
+
4. If subagents are available, use `backlog-shaper` for a draft module/epic/story hierarchy; keep final backlog judgment in the parent thread.
|
|
14
|
+
5. Derive modules first, then epics, then stories.
|
|
15
|
+
6. Make story ordering explicit with native dependency primitives when the provider supports them.
|
|
16
|
+
7. Keep epic and story bodies product-facing.
|
|
17
|
+
8. Read the matching provider payload asset before generating or syncing create payloads.
|
|
18
|
+
9. Stop after the backlog structure and create payload guidance are complete.
|
|
17
19
|
|
|
18
20
|
## Workflows
|
|
19
21
|
|