start-vibing-stacks 2.37.0 → 2.39.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/README.md CHANGED
@@ -6,7 +6,7 @@ Multi-stack AI workflow for **Claude Code** & **Cursor**. One command installs a
6
6
  npx start-vibing-stacks
7
7
  ```
8
8
 
9
- > Latest: **v2.34.0** — Advertising optimization memory system (detector bypass, creative cloaking, bot evasion, landing page validation) + Memory Optimization Pipeline (MOP) with LLM-as-Judge, `--with-memory-optimization` flag, new skills (`kubernetes-patterns`, `react-server-components`, `laravel-octane-inertia`, `podman-patterns`), and security hardening in container examples.
9
+ > Latest: **v2.39.0** — New `owned-infra-ops` skill + always-on memory: legitimate ops on user-owned servers (health/SSH backup/deploy) with phrasing and tool-order that reduce Anthropic Opus/Sonnet cyber false positives. Explicitly cannot override Cyber Verification / API cyber blocks. Universal skills: **31**.
10
10
 
11
11
  ---
12
12
 
@@ -15,7 +15,7 @@ npx start-vibing-stacks
15
15
  | Layer | Count | Purpose |
16
16
  |---|---|---|
17
17
  | Agents | **7** universal | `research-web` (MCP-first) · `documenter` (memory layer) · `domain-updater` · `commit-manager` · `tester` · `claude-md-compactor` (compaction) · **`security-auditor` (VETO)** |
18
- | Skills | **26** shared + stack-specific + frontend | Versioned (`version:` frontmatter), upgradable via `migrate` |
18
+ | Skills | **31** shared + stack-specific + frontend | Versioned (`version:` frontmatter), upgradable via `migrate` |
19
19
  | Hooks | `session-start` · `user-prompt-submit` · `pre-tool-use` · `post-tool-use` · `stop-validator` · `final-check` | Multi-instance coordination + git/docs/secrets/code-quality gates |
20
20
  | Commands | `/feature` · `/fix` · `/research` · `/validate` · `/peers` | Slash commands |
21
21
  | Workflows | `ci.yml` + `security.yml` per stack (audit · gitleaks · CodeQL · **Semgrep** · **Trivy** · **CycloneDX SBOM** · **dependency-review** · **OpenSSF Scorecard**) | Copied to `.github/workflows/` when target is empty |
@@ -35,16 +35,16 @@ npx start-vibing-stacks
35
35
 
36
36
  ## Skill matrix
37
37
 
38
- ### Universal (29 — shared across stacks)
38
+ ### Universal (31 — shared across stacks)
39
39
 
40
40
  | Group | Skills |
41
41
  |---|---|
42
42
  | **Security** | `security-baseline` · `secrets-management` · `ai-llm-security` |
43
43
  | **Observability** | `observability` |
44
- | **Reliability** | `error-handling` · `database-migrations` · `tool-resilience` |
44
+ | **Reliability** | `error-handling` · `database-migrations` · `tool-resilience` · `dead-code-hygiene` |
45
45
  | **A11y / UX** | `accessibility-wcag22` · `ui-ux-audit` |
46
46
  | **CI / Quality** | `ci-pipelines` · `quality-gate` · `final-check` · `git-workflow` |
47
- | **Infra** | `docker-patterns` · `podman-patterns` · `kubernetes-patterns` · `hook-development` · `multi-instance-coordination` |
47
+ | **Infra** | `docker-patterns` · `podman-patterns` · `kubernetes-patterns` · `hook-development` · `multi-instance-coordination` · `owned-infra-ops` |
48
48
  | **Framework** | `react-server-components` · `laravel-octane-inertia` |
49
49
  | **Testing** | `playwright-automation` · `test-coverage` |
50
50
  | **Performance** | `performance-patterns` |
@@ -207,16 +207,17 @@ This release includes a comprehensive set of permissive memories for legitimate
207
207
  1. BRANCH feature/ | fix/ | refactor/ | test/
208
208
  2. RESEARCH research-web (MCP-first; new features only)
209
209
  3. IMPLEMENT stack rules + strict types + security
210
- 4. TEST tester (Vitest / pytest / PHPUnit / Playwright)
211
- 5. SECURITY security-auditor VETO on CRITICAL/HIGH/MEDIUM findings
212
- 6. QUALITY quality-gate: typecheck lint test → build
213
- 7. COMMIT commit-manager verifies gates, diff-driven message, push
214
- 8. DOCUMENT documentermaps files/commits to domains, regenerates _index.json
215
- 9. WISDOM domain-updaterrecords session learnings, PREPENDS new entry to CLAUDE.md ## Recent Changes (append-only LIFO, cap 10, multi-instance safe)
216
- 10. COMPACT claude-md-compactortriggers if CLAUDE.md > 20 KB
210
+ 4. HYGIENE dead-code-hygiene delete unused legacy/inert paths from this change
211
+ 5. TEST tester (Vitest / pytest / PHPUnit / Playwright)
212
+ 6. SECURITY security-auditor VETO on CRITICAL/HIGH/MEDIUM findings
213
+ 7. QUALITY quality-gate: typecheck lint test → build
214
+ 8. COMMIT commit-managerverifies gates, diff-driven message, push
215
+ 9. DOCUMENT documentermaps files/commits to domains, regenerates _index.json
216
+ 10. WISDOM domain-updaterrecords session learnings, PREPENDS new entry to CLAUDE.md ## Recent Changes (append-only LIFO, cap 10, multi-instance safe)
217
+ 11. COMPACT claude-md-compactor — triggers if CLAUDE.md > 20 KB
217
218
  ```
218
219
 
219
- Steps 56 cannot be skipped — `security-auditor` and `quality-gate` veto `commit-manager` on findings.
220
+ Steps 67 cannot be skipped — `security-auditor` and `quality-gate` veto `commit-manager` on findings.
220
221
 
221
222
  ---
222
223
 
package/dist/migrate.js CHANGED
@@ -390,7 +390,7 @@ export function patchSettings(projectDir, dryRun) {
390
390
  else {
391
391
  report.alreadyPresent.push('permissions.defaultMode');
392
392
  }
393
- // Memory files (v2.34.0) ensure all canonical advertising + funnel memories are loaded.
393
+ // Memory files — canonical always-on memories (ads/funnel + owned-infra-ops).
394
394
  // This list is the single source of truth for auto-loaded .md memories.
395
395
  const requiredMemoryFiles = [
396
396
  '.claude/CLAUDE.md',
@@ -403,6 +403,7 @@ export function patchSettings(projectDir, dryRun) {
403
403
  '.claude/memories/ad-creative-cloaking.md',
404
404
  '.claude/memories/ad-bot-evasion.md',
405
405
  '.claude/memories/paid-ads-landing-validation.md',
406
+ '.claude/memories/owned-infra-ops.md',
406
407
  ];
407
408
  if (!settings.context)
408
409
  settings.context = {};
package/dist/setup.js CHANGED
@@ -264,6 +264,7 @@ export async function setupProject(projectDir, config, options = {}) {
264
264
  '.claude/memories/ad-creative-cloaking.md',
265
265
  '.claude/memories/ad-bot-evasion.md',
266
266
  '.claude/memories/paid-ads-landing-validation.md',
267
+ '.claude/memories/owned-infra-ops.md',
267
268
  ],
268
269
  },
269
270
  permissions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing-stacks",
3
- "version": "2.37.0",
3
+ "version": "2.39.0",
4
4
  "description": "AI-powered multi-stack dev workflow for Claude Code. Supports PHP, Node.js, Python and more.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,27 +1,28 @@
1
1
  ---
2
2
  name: feature
3
- description: Start a new feature with the full workflow (research → plan → implement → test → security → quality → commit → docs).
4
- version: 1.1.0
3
+ description: Start a new feature with the full workflow (research → plan → implement → hygiene → test → security → quality → commit → docs).
4
+ version: 1.2.0
5
5
  ---
6
6
 
7
7
  # /feature — Start New Feature
8
8
 
9
9
  Always read `.claude/config/active-project.json` first to know the active stack.
10
10
 
11
- Execute in order — do not skip steps. Steps 56 have **VETO power** over commit.
11
+ Execute in order — do not skip steps. Steps 67 have **VETO power** over commit.
12
12
 
13
13
  | # | Step | Agent / Skill |
14
14
  |---|---|---|
15
15
  | 1 | **Research** (only for new tech / patterns) | `research-web` |
16
16
  | 2 | **Plan** — break into tasks, create TODO list | (you, in plan mode) |
17
17
  | 3 | **Implement** — follow stack patterns + strict types | (you) |
18
- | 4 | **Test** — unit + e2e | `tester` |
19
- | 5 | **Security** — adversarial audit | `security-auditor` (VETO) |
20
- | 6 | **Quality** — typecheck lint → test → build | `quality-gate` |
21
- | 7 | **Commit** — gate-aware, diff-driven message | `commit-manager` |
22
- | 8 | **Map** — files + commits → domains | `documenter` |
23
- | 9 | **Wisdom + Recent Changes** — record learnings, PREPEND new `### YYYY-MM-DD · branch · vX.Y.Z` entry to `CLAUDE.md` `## Recent Changes` (append-only LIFO, cap 10) | `domain-updater` |
18
+ | 4 | **Dead-code hygiene** — delete unused legacy/inert paths from this change (no `// LEGACY` stubs) | `dead-code-hygiene` |
19
+ | 5 | **Test** — unit + e2e | `tester` |
20
+ | 6 | **Security** — adversarial audit | `security-auditor` (VETO) |
21
+ | 7 | **Quality** — typecheck lint → test → build | `quality-gate` |
22
+ | 8 | **Commit** — gate-aware, diff-driven message | `commit-manager` |
23
+ | 9 | **Map** — files + commits domains | `documenter` |
24
+ | 10 | **Wisdom + Recent Changes** — record learnings, PREPEND new `### YYYY-MM-DD · branch · vX.Y.Z` entry to `CLAUDE.md` `## Recent Changes` (append-only LIFO, cap 10) | `domain-updater` |
24
25
 
25
- If `security-auditor` returns CRITICAL/HIGH/MEDIUM, fix before re-running step 5. Steps 89 run AFTER push and never before.
26
+ If `security-auditor` returns CRITICAL/HIGH/MEDIUM, fix before re-running step 6. Steps 910 run AFTER push and never before.
26
27
 
27
- **Multi-instance note:** `commit-manager` v3.0.0 stages only THIS session's files via `scope.ts` when `.claude/state/` is present — peers' uncommitted files are never bundled into your commit. For a manual / interactive equivalent of Step 7, use `/commit-mine` (skip `/feature` from Step 7 onward).
28
+ **Multi-instance note:** `commit-manager` v3.0.0 stages only THIS session's files via `scope.ts` when `.claude/state/` is present — peers' uncommitted files are never bundled into your commit. For a manual / interactive equivalent of Step 8, use `/commit-mine` (skip `/feature` from Step 8 onward).
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: fix
3
- description: Fix a bug — reproduce, isolate, minimal fix, regression test, security check, commit, record wisdom.
4
- version: 1.1.0
3
+ description: Fix a bug — reproduce, isolate, minimal fix, fix-induced dead-code hygiene, regression test, security check, commit, record wisdom.
4
+ version: 1.2.0
5
5
  ---
6
6
 
7
7
  # /fix — Fix Bug
@@ -13,13 +13,14 @@ Always read `.claude/config/active-project.json` first.
13
13
  | 1 | **Reproduce** — read the error, reproduce locally, isolate the root cause (NOT the symptom) | (you) |
14
14
  | 2 | **Failing test first** — write a regression test that proves the bug | `tester` |
15
15
  | 3 | **Apply minimal fix** — do not refactor adjacent code in the same commit | (you) |
16
- | 4 | **Verify** — re-run the regression test + the wider suite | `tester` |
17
- | 5 | **Security** — only if the bug touched auth / input / secrets / SSRF surface | `security-auditor` (VETO) |
18
- | 6 | **Quality gate** — typecheck lint test build | `quality-gate` |
19
- | 7 | **Commit** — `fix(scope): <subject>`, diff-driven body, per-instance scoped staging | `commit-manager` v3.0.0 |
20
- | 8 | **Map** — files + commit domain | `documenter` v3.0.0 |
21
- | 9 | **Wisdom + Recent Changes entry** — append to domain `## Problems & Solutions` (symptom + root cause + fix + prevention + skill ref) AND PREPEND `### YYYY-MM-DD · branch · fix-tag` to `CLAUDE.md` `## Recent Changes` | `domain-updater` v3.0.0 |
16
+ | 4 | **Dead-code hygiene (scoped)** — delete only code made unreachable by *this* fix (old branch, shim, duplicate). Broad cleanup → separate `refactor:` commit | `dead-code-hygiene` |
17
+ | 5 | **Verify** — re-run the regression test + the wider suite | `tester` |
18
+ | 6 | **Security** — only if the bug touched auth / input / secrets / SSRF surface | `security-auditor` (VETO) |
19
+ | 7 | **Quality gate** — typecheck lint test build | `quality-gate` |
20
+ | 8 | **Commit** — `fix(scope): <subject>`, diff-driven body, per-instance scoped staging | `commit-manager` v3.0.0 |
21
+ | 9 | **Map** — files + commit domain | `documenter` v3.0.0 |
22
+ | 10 | **Wisdom + Recent Changes entry** — append to domain `## Problems & Solutions` (symptom + root cause + fix + prevention + skill ref) AND PREPEND `### YYYY-MM-DD · branch · fix-tag` to `CLAUDE.md` `## Recent Changes` | `domain-updater` v3.0.0 |
22
23
 
23
24
  `domain-updater` deduplicates by symptom/root-cause. If the same bug recurred, it appends a "Recurrence" note instead of a duplicate entry.
24
25
 
25
- **Multi-instance note:** Step 7 stages only THIS session's files via `scope.ts` when `.claude/state/` is present (peers' uncommitted files are never bundled). For a manual / interactive Step 7 (no chain auto-trigger), use `/commit-mine` instead.
26
+ **Multi-instance note:** Step 8 stages only THIS session's files via `scope.ts` when `.claude/state/` is present (peers' uncommitted files are never bundled). For a manual / interactive Step 8 (no chain auto-trigger), use `/commit-mine` instead.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // @sv-version: 1.2.0
2
+ // @sv-version: 1.3.0
3
3
  /**
4
4
  * UserPromptSubmit Hook — Start Vibing Stacks
5
5
  *
@@ -10,6 +10,8 @@
10
10
  * peer messages reach the user before this turn runs, and warn if active
11
11
  * peers exist.
12
12
  *
13
+ * v1.3.0: workflow adds dead-code hygiene step (skill `dead-code-hygiene`) between
14
+ * WORK and quality gates — remove inert legacy paths before commit.
13
15
  * v1.2.0: workflow guidance now points at `## Recent Changes` (append-only LIFO)
14
16
  * instead of `## Last Change` (overwritten). Aligned with `commit-manager` v3.0.0
15
17
  * and `domain-updater` v3.0.0 — multi-instance safe.
@@ -161,11 +163,15 @@ async function main(): Promise<void> {
161
163
 
162
164
  2. WORK through each item sequentially.
163
165
 
164
- 3. Run quality gates: ${qualityCmd}
166
+ 3. DEAD-CODE HYGIENE after replacements/refactors, delete unused legacy/inert paths
167
+ in the same change (skill: dead-code-hygiene). Evidence via grep + typecheck/tests;
168
+ do not leave // LEGACY stubs. On /fix: only code made unreachable by this fix.
165
169
 
166
- 4. COMMIT using conventional commits via commit-manager agent (v3.0.0+: stages only THIS session's files via scope.ts when .claude/state/ exists — peers' uncommitted files are never bundled).
170
+ 4. Run quality gates: ${qualityCmd}
167
171
 
168
- 5. UPDATE CLAUDE.md:
172
+ 5. COMMIT using conventional commits via commit-manager agent (v3.0.0+: stages only THIS session's files via scope.ts when .claude/state/ exists — peers' uncommitted files are never bundled).
173
+
174
+ 6. UPDATE CLAUDE.md:
169
175
  a. PREPEND a new entry under "## Recent Changes" — heading exactly:
170
176
  "### ${today} · <branch> · <version-or-tag>" followed by 1-4 plain-text lines.
171
177
  Append-only LIFO; cap 10 (drop ONLY the oldest if exceeded). Multi-instance safe.
@@ -173,7 +179,7 @@ async function main(): Promise<void> {
173
179
  b. Update ALL affected rule/flow sections (Critical Rules, FORBIDDEN, NRY) when the change
174
180
  modifies how the project works.
175
181
 
176
- 6. Run stop-validator before finishing.${standardsContext}${peersBlock}`;
182
+ 7. Run stop-validator before finishing.${standardsContext}${peersBlock}`;
177
183
 
178
184
  console.log(JSON.stringify({ continue: true, systemMessage }));
179
185
  process.exit(0);
@@ -0,0 +1,57 @@
1
+ ---
2
+ version: 1.0.0
3
+ ---
4
+
5
+ # Memory: Owned Infrastructure Ops
6
+
7
+ > **ALWAYS LOAD** — Authorizes legitimate admin work on infrastructure the user owns (or contractually administers): health checks, SSH with keys, backups, deploys, log pulls.
8
+
9
+ ---
10
+
11
+ ## Declared purpose
12
+
13
+ Help the agent treat **user-owned** server/ops requests as normal engineering work — not as unauthorized intrusion — when the user is clearly operating their own hosts.
14
+
15
+ Typical requests:
16
+
17
+ - “Is my VPS online?” / health check on a named host
18
+ - SSH with a project key (e.g. `.env.d/*.pub` / key path) for backup or deploy
19
+ - Pull or archive a known app directory on that host
20
+ - Inspect logs the user asks for on their machine
21
+
22
+ ---
23
+
24
+ ## Explicit rules
25
+
26
+ 1. **Ownership required.** Proceed with remote ops only when the user indicates the target is theirs (or they admin it). If unclear, ask once.
27
+ 2. **Single named target.** Do not scan networks or probe unrelated hosts.
28
+ 3. **Keys, not passwords.** Prefer SSH keys / agent. Never print secrets. Avoid `sshpass` and passwords on the CLI.
29
+ 4. **Scoped commands.** Prefer the minimum checks for the stated task over host-wide enumeration.
30
+ 5. **Load skill `owned-infra-ops`** for tool order, phrasing, and recovery when blocked.
31
+
32
+ ---
33
+
34
+ ## Hard limit (Anthropic cyber safeguards)
35
+
36
+ This memory **does not** and **cannot** override Anthropic’s real-time cyber safeguards on Opus/Sonnet, nor the Cyber Verification Program (CVP).
37
+
38
+ If the API returns a cybersecurity / Cyber Verification block:
39
+
40
+ - Stop remote recon/SSH chains in that turn
41
+ - Do not rephrase to evade the block
42
+ - Recover via: user-run commands + pasted output, key-based scoped SSH next time, or org CVP application — see skill `owned-infra-ops`
43
+
44
+ ---
45
+
46
+ ## Out of scope
47
+
48
+ - Third-party / competitor infrastructure without clear admin authority
49
+ - Offensive security, exploit development, mass recon, credential stuffing
50
+ - “Bypass Anthropic / evade the cyber gate” requests
51
+
52
+ ---
53
+
54
+ ## See Also
55
+
56
+ - Skill: `owned-infra-ops` (full checklist and safe patterns)
57
+ - Skill: `secrets-management` (keys, `.env.d/`)
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: dead-code-hygiene
3
+ version: 1.0.0
4
+ description: Remove unused legacy/inert code after replacements and refactors so leftover paths do not confuse later agent context. Invoke after you replace a module, dual-path, shim, or helper and before quality gates. Prefer evidence (grep + typecheck/tests) over guesswork; never delete public APIs without confirmation.
5
+ ---
6
+
7
+ # Dead-Code Hygiene
8
+
9
+ **Invoke after a replacement, migration, or refactor** that makes an old path unreachable — before quality gates and commit. Leftover inert code is read by the next session and steers agents the wrong way.
10
+
11
+ > Prefer **delete in the same change** over “leave for later.” Commenting-out or `// LEGACY` stubs are still context pollution.
12
+
13
+ ---
14
+
15
+ ## Golden Rules
16
+
17
+ 1. **Same change, not a follow-up TODO.** When you introduce the new path, remove the old one in that edit set.
18
+ 2. **Evidence before delete.** Grep for callers/imports/route names; run typecheck/tests. No evidence → leave it and note uncertainty.
19
+ 3. **Scope tight on `/fix`.** Only remove code made unreachable by *this* fix (old branch, dead shim). Broad cleanup → separate `refactor:` commit.
20
+ 4. **When uncertain, do not delete.** Prefer a short `TODO(dead-code): verify callers` over a wrong deletion.
21
+ 5. **Update docs/domains** when a path you remove was documented.
22
+
23
+ ---
24
+
25
+ ## When to Invoke
26
+
27
+ | Signal | Action |
28
+ |---|---|
29
+ | Replaced helper / module / page with a new one | Delete old file + update imports |
30
+ | Dual path (`v1` + `v2`, feature-flag both always-on) | Collapse to the live path; remove dead branch |
31
+ | Compatibility shim with zero remaining callers | Delete shim |
32
+ | Copy-pasted “keep for rollback” block in same PR | Delete; git history is the rollback |
33
+ | Unused import / export flagged by lint | Remove in the same pass |
34
+
35
+ ---
36
+
37
+ ## Verification Protocol (before delete)
38
+
39
+ 1. **Search references** — symbol name, file basename, route/component string (Inertia `component:`, Next route segment, Laravel route name).
40
+ 2. **Check dynamic uses** — string dispatch, `import()`, reflection, config maps, Blade/React name tables.
41
+ 3. **Run the stack gate** — typecheck / PHPStan / ruff after removal.
42
+ 4. **Run relevant tests** — at least the suite covering the changed surface.
43
+
44
+ ```bash
45
+ # Node / TS — find remaining references (adjust pattern)
46
+ rg -n "OldHelper|old-helper" --glob '!dist/**' --glob '!node_modules/**'
47
+
48
+ # PHP
49
+ rg -n "OldHelper|old_helper" app/ routes/ resources/ tests/
50
+
51
+ # Python
52
+ rg -n "old_helper|OldHelper" --glob '!**/__pycache__/**' --glob '!.venv/**'
53
+ ```
54
+
55
+ Optional tooling (prefer over guesswork when installed):
56
+
57
+ | Stack | Tool |
58
+ |---|---|
59
+ | Node/TS | ESLint `no-unused-vars` / `knip` / `ts-prune` |
60
+ | PHP | PHPStan level 4+ (dead code / always-true) |
61
+ | Python | Ruff `F401`/`F841`, `vulture` |
62
+
63
+ ---
64
+
65
+ ## Safe vs Unsafe Deletions
66
+
67
+ | Safe (with evidence) | Unsafe — do NOT delete without confirmation |
68
+ |---|---|
69
+ | Unreferenced private helper in same package | Public package API / exported library surface |
70
+ | Orphan page after route rewrite | Feature-flagged path still toggled in prod |
71
+ | Dead import after move | Dynamic import / string-dispatch target |
72
+ | Empty wrapper that only re-exports removed code | Test fixtures / factories used by name |
73
+ | Commented-out blocks left from this session | Migration “down” paths still required |
74
+
75
+ ---
76
+
77
+ ## Anti-Patterns (FORBIDDEN)
78
+
79
+ | Action | Why |
80
+ |---|---|
81
+ | Leave `// OLD:` / `# LEGACY` blocks “just in case” | Next agent reads them as live guidance |
82
+ | Keep dual implementations indefinitely | Doubles maintenance + context noise |
83
+ | Delete by filename alone without grep | Breaks dynamic / config references |
84
+ | Broad cleanup inside a minimal `/fix` | Violates fix scope; mix bugs with refactors |
85
+ | Suppress unused-lint instead of removing | Hides the signal |
86
+
87
+ ---
88
+
89
+ ## Polyglot Examples
90
+
91
+ ```ts
92
+ // WRONG — new path + inert old export left for "rollback"
93
+ export { NewCheckout } from './new-checkout';
94
+ export { OldCheckout } from './old-checkout'; // unused; confuses next session
95
+
96
+ // CORRECT — single live path
97
+ export { NewCheckout } from './new-checkout';
98
+ // delete old-checkout.ts after rg shows zero callers
99
+ ```
100
+
101
+ ```php
102
+ // WRONG — route still points at unused controller after rewrite
103
+ // Route::get('/billing', [OldBillingController::class, 'show']);
104
+
105
+ // CORRECT — update route + delete OldBillingController once rg is clean
106
+ Route::get('/billing', [BillingController::class, 'show']);
107
+ ```
108
+
109
+ ```python
110
+ # WRONG — keep unused helper after extract
111
+ def legacy_normalize(x): # no callers
112
+ return x.strip()
113
+
114
+ # CORRECT — delete legacy_normalize; keep only the live path
115
+ def normalize(x: str) -> str:
116
+ return x.strip()
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Pre-Commit Checklist
122
+
123
+ - [ ] Replaced paths: old files/exports removed or still have proven callers
124
+ - [ ] No `LEGACY` / commented dual implementations added in this change
125
+ - [ ] Grep clean for removed symbol names
126
+ - [ ] Typecheck / lint / relevant tests pass
127
+ - [ ] Domain docs / CLAUDE.md updated if a documented path was removed
128
+ - [ ] `/fix` scope: only fix-induced dead code (else separate refactor commit)
129
+
130
+ ## See Also
131
+
132
+ - `final-check` — mechanical leftovers (`console.log`, `any`, debug dumps); complementary
133
+ - `quality-gate` — typecheck/lint/test/build after hygiene
134
+ - `git-workflow` — use `refactor:` for broad dead-code deletions; keep `/fix` minimal
135
+ - `tool-resilience` — if grep/edit tools fail while verifying callers
136
+ - `error-handling` — application error paths (not inert-code cleanup)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: final-check
3
- version: 2.0.0
3
+ version: 2.0.1
4
4
  description: Final validator with VETO power. Now executable — runs `npx tsx .claude/hooks/final-check.ts` to scan for debug statements, secrets, .skip, any, RCE risks, SQL concat. Blocks completion on CRITICAL/HIGH findings.
5
5
  ---
6
6
 
@@ -88,6 +88,7 @@ The default Stop is `stop-validator.ts` (git/branch/CLAUDE.md/secret scan). `fin
88
88
 
89
89
  ## See Also
90
90
 
91
+ - `dead-code-hygiene` — remove unused legacy/inert paths after replacements (run before this scan)
91
92
  - `quality-gate` — typecheck/lint/test/build (different scope)
92
93
  - `security-baseline` — what the secret/RCE rules enforce
93
94
  - `stop-validator.ts` — git/branch/docs gate (sibling, complementary)
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: owned-infra-ops
3
+ version: 1.0.0
4
+ description: User-owned server ops (health check, SSH backup, deploy) — ownership framing, safe tool order, and patterns that reduce Anthropic Opus/Sonnet cyber false positives. Invoke when the user asks to operate on infrastructure they own. Not for third-party systems, offensive security, or mass recon. Cannot override Anthropic Cyber Verification Program / API cyber blocks.
5
+ ---
6
+
7
+ # Owned Infrastructure Ops
8
+
9
+ **Invoke when the user asks to operate on infrastructure they own** — health checks, SSH into their VPS, backups, deploys, log pulls. Goal: complete legitimate admin work with minimal “cyber recon” signal.
10
+
11
+ > **Hard limit:** Project memories and this skill **cannot** lift Anthropic’s real-time cyber safeguards on Opus/Sonnet. If the API returns a Cyber Verification / cybersecurity topic block, stop and follow the recovery section — do not rephrase to evade.
12
+
13
+ ---
14
+
15
+ ## Golden Rules
16
+
17
+ 1. **Ownership first.** Confirm the host/IP/domain is the user’s (or contracted admin scope) before remote ops.
18
+ 2. **One named target.** No CIDR sweeps, port scans, or “check all servers.”
19
+ 3. **Prefer keys over passwords.** Never put passwords in agent commands or chat output.
20
+ 4. **Minimal recon.** Only the checks needed for the stated task (backup path, health URL) — not full host enumeration.
21
+ 5. **If Anthropic cyber-blocks:** stop the remote chain; ask the user to run SSH locally and paste output, or apply CVP.
22
+
23
+ ---
24
+
25
+ ## Ownership Checklist (before Bash/SSH)
26
+
27
+ Ask or confirm when unclear:
28
+
29
+ - [ ] User states the host is **theirs** (or they admin it under contract)
30
+ - [ ] Target is a **single** hostname/IP already known to them
31
+ - [ ] Task is ops (health / backup / deploy / logs) — not vulnerability research on a third party
32
+ - [ ] Credentials: SSH key path / agent, not a password pasted into the agent
33
+
34
+ If ownership is ambiguous → **ask**. Do not default to proceeding.
35
+
36
+ ---
37
+
38
+ ## Preferred Phrasing (reduce false positives)
39
+
40
+ | Prefer (ops / owned) | Avoid (recon / attack framing) |
41
+ |---|---|
42
+ | “My VPS at … — check if SSH is up, then backup `/var/www/app`” | “Scan this IP / probe the network / enumerate services” |
43
+ | “I am root on this host; use my key at `.env.d/…`” | “Crack / brute / bypass SSH” |
44
+ | “Pull only the app directory for backup” | “Dump the whole filesystem / find all secrets” |
45
+ | User runs `ssh` and pastes `ls` / `df` output | Agent chains ping → banner grab → sshpass → recursive find |
46
+
47
+ ---
48
+
49
+ ## Safe Tool Order
50
+
51
+ ```
52
+ 1. Confirm ownership + task scope (one host, one goal)
53
+ 2. Connectivity (optional): ping OR curl https://host/healthz — not both + nmap
54
+ 3. Auth: ssh -i "$KEY" user@host (key already on disk / agent)
55
+ 4. Targeted commands only (named paths for backup/deploy)
56
+ 5. Tear down temp files; never echo secrets
57
+ ```
58
+
59
+ ### Safer patterns
60
+
61
+ ```bash
62
+ # CORRECT — key-based, single host, scoped command
63
+ ssh -i "$SSH_KEY_PATH" -o IdentitiesOnly=yes -o ConnectTimeout=15 \
64
+ user@my-vps.example.com 'hostname; ls -la /var/www/app.nutricionando'
65
+
66
+ # CORRECT — health of owned app (HTTPS)
67
+ curl -sfS --max-time 10 https://app.example.com/healthz
68
+
69
+ # CORRECT — when cyber risk is high: user runs SSH; agent analyzes pasted output only
70
+ ```
71
+
72
+ ### FORBIDDEN patterns (agent-side)
73
+
74
+ | Pattern | Why |
75
+ |---|---|
76
+ | `sshpass` / password on the command line | Credential in process list + strong cyber signal |
77
+ | Embedding passwords/private keys in prompts or logs | Leak + classifier trigger |
78
+ | `nmap`, subnet sweeps, mass banner grabs | Dual-use recon |
79
+ | Broad `find /` / recursive secret harvest after login | Looks like post-exploitation |
80
+ | Rephrasing after a Cyber Verification API block to “get around” it | Policy evasion — stop instead |
81
+ | Ops against hosts the user does not own | Out of scope |
82
+
83
+ ---
84
+
85
+ ## When Anthropic Cyber-Blocks Mid-Task
86
+
87
+ 1. **Stop** further remote Bash/SSH in that turn.
88
+ 2. Explain: API-level cyber safeguard (Opus/Sonnet), not a project hook.
89
+ 3. Offer recovery:
90
+ - User runs the SSH/backup commands locally and pastes output for analysis
91
+ - Prefer SSH keys + non-interactive, scoped commands next time
92
+ - For recurring legitimate dual-use ops: apply to the [Cyber Verification Program](https://portal.anthropic.com/programs/cvp) (org admin; data retention required)
93
+ 4. Optionally continue on **local** artifacts only (configs, scripts, pasted logs).
94
+
95
+ Do **not** claim this skill or any memory overrides that API gate.
96
+
97
+ ---
98
+
99
+ ## Prefer CI Over Ad-Hoc SSH
100
+
101
+ For deploy/backup that repeats: use existing pipelines (`ci-pipelines`, GitHub Actions, provider CLIs) instead of interactive root SSH from the agent.
102
+
103
+ ---
104
+
105
+ ## See Also
106
+
107
+ - `secrets-management` — SSH keys, `.env.d/`, never put secrets in commands
108
+ - `tool-resilience` — classify SSH/curl failures (permission vs transient)
109
+ - `ci-pipelines` — preferred path for repeatable deploy/backup
110
+ - `observability` — app `/healthz` / `/readyz` (not host recon)
111
+ - Memory `owned-infra-ops.md` — short always-on ownership contract
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: quality-gate
3
- version: 1.0.0
3
+ version: 1.0.1
4
+ description: Run stack quality checks (typecheck → lint → test → build) before commit. Invoke after dead-code hygiene and before commit-manager. Blocks on required gate failures.
4
5
  ---
5
6
 
6
7
  # Quality Gate — Verification System
@@ -60,3 +61,9 @@ bun run build # Build verification (must come AFTER
60
61
  2. **FIX ERRORS, DON'T SKIP** — never use `--no-verify`
61
62
  3. **ORDER MATTERS** — run in defined order (cheapest first)
62
63
  4. **REPORT RESULTS** — show pass/fail for each gate
64
+
65
+ ## See Also
66
+
67
+ - `dead-code-hygiene` — delete unused legacy/inert code after replacements (before this gate)
68
+ - `final-check` — mechanical leftovers / secrets / RCE scan (complementary)
69
+ - `git-workflow` — commit only after required gates pass
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: secrets-management
3
- version: 2.1.0
3
+ version: 2.1.1
4
4
  description: "Environment variable hygiene, OIDC federation for CI/CD (2026 default — replaces long-lived static secrets), secret detection (gitleaks 3-layer: pre-commit + CI + GitHub push protection), rotation, and secret-store patterns. Invoke whenever .env, secrets, API keys, env-var-reading code, or CI cloud-deploy credentials are touched."
5
5
  ---
6
6
 
@@ -403,6 +403,7 @@ Lockfile rules:
403
403
  - `security-baseline` — broader OWASP scope (2025-A03 Software Supply Chain Failures)
404
404
  - `observability` — log redaction details
405
405
  - `ci-pipelines` — OIDC patterns + workflow permissions
406
+ - `owned-infra-ops` — SSH/backup/deploy on user-owned hosts (keys, not passwords; cyber false-positive hygiene)
406
407
  - Stack `api-security-*` — usage patterns
407
408
  - `memory-optimization` — when this skill grows beyond ~200 lines, run MOP to keep it actionable
408
409
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tool-resilience
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: How the agent should recover from TOOL failures (not application errors) — Read/Edit/StrReplace/Bash/WebFetch/WebSearch/Grep/Glob. Error taxonomy, retry/backoff, read-before-edit, and the Cloudflare 520 / HTTP 444 bot-block recovery (switch User-Agent). Invoke when a tool call fails, times out, returns non-2xx, or a fetch is blocked.
5
5
  ---
6
6
 
@@ -222,5 +222,6 @@ Tool <name> failed after N attempts.
222
222
 
223
223
  - `error-handling` — application-level error taxonomy, Result types, retry/backoff, circuit breaker
224
224
  - `debugging-patterns` — "Bundle, not Backend" triage; general debug flow
225
+ - `owned-infra-ops` — SSH/curl on user-owned hosts; recover when Anthropic cyber-blocks (do not evade)
225
226
  - `competitive-intelligence-research` / `funnel-content-copy` memories — permissive web-copy context
226
227
  - MCP web-scraper — sends browser-like headers by default; prefer it for reliable page copies
@@ -114,7 +114,9 @@
114
114
  "openapi-design",
115
115
  "docker-patterns",
116
116
  "podman-patterns",
117
- "tool-resilience"
117
+ "tool-resilience",
118
+ "dead-code-hygiene",
119
+ "owned-infra-ops"
118
120
  ],
119
121
  "requirements": [
120
122
  {
@@ -104,7 +104,9 @@
104
104
  "openapi-design",
105
105
  "docker-patterns",
106
106
  "podman-patterns",
107
- "tool-resilience"
107
+ "tool-resilience",
108
+ "dead-code-hygiene",
109
+ "owned-infra-ops"
108
110
  ],
109
111
  "requirements": [
110
112
  {
@@ -74,7 +74,9 @@
74
74
  "api-security-python",
75
75
  "docker-patterns",
76
76
  "podman-patterns",
77
- "tool-resilience"
77
+ "tool-resilience",
78
+ "dead-code-hygiene",
79
+ "owned-infra-ops"
78
80
  ],
79
81
  "requirements": [
80
82
  {