Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions mureo/_data/skills/learn/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: learn
description: "Save a marketing diagnosis insight to the pro-diagnosis knowledge base so it is applied in future operations across all platforms. Use when the user runs /learn, explicitly teaches the agent a marketing insight, corrects the agent's analysis, or asks to remember/record an operational learning for next time."
metadata:
version: 0.7.1
---

# Learn

> PREREQUISITE: Read `../_mureo-shared/SKILL.md` for auth, security rules, output format, and **Tool Selection** (Read/Write on Code, `mureo_strategy_*` / `mureo_state_*` MCP on Desktop / Cowork).

Save a marketing diagnosis insight to the pro-diagnosis knowledge base
(`../_mureo-pro-diagnosis/SKILL.md`). Saved insights are loaded at the
start of future sessions and applied across `/daily-check`, `/rescue`,
`/budget-rebalance`, and the other diagnostic workflows.

## When to use

- The user runs `/learn` followed by an insight, e.g.:
- `/learn CV少ないサイトではマイクロCVを活用すべき`
- `/learn 予算5000円/日で広告グループ8個は多すぎる`
- `/learn Target CPA を下げすぎると逆に CV が減る`
- The user runs `/learn` with no argument — review the current
conversation for corrections or marketing expertise the user shared
and propose those as insights.

## Steps

1. **Identify the insight.** If the user passed an insight as the
argument, use it. Otherwise review the current conversation for
moments where the user corrected the agent's analysis or supplied
marketing expertise, and select the most reusable one(s).

2. **Locate the knowledge base.** The target is the sibling skill file
`../_mureo-pro-diagnosis/SKILL.md` (relative to this skill, i.e.
`~/.claude/skills/_mureo-pro-diagnosis/SKILL.md` for an installed
user). If it already exists, read it first to avoid duplicate or
conflicting entries. If it does **not** exist (it is not shipped — it
grows per account), create the directory and seed the file with this
minimal scaffold before appending:

```markdown
---
name: _mureo-pro-diagnosis
description: "Professional marketing diagnostic frameworks: expert-level campaign analysis that grows with your experience."
metadata:
version: 0.1.0
---

# Pro Diagnosis — Account Knowledge Base

Insights learned from operating this account, applied by every mureo
diagnostic workflow.

## Learned Insights
```

3. **Structure the insight** using this template:

```markdown
### [Short descriptive title]

**Situation:** [When this insight applies]
**Wrong assumption:** [What an inexperienced agent might think]
**Correct approach:** [The right way to handle this situation]
**Why:** [The reasoning behind the correct approach]

Date learned: YYYY-MM-DD
```

4. **Present for approval.** Show the formatted insight to the user and
ask for explicit confirmation before writing anything. Capture the
generalized lesson only — never record account IDs, credentials,
access tokens, or personal data in the knowledge base.

5. **Save.** Append the approved insight under the `## Learned Insights`
section of `../_mureo-pro-diagnosis/SKILL.md` (creating the file from
the scaffold in step 2 first if it was absent). Append only — never
rewrite or reorder existing entries.

6. **Confirm.** Tell the user the insight was saved and that it will be
applied in future `/daily-check`, `/rescue`, `/budget-rebalance`, and
other diagnostic workflows.

IMPORTANT: Always save to `../_mureo-pro-diagnosis/SKILL.md`, never to
Claude Code memory. The skill file persists across sessions and is read
by all mureo diagnostic workflows; Claude memory is not.
87 changes: 87 additions & 0 deletions skills/learn/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: learn
description: "Save a marketing diagnosis insight to the pro-diagnosis knowledge base so it is applied in future operations across all platforms. Use when the user runs /learn, explicitly teaches the agent a marketing insight, corrects the agent's analysis, or asks to remember/record an operational learning for next time."
metadata:
version: 0.7.1
---

# Learn

> PREREQUISITE: Read `../_mureo-shared/SKILL.md` for auth, security rules, output format, and **Tool Selection** (Read/Write on Code, `mureo_strategy_*` / `mureo_state_*` MCP on Desktop / Cowork).

Save a marketing diagnosis insight to the pro-diagnosis knowledge base
(`../_mureo-pro-diagnosis/SKILL.md`). Saved insights are loaded at the
start of future sessions and applied across `/daily-check`, `/rescue`,
`/budget-rebalance`, and the other diagnostic workflows.

## When to use

- The user runs `/learn` followed by an insight, e.g.:
- `/learn CV少ないサイトではマイクロCVを活用すべき`
- `/learn 予算5000円/日で広告グループ8個は多すぎる`
- `/learn Target CPA を下げすぎると逆に CV が減る`
- The user runs `/learn` with no argument — review the current
conversation for corrections or marketing expertise the user shared
and propose those as insights.

## Steps

1. **Identify the insight.** If the user passed an insight as the
argument, use it. Otherwise review the current conversation for
moments where the user corrected the agent's analysis or supplied
marketing expertise, and select the most reusable one(s).

2. **Locate the knowledge base.** The target is the sibling skill file
`../_mureo-pro-diagnosis/SKILL.md` (relative to this skill, i.e.
`~/.claude/skills/_mureo-pro-diagnosis/SKILL.md` for an installed
user). If it already exists, read it first to avoid duplicate or
conflicting entries. If it does **not** exist (it is not shipped — it
grows per account), create the directory and seed the file with this
minimal scaffold before appending:

```markdown
---
name: _mureo-pro-diagnosis
description: "Professional marketing diagnostic frameworks: expert-level campaign analysis that grows with your experience."
metadata:
version: 0.1.0
---

# Pro Diagnosis — Account Knowledge Base

Insights learned from operating this account, applied by every mureo
diagnostic workflow.

## Learned Insights
```

3. **Structure the insight** using this template:

```markdown
### [Short descriptive title]

**Situation:** [When this insight applies]
**Wrong assumption:** [What an inexperienced agent might think]
**Correct approach:** [The right way to handle this situation]
**Why:** [The reasoning behind the correct approach]

Date learned: YYYY-MM-DD
```

4. **Present for approval.** Show the formatted insight to the user and
ask for explicit confirmation before writing anything. Capture the
generalized lesson only — never record account IDs, credentials,
access tokens, or personal data in the knowledge base.

5. **Save.** Append the approved insight under the `## Learned Insights`
section of `../_mureo-pro-diagnosis/SKILL.md` (creating the file from
the scaffold in step 2 first if it was absent). Append only — never
rewrite or reorder existing entries.

6. **Confirm.** Tell the user the insight was saved and that it will be
applied in future `/daily-check`, `/rescue`, `/budget-rebalance`, and
other diagnostic workflows.

IMPORTANT: Always save to `../_mureo-pro-diagnosis/SKILL.md`, never to
Claude Code memory. The skill file persists across sessions and is read
by all mureo diagnostic workflows; Claude memory is not.
4 changes: 2 additions & 2 deletions tests/core/skills/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _reset_discovery_cache() -> Any:


# ---------------------------------------------------------------------------
# Case 1 — built-in scan finds the 16 in-tree skills (integration)
# Case 1 — built-in scan finds the in-tree skills (integration)
# ---------------------------------------------------------------------------


Expand All @@ -129,7 +129,7 @@ def _no_entry_points(group: str) -> tuple[Any, ...]:

assert len(entries) >= 1, "built-in scan must yield at least one skill"
names = {e.name for e in entries}
# daily-check is one of the 16 known built-ins.
# daily-check is one of the known built-ins.
assert "daily-check" in names, f"expected daily-check among built-ins; got {names}"


Expand Down
2 changes: 1 addition & 1 deletion tests/core/skills/test_existing_skills_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

These tests guard the contract that the parser (P1-08) accepts every
SKILL.md currently shipped at the repository root under ``skills/``.
None of the 16 in-tree files declare a ``capabilities`` block in
None of the in-tree files declare a ``capabilities`` block in
Phase 1, so every parsed entry must report empty capability frozensets.
This sentinel catches accidental drift if someone adds ``capabilities``
without going through the dedicated migration PR (planner tracks this
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli_setup_cmd_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def _make_skill_dir(parent: Path, name: str, content: str = "skill body") -> Pat
"creative-refresh",
"daily-check",
"goal-review",
"learn",
"onboard",
"rescue",
"search-term-cleanup",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_setup_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Number of skills shipped in mureo/_data/skills/. Update this constant
# whenever a skill is added or removed from the packaged set.
EXPECTED_PACKAGED_SKILLS = 15
EXPECTED_PACKAGED_SKILLS = 16


@pytest.mark.unit
Expand All @@ -40,6 +40,7 @@ def test_install_skills(tmp_path: Path) -> None:
assert dest == tmp_path / "skills"
# Operational skills (formerly slash commands)
assert (dest / "daily-check" / "SKILL.md").exists()
assert (dest / "learn" / "SKILL.md").exists()
assert (dest / "onboard" / "SKILL.md").exists()
assert (dest / "rescue" / "SKILL.md").exists()
# Foundation skills (referenced as PREREQUISITE by the operational ones)
Expand Down