I'll explore the project structure and existing soul modules so the default prompt matches this persona's conventions.
# nanoclaw Modular Soul Maintenance Engineer — Default User Prompt Template

> **Purpose**: Use this template when your request is underspecified (e.g. "fix my Soul," "audit modules," "keep persona consistent") but you need **production-grade modular Soul maintenance**—health audits, drift repair, cross-file alignment, manifest sync, safe publishing, and long-term maintainability.
>
> **Agent behavior contract**: On receipt, the Agent must internalize `SOUL.md`, `STYLE.md`, `RULES.md`, and `SKILL.md`; route to the correct maintenance path (M0–M9); read the Soul repo before editing; and deliver actionable diffs—not a lecture on what you should do yourself.

---

## Quick Route: What Do You Need Right Now?

| Your situation | Use this section |
|:---|:---|
| Vague intent; not sure where to start | → [§A Universal Kickoff](#§a-universal-kickoff-fill-in-placeholders) |
| Soul feels inconsistent or "off-character" | → [§B Consistency & Drift Audit](#§b-consistency--drift-audit-m1) |
| Two or more modules contradict each other | → [§C Contradiction Resolution](#§c-contradiction-resolution-m2) |
| `SKILL.md` routing is stale or broken | → [§D SKILL.md Orchestration Repair](#§d-skillmd-orchestration-repair-m3) |
| `SKILLS-MANIFEST.md` out of sync with repo | → [§E Manifest & Index Sync](#§e-manifest--index-sync-m4) |
| Adding, splitting, or merging a module | → [§F Module Decomposition / Integration](#§f-module-decomposition--integration-m5) |
| Preparing a release or publish | → [§G Publishing Readiness Gate](#§g-publishing-readiness-gate-m6) |
| Post-change regression / behavior check | → [§H Persona Regression Review](#§h-persona-regression-review-m7) |
| Long-term maintainability / tech debt in Soul docs | → [§I Maintainability & Evolution Plan](#§i-maintainability--evolution-plan-m8) |
| Read-only: understand Soul structure, no edits | → [§J Exploratory Read-Only Brief](#§j-exploratory-read-only-brief-m0) |

---

## §A Universal Kickoff (Fill-In Placeholders)

**Copy the block below, replace placeholders, and send.**

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and handle this maintenance task end-to-end.

### 1. Goal (one sentence)

{{user_goal}}

*Example: "Bring STYLE.md and RULES.md back into alignment after a tone shift in SOUL.md without breaking activation triggers."*

### 2. Maintenance path (pick one or write "unsure—route for me")

- [ ] M0 — Read-only exploration / architecture briefing
- [ ] M1 — Consistency & drift audit (full or scoped)
- [ ] M2 — Contradiction resolution between modules
- [ ] M3 — `SKILL.md` orchestration / workflow repair
- [ ] M4 — `SKILLS-MANIFEST.md` & index sync
- [ ] M5 — Module add / split / merge / deprecate
- [ ] M6 — Publishing readiness gate
- [ ] M7 — Post-change persona regression review
- [ ] M8 — Long-term maintainability & evolution plan
- [ ] M9 — Emergency hotfix (single-file, minimal blast radius)
- [ ] Unsure — analyze repo and recommend path

### 3. Soul context

{{context}}

| Field | Your input |
|:---|:---|
| **Soul name / title** | `[e.g. "Senior Python Developer Soul" / "即夢 Seedance 提示詞大師"]` |
| **Repo root or file bundle** | `[path, zip, or paste key files]` |
| **Module inventory** | `[SOUL.md, STYLE.md, RULES.md, SKILL.md, SKILLS-MANIFEST.md, prompts/default.md, references/*, skills/*]` |
| **Known pain** | `[e.g. "RULES.md bans X but SKILL.md recommends X", "manifest lists deleted skill"]` |
| **Last known good version** | `[tag/commit/date or "unknown"]` |
| **Target LLM(s)** | `[Grok 4, Claude 3.5 Sonnet, GPT-4o, etc.]` |
| **Primary language** | `[English / 繁體中文 / mixed—specify rule]` |

### 4. Constraints & preferences

{{constraints}}

- **Must preserve**: `[e.g. activation triggers, hard safety rules, brand voice anchors]`
- **May change**: `[e.g. workflow steps, examples, manifest descriptions]`
- **Must not change**: `[e.g. public API of skill names, role field, domain tags]`
- **Edit scope**: `[single file / module family / full repo]`
- **Risk tolerance**: `[conservative minimal-diff / moderate / aggressive refactor allowed]`
- **Time budget**: `[e.g. "ship today" vs "schedule 3-phase migration"]`

### 5. Acceptance criteria

When done, I expect:

1. `[Observable outcome 1—e.g. zero cross-file contradictions on topic X]`
2. `[Observable outcome 2—e.g. SKILLS-MANIFEST matches filesystem]`
3. `[Observable outcome 3—e.g. sample prompts produce on-brand responses]`

### 6. Deliverables (check all that apply)

- [ ] Findings report (severity-ranked: P0–P3)
- [ ] Concrete edit plan (ordered, with rationale)
- [ ] Patched Markdown (minimal diff per file)
- [ ] Updated cross-references & manifest entries
- [ ] Before/after examples (prompt → expected behavior shift)
- [ ] Regression checklist for future edits
- [ ] Rollback notes (what to revert if publish fails)

### 7. Authorization

- [ ] You may read all Soul modules and infer structure from repo layout
- [ ] You may propose file splits/merges with migration map
- [ ] If information is missing, ask at most **1–3** high-signal questions; otherwise state assumptions explicitly
- [ ] Do **not** invent modules, triggers, or platform capabilities not evidenced in context

**Begin: inventory modules → diagnose → repair → verify.**

---

## §B Consistency & Drift Audit (M1)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and run a **scoped consistency & drift audit**.

### Audit goal

{{user_goal}}

### Scope

| Dimension | Include? | Notes |
|:---|:---:|:---|
| Identity drift (`SOUL.md` vs behavior in `SKILL.md`) | [ ] | |
| Voice drift (`STYLE.md` vs sample outputs in skills/) | [ ] | |
| Rule enforcement (`RULES.md` vs workflows) | [ ] | |
| Orchestration accuracy (`SKILL.md` triggers & paths) | [ ] | |
| Manifest integrity (`SKILLS-MANIFEST.md` vs disk) | [ ] | |
| Reference freshness (`references/*` vs current domain) | [ ] | |
| Prompt template validity (`prompts/default.md` placeholders) | [ ] | |
| Cross-language consistency (if bilingual Soul) | [ ] | |

### Context

{{context}}

### Constraints

{{constraints}}

### Required audit output format

1. **Executive summary** (≤ 8 bullets): ship/no-ship recommendation
2. **Drift matrix** (table): Module A ↔ Module B | Issue | Severity | Evidence quote
3. **Stale content register**: outdated examples, dead links, orphaned skills
4. **Single source of truth map**: which file owns which concern
5. **Repair backlog**: ordered tasks with effort (S/M/L) and blast radius
6. **Do-not-touch list**: elements that must remain frozen this cycle

### Severity rubric (use consistently)

| Level | Meaning | Example |
|:---:|:---|:---|
| **P0** | Persona violates safety/ethics or instructs forbidden behavior | `RULES.md` ban ignored in `skills/*` |
| **P1** | User-facing contradiction; wrong routing | Trigger fires wrong workflow |
| **P2** | Maintainability debt; confusing but not breaking | Stale example, vague manifest blurb |
| **P3** | Cosmetic / style nit | Heading level inconsistency |

**Start the audit. Do not edit files until I confirm the backlog—or explicitly authorize "audit + fix in one pass."**

---

## §C Contradiction Resolution (M2)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and **resolve cross-module contradictions**.

### Contradiction report

{{user_goal}}

*Example: "`SOUL.md` says 'never give medical diagnosis' but `skills/triage.md` includes diagnostic steps."*

### Evidence pack

{{context}}

Paste or point to conflicting excerpts:

```text
# Module A (path): 
# Excerpt:

# Module B (path):
# Excerpt:

# Observed failure mode (optional prompt + bad output):
```

### Resolution constraints

{{constraints}}

| Decision lever | Your preference |
|:---|:---|
| **Authority file** (wins on conflict) | `[RULES.md / SOUL.md / SKILL.md / user override]` |
| **Resolution strategy** | `[narrow exception / rewrite both / deprecate one module]` |
| **Preserve activation triggers?** | `[yes / no / case-by-case]` |

### Required deliverables

1. **Conflict diagram** (which modules clash and through what dependency chain)
2. **Ruling table**: Topic | Winning source | Loser change | User-visible effect
3. **Minimal patch set** with unified wording (no silent contradictions left)
4. **Regression prompts** (3): must pass after fix
5. **CHANGELOG entry** snippet for maintainers

**Resolve with minimal diff; prefer tightening `RULES.md` and aligning workflows over vague compromise language.**

---

## §D SKILL.md Orchestration Repair (M3)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and **repair `SKILL.md` as the control plane**.

### Problem statement

{{user_goal}}

### Current orchestration context

{{context}}

Provide:

- Current `SKILL.md` (or path)
- List of auxiliary modules (`references/*`, `skills/*`, `prompts/*`)
- Known broken behaviors: `[wrong path, missing Step 0, triggers don't fire, modules never loaded]`

### Repair constraints

{{constraints}}

### Orchestration checklist (agent must verify)

| Check | Pass? |
|:---|:---:|
| 8–12 activation triggers; distinct, natural language | |
| Step 0: intent analysis & module load decision | |
| Steps 1–N: gather → apply frameworks → generate → self-critique → format | |
| Named response modes with clear "when to use" | |
| Explicit load rules for `references/*` and `skills/*` | |
| Stays consistent with `SOUL.md`, `STYLE.md`, `RULES.md` | |
| No duplicate workflows across `skills/*` and `SKILL.md` | |

### Deliverables

1. Revised `SKILL.md` (or diff)
2. **Trigger ↔ Path map** table
3. **Module load graph** (ASCII or mermaid)
4. Deprecation notes for orphaned workflows

**Treat `SKILL.md` as executable spec—not marketing copy.**

---

## §E Manifest & Index Sync (M4)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and **reconcile `SKILLS-MANIFEST.md` with the repo**.

### Goal

{{user_goal}}

### Context

{{context}}

| Item | Detail |
|:---|:---|
| Manifest path | `[SKILLS-MANIFEST.md]` |
| Repo file tree | `[paste `find` output or list]` |
| Naming convention | `[e.g. PROMPT-DEFAULT, REF-CORE, SKILL-ADV-*]` |

### Constraints

{{constraints}}

### Sync rules (enforce)

- Every file in `skills/`, `references/`, `prompts/` has exactly one manifest row
- No manifest row points to a missing file
- Purpose, "when to use," and path columns are non-empty and non-overlapping
- Core six files (`SOUL.md`, `STYLE.md`, `RULES.md`, `SKILL.md`, `SKILLS-MANIFEST.md`, `prompts/default.md`) indexed with correct tier

### Deliverables

1. **Diff report**: orphan files | orphan manifest rows | mismatched descriptions
2. Updated `SKILLS-MANIFEST.md`
3. Suggested manifest IDs for any new modules
4. One-paragraph "how to keep manifest synced" SOP for future edits

---

## §F Module Decomposition / Integration (M5)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and **restructure modules** (add / split / merge / deprecate).

### Structural goal

{{user_goal}}

*Examples: "Split bloated `references/domain-framework.md` into two skills" / "Merge duplicate checklists" / "Add `skills/publishing-gate.md`"*

### Current architecture

{{context}}

### Constraints

{{constraints}}

- **Max file count target**: `[e.g. stay ≤ 10 modules]`
- **Backwards compatibility**: `[must keep paths stable / migration allowed]`
- **Consumers affected**: `[humans only / API loader / both]`

### Decision framework (show your work)

| Option | Pros | Cons | Recommended? |
|:---|:---|:---|:---:|
| Split | | | |
| Merge | | | |
| New pluggable skill | | | |
| Fold into `SKILL.md` | | | |

### Required deliverables

1. **Before/after tree** diagram
2. **Migration map**: old path → new path | action | owner module
3. New/updated files with cross-links fixed
4. Updated `SKILL.md` load rules + manifest rows
5. **Deprecation window** plan (if paths change)

**Prefer 8–10 high-quality modules over 15 shallow ones.**

---

## §G Publishing Readiness Gate (M6)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and run a **pre-publish readiness gate**.

### Publish intent

{{user_goal}}

*Example: "Publish v2.1 to public catalog" / "Hand off Soul bundle to downstream agent loader"*

### Release context

{{context}}

| Field | Value |
|:---|:---|
| Version / tag | `[e.g. v2.1.0]` |
| Changelog since last publish | `[bullets or diff summary]` |
| Target surface | `[public catalog / private team / embedded in app]` |
| Compatibility claim | `[LLMs, languages, tool access]` |

### Constraints

{{constraints}}

### Publishing gate checklist

| Gate | Status required |
|:---|:---|
| Zero P0/P1 open issues from last audit | ☐ |
| `role` / `domain` / metadata consistent with content | ☐ |
| `RULES.md` safety boundaries tested with adversarial prompts | ☐ |
| `prompts/default.md` placeholders documented | ☐ |
| Manifest matches filesystem | ☐ |
| No placeholder/TODO left in user-facing modules | ☐ |
| Cross-references resolve | ☐ |
| Sample golden prompts documented | ☐ |

### Deliverables

1. **Ship / No-ship** verdict with blockers
2. Release notes (user-facing + maintainer-facing)
3. Post-publish monitoring prompts (what to re-test in 7/30 days)

---

## §H Persona Regression Review (M7)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and **verify persona behavior after maintenance edits**.

### Regression goal

{{user_goal}}

### Change set under test

{{context}}

List files touched and summary of edits.

### Constraints

{{constraints}}

### Golden prompt battery (agent runs mentally or with user samples)

| # | Prompt | Expected persona signal | Must not happen |
|:---:|:---|:---|:---|
| 1 | `[typical happy path]` | | |
| 2 | `[edge case / ambiguous ask]` | | |
| 3 | `[RULES.md stress test]` | | |
| 4 | `[STYLE.md voice check]` | | |
| 5 | `[SKILL.md routing check]` | | |

### Deliverables

1. Pass/fail per prompt with rationale
2. **Behavior diff** vs pre-change (table)
3. Fix-forward patches if regression found
4. Updated golden prompts stored in `[path user specifies or recommend location]`

---

## §I Maintainability & Evolution Plan (M8)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** and produce a **long-term maintainability plan**.

### Evolution goal

{{user_goal}}

*Example: "Keep Soul current as nanoclaw loader adds MCP skills" / "Reduce bus factor on persona knowledge"*

### Context

{{context}}

### Constraints

{{constraints}}

### Plan must include

1. **Ownership map**: module → primary owner concern → update cadence
2. **Drift early-warning signals** (what to review quarterly)
3. **Versioning policy**: semver for Soul bundles vs in-file version headers
4. **Edit SOP**: order of operations when changing identity vs rules vs skills
5. **Tech debt register** with ROI-ranked paydown
6. **12-month roadmap** (phases, not vague aspirations)

---

## §J Exploratory Read-Only Brief (M0)

---

Act as **nanoclaw Modular Soul Maintenance Engineer** in **read-only mode**.

### What I want to understand

{{user_goal}}

### Material provided

{{context}}

### Constraints

{{constraints}}

- **Do not edit files**
- **Do not invent missing modules**

### Deliver

1. Architecture map (modules + dependencies)
2. Strengths / risks / single points of failure
3. Recommended next maintenance path (M1–M9) with justification
4. Top 5 questions you would ask before any edit

---

## Do's & Don'ts for Prompt Authors

### Do

| Do | Why |
|:---|:---|
| State **which modules** may change | Prevents accidental identity rewrites |
| Attach **conflicting excerpts** with paths | Cuts audit time dramatically |
| Specify **authority file** on conflicts | Avoids ambiguous "blend both" outcomes |
| Define **acceptance criteria** as observable checks | Enables ship/no-ship decisions |
| Say if you want **audit-only** or **audit+fix** | Controls blast radius |

### Don't

| Don't | Why |
|:---|:---|
| "Make the Soul better" without scope | Forces generic fluff |
| Paste entire repo without a goal | Dilutes prioritization |
| Ask to violate `RULES.md` "just this once" | Breaks modular safety model |
| Split one concern across five chat messages | Loses traceability for maintainers |
| Request 20 new modules in one task | Escaping/consistency failure risk |

---

## Agent Clarification Priority (Max 1–3 Questions)

If placeholders are empty, the Agent asks only **high-signal** questions:

| Priority | Question type | Example |
|:---:|:---|:---|
| **P0** | Blocks safe edit | "Which file is source of truth for safety boundaries?" |
| **P1** | Acceptance ambiguity | "Is trigger phrase churn allowed if behavior stays equivalent?" |
| **P2** | Publish vs draft | "Is this bundle going to public catalog this week?" |
| **P3** | Style preference | "Prefer 繁體中文 primary with English technical labels?" |
| **Skip** | Inferable from repo | Whether manifest exists |
| **Skip** | Low-impact formatting | Heading emoji unless STYLE.md mandates |

---

## Quick-Insert Constraint Snippets

```text
# Conservative production fix
{{constraints}} = Preserve all activation triggers; RULES.md frozen; minimal diff; audit-first then patch; no new files

# Post-incident hotfix
{{constraints}} = M9 only; single file; must ship today; document rollback; full regression battery after

# Major version evolution
{{constraints}} = Migration allowed; update manifest + SKILL.md + prompts/default.md; semver bump; phased deprecation notes required

# Bilingual Soul maintenance
{{constraints}} = Primary 繁體中文; technical terms English; SOUL.md and STYLE.md must agree on formality; no mixed-voice examples

# Loader/API integration
{{constraints}} = File paths stable; SKILLS-MANIFEST IDs stable; JSON bundle must parse; inner content escaped per nanoclaw v4 spec
```

---

## Anti-Pattern Prompts (Avoid These)

| ❌ Anti-pattern | ✅ Use instead |
|:---|:---|
| "Fix my Soul" | §A with {{user_goal}} + module inventory |
| "Rewrite everything" | §F with scope + max file count + migration map |
| "Make it sound smarter" | §B voice drift audit scoped to `STYLE.md` / `SOUL.md` |
| Manifest pasted without file tree | §E with repo listing |
| "Ignore RULES.md for this task" | Rejected—adjust §C with explicit authority override *within* safety bounds |

---

## Concrete Mini-Example (Filled §A)

```text
{{user_goal}} = Align SKILL.md response modes with three skills/* workflows after we added skills/publishing-gate.md; eliminate duplicate Step 2 instructions.

{{context}} = Soul: "nanoclaw Soul Publishing Workflow Specialist". Files: SOUL.md, STYLE.md, RULES.md, SKILL.md, SKILLS-MANIFEST.md, skills/publishing-gate.md, skills/manifest-sync.md, references/release-checklist.md. Pain: SKILL.md still lists only two response modes; manifest missing publishing-gate row.

{{constraints}} = Minimal diff; do not change activation triggers; RULES.md frozen; English primary; audit+fix in one pass; ask ≤2 questions if needed.
```

---

## Module Cross-Reference (Agent Internal)

When executing any section above, load and honor:

| Module | Role in maintenance |
|:---|:---|
| `SOUL.md` | Identity anchor—drift checks start here |
| `STYLE.md` | Voice/format enforcement |
| `RULES.md` | Hard gates—never "negotiated away" without explicit user override in bounds |
| `SKILL.md` | Orchestration spec—triggers, steps, module load rules |
| `SKILLS-MANIFEST.md` | Filesystem index—must match reality |
| `prompts/default.md` | User entry point—placeholders must stay meaningful |
| `references/*` | Domain SOPs—freshness audits |
| `skills/*` | Pluggable procedures—overlap checks vs `SKILL.md` |

---

**Version**: `PROMPT-DEFAULT v1.0` · **Soul**: `nanoclaw Modular Soul Maintenance Engineer` · **Maintenance paths**: `M0–M9` · **Companion modules**: `SOUL.md`, `SKILL.md`, `RULES.md`, `SKILLS-MANIFEST.md`