TL;DR
What It Does
Generates a CLAUDE.md file from your CRAFT project file. CLAUDE.md is the bridge between CRAFT’s infrastructure and Cowork’s native memory system — it gets loaded automatically at session start so the AI has your project identity, personas, cookbooks, priorities, and key files without you pasting anything.
How It Works
The AI reads your project implementation file and extracts the configuration sections: project identity, persona settings, user context, active cookbooks, communication preferences, and current priorities from the latest handoff. It preserves any existing subproject outcomes section across regenerations. The generated CLAUDE.md is validated for structural integrity (no missing sections, no leaked credentials, no template variables left unsubstituted), then committed via git checkpoint.
What To Expect
A validated CLAUDE.md file in 3–5 minutes. The AI reports which sections were generated, whether recipe summaries were included, and the git commit status. If validation fails, the AI retries once automatically.
Best Results When You
Run this after any significant change to your project file — persona updates, cookbook additions, priority shifts, or configuration changes. The “Last synced” date in CLAUDE.md tells you when it was last regenerated. Stale CLAUDE.md means the AI starts sessions with outdated context.
Typical Time
3–5 minutes.
Difficulty
Intermediate — the AI handles generation and validation, but you choose whether to include recipe summaries and how to handle existing CLAUDE.md files (overwrite, append, or cancel).
How To Start
Run this recipe when your CLAUDE.md is out of sync with your project file, or when setting up a new project. The recipe reads your project implementation file and generates a fresh CLAUDE.md.
STEP 1Tell the AI Which Project File to Read
Point the AI to your project implementation file. Optionally enable recipe summaries (adds cookbook quick-reference tables to CLAUDE.md) and control whether the handoff hint is included.
Available parameters
-
project_file
· string · required
Path to your CRAFT project implementation file (e.g., “project/CFT-PROJ-CP-067_USING-CRAFT-W-CLAUDE-COWORK.txt”).
-
include_recipes
· boolean · optional · default: false
Whether to include cookbook recipe summaries in CLAUDE.md. Increases file size but gives the AI recipe awareness without loading full cookbooks.
-
include_handoff_hint
· boolean · optional · default: true
Whether to include a hint directing the AI to read the chat history file for handoff context at session start.
Example invocations
Standard generation
#H->AI::Directive: (Generate CLAUDE.md from project file project/CFT-PROJ-CP-067_USING-CRAFT-W-CLAUDE-COWORK.txt)
With recipe summaries
#H->AI::Directive: (Generate CLAUDE.md from project file project/CFT-PROJ-CP-067_USING-CRAFT-W-CLAUDE-COWORK.txt with include_recipes=true)
Minimal (no handoff hint)
#H->AI::Directive: (Generate CLAUDE.md from project file project/CFT-PROJ-CP-067_USING-CRAFT-W-CLAUDE-COWORK.txt with include_handoff_hint=false)
STEP 2Handle Existing CLAUDE.md
If a CLAUDE.md already exists, the AI presents three options: overwrite with the new CRAFT-generated version, append a CRAFT section to the existing file, or cancel and keep the current file. For new projects, this step is skipped.
STEP 3Review the Generated File
The AI writes CLAUDE.md and runs post-generation validation: checking that all required sections are present, no credentials leaked into the git repository section, no template variables remain unsubstituted, and the recipe count (if included) matches the actual cookbook. If validation fails, the AI retries once automatically. It then commits the file via git checkpoint.
STEP 4Keep CLAUDE.md in Sync
The AI reports the “Last synced” date and recommends re-running this recipe after significant project file changes. CLAUDE.md is auto-loaded by Cowork at session start — a stale file means the AI starts with outdated project context.
Usage Examples
Two scenarios — generating CLAUDE.md for an existing project, and regenerating after a configuration change.
Example 1 · First-time generation for project 067
User:
#H->AI::Directive: (Generate CLAUDE.md from project file project/CFT-PROJ-CP-067_USING-CRAFT-W-CLAUDE-COWORK.txt)
AI:
Reading project file. Extracted 8 sections. Reading latest handoff H050 for current priorities. No existing CLAUDE.md found — generating fresh.
AI:
CLAUDE.md written. Validation: 7/7 checks passed. Sections: Project Identity, CRAFT Framework, Session Initialization, Key Files, Active Cookbooks, Communication Preferences, Current Priorities. Recipe summaries: excluded. Committed via CWK-005: “CLAUDE.md generated — CRAFT project file bridge.”
[CLAUDE.md will auto-load on next session start]
Example 2 · Regenerating after adding a cookbook
User:
I just added CAT-CWK-ADM to the project. Regenerate CLAUDE.md with recipe summaries.
AI:
Reading project file. 3 active cookbooks detected (CORE, COWORK, COWORK ADMIN — 128 recipes total). CLAUDE.md exists — overwrite, append, or cancel?
User:
Overwrite.
AI:
Preserving Recent Subproject Outcomes section from existing file. Generating with include_recipes=true. Written. Validation: 7/7 passed. Recipe count: 128 (matches cookbook). Committed.
[Updated CLAUDE.md now includes recipe quick-reference tables]
How AI Reads This Recipe
When this recipe is triggered, the AI generates a structured CLAUDE.md file that bridges CRAFT project data into Cowork’s native memory. The AI should:
- READ the project implementation file and extract all configuration sections: project identity, persona settings, user context, active cookbooks, communication preferences, and response footer configuration.
- READ the latest handoff from the chat history file to populate current priorities and deferred items.
- PRESERVE the “Recent Subproject Outcomes” section from any existing CLAUDE.md — this section is written by CWK-049 at subproject close and must be spliced forward across regenerations, never regenerated from project-file data.
- ASSEMBLE the CLAUDE.md content following the standard section order, using folder-qualified file paths in the Key Files table.
- CHECK for an existing CLAUDE.md and ask the user how to handle it (overwrite, append, or cancel) before writing.
- WRITE the file and run post-generation validation: verify all required sections are present, no Personal Access Tokens leaked into the git repository section, no unsubstituted template variables remain, recipe count matches the actual cookbook (if included), and the subproject outcomes section was preserved.
- COMMIT via CWK-005 with called_by=“RCP-CWK-007” so the commit message carries the “CLAUDE.md generated” prefix.
The AI should NOT regenerate the “Recent Subproject Outcomes” section from scratch — it must be preserved verbatim from the existing CLAUDE.md or emitted as a stub for new projects. The post-generation validation must check for PAT leakage even if the git repository section was generated from clean data — defense in depth.
When to Use This Recipe
Use this recipe when you:
- Set up a new CRAFT project and need an initial CLAUDE.md.
- Changed your project configuration (personas, cookbooks, communication preferences) and need to sync CLAUDE.md.
- Added or removed cookbooks and want recipe summaries updated.
- Notice the “Last synced” date in CLAUDE.md is stale relative to recent project file changes.
- Want to rebuild CLAUDE.md after a major project milestone that shifted priorities.
Do not use this recipe when:
You just want to edit one line in CLAUDE.md (e.g., fix a typo or update a priority). Edit the file directly instead of regenerating the whole thing — regeneration overwrites manual edits that are not captured in the project file.
Recipe FAQ
Q.What is CLAUDE.md and why does it matter?
CLAUDE.md is a special file that Cowork loads automatically at the start of every session. It gives the AI baseline context about your project — identity, personas, cookbooks, priorities, key files — without you having to paste anything. Think of it as the AI’s memory of who you are and what you are working on.
Q.Will this overwrite my existing CLAUDE.md?
Only if you choose to. The recipe asks before overwriting. You can also choose to append a CRAFT section to an existing file or cancel entirely.
Q.What does the post-generation validation check?
Seven things: the file is not empty, all required sections exist, recipe counts match the cookbook (if included), no Personal Access Tokens leaked into the file, no template variables remain unsubstituted, the subproject outcomes section was preserved, and the response footer fence rule was emitted (if enabled).
Q.How often should I regenerate CLAUDE.md?
After any significant project file change — adding cookbooks, changing personas, updating communication preferences. For routine session work, CLAUDE.md stays current. Check the “Last synced” date at the top of the file.
Q.What happens if validation fails?
The AI retries generation once automatically. If it fails again, it reports the specific failures and asks for manual review. Common failures are template variable leakage (usually a project file parsing issue) and section omissions.
Q.Does CLAUDE.md include my full cookbooks?
No, unless you set include_recipes=true. By default, CLAUDE.md includes cookbook names and categories only. With include_recipes, it adds a quick-reference table of all recipes — useful but increases file size.
Q.What is the “Recent Subproject Outcomes” section?
A FIFO list of the last three completed subprojects, written by CWK-049 when a subproject closes. This recipe preserves it across regenerations — it is never rebuilt from project file data.
Version History
Changes to this recipe over time. Most recent first.
v1.06a
2026-03-20
Subproject awareness. Preserves “Recent Subproject Outcomes” section across regenerations (FIFO top-3, written by CWK-049). Added footer fence rule to emitted Response Footer Directive. Post-generation validation extended with outcomes preservation and fence rule checks.
v1.05a
2026-03-15
Folder-qualified file paths in Key Files table and discovery patterns. Falls back to flat-path scan for pre-migration workspaces.
v1.04a
2026-03-10
Added CWK-051 hook for CLAUDE.md overwrite gate. Non-routine classification. FileWrite summary includes diff of key sections changed.
v1.03a
2026-03-05
Post-generation validation added. Checks structural integrity, recipe count accuracy, PAT leakage, and template variable substitution. Automatic retry on failure.
v1.00a
2026-02-28
Initial release. Extracts project configuration into CLAUDE.md format, includes optional recipe summaries, calls CWK-005 for git checkpoint.