claude-code-pilot 3.2.0 → 3.3.1
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/CHANGELOG.md +67 -0
- package/README.md +14 -9
- package/bin/install.js +124 -16
- package/manifest.json +18 -3
- package/package.json +3 -2
- package/src/agents/django-build-resolver.md +252 -0
- package/src/agents/django-reviewer.md +169 -0
- package/src/agents/fastapi-reviewer.md +79 -0
- package/src/agents/fsharp-reviewer.md +109 -0
- package/src/agents/swift-build-resolver.md +170 -0
- package/src/agents/swift-reviewer.md +116 -0
- package/src/commands/ccp/cost-report.md +107 -0
- package/src/commands/ccp/intel.md +3 -3
- package/src/commands/ccp/mvp-phase.md +45 -0
- package/src/commands/ccp/plan-prd.md +160 -0
- package/src/commands/ccp/pr-ecc.md +184 -0
- package/src/commands/ccp/security-scan.md +74 -0
- package/src/hooks/ccp-bash-hook-dispatcher.js +96 -0
- package/src/hooks/ccp-context-monitor.js +23 -0
- package/src/hooks/ccp-doc-file-warning.js +93 -0
- package/src/hooks/ccp-pre-bash-dispatcher.js +24 -0
- package/src/hooks/ccp-write-gateguard.js +868 -0
- package/src/lib/project-detect.js +0 -2
- package/src/lib/shell-substitution.js +499 -0
- package/src/pilot/references/execute-mvp-tdd.md +81 -0
- package/src/pilot/references/mvp-concepts.md +49 -0
- package/src/pilot/references/planner-graphify-auto-update.md +67 -0
- package/src/pilot/references/planner-human-verify-mode.md +57 -0
- package/src/pilot/references/planner-mvp-mode.md +53 -0
- package/src/pilot/references/skeleton-template.md +48 -0
- package/src/pilot/references/spidr-splitting.md +69 -0
- package/src/pilot/references/user-story-template.md +58 -0
- package/src/pilot/references/verify-mvp-mode.md +85 -0
- package/src/pilot/references/worktree-path-safety.md +89 -0
- package/src/pilot/workflows/help.md +5 -0
- package/src/pilot/workflows/mvp-phase.md +199 -0
- package/src/skills/agent-architecture-audit/SKILL.md +256 -0
- package/src/skills/agent-harness-design/SKILL.md +73 -0
- package/src/skills/angular-developer/SKILL.md +154 -0
- package/src/skills/angular-developer/references/angular-animations.md +160 -0
- package/src/skills/angular-developer/references/angular-aria.md +410 -0
- package/src/skills/angular-developer/references/cli.md +86 -0
- package/src/skills/angular-developer/references/component-harnesses.md +59 -0
- package/src/skills/angular-developer/references/component-styling.md +91 -0
- package/src/skills/angular-developer/references/components.md +117 -0
- package/src/skills/angular-developer/references/creating-services.md +97 -0
- package/src/skills/angular-developer/references/data-resolvers.md +69 -0
- package/src/skills/angular-developer/references/define-routes.md +67 -0
- package/src/skills/angular-developer/references/defining-providers.md +72 -0
- package/src/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/src/skills/angular-developer/references/e2e-testing.md +56 -0
- package/src/skills/angular-developer/references/effects.md +83 -0
- package/src/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/src/skills/angular-developer/references/host-elements.md +80 -0
- package/src/skills/angular-developer/references/injection-context.md +63 -0
- package/src/skills/angular-developer/references/inputs.md +101 -0
- package/src/skills/angular-developer/references/linked-signal.md +59 -0
- package/src/skills/angular-developer/references/loading-strategies.md +61 -0
- package/src/skills/angular-developer/references/mcp.md +108 -0
- package/src/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/src/skills/angular-developer/references/outputs.md +86 -0
- package/src/skills/angular-developer/references/reactive-forms.md +122 -0
- package/src/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/src/skills/angular-developer/references/resource.md +77 -0
- package/src/skills/angular-developer/references/route-animations.md +56 -0
- package/src/skills/angular-developer/references/route-guards.md +52 -0
- package/src/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/src/skills/angular-developer/references/router-testing.md +87 -0
- package/src/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/src/skills/angular-developer/references/signal-forms.md +795 -0
- package/src/skills/angular-developer/references/signals-overview.md +94 -0
- package/src/skills/angular-developer/references/tailwind-css.md +69 -0
- package/src/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/src/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/src/skills/error-handling/SKILL.md +376 -0
- package/src/skills/fastapi-patterns/SKILL.md +327 -0
- package/src/skills/flox-environments/SKILL.md +496 -0
- package/src/skills/fsharp-testing/SKILL.md +280 -0
- package/src/skills/ios-icon-gen/SKILL.md +157 -0
- package/src/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/src/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/src/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/src/skills/mysql-patterns/SKILL.md +412 -0
- package/src/skills/plan-orchestrate/SKILL.md +220 -0
- package/src/skills/prisma-patterns/SKILL.md +371 -0
- package/src/skills/production-audit/SKILL.md +206 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/candidate-playbook.md +49 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/report.json +35 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/scenario.json +62 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/trace.json +45 -0
- package/src/skills/security-scan/references/agentshield-policy-exception/verifier-result.json +35 -0
- package/src/skills/vite-patterns/SKILL.md +449 -0
- package/src/skills/windows-desktop-e2e/SKILL.md +887 -0
|
@@ -26,6 +26,21 @@ const CRITICAL_THRESHOLD = 25; // remaining_percentage <= 25%
|
|
|
26
26
|
const STALE_SECONDS = 60; // ignore metrics older than 60s
|
|
27
27
|
const DEBOUNCE_CALLS = 5; // min tool uses between warnings
|
|
28
28
|
|
|
29
|
+
// Cost-warning opt-out (backport of ECC b47dfa95, re-expressed for CCP).
|
|
30
|
+
// Set CCP_CONTEXT_MONITOR_COST_WARNINGS=0 (or false/off/no/disabled) to suppress
|
|
31
|
+
// cost-warning emission. Default ON. CCP's monitor currently emits context
|
|
32
|
+
// warnings only; this gate future-proofs any cost-warning emission point.
|
|
33
|
+
function isEnabledEnv(value, defaultValue = true) {
|
|
34
|
+
if (value == null || String(value).trim() === '') return defaultValue;
|
|
35
|
+
const n = String(value).trim().toLowerCase();
|
|
36
|
+
if (['0', 'false', 'no', 'off', 'disabled'].includes(n)) return false;
|
|
37
|
+
if (['1', 'true', 'yes', 'on', 'enabled'].includes(n)) return true;
|
|
38
|
+
return defaultValue;
|
|
39
|
+
}
|
|
40
|
+
function costWarningsEnabled(env = process.env) {
|
|
41
|
+
return isEnabledEnv(env.CCP_CONTEXT_MONITOR_COST_WARNINGS, true); // CCP-branded rename of the upstream cost-warning opt-out (b47dfa95)
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
let input = '';
|
|
30
45
|
// Timeout guard: if stdin doesn't close within 3s (e.g. pipe issues on
|
|
31
46
|
// Windows/Git Bash), exit silently instead of hanging until Claude Code
|
|
@@ -134,6 +149,14 @@ process.stdin.on('end', () => {
|
|
|
134
149
|
};
|
|
135
150
|
|
|
136
151
|
process.stdout.write(JSON.stringify(output));
|
|
152
|
+
|
|
153
|
+
// --- Cost-warning emission point (gated by CCP_CONTEXT_MONITOR_COST_WARNINGS) ---
|
|
154
|
+
// CCP's statusline bridge does not currently surface per-session cost data, so
|
|
155
|
+
// this branch is a no-op today. When metrics.cost_* becomes available, emit the
|
|
156
|
+
// cost advisory HERE, guarded by the opt-out so users can suppress it.
|
|
157
|
+
if (costWarningsEnabled() && metrics && metrics.cost_warning) {
|
|
158
|
+
// (future) emit cost advisory via hookSpecificOutput.additionalContext
|
|
159
|
+
}
|
|
137
160
|
} catch (e) {
|
|
138
161
|
// Silent fail -- never block tool execution
|
|
139
162
|
process.exit(0);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Doc File Warning - PreToolUse (Write) hook
|
|
3
|
+
// Warns-only advisory: never blocks the Write, ALWAYS exits 0.
|
|
4
|
+
//
|
|
5
|
+
// Uses a denylist approach: only warn on known ad-hoc documentation
|
|
6
|
+
// filenames (NOTES, TODO, SCRATCH, etc.) written outside structured
|
|
7
|
+
// directories. This avoids false positives for legitimate
|
|
8
|
+
// markdown-heavy workflows (specs, ADRs, command definitions, skill
|
|
9
|
+
// files, etc.).
|
|
10
|
+
//
|
|
11
|
+
// How it works:
|
|
12
|
+
// 1. Reads the PreToolUse JSON payload from stdin (tool_input.file_path).
|
|
13
|
+
// 2. If the basename matches a known ad-hoc doc filename AND the path is
|
|
14
|
+
// NOT inside a structured directory, emits an advisory to stderr.
|
|
15
|
+
// 3. Exits 0 unconditionally (advisory only, never blocks the write).
|
|
16
|
+
//
|
|
17
|
+
// On empty or unparseable stdin it exits 0 silently. Stdlib-only (path).
|
|
18
|
+
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
const path = require('path');
|
|
22
|
+
|
|
23
|
+
const MAX_STDIN = 1024 * 1024;
|
|
24
|
+
|
|
25
|
+
// Known ad-hoc filenames that signal impulse/scratch docs (case-sensitive, uppercase).
|
|
26
|
+
const ADHOC_FILENAMES = /^(NOTES|TODO|SCRATCH|TEMP|DRAFT|BRAINSTORM|SPIKE|DEBUG|WIP)\.(md|txt)$/;
|
|
27
|
+
|
|
28
|
+
// Structured directories where even ad-hoc names are intentional.
|
|
29
|
+
const STRUCTURED_DIRS = /(^|\/)(docs|\.claude|\.github|commands|skills|benchmarks|templates|\.history|memory)\//;
|
|
30
|
+
|
|
31
|
+
function isSuspiciousDocPath(filePath) {
|
|
32
|
+
const normalized = String(filePath).replace(/\\/g, '/');
|
|
33
|
+
const basename = path.basename(normalized);
|
|
34
|
+
|
|
35
|
+
// Only inspect .md and .txt files (case-sensitive, consistent with ADHOC_FILENAMES).
|
|
36
|
+
if (!/\.(md|txt)$/.test(basename)) return false;
|
|
37
|
+
|
|
38
|
+
// Only flag known ad-hoc filenames.
|
|
39
|
+
if (!ADHOC_FILENAMES.test(basename)) return false;
|
|
40
|
+
|
|
41
|
+
// Allow ad-hoc names inside structured directories (intentional usage).
|
|
42
|
+
if (STRUCTURED_DIRS.test(normalized)) return false;
|
|
43
|
+
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Pure decision function. Returns an advisory string (for stderr) or null.
|
|
48
|
+
// Exported for testing; the CLI below drives it from stdin.
|
|
49
|
+
function matchesDenylist(rawInput) {
|
|
50
|
+
let input;
|
|
51
|
+
try {
|
|
52
|
+
input = typeof rawInput === 'string'
|
|
53
|
+
? (rawInput.trim() ? JSON.parse(rawInput) : {})
|
|
54
|
+
: (rawInput || {});
|
|
55
|
+
} catch (_e) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const filePath = String((input && input.tool_input && input.tool_input.file_path) || '');
|
|
60
|
+
if (!filePath || !isSuspiciousDocPath(filePath)) return null;
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
'[Hook] WARNING: Ad-hoc documentation filename detected\n' +
|
|
64
|
+
'[Hook] File: ' + filePath + '\n' +
|
|
65
|
+
'[Hook] Consider a structured path (e.g. docs/, .claude/, skills/, .github/, benchmarks/, templates/)'
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = { matchesDenylist, isSuspiciousDocPath };
|
|
70
|
+
|
|
71
|
+
if (require.main === module) {
|
|
72
|
+
let data = '';
|
|
73
|
+
|
|
74
|
+
process.stdin.setEncoding('utf8');
|
|
75
|
+
process.stdin.on('data', chunk => {
|
|
76
|
+
if (data.length < MAX_STDIN) {
|
|
77
|
+
data += chunk.substring(0, MAX_STDIN - data.length);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
process.stdin.on('end', () => {
|
|
82
|
+
const advisory = matchesDenylist(data);
|
|
83
|
+
if (advisory) {
|
|
84
|
+
process.stderr.write(advisory + '\n');
|
|
85
|
+
}
|
|
86
|
+
// Pass the payload through unchanged; warns-only, never blocks.
|
|
87
|
+
process.stdout.write(data);
|
|
88
|
+
process.exit(0);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Empty/closed stdin: exit 0 silently.
|
|
92
|
+
process.stdin.on('error', () => process.exit(0));
|
|
93
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { runPreBash } = require('./ccp-bash-hook-dispatcher');
|
|
5
|
+
|
|
6
|
+
let raw = '';
|
|
7
|
+
const MAX_STDIN = 1024 * 1024;
|
|
8
|
+
|
|
9
|
+
process.stdin.setEncoding('utf8');
|
|
10
|
+
process.stdin.on('data', chunk => {
|
|
11
|
+
if (raw.length < MAX_STDIN) {
|
|
12
|
+
const remaining = MAX_STDIN - raw.length;
|
|
13
|
+
raw += chunk.substring(0, remaining);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
process.stdin.on('end', () => {
|
|
18
|
+
const result = runPreBash(raw);
|
|
19
|
+
if (result.stderr) {
|
|
20
|
+
process.stderr.write(result.stderr);
|
|
21
|
+
}
|
|
22
|
+
process.stdout.write(result.output);
|
|
23
|
+
process.exitCode = result.exitCode;
|
|
24
|
+
});
|