cold-start
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Bootstrap a Memory Bank for a new or existing repository, then route into PRD-driven or brownfield workflows.
14installs
Sourcemrvladd-d/memobank
Added on
NPX Install
npx skill4agent add mrvladd-d/memobank cold-startTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Cold Start: Memory Bank + Agents bootstrap (greenfield & brownfield)
Summary
Note:is the package skill for all-in-one bootstrap. Do not confuse it with the generated project commandcold-start: that command is a lightweight router used after skeleton creation inside a target repo. For modular usage, prefer individual skills:/cold-start(skeleton),mb-init(greenfield),mb-from-prd(brownfield),mb-map-codebase(review),mb-review(implementation),mb-execute(UAT).mb-verify
- What it does: creates the Memory Bank skeleton, writes agent entry points, and routes the repo into the right workflow.
- Use it when: you want one entry point for either a new project with a PRD or an existing codebase that needs mapping first.
- Input: repository root plus either / requirements text or an existing codebase.
prd.md - Output: ,
.memory-bank/,.tasks/, agent entry files, and the next step for greenfield or brownfield work..protocols/
Supported scenarios:
- Greenfield: repo has or requirements text, but no code yet.
prd.md - Brownfield: repo already contains code and needs as-is documentation before change planning.
Non-negotiable principles
1) Orchestrator vs workers
- You (main agent) are the orchestrator. You plan and coordinate.
- Workers (subagents) do the heavy lifting (scanning many files, producing long reports).
- Max depth = 2: orchestrator → subagent. No sub-sub-agents.
2) .tasks/
is runtime memory (НЕ Memory Bank)
.tasks/- Every agent process gets a unique task folder: .
.tasks/TASK-XXX/ - Subagents write detailed outputs there, and return only short summaries to the orchestrator.
3) Avoid conflicts by design
- Split work by non-overlapping file sets.
- If overlap is unavoidable, use git branches/worktrees per agent and merge later.
4) Parallelism limits
- Run up to 5–7 subagents in parallel.
- If your runtime supports multi-tool calls: spawn parallel subagents in a single orchestrator turn.
5) Docs First
After completing any meaningful unit of work:
- Update Memory Bank while context is fresh.
- Then change code / commit.
Output you MUST create/maintain
Repo root
- (canonical, short, ~100 lines)
AGENTS.md - → symlink (or copy) to
CLAUDE.mdAGENTS.md - (optional) → symlink (or copy) to
GEMINI.mdAGENTS.md
Repo folders
- — durable knowledge base
.memory-bank/ - — operational runtime memory
.tasks/ - — file-based protocols (plans / decision logs / resume)
.protocols/
Step 0 — Detect environment (don’t guess)
-
Check what tools you have:
- Codex available? (Codex CLI / MCP tool)
- Claude Code available? (CLI , subagents)
claude - Browser tools? (Playwright / agent-browser / CDP MCP)
-
Decide primary engine:
- If working inside Codex: use for implementation and review (prefer fresh sessions for critical reviews).
gpt-5.2-high - If working inside Claude Code: use subagents for analysis + use Opus for synthesis; optionally call Codex via shell for second opinion or structured review.
- If both Codex and Claude are available (dual-engine): use Claude for wide-context scanning and synthesis, Codex for structured review and implementation. Cross-validate critical outputs (MB compliance, architecture) by running the review step on the other engine. See Step 4 for the hybrid workflow.
- If working inside Codex: use
If you don’t control Codex model selection via UI, create a projectprofile set (see Step 1.5)..codex/config.toml
Step 1 — Bootstrap the skeleton
1.1 Create directories
Create (if missing):
-
.memory-bank/mbb/architecture/guides/adrs/tech-specs/- (optional but recommended)
domains/ - (optional but recommended)
contracts/ - (optional but recommended)
runbooks/ - (optional; can keep
workflows/if you already use it)wfs/ - (optional but recommended)
quality/ testing/skills/epics/features/- (Memory Bank backlog & plans)
tasks/ - (slash-command specs used by humans/agents)
commands/ - (subagent prompt library)
agents/ archive/bugs/
-
.tasks/ -
.protocols/
1.2 Create core files (use the templates)
Use the templates in:
./references/shared-structure-template.md
At minimum you must create:
AGENTS.md- symlink/copy
CLAUDE.md .memory-bank/index.md.memory-bank/mbb/index.md.memory-bank/product.md.memory-bank/requirements.md.memory-bank/testing/index.md.memory-bank/tasks/backlog.md
Also create the command specs under (use ).
.memory-bank/commands/references/commands/*1.2.1 Create native skills (proxy commands)
Create thin proxy skills so commands work natively in each runtime:
- → Claude Code + OpenCode
.claude/skills/<name>/SKILL.md - → Codex CLI + OpenCode
.agents/skills/<name>/SKILL.md
Each proxy just says: .
This makes commands available natively (, , , etc.) in all three tools.
Read and follow the instructions in .memory-bank/commands/<name>.md/mb/prd/executeThe script creates both sets automatically.
init-mb.js1.3 Enforce frontmatter rule
Every markdown file inside must include YAML frontmatter with at least:
.memory-bank/description: ...status: draft|active|deprecated|archived
1.4 Create .tasks/
protocol
.tasks/Create a task folder for this run (pick a new id):
.tasks/TASK-MB-INIT/
Inside it, create:
- — what you will do + which subagents
TASK-MB-INIT-S-00-orchestrator-plan.md
1.5 Optional: Codex profile presets
If Codex is used, create with profiles:
.codex/config.toml- default: coding (gpt-5.2, high)
- profile : review (gpt-5.2, xhigh)
deep-review
(If your repo is shared, consider keeping it local or documenting it in .)
.memory-bank/runbooks/Step 2 — Choose scenario
Decision rule
- If repo has substantial code (,
src/,package.json,go.mod, etc.) → Brownfield (Step 3B).Cargo.toml - If repo is mostly empty and you have → Greenfield (Step 3A).
prd.md - If both exist: treat as Brownfield + PRD delta (Step 3B).
- If repo is empty/new and no → Skeleton-only (Step 3C).
prd.md
Record the scenario in:
.tasks/TASK-MB-INIT/TASK-MB-INIT-S-00-orchestrator-plan.md
Step 3A — Greenfield workflow (PRD → Memory Bank)
3A.1 Read PRD and do Deep Questioning
- Read .
prd.md - If gaps exist, run deep questioning in rounds (3–5 questions each). Use .
./references/shared-deep-questioning.md - If PRD mentions “use skills/tools/CLIs” — run first (project-installed → marketplace).
/find-skills
If user is temporarily unavailable (“запуск и ушёл”):
- Record in
Open questions..protocols/PRD-BOOTSTRAP/decision-log.md - Stop and wait (do not invent facts; do not proceed to EP/FT/backlog generation without answers).
If the user explicitly wants autonomous mode:
- record non-blocking gaps as
Assumptions - halt only on blocking gaps (security/compliance/external contract/data-loss risks)
- after L1–L3 + review gate, continue with
/autonomous
3A.2 Write product brief (L1)
Update using user’s wording.
.memory-bank/product.md3A.3 Requirements + RTM
Update :
.memory-bank/requirements.md- REQ-IDs
- RTM table mapping REQ → Epic → Feature → Test
3A.4 Create epics and features
Create:
.memory-bank/epics/EP-001-<slug>.md.memory-bank/features/FT-001-<slug>.md
Each feature MUST include:
- use cases
- acceptance criteria
- failure modes / edge cases
- test strategy pointers
Status policy:
- Default EP/FT frontmatter to until
status: draftare resolved.Open questions - Promote to only when acceptance criteria + verification plan are stable.
status: active
3A.5 Tasks planning (per-feature, no “everything at once”)
Do not generate a full task backlog for all features in one pass.
Instead:
- Create/refresh as a skeleton (waves + placeholders).
.memory-bank/tasks/backlog.md - For each selected feature, run to produce:
/prd-to-tasks FT-<NNN>.memory-bank/tasks/plans/IMPL-FT-<NNN>.md- atomic items grouped by waves in
TASK-*backlog.md
3A.6 Identify key concepts and create duo docs
For every non-trivial concept, create a duo:
- (WHAT/WHY)
.memory-bank/architecture/<concept>.md - (HOW)
.memory-bank/guides/<concept>.md
3A.7 Update index
Update with annotated links to all created docs.
.memory-bank/index.mdStep 3B — Brownfield workflow (Repo → Memory Bank)
3B.1 Spawn repo-scanning subagents (parallel)
Create a new task folder:
.tasks/TASK-MB-MAP/
Spawn up to 5 subagents in parallel with non-overlapping scopes:
- : build/tooling (package managers, scripts, CI)
S-01 - : backend/services
S-02 - : frontend/UI
S-03 - : data layer (DB, migrations, schema)
S-04 - : tests + quality gates
S-05
Each subagent MUST:
- verify its file glob targets exist ("smart calling")
- write a detailed report into using naming:
.tasks/TASK-MB-MAP/TASK-MB-MAP-S-0X-final-report-<code|docs>-YY.md - return a 5–10 line summary + file list
Use as baseline prompt, but scope it.
./agents/shared-repo-scanner.md3B.2 Synthesize Memory Bank from reports
Using the reports, fill:
.tasks/TASK-MB-MAP/- — what the system is today
.memory-bank/product.md - — C4 L1–L3 overview + key invariants
.memory-bank/architecture/ - — setup, dev, test, deploy
.memory-bank/runbooks/ - — API/event contracts
.memory-bank/contracts/ - — canonical gates + verification notes
.memory-bank/testing/index.md - — annotated links
.memory-bank/index.md
PRD-less rule (non-negotiable): if there is no, you MUST NOT create or populate:prd.md
.memory-bank/epics/*.memory-bank/features/* with waves/tasks.memory-bank/tasks/backlog.mdEmpty skeleton files/folders are allowed if they were created by bootstrap.Repo mapping is as-is documentation, not roadmap planning. If something cannot be derived from code/logs/tests, record it as a hypothesis or an open question.
3B.3 Ask user for PRD delta
After baseline MB exists:
- ask the user for describing what to change/add
prd.md - run and
/prdstyle decomposition against the existing baseline/prd-to-tasks
Step 3C — Skeleton-only workflow (no PRD, no code)
When the repo is new/empty and no is available:
prd.md3C.1 Create skeleton only
Run Step 1 as usual — create all directories, core files from templates, , symlink.
AGENTS.mdCLAUDE.mdThe skeleton provides a ready-to-fill structure: , , , etc. remain as draft stubs.
product.mdrequirements.mdbacklog.md3C.2 Ask for PRD
After skeleton is created, ask the user to provide a PRD:
"Memory Bank skeleton created. To fill it with product details, epics, features, and a backlog, please provide afile (or paste requirements text). You can do this now or later — runprd.mdwhen ready."/prd
3C.3 Wait or proceed
- If user provides PRD now → continue to Step 3A (Greenfield workflow).
- If user defers → stop here. The skeleton is valid and usable. The user can invoke or
$mb-from-prdlater to fill the Memory Bank./prd - If user provides partial info → run deep questioning () to extract enough for product.md, then stop and wait for full PRD.
./references/shared-deep-questioning.md
Note: The skeleton-only state is a valid stopping point.+AGENTS.md+ MBB rules are enough for agents to start navigating the repo..memory-bank/index.md
Step 4 — Hybrid mode (Claude ↔ Codex)
If you’re in Claude Code but want Codex quality or long-horizon autonomy:
- Use Claude subagents to produce the scan reports into .
.tasks/TASK-MB-MAP/ - Call Codex via shell to synthesize Memory Bank:
bash
codex exec --ephemeral --full-auto -m gpt-5.2-high \
'Read .tasks/TASK-MB-MAP and build/refresh .memory-bank per MBB. Keep AGENTS.md short. Produce a summary and run a self-review.'- Then run a Codex deep review profile (or a fresh Claude session) for 5-expert review.
Step 5 — Multi-expert review loop (fresh context)
Run fresh-context reviewers (do not reuse the writer context):
- Architect (C4 + dependencies)
- Scope analyst (REQ → Epic → Feature → Task coverage)
- MBB compliance reviewer (frontmatter, links, atomics, duo)
- Plan reviewer (backlog quality, waves, gates)
- Security reviewer (auth, sensitive data, OWASP risks)
- Code quality reviewer (conditional: if code exists — quality gates, conventions, hotspots)
Use prompts in and .
./agents/shared-review-*.md./agents/shared-mb-reviewer.mdRules:
- If any reviewer returns REJECT → fix MB and repeat review.
- Persist reviewer reports into .
.tasks/TASK-MB-REVIEW/
Step 6 — Start executing tasks
After review gate passes (APPROVE):
- Pick the highest-priority task from .
.memory-bank/tasks/backlog.md - Run for the task (plan → implement → quality gates → MB-SYNC).
mb-execute - Run to check acceptance criteria and record evidence.
mb-verify - Repeat until the wave is complete or user stops.
If the intended mode is unattended end-to-end:
- do not stay in manual loop here
- switch to generated project command
/autonomous
Iformb-executeare not installed, follow their SKILL.md manually.mb-verify
Definition of done
You are done when:
- exists, short, points to
AGENTS.md..memory-bank/index.md - is a symlink/copy of
CLAUDE.md.AGENTS.md - contains at minimum: index + MBB + product + testing (requirements/backlog can remain as stubs until PRD exists).
.memory-bank/ - contains scan/review artifacts with naming + stage ids.
.tasks/ - Greenfield: epics/features/backlog created from PRD.
- Brownfield: repo mapped as-is into MB and user asked for PRD delta (no roadmap entities invented without PRD).
- Skeleton-only: skeleton created, user asked for PRD (valid stopping point).
- Multi-expert review passes (APPROVE) — for Greenfield/Brownfield; skip for Skeleton-only.
- Execution loop is available (mb-execute + mb-verify reachable or documented).
- Autonomous loop is available (+
/autonomousdocumented)./autopilot
References in this skill
./references/shared-structure-template.md./references/shared-deep-questioning.md./agents/shared-repo-scanner.md./agents/shared-mb-reviewer.md./agents/shared-review-architect.md./agents/shared-review-scope.md./agents/shared-review-code.md./agents/shared-review-plan.md./agents/shared-review-security.md- (optional helper)
./scripts/shared-init-mb.js