elliot-stack 1.0.36 β†’ 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE +21 -21
  2. package/bin/install.cjs +981 -981
  3. package/hooks/repo-search-nudge.js +32 -32
  4. package/package.json +1 -1
  5. package/skills/estack-active-learning-tutor/SKILL.md +339 -339
  6. package/skills/estack-better-title/SKILL.md +64 -64
  7. package/skills/estack-better-title/scripts/rename.sh +55 -55
  8. package/skills/estack-chris-voss/SKILL.md +80 -80
  9. package/skills/estack-chris-voss/references/elliot-notes.md +120 -120
  10. package/skills/estack-chris-voss/references/voss-principles.md +210 -210
  11. package/skills/estack-customer-discovery/SKILL.md +60 -60
  12. package/skills/estack-flight-planner/SKILL.md +332 -332
  13. package/skills/estack-flight-planner/references/config_schema.md +156 -156
  14. package/skills/estack-flight-planner/references/flight_history_schema.md +97 -97
  15. package/skills/estack-flight-planner/references/shuttle_schedules.md +98 -98
  16. package/skills/estack-flight-planner/scripts/check_setup.sh +89 -89
  17. package/skills/estack-flight-planner/scripts/fetch_flights.py +99 -99
  18. package/skills/estack-flight-planner/scripts/filter_flights.py +265 -265
  19. package/skills/estack-flight-planner/scripts/pair_shuttles.py +173 -173
  20. package/skills/estack-github-issue-tracker/SKILL.md +322 -322
  21. package/skills/estack-github-issue-tracker/bin/tracker-tools.cjs +1358 -1358
  22. package/skills/estack-github-issue-tracker/references/gh-cli-patterns.md +124 -124
  23. package/skills/estack-github-issue-tracker/references/result-file-schema.md +156 -156
  24. package/skills/estack-github-issue-tracker/references/tracker-schema.md +96 -96
  25. package/skills/estack-github-issue-tracker/tracker-template.md +58 -58
  26. package/skills/estack-leadership-coach/SKILL.md +1 -1
  27. package/skills/estack-leadership-coach/adding-references.md +1 -1
  28. package/skills/estack-migrate-claude-session-history/SKILL.md +15 -2
  29. package/skills/estack-pdf-to-md/SKILL.md +1 -2
  30. package/skills/estack-prompt-builder-coach/SKILL.md +81 -81
  31. package/skills/estack-prompt-builder-coach/definition-of-done-generator.md +42 -42
  32. package/skills/estack-prompt-builder-coach/prompt-builder.md +37 -37
  33. package/skills/estack-prompt-builder-coach/task-shaper.md +36 -36
  34. package/skills/estack-prompt-builder-coach/vague-ask-auditor.md +37 -37
  35. package/skills/estack-read-claude-session-history/SKILL.md +228 -204
  36. package/skills/estack-read-claude-session-history/references/jsonl-schema.md +126 -126
  37. package/skills/estack-read-claude-session-history/references/modes.md +455 -423
  38. package/skills/estack-read-claude-session-history/references/recipes.md +300 -271
  39. package/skills/estack-read-claude-session-history/scripts/lib/__init__.py +1 -1
  40. package/skills/estack-read-claude-session-history/scripts/lib/parser.py +460 -460
  41. package/skills/estack-read-claude-session-history/scripts/lib/paths.py +234 -234
  42. package/skills/estack-read-claude-session-history/scripts/lib/search.py +179 -179
  43. package/skills/estack-read-claude-session-history/scripts/lib/subagents.py +88 -88
  44. package/skills/estack-read-claude-session-history/scripts/lib/tools.py +144 -144
  45. package/skills/estack-read-claude-session-history/scripts/read_transcript.py +1914 -1776
  46. package/skills/estack-read-claude-session-history/scripts/tests/conftest.py +40 -40
  47. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/README.md +20 -20
  48. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/all-noise.jsonl +4 -4
  49. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/basic-session.jsonl +2 -2
  50. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-gaps.jsonl +9 -9
  51. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-noise.jsonl +7 -7
  52. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-a.jsonl +3 -3
  53. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-b.jsonl +3 -3
  54. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-waiting.jsonl +5 -5
  55. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/interrupted.jsonl +2 -2
  56. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/multi-compact.jsonl +8 -8
  57. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/pending-user.jsonl +2 -2
  58. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta/subagents/agent-aaa.jsonl +2 -2
  59. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta.jsonl +2 -2
  60. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.jsonl +2 -2
  61. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.meta.json +1 -1
  62. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent.jsonl +4 -4
  63. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/time-spread.jsonl +6 -6
  64. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/timeline-day-test.jsonl +5 -5
  65. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-usage-parent/subagents/agent-sub1.jsonl +3 -0
  66. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-usage-parent.jsonl +3 -0
  67. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-zoo.jsonl +10 -10
  68. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/truncated.jsonl +2 -2
  69. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/unicode.jsonl +2 -2
  70. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-advisor.jsonl +3 -3
  71. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-compact.jsonl +5 -5
  72. package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-thinking.jsonl +2 -2
  73. package/skills/estack-read-claude-session-history/scripts/tests/test_backup_roots.py +56 -56
  74. package/skills/estack-read-claude-session-history/scripts/tests/test_engagement.py +239 -239
  75. package/skills/estack-read-claude-session-history/scripts/tests/test_json_format.py +201 -201
  76. package/skills/estack-read-claude-session-history/scripts/tests/test_modes.py +323 -199
  77. package/skills/estack-read-claude-session-history/scripts/tests/test_parser.py +195 -195
  78. package/skills/estack-read-claude-session-history/scripts/tests/test_paths.py +133 -133
  79. package/skills/estack-read-claude-session-history/scripts/tests/test_search.py +78 -78
  80. package/skills/estack-read-claude-session-history/scripts/tests/test_subagents.py +43 -43
  81. package/skills/estack-read-claude-session-history/scripts/tests/test_timeline.py +179 -179
  82. package/skills/estack-read-claude-session-history/scripts/tests/test_timezone_and_project.py +212 -212
  83. package/skills/estack-read-claude-session-history/scripts/tests/test_tools.py +80 -80
@@ -1,40 +1,40 @@
1
- """Shared pytest fixtures and import-path setup."""
2
-
3
- from __future__ import annotations
4
-
5
- import sys
6
- from pathlib import Path
7
-
8
- import pytest
9
-
10
-
11
- # Ensure UTF-8 output regardless of console code page (Windows)
12
- if sys.stdout.encoding and sys.stdout.encoding.lower() != "utf-8":
13
- try:
14
- sys.stdout.reconfigure(encoding="utf-8", errors="replace")
15
- except (AttributeError, OSError):
16
- pass
17
-
18
-
19
- THIS_DIR = Path(__file__).resolve().parent
20
- SCRIPTS_DIR = THIS_DIR.parent
21
- FIXTURES_DIR = THIS_DIR / "fixtures"
22
-
23
- # Make `from lib...` work in tests
24
- if str(SCRIPTS_DIR) not in sys.path:
25
- sys.path.insert(0, str(SCRIPTS_DIR))
26
-
27
-
28
- @pytest.fixture
29
- def fixtures_dir() -> Path:
30
- return FIXTURES_DIR
31
-
32
-
33
- @pytest.fixture
34
- def scripts_dir() -> Path:
35
- return SCRIPTS_DIR
36
-
37
-
38
- @pytest.fixture
39
- def cli_path() -> Path:
40
- return SCRIPTS_DIR / "read_transcript.py"
1
+ """Shared pytest fixtures and import-path setup."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+ from pathlib import Path
7
+
8
+ import pytest
9
+
10
+
11
+ # Ensure UTF-8 output regardless of console code page (Windows)
12
+ if sys.stdout.encoding and sys.stdout.encoding.lower() != "utf-8":
13
+ try:
14
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
15
+ except (AttributeError, OSError):
16
+ pass
17
+
18
+
19
+ THIS_DIR = Path(__file__).resolve().parent
20
+ SCRIPTS_DIR = THIS_DIR.parent
21
+ FIXTURES_DIR = THIS_DIR / "fixtures"
22
+
23
+ # Make `from lib...` work in tests
24
+ if str(SCRIPTS_DIR) not in sys.path:
25
+ sys.path.insert(0, str(SCRIPTS_DIR))
26
+
27
+
28
+ @pytest.fixture
29
+ def fixtures_dir() -> Path:
30
+ return FIXTURES_DIR
31
+
32
+
33
+ @pytest.fixture
34
+ def scripts_dir() -> Path:
35
+ return SCRIPTS_DIR
36
+
37
+
38
+ @pytest.fixture
39
+ def cli_path() -> Path:
40
+ return SCRIPTS_DIR / "read_transcript.py"
@@ -1,20 +1,20 @@
1
- # Test fixtures
2
-
3
- Hand-crafted minimal JSONL files, one scenario per file. Keep them small (≀50 lines) β€” they're easier to reason about than real session snapshots and don't carry PII.
4
-
5
- | File | Purpose |
6
- |---|---|
7
- | `basic-session.jsonl` | One user + one assistant exchange. Sanity check for the parser. |
8
- | `with-compact.jsonl` | Conversation interrupted by a single `/compact` marker. |
9
- | `multi-compact.jsonl` | Two `/compact` markers β€” exercises "most recent" logic. |
10
- | `with-advisor.jsonl` | Contains an `advisor_tool_result` block. |
11
- | `with-thinking.jsonl` | Contains a `thinking` block plus normal text. |
12
- | `all-noise.jsonl` | Only `ai-title` + `attachment` entries β€” should look empty to signal queries. |
13
- | `subagent-parent.jsonl` | Parent session that spawns one subagent via the `Agent` tool. |
14
- | `subagent-no-meta.jsonl` | Parent session with a sibling subagent file but no `.meta.json` sidecar β€” `load_meta` must fall back. |
15
- | `tool-zoo.jsonl` | One call to each of Bash, Read, Edit, Write, Agent, Skill, Glob, Grep. |
16
- | `time-spread.jsonl` | Six messages over a known time range β€” exercises `--since`/`--until`. |
17
- | `truncated.jsonl` | Final line is missing its newline AND is malformed JSON β€” should be dropped silently. |
18
- | `unicode.jsonl` | Contains emoji + CJK characters β€” exercises UTF-8 decoding. |
19
- | `pending-user.jsonl` | Last assistant message ends with `?` β€” `infer_status` should return `pending-user`. |
20
- | `interrupted.jsonl` | Final assistant message has a `tool_use` block with no matching `tool_result` β€” status `interrupted`. |
1
+ # Test fixtures
2
+
3
+ Hand-crafted minimal JSONL files, one scenario per file. Keep them small (≀50 lines) β€” they're easier to reason about than real session snapshots and don't carry PII.
4
+
5
+ | File | Purpose |
6
+ |---|---|
7
+ | `basic-session.jsonl` | One user + one assistant exchange. Sanity check for the parser. |
8
+ | `with-compact.jsonl` | Conversation interrupted by a single `/compact` marker. |
9
+ | `multi-compact.jsonl` | Two `/compact` markers β€” exercises "most recent" logic. |
10
+ | `with-advisor.jsonl` | Contains an `advisor_tool_result` block. |
11
+ | `with-thinking.jsonl` | Contains a `thinking` block plus normal text. |
12
+ | `all-noise.jsonl` | Only `ai-title` + `attachment` entries β€” should look empty to signal queries. |
13
+ | `subagent-parent.jsonl` | Parent session that spawns one subagent via the `Agent` tool. |
14
+ | `subagent-no-meta.jsonl` | Parent session with a sibling subagent file but no `.meta.json` sidecar β€” `load_meta` must fall back. |
15
+ | `tool-zoo.jsonl` | One call to each of Bash, Read, Edit, Write, Agent, Skill, Glob, Grep. |
16
+ | `time-spread.jsonl` | Six messages over a known time range β€” exercises `--since`/`--until`. |
17
+ | `truncated.jsonl` | Final line is missing its newline AND is malformed JSON β€” should be dropped silently. |
18
+ | `unicode.jsonl` | Contains emoji + CJK characters β€” exercises UTF-8 decoding. |
19
+ | `pending-user.jsonl` | Last assistant message ends with `?` β€” `infer_status` should return `pending-user`. |
20
+ | `interrupted.jsonl` | Final assistant message has a `tool_use` block with no matching `tool_result` β€” status `interrupted`. |
@@ -1,4 +1,4 @@
1
- {"type":"ai-title","aiTitle":"Test session"}
2
- {"type":"attachment","data":{"path":"foo.png"}}
3
- {"type":"permission-mode","mode":"plan"}
4
- {"type":"file-history-snapshot","content":{"file":"bar.py"}}
1
+ {"type":"ai-title","aiTitle":"Test session"}
2
+ {"type":"attachment","data":{"path":"foo.png"}}
3
+ {"type":"permission-mode","mode":"plan"}
4
+ {"type":"file-history-snapshot","content":{"file":"bar.py"}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello Claude"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Hi there. Here is help."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello Claude"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Hi there. Here is help."}]}}
@@ -1,9 +1,9 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Start the analysis"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:01:00Z","message":{"role":"assistant","content":[{"type":"text","text":"On it."}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:05:00Z","message":{"role":"user","content":"Looks good, continue"}}
4
- {"type":"assistant","timestamp":"2026-05-01T10:06:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Done with phase 1."}]}}
5
- {"type":"user","timestamp":"2026-05-01T10:08:00Z","message":{"role":"user","content":"Next phase"}}
6
- {"type":"assistant","timestamp":"2026-05-01T10:09:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Phase 2 complete."}]}}
7
- {"type":"user","timestamp":"2026-05-01T10:40:00Z","message":{"role":"user","content":"Back from a break, keep going"}}
8
- {"type":"assistant","timestamp":"2026-05-01T10:41:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Resumed."}]}}
9
- {"type":"user","timestamp":"2026-05-01T10:45:00Z","message":{"role":"user","content":"Wrap it up"}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Start the analysis"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:01:00Z","message":{"role":"assistant","content":[{"type":"text","text":"On it."}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:05:00Z","message":{"role":"user","content":"Looks good, continue"}}
4
+ {"type":"assistant","timestamp":"2026-05-01T10:06:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Done with phase 1."}]}}
5
+ {"type":"user","timestamp":"2026-05-01T10:08:00Z","message":{"role":"user","content":"Next phase"}}
6
+ {"type":"assistant","timestamp":"2026-05-01T10:09:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Phase 2 complete."}]}}
7
+ {"type":"user","timestamp":"2026-05-01T10:40:00Z","message":{"role":"user","content":"Back from a break, keep going"}}
8
+ {"type":"assistant","timestamp":"2026-05-01T10:41:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Resumed."}]}}
9
+ {"type":"user","timestamp":"2026-05-01T10:45:00Z","message":{"role":"user","content":"Wrap it up"}}
@@ -1,7 +1,7 @@
1
- {"type":"user","timestamp":"2026-05-01T09:00:00Z","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"SessionStart hook output β€” not a human action"}]}}
2
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Summary: we were doing things."}}
3
- {"type":"user","timestamp":"2026-05-01T10:01:00Z","message":{"role":"user","content":"Real prompt one"}}
4
- {"type":"assistant","timestamp":"2026-05-01T10:02:00Z","message":{"role":"assistant","content":[{"type":"tool_use","name":"Read","input":{"file_path":"x"},"id":"t9"}]}}
5
- {"type":"user","timestamp":"2026-05-01T10:03:00Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"t9","content":"file contents"}]}}
6
- {"type":"user","timestamp":"2026-05-01T10:05:00Z","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"Skill expansion injected text"}]}}
7
- {"type":"user","timestamp":"2026-05-01T10:06:00Z","message":{"role":"user","content":"Real prompt two"}}
1
+ {"type":"user","timestamp":"2026-05-01T09:00:00Z","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"SessionStart hook output β€” not a human action"}]}}
2
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Summary: we were doing things."}}
3
+ {"type":"user","timestamp":"2026-05-01T10:01:00Z","message":{"role":"user","content":"Real prompt one"}}
4
+ {"type":"assistant","timestamp":"2026-05-01T10:02:00Z","message":{"role":"assistant","content":[{"type":"tool_use","name":"Read","input":{"file_path":"x"},"id":"t9"}]}}
5
+ {"type":"user","timestamp":"2026-05-01T10:03:00Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"t9","content":"file contents"}]}}
6
+ {"type":"user","timestamp":"2026-05-01T10:05:00Z","isMeta":true,"message":{"role":"user","content":[{"type":"text","text":"Skill expansion injected text"}]}}
7
+ {"type":"user","timestamp":"2026-05-01T10:06:00Z","message":{"role":"user","content":"Real prompt two"}}
@@ -1,3 +1,3 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Chat A start"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:01:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working in A."}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:30:00Z","message":{"role":"user","content":"Chat A follow-up"}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Chat A start"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:01:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working in A."}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:30:00Z","message":{"role":"user","content":"Chat A follow-up"}}
@@ -1,3 +1,3 @@
1
- {"type":"user","timestamp":"2026-05-01T10:10:00Z","message":{"role":"user","content":"Chat B start"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:11:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working in B."}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:20:00Z","message":{"role":"user","content":"Chat B follow-up"}}
1
+ {"type":"user","timestamp":"2026-05-01T10:10:00Z","message":{"role":"user","content":"Chat B start"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:11:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working in B."}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:20:00Z","message":{"role":"user","content":"Chat B follow-up"}}
@@ -1,5 +1,5 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run the long migration"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:02:00Z","message":{"role":"assistant","content":[{"type":"tool_use","name":"Bash","input":{"command":"migrate"},"id":"t1"}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:15:00Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"t1","content":"step 1 done"}]}}
4
- {"type":"assistant","timestamp":"2026-05-01T10:30:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Migration finished."}]}}
5
- {"type":"user","timestamp":"2026-05-01T10:32:00Z","message":{"role":"user","content":"Great, now verify it"}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run the long migration"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:02:00Z","message":{"role":"assistant","content":[{"type":"tool_use","name":"Bash","input":{"command":"migrate"},"id":"t1"}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:15:00Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"t1","content":"step 1 done"}]}}
4
+ {"type":"assistant","timestamp":"2026-05-01T10:30:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Migration finished."}]}}
5
+ {"type":"user","timestamp":"2026-05-01T10:32:00Z","message":{"role":"user","content":"Great, now verify it"}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run a tool"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Running."},{"type":"tool_use","id":"toolu_999","name":"Bash","input":{"command":"sleep 999"}}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run a tool"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Running."},{"type":"tool_use","id":"toolu_999","name":"Bash","input":{"command":"sleep 999"}}]}}
@@ -1,8 +1,8 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"First"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R1"}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:30:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Round 1"}}
4
- {"type":"user","timestamp":"2026-05-01T11:00:00Z","message":{"role":"user","content":"Mid"}}
5
- {"type":"assistant","timestamp":"2026-05-01T11:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R2"}]}}
6
- {"type":"user","timestamp":"2026-05-01T11:30:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Round 2"}}
7
- {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"Last"}}
8
- {"type":"assistant","timestamp":"2026-05-01T12:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R3"}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"First"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R1"}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:30:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Round 1"}}
4
+ {"type":"user","timestamp":"2026-05-01T11:00:00Z","message":{"role":"user","content":"Mid"}}
5
+ {"type":"assistant","timestamp":"2026-05-01T11:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R2"}]}}
6
+ {"type":"user","timestamp":"2026-05-01T11:30:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Round 2"}}
7
+ {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"Last"}}
8
+ {"type":"assistant","timestamp":"2026-05-01T12:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"R3"}]}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Sure, do you want me to A, B, or C?"}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Sure, do you want me to A, B, or C?"}]}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:10Z","message":{"role":"user","content":"Do thing"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:20Z","message":{"role":"assistant","content":[{"type":"text","text":"Done."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:10Z","message":{"role":"user","content":"Do thing"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:20Z","message":{"role":"assistant","content":[{"type":"text","text":"Done."}]}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run an agent"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Agent ran."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run an agent"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Agent ran."}]}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:10Z","message":{"role":"user","content":"Find the bug in foo.py"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:20Z","message":{"role":"assistant","content":[{"type":"text","text":"Found it: foo.py line 42 β€” off-by-one in loop bound."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:10Z","message":{"role":"user","content":"Find the bug in foo.py"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:20Z","message":{"role":"assistant","content":[{"type":"text","text":"Found it: foo.py line 42 β€” off-by-one in loop bound."}]}}
@@ -1 +1 @@
1
- {"agentType": "Explore", "description": "Find the bug in foo.py"}
1
+ {"agentType": "Explore", "description": "Find the bug in foo.py"}
@@ -1,4 +1,4 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Investigate the bug"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"toolu_01abc","name":"Agent","input":{"description":"Find the bug","prompt":"Look at file X","subagent_type":"Explore"}}]}}
3
- {"type":"user","timestamp":"2026-05-01T10:00:30Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_01abc","content":"Found it in foo.py:42"}]}}
4
- {"type":"assistant","timestamp":"2026-05-01T10:00:35Z","message":{"role":"assistant","content":[{"type":"text","text":"Got the report, patching foo.py."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Investigate the bug"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"toolu_01abc","name":"Agent","input":{"description":"Find the bug","prompt":"Look at file X","subagent_type":"Explore"}}]}}
3
+ {"type":"user","timestamp":"2026-05-01T10:00:30Z","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_01abc","content":"Found it in foo.py:42"}]}}
4
+ {"type":"assistant","timestamp":"2026-05-01T10:00:35Z","message":{"role":"assistant","content":[{"type":"text","text":"Got the report, patching foo.py."}]}}
@@ -1,6 +1,6 @@
1
- {"type":"user","timestamp":"2026-04-15T08:00:00Z","message":{"role":"user","content":"Apr 15 morning"}}
2
- {"type":"assistant","timestamp":"2026-04-15T08:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Apr 15 reply"}]}}
3
- {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"May 1 noon"}}
4
- {"type":"assistant","timestamp":"2026-05-01T12:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"May 1 reply"}]}}
5
- {"type":"user","timestamp":"2026-05-15T20:00:00Z","message":{"role":"user","content":"May 15 evening"}}
6
- {"type":"assistant","timestamp":"2026-05-15T20:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"May 15 reply"}]}}
1
+ {"type":"user","timestamp":"2026-04-15T08:00:00Z","message":{"role":"user","content":"Apr 15 morning"}}
2
+ {"type":"assistant","timestamp":"2026-04-15T08:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Apr 15 reply"}]}}
3
+ {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"May 1 noon"}}
4
+ {"type":"assistant","timestamp":"2026-05-01T12:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"May 1 reply"}]}}
5
+ {"type":"user","timestamp":"2026-05-15T20:00:00Z","message":{"role":"user","content":"May 15 evening"}}
6
+ {"type":"assistant","timestamp":"2026-05-15T20:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"May 15 reply"}]}}
@@ -1,5 +1,5 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Start the CRM cleanup"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:05:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working on it."}]}}
3
- {"type":"assistant","timestamp":"2026-05-01T10:08:00Z","message":{"role":"assistant","content":[{"type":"text","text":"First pass done."}]}}
4
- {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"Back β€” continue"}}
5
- {"type":"assistant","timestamp":"2026-05-01T12:02:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Resumed and finished."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Start the CRM cleanup"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:05:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Working on it."}]}}
3
+ {"type":"assistant","timestamp":"2026-05-01T10:08:00Z","message":{"role":"assistant","content":[{"type":"text","text":"First pass done."}]}}
4
+ {"type":"user","timestamp":"2026-05-01T12:00:00Z","message":{"role":"user","content":"Back β€” continue"}}
5
+ {"type":"assistant","timestamp":"2026-05-01T12:02:00Z","message":{"role":"assistant","content":[{"type":"text","text":"Resumed and finished."}]}}
@@ -0,0 +1,3 @@
1
+ {"type":"user","timestamp":"2026-05-01T10:00:03Z","message":{"role":"user","content":"sub task"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:04Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"s1","name":"Skill","input":{"skill":"estack-repo-search"}}]}}
3
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"s2","name":"Bash","input":{"command":"ls"}}]}}
@@ -0,0 +1,3 @@
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"do it"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:01Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"p1","name":"Skill","input":{"skill":"commit"}}]}}
3
+ {"type":"assistant","timestamp":"2026-05-01T10:00:02Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"p2","name":"Agent","input":{"description":"sub","subagent_type":"Explore"}}]}}
@@ -1,10 +1,10 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run all the tools"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:01Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t1","name":"Bash","input":{"command":"ls -la /tmp"}}]}}
3
- {"type":"assistant","timestamp":"2026-05-01T10:00:02Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t2","name":"PowerShell","input":{"command":"Get-ChildItem"}}]}}
4
- {"type":"assistant","timestamp":"2026-05-01T10:00:03Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t3","name":"Read","input":{"file_path":"C:\\foo.py","offset":1,"limit":50}}]}}
5
- {"type":"assistant","timestamp":"2026-05-01T10:00:04Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t4","name":"Edit","input":{"file_path":"C:\\foo.py","old_string":"a","new_string":"b"}}]}}
6
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t5","name":"Write","input":{"file_path":"C:\\bar.py","content":"print('hi')"}}]}}
7
- {"type":"assistant","timestamp":"2026-05-01T10:00:06Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t6","name":"Agent","input":{"description":"Find X","subagent_type":"Explore"}}]}}
8
- {"type":"assistant","timestamp":"2026-05-01T10:00:07Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t7","name":"Skill","input":{"skill":"using-superpowers"}}]}}
9
- {"type":"assistant","timestamp":"2026-05-01T10:00:08Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t8","name":"Glob","input":{"pattern":"**/*.py"}}]}}
10
- {"type":"assistant","timestamp":"2026-05-01T10:00:09Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t9","name":"Grep","input":{"pattern":"TODO"}}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Run all the tools"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:01Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t1","name":"Bash","input":{"command":"ls -la /tmp"}}]}}
3
+ {"type":"assistant","timestamp":"2026-05-01T10:00:02Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t2","name":"PowerShell","input":{"command":"Get-ChildItem"}}]}}
4
+ {"type":"assistant","timestamp":"2026-05-01T10:00:03Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t3","name":"Read","input":{"file_path":"C:\\foo.py","offset":1,"limit":50}}]}}
5
+ {"type":"assistant","timestamp":"2026-05-01T10:00:04Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t4","name":"Edit","input":{"file_path":"C:\\foo.py","old_string":"a","new_string":"b"}}]}}
6
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t5","name":"Write","input":{"file_path":"C:\\bar.py","content":"print('hi')"}}]}}
7
+ {"type":"assistant","timestamp":"2026-05-01T10:00:06Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t6","name":"Agent","input":{"description":"Find X","subagent_type":"Explore"}}]}}
8
+ {"type":"assistant","timestamp":"2026-05-01T10:00:07Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t7","name":"Skill","input":{"skill":"using-superpowers"}}]}}
9
+ {"type":"assistant","timestamp":"2026-05-01T10:00:08Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t8","name":"Glob","input":{"pattern":"**/*.py"}}]}}
10
+ {"type":"assistant","timestamp":"2026-05-01T10:00:09Z","message":{"role":"assistant","content":[{"type":"tool_use","id":"t9","name":"Grep","input":{"pattern":"TODO"}}]}}
@@ -1,3 +1,3 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Valid line"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Valid reply"}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Valid line"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Valid reply"}]}}
3
3
  {"type":"user","timestamp":"2026-05-01T10:01:00Z","message":{"role":"user","content":"Trunc
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello 🌍, δ½ ε₯½"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"ΠŸΡ€ΠΈΠ²Π΅Ρ‚ β€” μ•ˆλ…•ν•˜μ„Έμš”!"}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Hello 🌍, δ½ ε₯½"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"ΠŸΡ€ΠΈΠ²Π΅Ρ‚ β€” μ•ˆλ…•ν•˜μ„Έμš”!"}]}}
@@ -1,3 +1,3 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Get advice"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Calling advisor..."},{"type":"advisor_tool_result","content":{"text":"The advisor says do X then Y."}}]}}
3
- {"type":"assistant","timestamp":"2026-05-01T10:00:10Z","message":{"role":"assistant","content":[{"type":"text","text":"OK, doing X."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Get advice"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"Calling advisor..."},{"type":"advisor_tool_result","content":{"text":"The advisor says do X then Y."}}]}}
3
+ {"type":"assistant","timestamp":"2026-05-01T10:00:10Z","message":{"role":"assistant","content":[{"type":"text","text":"OK, doing X."}]}}
@@ -1,5 +1,5 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"First question"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"First answer"}]}}
3
- {"type":"user","timestamp":"2026-05-01T11:00:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Summary follows..."}}
4
- {"type":"user","timestamp":"2026-05-01T11:00:10Z","message":{"role":"user","content":"After compact"}}
5
- {"type":"assistant","timestamp":"2026-05-01T11:00:15Z","message":{"role":"assistant","content":[{"type":"text","text":"Post-compact reply"}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"First question"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"text","text":"First answer"}]}}
3
+ {"type":"user","timestamp":"2026-05-01T11:00:00Z","message":{"role":"user","content":"This session is being continued from a previous conversation. Summary follows..."}}
4
+ {"type":"user","timestamp":"2026-05-01T11:00:10Z","message":{"role":"user","content":"After compact"}}
5
+ {"type":"assistant","timestamp":"2026-05-01T11:00:15Z","message":{"role":"assistant","content":[{"type":"text","text":"Post-compact reply"}]}}
@@ -1,2 +1,2 @@
1
- {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Solve this"}}
2
- {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Let me think step by step..."},{"type":"text","text":"The answer is 42."}]}}
1
+ {"type":"user","timestamp":"2026-05-01T10:00:00Z","message":{"role":"user","content":"Solve this"}}
2
+ {"type":"assistant","timestamp":"2026-05-01T10:00:05Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Let me think step by step..."},{"type":"text","text":"The answer is 42."}]}}
@@ -1,56 +1,56 @@
1
- """Tests for backup-root resolution (--root mirror|snapshot-*|<abs-path>)."""
2
-
3
- from pathlib import Path
4
-
5
- import pytest
6
-
7
- from lib import paths as P
8
-
9
-
10
- def test_root_live_default():
11
- assert P.resolve_root(None) == P.DEFAULT_LIVE_PROJECTS
12
- assert P.resolve_root("live") == P.DEFAULT_LIVE_PROJECTS
13
-
14
-
15
- def test_root_mirror_path_shape():
16
- r = P.resolve_root("mirror")
17
- parts = r.parts
18
- assert ".claude-backups" in parts
19
- assert "mirror" in parts
20
- assert parts[-1] == "projects"
21
-
22
-
23
- def test_root_snapshot_24h_path_shape():
24
- r = P.resolve_root("snapshot-24h")
25
- assert "snapshot-24h" in r.parts
26
- assert r.name == "projects"
27
-
28
-
29
- def test_root_all_known():
30
- for name in ("mirror", "snapshot-24h", "snapshot-1w", "snapshot-1mo"):
31
- r = P.resolve_root(name)
32
- assert name in r.parts
33
-
34
-
35
- def test_root_absolute_path(tmp_path: Path):
36
- fake = tmp_path / "weird-root"
37
- fake.mkdir()
38
- assert P.resolve_root(str(fake)) == fake
39
-
40
-
41
- def test_root_unknown_relative_raises():
42
- with pytest.raises(ValueError):
43
- P.resolve_root("bogus")
44
-
45
-
46
- def test_find_project_dir_uses_root(tmp_path: Path):
47
- # Build a fake root with a fake project dir
48
- proj = tmp_path / "C--Users-foo-bar"
49
- proj.mkdir()
50
- found = P.find_project_dir("C:\\Users\\foo\\bar", root=tmp_path)
51
- assert found == proj
52
-
53
-
54
- def test_find_project_dir_not_found(tmp_path: Path):
55
- with pytest.raises(FileNotFoundError):
56
- P.find_project_dir("C:\\does\\not\\exist", root=tmp_path)
1
+ """Tests for backup-root resolution (--root mirror|snapshot-*|<abs-path>)."""
2
+
3
+ from pathlib import Path
4
+
5
+ import pytest
6
+
7
+ from lib import paths as P
8
+
9
+
10
+ def test_root_live_default():
11
+ assert P.resolve_root(None) == P.DEFAULT_LIVE_PROJECTS
12
+ assert P.resolve_root("live") == P.DEFAULT_LIVE_PROJECTS
13
+
14
+
15
+ def test_root_mirror_path_shape():
16
+ r = P.resolve_root("mirror")
17
+ parts = r.parts
18
+ assert ".claude-backups" in parts
19
+ assert "mirror" in parts
20
+ assert parts[-1] == "projects"
21
+
22
+
23
+ def test_root_snapshot_24h_path_shape():
24
+ r = P.resolve_root("snapshot-24h")
25
+ assert "snapshot-24h" in r.parts
26
+ assert r.name == "projects"
27
+
28
+
29
+ def test_root_all_known():
30
+ for name in ("mirror", "snapshot-24h", "snapshot-1w", "snapshot-1mo"):
31
+ r = P.resolve_root(name)
32
+ assert name in r.parts
33
+
34
+
35
+ def test_root_absolute_path(tmp_path: Path):
36
+ fake = tmp_path / "weird-root"
37
+ fake.mkdir()
38
+ assert P.resolve_root(str(fake)) == fake
39
+
40
+
41
+ def test_root_unknown_relative_raises():
42
+ with pytest.raises(ValueError):
43
+ P.resolve_root("bogus")
44
+
45
+
46
+ def test_find_project_dir_uses_root(tmp_path: Path):
47
+ # Build a fake root with a fake project dir
48
+ proj = tmp_path / "C--Users-foo-bar"
49
+ proj.mkdir()
50
+ found = P.find_project_dir("C:\\Users\\foo\\bar", root=tmp_path)
51
+ assert found == proj
52
+
53
+
54
+ def test_find_project_dir_not_found(tmp_path: Path):
55
+ with pytest.raises(FileNotFoundError):
56
+ P.find_project_dir("C:\\does\\not\\exist", root=tmp_path)