Skip to content

Commit fc99475

Browse files
committed
feat: update prompts right before tests
1 parent ce22044 commit fc99475

33 files changed

Lines changed: 1309 additions & 1055 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ The install script also works as an upgrade path: `curl -L shellbrain.ai/upgrade
7676

7777
## How to Use ShellBrain
7878

79-
Use Shellbrain Session Start in your agent of choice. Then, just work normally.
79+
Use Shellbrain in your agent of choice. Then, just work normally.
8080

81-
**Claude Code:** *Use `/shellbrain-session-start` to get up to speed in this repo and record durable evidence-backed learnings.*
81+
**Claude Code:** *Use `/shellbrain` to remember Shellbrain recall at the right task boundaries.*
8282

83-
**Codex:** *Use $shellbrain-session-start to get up to speed in this repo and record durable evidence-backed learnings.*
83+
**Codex:** *Use $shellbrain to remember Shellbrain recall at the right task boundaries.*
8484

85-
**Cursor:** *Use `/shellbrain-session-start` to get up to speed in this repo and record durable evidence-backed learnings.*
85+
**Cursor:** *Use `/shellbrain` to remember Shellbrain recall at the right task boundaries.*
8686

8787
---
8888

‎app/core/use_cases/retrieval/build_context/execute.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ def _deterministic_brief(
263263
if item.get("orientation") or item.get("name") or item.get("ref")
264264
],
265265
"anchors": _anchors(memory_sections=memory_sections, concept_items=concept_items),
266+
"conflicts": [],
266267
"gaps": [],
268+
"next_checks": [],
267269
"sources": [
268270
{
269271
"kind": item["source_kind"],
@@ -286,7 +288,9 @@ def _no_context_brief() -> dict[str, Any]:
286288
"prior_cases": [],
287289
"concept_orientation": [],
288290
"anchors": [],
291+
"conflicts": [],
289292
"gaps": ["Shellbrain has no relevant memories or concepts for this query."],
293+
"next_checks": [],
290294
"sources": [],
291295
}
292296

@@ -304,7 +308,9 @@ def _normalize_provider_brief(
304308
"prior_cases": _string_list(brief.get("prior_cases")),
305309
"concept_orientation": _string_list(brief.get("concept_orientation")),
306310
"anchors": _string_list(brief.get("anchors")),
311+
"conflicts": _string_list(brief.get("conflicts")),
307312
"gaps": _string_list(brief.get("gaps")),
313+
"next_checks": _string_list(brief.get("next_checks")),
308314
"sources": brief.get("sources")
309315
if isinstance(brief.get("sources"), list)
310316
else deterministic_sources,

‎app/infrastructure/host_apps/assets/claude.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from app.infrastructure.host_apps.assets.managed_tree import (
1010
install_asset_tree,
1111
is_shellbrain_managed_asset,
12+
remove_managed_asset_tree,
1213
)
1314
from app.infrastructure.host_apps.assets.packaged_assets import (
1415
load_packaged_text,
@@ -21,8 +22,9 @@
2122
install_claude_hook,
2223
)
2324

24-
PRIMARY_CLAUDE_SKILL_NAME = "shellbrain-session-start"
25-
CLAUDE_SKILL_NAMES = ("shellbrain-session-start", "shellbrain-usage-review")
25+
PRIMARY_CLAUDE_SKILL_NAME = "shellbrain"
26+
CLAUDE_SKILL_NAMES = ("shellbrain", "shellbrain-usage-review")
27+
LEGACY_CLAUDE_SKILL_NAMES = ("shellbrain-session-start",)
2628
CLAUDE_STARTUP_MARKER = "shellbrain-managed:claude-startup"
2729

2830

@@ -58,6 +60,11 @@ def install_claude_assets(
5860
),
5961
)
6062
)
63+
for skill_name in LEGACY_CLAUDE_SKILL_NAMES:
64+
remove_managed_asset_tree(
65+
target_root=claude_root / "skills" / skill_name,
66+
asset_kind="claude_skill",
67+
)
6168
settings_path = install_claude_hook(
6269
settings_path=default_global_claude_settings_path(),
6370
**(

‎app/infrastructure/host_apps/assets/codex.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
from app.infrastructure.host_apps.assets.managed_tree import (
1010
install_asset_tree,
1111
is_shellbrain_managed_asset,
12+
remove_managed_asset_tree,
1213
)
1314
from app.infrastructure.host_apps.assets.packaged_assets import (
1415
load_packaged_text,
1516
packaged_asset_root,
1617
)
1718
from app.infrastructure.host_apps.assets.paths import default_codex_home
1819

19-
PRIMARY_CODEX_SKILL_NAME = "shellbrain-session-start"
20-
CODEX_SKILL_NAMES = ("shellbrain-session-start", "shellbrain-usage-review")
20+
PRIMARY_CODEX_SKILL_NAME = "shellbrain"
21+
CODEX_SKILL_NAMES = ("shellbrain", "shellbrain-usage-review")
22+
LEGACY_CODEX_SKILL_NAMES = ("shellbrain-session-start",)
2123
CODEX_STARTUP_MARKER = "shellbrain-managed:codex-startup"
2224

2325

@@ -52,6 +54,11 @@ def install_codex_assets(*, force: bool, render_install_status) -> list[str]:
5254
),
5355
)
5456
)
57+
for skill_name in LEGACY_CODEX_SKILL_NAMES:
58+
remove_managed_asset_tree(
59+
target_root=skills_root / skill_name,
60+
asset_kind="codex_skill",
61+
)
5562
return lines
5663

5764

‎app/infrastructure/host_apps/assets/cursor.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
from app.infrastructure.host_apps.assets.managed_tree import (
1010
install_asset_tree,
1111
is_shellbrain_managed_asset,
12+
remove_managed_asset_tree,
1213
)
1314
from app.infrastructure.host_apps.assets.packaged_assets import packaged_asset_root
1415
from app.infrastructure.host_apps.assets.paths import default_cursor_home
1516

16-
PRIMARY_CURSOR_SKILL_NAME = "shellbrain-session-start"
17-
CURSOR_SKILL_NAMES = ("shellbrain-session-start", "shellbrain-usage-review")
17+
PRIMARY_CURSOR_SKILL_NAME = "shellbrain"
18+
CURSOR_SKILL_NAMES = ("shellbrain", "shellbrain-usage-review")
19+
LEGACY_CURSOR_SKILL_NAMES = ("shellbrain-session-start",)
1820

1921

2022
def install_cursor_assets(
@@ -38,6 +40,11 @@ def install_cursor_assets(
3840
),
3941
)
4042
)
43+
for skill_name in LEGACY_CURSOR_SKILL_NAMES:
44+
remove_managed_asset_tree(
45+
target_root=cursor_root / "skills" / skill_name,
46+
asset_kind="cursor_skill",
47+
)
4148
lines.append(
4249
render_install_status(
4350
"Cursor statusline",

‎app/infrastructure/host_apps/assets/managed_tree.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ def is_shellbrain_managed_asset(*, target_root: Path, asset_kind: str) -> bool:
7676
)
7777

7878

79+
def remove_managed_asset_tree(*, target_root: Path, asset_kind: str) -> bool:
80+
"""Remove one managed asset tree and leave unmanaged paths untouched."""
81+
82+
if not target_root.exists():
83+
return False
84+
if not is_shellbrain_managed_asset(target_root=target_root, asset_kind=asset_kind):
85+
return False
86+
remove_existing_path(target_root)
87+
return True
88+
89+
7990
def remove_existing_path(path: Path) -> None:
8091
"""Remove one filesystem path whether it is a file or directory."""
8192

0 commit comments

Comments
 (0)