minimal-vibe-coding-kit 0.3.0 → 0.4.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.
Files changed (123) hide show
  1. package/.agents/skills/agentshield-security-review/SKILL.md +6 -6
  2. package/.agents/skills/agentshield-security-review/references/native-install.md +10 -10
  3. package/.agents/skills/agentshield-security-review/references/report-template.md +1 -1
  4. package/.agents/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +3 -3
  5. package/.agents/skills/autoresearch-coding/README.md +1 -1
  6. package/.agents/skills/autoresearch-coding/SKILL.md +4 -4
  7. package/.agents/skills/coding-level/SKILL.md +8 -1
  8. package/.agents/skills/daily-workflow-curator/SKILL.md +3 -3
  9. package/.agents/skills/parallel-analysis/SKILL.md +160 -0
  10. package/.agents/skills/path-sensitive-shell-safety/SKILL.md +69 -0
  11. package/.agents/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
  12. package/.agents/skills/vibekit-init/SKILL.md +6 -6
  13. package/.claude/commands/vibe-finalize.md +1 -1
  14. package/.claude/rules/safe-delete.md +11 -0
  15. package/.claude/rules/security.md +2 -0
  16. package/.claude/rules/tooling.md +1 -1
  17. package/.claude/skills/agentshield-security-review/SKILL.md +6 -6
  18. package/.claude/skills/agentshield-security-review/references/native-install.md +10 -10
  19. package/.claude/skills/agentshield-security-review/references/report-template.md +1 -1
  20. package/.claude/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +3 -3
  21. package/.claude/skills/autoresearch-coding/README.md +1 -1
  22. package/.claude/skills/autoresearch-coding/SKILL.md +4 -4
  23. package/.claude/skills/coding-level/SKILL.md +8 -1
  24. package/.claude/skills/daily-workflow-curator/SKILL.md +3 -3
  25. package/.claude/skills/parallel-analysis/SKILL.md +160 -0
  26. package/.claude/skills/path-sensitive-shell-safety/SKILL.md +69 -0
  27. package/.claude/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
  28. package/.claude/skills/vibekit-init/SKILL.md +6 -6
  29. package/.codex-plugin/plugin.json +2 -2
  30. package/.cursor/commands/vibe-finalize.md +1 -1
  31. package/.cursor/rules/001-vibe-core.mdc +1 -1
  32. package/.cursor/rules/010-init.mdc +1 -1
  33. package/.cursor/rules/020-security-agentshield.mdc +2 -2
  34. package/.cursor/rules/030-autoresearch-loop.mdc +1 -1
  35. package/.cursor/rules/040-safe-delete.mdc +16 -0
  36. package/.cursor/skills/coding-level/SKILL.md +8 -1
  37. package/.cursor/skills/parallel-analysis/SKILL.md +160 -0
  38. package/.cursor/skills/path-sensitive-shell-safety/SKILL.md +69 -0
  39. package/.cursor/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
  40. package/.vibekit/commands/vibe-finalize.md +3 -0
  41. package/{.vbkit-docs → .vibekit/docs}/AUTORESEARCH_LEDGER.md +3 -3
  42. package/{.vbkit-docs → .vibekit/docs}/BACKBONE_REFERENCE.md +1 -1
  43. package/{.vbkit-docs → .vibekit/docs}/INSTALL.md +28 -16
  44. package/{.vbkit-docs → .vibekit/docs}/RESEARCH_NOTES.md +1 -1
  45. package/{.vbkit-docs → .vibekit/docs}/SECURITY_MODEL.md +2 -2
  46. package/{.vbkit-docs → .vibekit/docs}/TOOLING_GUIDE.md +2 -2
  47. package/{.vbkit-docs → .vibekit/docs}/templates/CONTEXT_TEMPLATE.md +1 -1
  48. package/{.vbkit-docs → .vibekit/docs}/templates/PRD_TEMPLATE.md +1 -1
  49. package/{CLAUDE-template.md → .vibekit/init/CLAUDE-template.md} +3 -1
  50. package/{FIRST_PROMPT.md → .vibekit/init/FIRST_PROMPT.md} +6 -6
  51. package/{FIRST_TIME_INIT.md → .vibekit/init/FIRST_TIME_INIT.md} +46 -14
  52. package/{.vbkit-scripts → .vibekit/scripts}/agentshield-probe.mjs +1 -1
  53. package/{.vbkit-scripts → .vibekit/scripts}/daily-enhance.mjs +3 -3
  54. package/{.vbkit-scripts → .vibekit/scripts}/doctor.mjs +22 -7
  55. package/{.vbkit-scripts → .vibekit/scripts}/init-backbone.mjs +31 -22
  56. package/{.vbkit-scripts → .vibekit/scripts}/mvck.mjs +61 -25
  57. package/{.vbkit-scripts → .vibekit/scripts}/test-install.mjs +32 -18
  58. package/{.vbkit-scripts → .vibekit/scripts}/validate-kit.mjs +47 -31
  59. package/{.vbkit-scripts → .vibekit/scripts}/vibekit-finalize.mjs +7 -7
  60. package/{skills → .vibekit/skills}/agentshield-security-review/SKILL.md +6 -6
  61. package/{skills → .vibekit/skills}/agentshield-security-review/references/native-install.md +10 -10
  62. package/{skills → .vibekit/skills}/agentshield-security-review/references/report-template.md +1 -1
  63. package/{skills → .vibekit/skills}/agentshield-security-review/scripts/agentshield_repo_probe.py +3 -3
  64. package/{skills → .vibekit/skills}/autoresearch-coding/README.md +1 -1
  65. package/{skills → .vibekit/skills}/autoresearch-coding/SKILL.md +4 -4
  66. package/{skills → .vibekit/skills}/coding-level/SKILL.md +8 -1
  67. package/{skills → .vibekit/skills}/daily-workflow-curator/SKILL.md +3 -3
  68. package/.vibekit/skills/parallel-analysis/SKILL.md +160 -0
  69. package/.vibekit/skills/path-sensitive-shell-safety/SKILL.md +69 -0
  70. package/.vibekit/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
  71. package/{skills → .vibekit/skills}/vibekit-init/SKILL.md +6 -6
  72. package/AGENTS.md +6 -2
  73. package/CHANGELOG.md +24 -2
  74. package/CONTRIBUTING.md +3 -3
  75. package/README.md +147 -372
  76. package/backbone.yml +8 -7
  77. package/bin/mvck.js +1 -1
  78. package/bin/vibe-kit.js +1 -1
  79. package/docs/README.vi.md +268 -0
  80. package/install.ps1 +1 -1
  81. package/install.sh +5 -3
  82. package/package.json +23 -19
  83. package/.vbkit-commands/vibe-finalize.md +0 -3
  84. package/README.vi.md +0 -431
  85. /package/{.vbkit-commands → .vibekit/commands}/autoresearch-coding.md +0 -0
  86. /package/{.vbkit-commands → .vibekit/commands}/council.md +0 -0
  87. /package/{.vbkit-commands → .vibekit/commands}/daily-enhance.md +0 -0
  88. /package/{.vbkit-commands → .vibekit/commands}/init-vibe.md +0 -0
  89. /package/{.vbkit-commands → .vibekit/commands}/security-scan.md +0 -0
  90. /package/{.vbkit-docs → .vibekit/docs}/backbone.schema.json +0 -0
  91. /package/{.vbkit-scripts → .vibekit/scripts}/pack-dry-run.mjs +0 -0
  92. /package/{skills → .vibekit/skills}/agentshield-security-review/agents/openai.yaml +0 -0
  93. /package/{skills → .vibekit/skills}/agentshield-security-review/references/review-checklist.md +0 -0
  94. /package/{skills → .vibekit/skills}/autoresearch-coding/references/experiment-contract.md +0 -0
  95. /package/{skills → .vibekit/skills}/autoresearch-coding/references/metric-extraction.md +0 -0
  96. /package/{skills → .vibekit/skills}/autoresearch-coding/references/result-ledger.md +0 -0
  97. /package/{skills → .vibekit/skills}/autoresearch-coding/scripts/log_result.py +0 -0
  98. /package/{skills → .vibekit/skills}/autoresearch-coding/scripts/run_logged.py +0 -0
  99. /package/{skills → .vibekit/skills}/clearthought/SKILL.md +0 -0
  100. /package/{skills → .vibekit/skills}/clearthought/examples/decision-framework.md +0 -0
  101. /package/{skills → .vibekit/skills}/clearthought/examples/metagame-examples.md +0 -0
  102. /package/{skills → .vibekit/skills}/clearthought/examples/sequential-thinking.md +0 -0
  103. /package/{skills → .vibekit/skills}/clearthought/references/output-schemas.md +0 -0
  104. /package/{skills → .vibekit/skills}/clearthought/references/parameter-reference.md +0 -0
  105. /package/{skills → .vibekit/skills}/coding-level/references/level-0.md +0 -0
  106. /package/{skills → .vibekit/skills}/coding-level/references/level-1.md +0 -0
  107. /package/{skills → .vibekit/skills}/coding-level/references/level-2.md +0 -0
  108. /package/{skills → .vibekit/skills}/coding-level/references/level-3.md +0 -0
  109. /package/{skills → .vibekit/skills}/coding-level/references/level-4.md +0 -0
  110. /package/{skills → .vibekit/skills}/coding-level/references/level-5.md +0 -0
  111. /package/{skills → .vibekit/skills}/memento/SKILL.md +0 -0
  112. /package/{skills → .vibekit/skills}/reviewing-4p-priorities/SKILL.md +0 -0
  113. /package/{skills → .vibekit/skills}/reviewing-4p-priorities/examples.md +0 -0
  114. /package/{skills → .vibekit/skills}/sequential-thinking/SKILL.md +0 -0
  115. /package/{skills → .vibekit/skills}/sequential-thinking/examples/adaptive-depth.md +0 -0
  116. /package/{skills → .vibekit/skills}/sequential-thinking/examples/branching-exploration.md +0 -0
  117. /package/{skills → .vibekit/skills}/sequential-thinking/examples/linear-reasoning.md +0 -0
  118. /package/{skills → .vibekit/skills}/sequential-thinking/examples/revision-pattern.md +0 -0
  119. /package/{skills → .vibekit/skills}/sequential-thinking/references/output-schema.md +0 -0
  120. /package/{skills → .vibekit/skills}/sequential-thinking/references/parameters.md +0 -0
  121. /package/{skills → .vibekit/skills}/sequential-thinking/references/patterns.md +0 -0
  122. /package/{skills → .vibekit/skills}/visual-design-loop/SKILL.md +0 -0
  123. /package/{skills → .vibekit/skills}/visual-design-loop/agents/openai.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Metric-driven autoresearch loop rules for repeated repo improvement.
3
- globs: ["src/**", "app/**", "lib/**", ".vbkit-docs/**", "skills/**", ".vbkit-scripts/**", ".vbkit-commands/**", ".claude/**", ".cursor/**", ".agents/**"]
3
+ globs: ["src/**", "app/**", "lib/**", ".vibekit/docs/**", ".vibekit/skills/**", ".vibekit/scripts/**", ".vibekit/commands/**", ".claude/**", ".cursor/**", ".agents/**"]
4
4
  alwaysApply: false
5
5
  ---
6
6
 
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Safe-delete guardrail - prefer trash over rm so deletions stay recoverable.
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Safe delete rules
7
+
8
+ - Never delete permanently by default. Prefer `trash` over `rm`, `rm -rf`, `rmdir`, and `find -delete` so deletions stay recoverable.
9
+ - Before deleting, check availability with `command -v trash`. If available, use `trash <path>`.
10
+ - If `trash` is missing, recommend installing it instead of falling back to `rm`:
11
+ - macOS 14 or newer: built in at `/usr/bin/trash`, nothing to install.
12
+ - Older macOS: `brew install trash` (https://formulae.brew.sh/formula/trash).
13
+ - Linux: `sudo apt install trash-cli` or `pip install trash-cli` (https://github.com/andreafrancia/trash-cli).
14
+ - Any OS with Node.js: `npm install --global trash-cli` (https://github.com/sindresorhus/trash-cli).
15
+ - Permanent deletion requires the user's explicit approval of the exact paths, and the `path-sensitive-shell-safety` skill first when paths come from variables.
16
+ - Honor the deletion preference recorded in `backbone.yml` `conventions.custom_rules` during first-time init.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: coding-level
3
- description: Set the coding-explanation register. /coding-level N (0=ELI5, 1=Junior, 2=Mid, 3=Senior, 4=Tech Lead, 5=God); active until reinvoked.
3
+ description: Set the coding-explanation register. /coding-level N (0=ELI5, 1=Junior, 2=Mid, 3=Senior, 4=Tech Lead, 5=God); active until reinvoked. A project default may be recorded in backbone.yml conventions.custom_rules.
4
4
  disable-model-invocation: true
5
5
  argument-hint: "[0-5]"
6
6
  ---
@@ -20,6 +20,13 @@ argument-hint: "[0-5]"
20
20
 
21
21
  1. Read `$ARGUMENTS` as N. If N is not an integer 0–5, reply with the table above and ask for a valid N.
22
22
  2. Read `references/level-<N>.md`, state once which level is now active, and apply that persona to every reply until `/coding-level` is invoked again.
23
+ 3. Ask once: "Save level N as the project default?" If yes, add or update the `Default coding level: N` entry in `backbone.yml` `conventions.custom_rules` (show the diff and wait for approval, per kit rules).
24
+
25
+ ## Project default
26
+
27
+ - First-time init records a default as a `backbone.yml` `conventions.custom_rules` entry: `Default coding level: N (<Register>)`.
28
+ - Sessions without an explicit `/coding-level` start from that default level.
29
+ - `/coding-level N` overrides the default for the current session only, unless the user saves it in step 3.
23
30
 
24
31
  ## Scope
25
32
 
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: parallel-analysis
3
+ description: Fan out 2-5 independent read-only analysis lanes across the repo using your configured executor (Cursor CLI Composer, Claude subagents, or Codex CLI), then merge the lane reports and verify them with a refutation pass. Use for repo-wide questions, large uncommitted-diff reviews, multi-doc reading, impact analysis, or consistency audits. On first use it asks which provider/model to use and saves the answer so it never asks again.
4
+ argument-hint: "<analysis question, diff, or review target>"
5
+ user-invocable: true
6
+ effort: medium
7
+ ---
8
+
9
+ # Parallel Analysis (Multi-Agent Fan-Out)
10
+
11
+ Split a large analysis into independent read-only lanes, run them concurrently
12
+ with the configured executor, merge the lane reports, and verify merged claims
13
+ with a skeptical refutation pass. One round of parallel lanes replaces slow
14
+ serial reading; the verification lane replaces manual double-checking.
15
+
16
+ This skill is project-agnostic: it works in any repo where the kit is
17
+ installed, using that repo's `backbone.yml` (if present) for boundaries.
18
+
19
+ ## Best Use
20
+
21
+ - Repo-wide questions ("where is X handled, what depends on Y").
22
+ - Reviewing a large uncommitted diff by concern (backend vs frontend vs i18n
23
+ vs scripts).
24
+ - Reading several large docs, plans, or reference trees at once.
25
+ - Pre-change impact analysis across packages/apps listed in `backbone.yml`
26
+ `paths.apps`.
27
+ - Consistency audits (docs vs code, rules vs skills, config vs actual layout).
28
+
29
+ Do NOT use for single-file questions or quick lookups; direct reads are faster.
30
+
31
+ ## Executor Setup (first use only)
32
+
33
+ Lane execution is delegated to ONE configured executor. The choice is stored
34
+ in `.vibekit/parallel-analysis.json`; while that file exists and its preflight
35
+ passes, NEVER ask again.
36
+
37
+ 1. **If `.vibekit/parallel-analysis.json` exists**: read it, run the matching
38
+ preflight below, and proceed silently on success. If preflight fails
39
+ (binary missing, logged out), tell the user what broke, offer to re-run
40
+ setup, and update the file with their answer.
41
+ 2. **If it does not exist**: detect what is available, then ask the user ONE
42
+ question — "Which provider should run parallel analysis lanes?" — using the
43
+ harness-native prompt (AskUserQuestion in Claude Code; a plain chat
44
+ question in Cursor/Codex). Offer, in this order:
45
+ - **Cursor CLI + Composer 2.5 Fast (recommended)** — fastest lane executor;
46
+ requires `cursor-agent` installed and logged in.
47
+ - **Claude subagents** — no extra install; lanes run as read-only Claude
48
+ Code subagents (Explore/general-purpose). Choose this automatically if
49
+ the user declines external CLIs.
50
+ - **Codex CLI** — lanes run via `codex exec` in a read-only sandbox with
51
+ the best available Codex model.
52
+ 3. **Resolve the model** for the chosen provider (see per-executor notes),
53
+ confirm the resolved value in one line, and write the config file. Include
54
+ a fallback executor so lanes still run when the primary is unavailable.
55
+
56
+ ### Preflights and model resolution
57
+
58
+ - `cursor-cli`: `cursor-agent status` must report logged in (otherwise the
59
+ user runs `cursor-agent login` once). Resolve the model with
60
+ `cursor-agent --list-models` and prefer the Composer 2.5 fast variant
61
+ (e.g. `composer-2.5-fast`); if absent, use the newest Composer model and
62
+ record what was picked.
63
+ - `claude-subagents`: available whenever running inside Claude Code; no
64
+ binary needed. Use read-only subagent types only.
65
+ - `codex-cli`: `codex --version` must succeed. Use the CLI's default/best
66
+ coding model unless the user names one; record the resolved model.
67
+
68
+ ### Config file — `.vibekit/parallel-analysis.json`
69
+
70
+ ```json
71
+ {
72
+ "executor": "cursor-cli",
73
+ "model": "composer-2.5-fast",
74
+ "fallback": "claude-subagents",
75
+ "configuredAt": "2026-07-16T07:30:00Z"
76
+ }
77
+ ```
78
+
79
+ `executor` is one of `cursor-cli` | `claude-subagents` | `codex-cli`. The file
80
+ is local state (gitignored by default); a team may commit it deliberately to
81
+ share a default. To change the choice later, delete the file or ask for
82
+ "parallel-analysis setup" again.
83
+
84
+ ## Running a lane (per executor)
85
+
86
+ Every lane is READ-ONLY: search, read, summarize — never edit files, execute
87
+ project binaries, run hooks, or trigger installs/deploys/migrations.
88
+
89
+ - `cursor-cli`:
90
+
91
+ ```sh
92
+ cursor-agent -p --mode ask --output-format text \
93
+ --model "<configured-model>" \
94
+ --workspace "<repo-root>" \
95
+ "<lane brief>"
96
+ ```
97
+
98
+ Never pass `--force` or `--yolo`; `--mode ask` keeps Composer read-only.
99
+ One workspace per lane; a question spanning multiple repos becomes one lane
100
+ per repo.
101
+ - `claude-subagents`: launch each lane as a read-only subagent with the lane
102
+ brief as its prompt, all lanes in ONE message so they run concurrently.
103
+ - `codex-cli`:
104
+
105
+ ```sh
106
+ codex exec --sandbox read-only -C "<repo-root>" "<lane brief>"
107
+ ```
108
+
109
+ If the harness cannot run lanes concurrently (plain CLI loop), run them
110
+ back-to-back without changing the briefs — merge and verification stay the
111
+ same.
112
+
113
+ ## Workflow
114
+
115
+ 1. **Scope.** State the question in one sentence. Split it into 2-5 lanes that
116
+ are independent of each other (by directory, package, concern, or doc set).
117
+ If lanes would depend on each other's output, merge them or run two rounds.
118
+ 2. **Brief.** Give each lane a numbered brief: exact paths, the questions to
119
+ answer, and the required return format ("facts only, numbered sections,
120
+ findings as `file:line — issue — why it matters`").
121
+ 3. **Launch all lanes at once** with the configured executor.
122
+ 4. **Prepare while waiting.** Build the merge skeleton; do not duplicate lane
123
+ work.
124
+ 5. **Merge.** Combine lane reports into one findings list. Mark conflicts
125
+ between lanes and unknowns explicitly — never average away a disagreement.
126
+ 6. **Verify.** Run one verification lane that receives the merged claims (not
127
+ the reasoning) with the instruction: "Default-skeptical: confirm or refute
128
+ each claim against the repo with file:line evidence." Drop or re-investigate
129
+ every refuted claim; never silently keep one.
130
+ 7. **Deliver.** Report merged findings, what was verified, and remaining
131
+ unknowns. For issue triage, classify surviving findings with the
132
+ `reviewing-4p-priorities` skill (P0-P4). Decisions and edits stay in the
133
+ main session under the repo's normal review rules.
134
+
135
+ ## Lane brief template
136
+
137
+ ```text
138
+ Lane <n>: <one-line purpose>
139
+ Workspace: <repo root>
140
+ Paths: <exact dirs/files>
141
+ Read-only. Do not modify anything or execute binaries/scripts.
142
+ Questions:
143
+ 1. <specific question>
144
+ 2. <specific question>
145
+ Return: numbered sections matching the questions, facts only,
146
+ findings as file:line — issue — why it matters.
147
+ ```
148
+
149
+ ## Guardrails
150
+
151
+ - 2-5 lanes per round; needing more means the question is under-scoped.
152
+ - Lanes are read-only; only the main session edits files. Agent-surface edits
153
+ (`backbone.yml`, `AGENTS.md`, `CLAUDE.md`, `.claude/**`, `.cursor/**`,
154
+ `.agents/**`, `.codex/**`, kit skills/commands) additionally require the
155
+ `agentshield-security-review` skill afterwards.
156
+ - Respect `backbone.yml` `policy.protected_paths` in every lane brief.
157
+ - Never put secrets in lane briefs or executor prompts: no `.env*` contents,
158
+ credentials, tokens, private keys, or customer data.
159
+ - This skill produces analysis, not decisions; a lane may not conclude
160
+ "therefore change X" without main-session review.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: path-sensitive-shell-safety
3
+ description: Guardrail workflow for shell changes that use path variables, remote base directories, repo folders, checkout repair, or destructive filesystem commands such as rm, mv, cp, rsync, find -delete, git clean, or git reset.
4
+ argument-hint: "<script path, command, or safety review target>"
5
+ user-invocable: true
6
+ effort: medium
7
+ ---
8
+
9
+ # Path-Sensitive Shell Safety
10
+
11
+ Use this skill before editing or reviewing shell, deploy, installer, cleanup, or repair logic that builds filesystem paths from variables or touches remote repositories.
12
+
13
+ Common triggers:
14
+
15
+ - Path variables such as `remote_base`, `repo_dir`, `repo_folder`, `target_dir`, `backup_dir`, `worktree`, `site`, `app`, or user-entered folder names.
16
+ - Destructive or path-sensitive commands: `rm`, `mv`, `cp -a`, `rsync --delete`, `find -delete`, `docker volume rm`, `git clean`, `git reset`, checkout repair, clone replacement, or symlink-sensitive copy.
17
+ - Git sync that decides which branch or remote checkout will be deployed.
18
+
19
+ ## Safety objective
20
+
21
+ No empty, unset, broad, symlinked, or unintended path may reach a destructive command. Validate values before joining paths, validate the joined path before use, and validate containment immediately before the command.
22
+
23
+ ## Required workflow
24
+
25
+ 1. Identify the command with the highest blast radius.
26
+ 2. List every variable that contributes to its path or repository target.
27
+ 3. Classify each variable:
28
+ - trusted constant;
29
+ - config value;
30
+ - remote/server value;
31
+ - user/operator input;
32
+ - derived path.
33
+ 4. Validate raw inputs before joining:
34
+ - required and non-empty;
35
+ - expected shape: absolute base path or safe single folder segment;
36
+ - no traversal, newlines, glob metacharacters, leading option dash, or control characters;
37
+ - explicit allowlist for server roots when possible.
38
+ 5. Join paths with quoted expansions only. Do not use `eval`.
39
+ 6. Canonicalize existing paths with physical resolution (`pwd -P` or `realpath`) before destructive work.
40
+ 7. Assert containment:
41
+ - target is inside the approved base;
42
+ - target is not `/`, `.`, `..`, `$HOME`, the base root itself, or another broad system directory;
43
+ - target is not a symlink unless the operation explicitly supports symlinks.
44
+ 8. Put the final guard directly next to the dangerous command.
45
+ 9. Use command terminators and quoting: `-- "$path"` where supported.
46
+ 10. For Git sync, verify expected origin, selected branch policy, fetch success, clean worktree, fast-forward state, and final `HEAD == origin/<branch>` before build/deploy.
47
+ 11. Run the repo validation command and AgentShield probe when this changes agent surfaces or automation rules.
48
+
49
+ ## Required outcomes
50
+
51
+ - Prefer a recoverable delete (`trash`) over permanent `rm` for user files; permanent deletion requires explicit confirmation of the exact paths. If `trash` is missing, recommend installing it (macOS 14+ built-in; older macOS `brew install trash`; Linux `sudo apt install trash-cli`; any OS with Node `npm i -g trash-cli`).
52
+ - A blank branch may follow the documented default-branch fallback policy.
53
+ - An explicit branch must fail if missing; never silently deploy another branch.
54
+ - A blank folder/base value must fail before any `rm`, `mv`, `cp`, `rsync`, `find`, Docker, or Git cleanup command runs.
55
+ - A repair flow may move an unusable checkout to a timestamped backup only after a verified replacement exists.
56
+ - No automatic cleanup should delete backups, locks, runtime data, uploads, volumes, databases, or environment files without separate explicit confirmation.
57
+
58
+ ## Review priority
59
+
60
+ Use `reviewing-4p-priorities` if triage is needed:
61
+
62
+ - P0: unsafe path command already caused data loss or can expose/delete secrets in the active environment.
63
+ - P1: unchecked empty/broad variable can reach destructive commands in deploy/repair/install paths.
64
+ - P2: guard exists but misses edge cases such as symlinks, traversal, explicit branch fallback, or wrong origin.
65
+ - P3/P4: documentation clarity or minor naming improvements after the safety invariant is already enforced.
66
+
67
+ ## Reference
68
+
69
+ Use `references/workflow.md` for copy-ready guard patterns and review checklist.
@@ -0,0 +1,127 @@
1
+ # Path-Sensitive Shell Safety Reference
2
+
3
+ This reference gives reusable guard patterns for shell scripts. Adapt names and allowlists to the repo, but keep the invariant: validate raw input, validate the joined path, then guard immediately before the dangerous command.
4
+
5
+ ## Baseline guard functions
6
+
7
+ ```bash
8
+ die() {
9
+ printf 'ERROR: %s\n' "$*" >&2
10
+ exit 1
11
+ }
12
+
13
+ require_nonempty() {
14
+ local name="${1:?missing name}"
15
+ local value="${2-}"
16
+ [[ -n "$value" ]] || die "$name is required"
17
+ [[ "$value" != *$'\n'* && "$value" != *$'\r'* ]] || die "$name contains a newline"
18
+ }
19
+
20
+ validate_abs_base_path() {
21
+ local name="${1:?missing name}"
22
+ local value="${2-}"
23
+ require_nonempty "$name" "$value"
24
+ [[ "$value" == /* ]] || die "$name must be an absolute path: $value"
25
+ [[ "$value" != "/" && "$value" != "." && "$value" != ".." ]] || die "$name is too broad: $value"
26
+ [[ "$value" != *"/../"* && "$value" != *"/./"* && "$value" != *"//"* ]] || die "$name contains unsafe traversal: $value"
27
+ case "$value" in
28
+ /bin|/boot|/dev|/etc|/home|/lib|/lib64|/opt|/private|/root|/sbin|/srv|/sys|/tmp|/usr|/var)
29
+ die "$name points at a broad system directory: $value"
30
+ ;;
31
+ esac
32
+ }
33
+
34
+ validate_folder_segment() {
35
+ local name="${1:?missing name}"
36
+ local value="${2-}"
37
+ require_nonempty "$name" "$value"
38
+ [[ "$value" != -* ]] || die "$name must not start with '-': $value"
39
+ [[ "$value" != "." && "$value" != ".." ]] || die "$name is unsafe: $value"
40
+ [[ "$value" != */* && "$value" != *\\* ]] || die "$name must be one folder segment: $value"
41
+ [[ "$value" =~ ^[A-Za-z0-9._#@+=:-]+$ ]] || die "$name contains unsupported characters: $value"
42
+ }
43
+
44
+ join_child_path() {
45
+ local base="${1:?missing base}"
46
+ local child="${2:?missing child}"
47
+ printf '%s/%s\n' "${base%/}" "$child"
48
+ }
49
+ ```
50
+
51
+ ## Containment guard
52
+
53
+ ```bash
54
+ canonical_existing_dir() {
55
+ local path_value="${1:?missing path}"
56
+ [[ -d "$path_value" ]] || die "not a directory: $path_value"
57
+ [[ ! -L "$path_value" ]] || die "refusing symlink directory: $path_value"
58
+ (cd -P -- "$path_value" && pwd) || die "cannot resolve directory: $path_value"
59
+ }
60
+
61
+ assert_child_under_parent() {
62
+ local parent="${1:?missing parent}"
63
+ local child="${2:?missing child}"
64
+ [[ "$child" != "$parent" ]] || die "refusing to operate on parent directory itself: $child"
65
+ case "$child" in
66
+ "$parent"/*) ;;
67
+ *) die "path escapes parent: child=$child parent=$parent" ;;
68
+ esac
69
+ }
70
+ ```
71
+
72
+ ## Safer remove wrapper
73
+
74
+ Use a wrapper instead of inline deletion when a path contains variables.
75
+
76
+ ```bash
77
+ safe_rm_rf_dir() {
78
+ local label="${1:?missing label}"
79
+ local target="${2-}"
80
+ local allowed_parent="${3-}"
81
+
82
+ validate_abs_base_path "$label target" "$target"
83
+ validate_abs_base_path "$label allowed parent" "$allowed_parent"
84
+
85
+ [[ -d "$target" ]] || die "$label target is not an existing directory: $target"
86
+ [[ ! -L "$target" ]] || die "$label target is a symlink: $target"
87
+
88
+ local parent_real
89
+ parent_real="$(canonical_existing_dir "$allowed_parent")"
90
+
91
+ local target_real
92
+ target_real="$(canonical_existing_dir "$target")"
93
+
94
+ assert_child_under_parent "$parent_real" "$target_real"
95
+ rm -rf -- "$target_real"
96
+ }
97
+ ```
98
+
99
+ Never call the wrapper with a broad parent such as `/`, `/opt`, `/var`, `/tmp`, or `$HOME`. Use the narrowest app-owned parent.
100
+
101
+ ## Git sync guard checklist
102
+
103
+ - Validate the checkout directory is inside the approved app base.
104
+ - Validate the origin URL or host matches the expected repository.
105
+ - Fetch with bounded timeout and non-interactive credentials.
106
+ - Explicit branch:
107
+ - require the exact remote branch;
108
+ - fail with an actionable message if it is missing.
109
+ - Blank branch:
110
+ - current valid upstream;
111
+ - remote default branch;
112
+ - `main`;
113
+ - `master`.
114
+ - Refuse dirty, local-ahead, or diverged worktrees unless the operator chooses a guided repair command.
115
+ - After sync, verify `git rev-parse HEAD` equals `git rev-parse "origin/<branch>"`.
116
+ - Build or deploy only after the equality check passes.
117
+
118
+ ## Review checklist
119
+
120
+ - Are all path variables checked with `[[ -n "$value" ]]` or a stronger helper before use?
121
+ - Are folder names validated as segments before joining?
122
+ - Is the final path canonicalized or otherwise proven inside the base?
123
+ - Is the destructive command adjacent to its guard?
124
+ - Does the command use quoted expansions and `--` where available?
125
+ - Does the code fail closed for missing explicit branches?
126
+ - Does repair preserve runtime data and keep backups instead of deleting them?
127
+ - Does validation cover empty values, traversal, symlink, wrong origin, dirty checkout, branch with `#`, and missing branch?
@@ -0,0 +1,3 @@
1
+ # vibe-finalize
2
+
3
+ Graduate this project once init and the first prompt are complete. Run `node .vibekit/scripts/vibekit-finalize.mjs . --propose` to preview, then `--write --yes` to move one-time bootstrap files (.vibekit/init/FIRST_TIME_INIT.md, .vibekit/init/FIRST_PROMPT.md, .vibekit/init/PUSH_TO_GITHUB.md, .vibekit/init/CLAUDE-template.md) into `_vibekit-cleanup/` for deletion. It refuses to run on the kit source repo and is reversible with `--restore --write`.
@@ -4,8 +4,8 @@ This file summarizes the improvement loop used to build and maintain the enhance
4
4
 
5
5
  | Experiment | Metric | Result | Kept reason |
6
6
  |---|---:|---|---|
7
- | Baseline review | `node .vbkit-scripts/validate-kit.mjs .` -> `171/0f/0w` | keep | established current kit health before new edits |
8
- | Package manifest coverage | `node .vbkit-scripts/validate-kit.mjs .` -> `215/0f/0w` | keep | validates npm bin targets and shipped `files` entries |
9
- | Codex and CI coverage | `node .vbkit-scripts/validate-kit.mjs .` -> `221/0f/0w` | keep | validates Codex support files and core CI workflow commands |
7
+ | Baseline review | `node .vibekit/scripts/validate-kit.mjs .` -> `171/0f/0w` | keep | established current kit health before new edits |
8
+ | Package manifest coverage | `node .vibekit/scripts/validate-kit.mjs .` -> `215/0f/0w` | keep | validates npm bin targets and shipped `files` entries |
9
+ | Codex and CI coverage | `node .vibekit/scripts/validate-kit.mjs .` -> `221/0f/0w` | keep | validates Codex support files and core CI workflow commands |
10
10
 
11
11
  Final validation results for each run are recorded in `.autoresearch/logs/` and summarized in `results.tsv`.
@@ -17,7 +17,7 @@
17
17
 
18
18
  `meta.template_status` is the durable init flag.
19
19
 
20
- - `uninitialized`: agent must run `FIRST_TIME_INIT.md`.
20
+ - `uninitialized`: agent must run `.vibekit/init/FIRST_TIME_INIT.md`.
21
21
  - `initialized`: agent skips init and proceeds.
22
22
 
23
23
  `.vibekit/INIT_DONE` is a local cache only. It helps prevent same-machine repeat init, but does not need to be committed.
@@ -1,5 +1,17 @@
1
1
  # Install guide
2
2
 
3
+ ## Install from npm
4
+
5
+ ```bash
6
+ # one-shot (recommended) — adds nothing to the project's dependencies:
7
+ npx --yes minimal-vibe-coding-kit@latest install /path/to/project
8
+
9
+ # or, after `npm i -D minimal-vibe-coding-kit` inside the project:
10
+ npx mvck install .
11
+ ```
12
+
13
+ `npm i` alone only places the kit in `node_modules/` and nothing is active yet; `mvck install` (alias: `vibe-kit`) is the step that copies the kit files into the repo root.
14
+
3
15
  ## Local install
4
16
 
5
17
  ```bash
@@ -9,7 +21,7 @@
9
21
  ## Node install
10
22
 
11
23
  ```bash
12
- node .vbkit-scripts/mvck.mjs install /path/to/project --profile all
24
+ node .vibekit/scripts/mvck.mjs install /path/to/project --profile all
13
25
  ```
14
26
 
15
27
  Profiles:
@@ -31,8 +43,8 @@ The installer:
31
43
  Preview without writing:
32
44
 
33
45
  ```bash
34
- node .vbkit-scripts/mvck.mjs install /path/to/project --profile all --dry-run
35
- node .vbkit-scripts/mvck.mjs install /path/to/project --profile all --dry-run --json
46
+ node .vibekit/scripts/mvck.mjs install /path/to/project --profile all --dry-run
47
+ node .vibekit/scripts/mvck.mjs install /path/to/project --profile all --dry-run --json
36
48
  ```
37
49
 
38
50
  ## Update an existing project
@@ -42,12 +54,12 @@ When a newer kit version ships, refresh kit-owned files without touching user-ow
42
54
  ```bash
43
55
  npx --yes minimal-vibe-coding-kit@latest update .
44
56
  # or from a local kit clone:
45
- node /path/to/kit/.vbkit-scripts/mvck.mjs update /path/to/project
57
+ node /path/to/kit/.vibekit/scripts/mvck.mjs update /path/to/project
46
58
  ```
47
59
 
48
60
  The updater:
49
61
 
50
- - refreshes kit-owned surfaces (`skills/`, `.vbkit-commands/`, `.vbkit-scripts/`, `.vbkit-docs/`, and the `.claude/`, `.cursor/`, `.agents/`, `.codex*` mirrors) and adds any new kit skills;
62
+ - refreshes kit-owned surfaces (`.vibekit/skills/`, `.vibekit/commands/`, `.vibekit/scripts/`, `.vibekit/docs/`, and the `.claude/`, `.cursor/`, `.agents/`, `.codex*` mirrors) and adds any new kit skills;
51
63
  - never overwrites `backbone.yml`, `CLAUDE.md`, `AGENTS.md` content outside the managed block, or `settings.json` files — those are seeded only if missing;
52
64
  - backs up every replaced kit file to `.vibekit/update-backup/<timestamp>/` (disable with `--no-backup`);
53
65
  - never deletes files you added, and skips re-seeding one-time files after `mvck finalize`;
@@ -60,30 +72,30 @@ npx --yes minimal-vibe-coding-kit@latest update . --dry-run
60
72
  npx --yes minimal-vibe-coding-kit@latest update . --dry-run --json
61
73
  ```
62
74
 
63
- Note: run the updater from a newer kit (npx or a local clone), not via the project's own `.vbkit-scripts/mvck.mjs` copy — source and target would be the same files.
75
+ Note: run the updater from a newer kit (npx or a local clone), not via the project's own `.vibekit/scripts/mvck.mjs` copy — source and target would be the same files.
64
76
 
65
77
  ## After install
66
78
 
67
- Paste the universal prompt from `FIRST_PROMPT.md`, or run:
79
+ Paste the universal prompt from `.vibekit/init/FIRST_PROMPT.md`, or run:
68
80
 
69
81
  ```bash
70
- node .vbkit-scripts/init-backbone.mjs . --propose
82
+ node .vibekit/scripts/init-backbone.mjs . --propose
71
83
  ```
72
84
 
73
85
  Use a preset when you already know the target stack:
74
86
 
75
87
  ```bash
76
- node .vbkit-scripts/mvck.mjs init . --preset nextjs --propose
77
- node .vbkit-scripts/mvck.mjs init . --preset wordpress --propose
78
- node .vbkit-scripts/mvck.mjs init . --preset python --propose
79
- node .vbkit-scripts/mvck.mjs init . --preset laravel --propose
80
- node .vbkit-scripts/mvck.mjs init . --preset docker --propose
88
+ node .vibekit/scripts/mvck.mjs init . --preset nextjs --propose
89
+ node .vibekit/scripts/mvck.mjs init . --preset wordpress --propose
90
+ node .vibekit/scripts/mvck.mjs init . --preset python --propose
91
+ node .vibekit/scripts/mvck.mjs init . --preset laravel --propose
92
+ node .vibekit/scripts/mvck.mjs init . --preset docker --propose
81
93
  ```
82
94
 
83
95
  Review the proposal. After approval:
84
96
 
85
97
  ```bash
86
- node .vbkit-scripts/init-backbone.mjs . --write --yes
98
+ node .vibekit/scripts/init-backbone.mjs . --write --yes
87
99
  ```
88
100
 
89
101
  ## Doctor
@@ -91,13 +103,13 @@ node .vbkit-scripts/init-backbone.mjs . --write --yes
91
103
  Run a read-only health check after install:
92
104
 
93
105
  ```bash
94
- node .vbkit-scripts/mvck.mjs doctor .
106
+ node .vibekit/scripts/mvck.mjs doctor .
95
107
  ```
96
108
 
97
109
  Generate a handoff report:
98
110
 
99
111
  ```bash
100
- node .vbkit-scripts/mvck.mjs doctor . --write-report
112
+ node .vibekit/scripts/mvck.mjs doctor . --write-report
101
113
  ```
102
114
 
103
115
  ## Native reasoning skills
@@ -14,7 +14,7 @@ The kit follows these design decisions:
14
14
 
15
15
  ```text
16
16
  Goal: improve Minimal Vibe Coding Kit quality.
17
- Metric command: node .vbkit-scripts/validate-kit.mjs .
17
+ Metric command: node .vibekit/scripts/validate-kit.mjs .
18
18
  Direction: higher pass count and zero failures.
19
19
  Editable paths: docs, scripts, skills, commands, .claude, .cursor, .agents, .codex-plugin, .github, root templates.
20
20
  Protected paths: .git, .env*, node_modules, vendor packages, secrets, lockfiles.
@@ -6,7 +6,7 @@ Review these before merging changes:
6
6
 
7
7
  - `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`
8
8
  - `.claude/**`, `.cursor/**`, `.agents/**`, `.codex-plugin/**`
9
- - `skills/**`, `.vbkit-commands/**`, `.vbkit-scripts/**`, `hooks/**`
9
+ - `.vibekit/skills/**`, `.vibekit/commands/**`, `.vibekit/scripts/**`, `hooks/**`
10
10
  - `.mcp.json`, `mcp.json`, `mcp-configs/**`
11
11
  - installer scripts and CI workflows
12
12
 
@@ -15,7 +15,7 @@ Review these before merging changes:
15
15
  Read-only probe:
16
16
 
17
17
  ```bash
18
- node .vbkit-scripts/agentshield-probe.mjs .
18
+ node .vibekit/scripts/agentshield-probe.mjs .
19
19
  ```
20
20
 
21
21
  Full scanner when available:
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Claude Code
4
4
 
5
- Use root `CLAUDE.md` plus project skills in `.claude/skills/`. Keep long instructions out of `CLAUDE.md` and in skills. The kit provides shims that point to canonical shared skills under `skills/`.
5
+ Use root `CLAUDE.md` plus project skills in `.claude/skills/`. Keep long instructions out of `CLAUDE.md` and in skills. The kit provides shims that point to canonical shared skills under `.vibekit/skills/`.
6
6
 
7
7
  ## Cursor
8
8
 
@@ -14,7 +14,7 @@ Use `AGENTS.md` for repo instructions and `.agents/skills/*/SKILL.md` for skills
14
14
 
15
15
  ## Shared skill strategy
16
16
 
17
- Canonical skill bodies live in `skills/<skill-name>/`. Harness-specific folders contain small shims:
17
+ Canonical skill bodies live in `.vibekit/skills/<skill-name>/`. Harness-specific folders contain small shims:
18
18
 
19
19
  - `.claude/skills/<skill-name>/SKILL.md`
20
20
  - `.agents/skills/<skill-name>/SKILL.md`
@@ -43,5 +43,5 @@ Non-obvious things that have surprised people. Save the next agent the debugging
43
43
 
44
44
  ---
45
45
 
46
- Related: `.vbkit-docs/PRD.md` (intent and focus) and `backbone.yml` (project map, commands,
46
+ Related: `.vibekit/docs/PRD.md` (intent and focus) and `backbone.yml` (project map, commands,
47
47
  protected paths). Link `project.context` in `backbone.yml` to this file.
@@ -44,5 +44,5 @@ If existing code: which module, surface, or flow are we improving first, and why
44
44
 
45
45
  ---
46
46
 
47
- Linked context: see `.vbkit-docs/CONTEXT.md` for domain terminology and `backbone.yml`
47
+ Linked context: see `.vibekit/docs/CONTEXT.md` for domain terminology and `backbone.yml`
48
48
  for the project map (`project.mode`, `project.prd`, conventions, commands).
@@ -7,7 +7,7 @@ This file is intentionally small. Shared rules live in `AGENTS.md`, project fact
7
7
  ## Startup
8
8
 
9
9
  1. Read `backbone.yml`.
10
- 2. If `meta.template_status` is `uninitialized`, follow `FIRST_TIME_INIT.md` before other work.
10
+ 2. If `meta.template_status` is `uninitialized`, follow `.vibekit/init/FIRST_TIME_INIT.md` before other work.
11
11
  3. If initialized, follow `backbone.yml` `conventions` and continue with the user's task.
12
12
 
13
13
  ## Useful skills
@@ -16,11 +16,13 @@ This file is intentionally small. Shared rules live in `AGENTS.md`, project fact
16
16
  - `/autoresearch-coding` - run a metric-driven improvement loop.
17
17
  - `/security-scan` - run AgentShield-style review.
18
18
  - `/daily-enhance` - propose rule, skill, and workflow improvements.
19
+ - `/coding-level N` - set explanation depth 0-5; the project default lives in `backbone.yml` `conventions.custom_rules`.
19
20
 
20
21
  ## Hard rules
21
22
 
22
23
  - Show a diff and wait for explicit approval before changing root instruction files, `backbone.yml`, rules, skills, or workflows.
23
24
  - Do not deploy, rotate secrets, run migrations, delete data, or rewrite remote history without explicit approval.
25
+ - Prefer `trash` over `rm` for deletions; permanent deletes need explicit approval of the exact paths (see `.claude/rules/safe-delete.md`).
24
26
  - Keep `.autoresearch/`, `results.tsv`, and `.vibekit/reports/` local unless the user asks to commit them.
25
27
 
26
28
  ## English Learning & Grammar Correction