dirsql 0.0.16__tar.gz → 0.0.17__tar.gz
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.
- dirsql-0.0.17/.claude/CLAUDE.md +3 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.gitignore +0 -1
- {dirsql-0.0.16 → dirsql-0.0.17}/PKG-INFO +1 -1
- {dirsql-0.0.16 → dirsql-0.0.17}/pyproject.toml +1 -1
- dirsql-0.0.16/.claude/CLAUDE.md +0 -132
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/minor-release.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/patch-release.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/pr-monitor.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/publish.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/python-lint.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/python-test.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.github/workflows/rust-test.yml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/.npmignore +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/Cargo.lock +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/Cargo.toml +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/LICENSE +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/SUMMARY.md +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/python/dirsql/__init__.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/python/dirsql/_async.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/db.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/differ.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/lib.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/matcher.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/scanner.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/src/watcher.rs +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/tests/__init__.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/tests/conftest.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/tests/integration/__init__.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/tests/integration/test_async_dirsql.py +0 -0
- {dirsql-0.0.16 → dirsql-0.0.17}/tests/integration/test_dirsql.py +0 -0
dirsql-0.0.16/.claude/CLAUDE.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# dirsql Development
|
|
2
|
-
|
|
3
|
-
## Cross-Language Parity
|
|
4
|
-
|
|
5
|
-
dirsql ships SDKs in Rust, Python, and TypeScript. Aim for **complete API parity across all three languages**: same concepts, same capabilities, same naming where possible. Exceptions are allowed for language-idiomatic patterns:
|
|
6
|
-
|
|
7
|
-
- **Python**: `await db.ready()` (method call, not awaitable property). snake_case. Async iterators for event streams.
|
|
8
|
-
- **TypeScript**: `await db.ready` (awaitable property is idiomatic). camelCase. AsyncIterables for event streams.
|
|
9
|
-
- **Rust**: Builder pattern or `db.ready().await`. snake_case. Stream trait for event streams.
|
|
10
|
-
|
|
11
|
-
When adding a feature to one SDK, create beads for the other two. Don't let them drift apart.
|
|
12
|
-
|
|
13
|
-
## Scratch Files
|
|
14
|
-
|
|
15
|
-
Write scratch/temporary files to `/tmp` instead of asking permission. Use unique filenames to avoid collisions with other sessions.
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
- Work in git worktrees under `.worktrees/` folder
|
|
20
|
-
- **NEVER commit directly to main** - always create a PR
|
|
21
|
-
- One PR per bead. Beads should be concise and small -- as small as possible while still being useful
|
|
22
|
-
- Use `bd` (Beads) for task tracking: `bd list`, `bd show <id>`, `bd ready`
|
|
23
|
-
- **Bead first**: When starting new work, the first step is always to create a bead (`bd create`). No implementation work begins without a bead.
|
|
24
|
-
|
|
25
|
-
### Git Worktrees
|
|
26
|
-
|
|
27
|
-
**ALL work happens in git worktrees.** Never edit files in the root repo directory. Never commit outside a worktree.
|
|
28
|
-
|
|
29
|
-
#### Creating a Worktree
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
git worktree add .worktrees/my-feature -b feat/my-feature
|
|
33
|
-
cd .worktrees/my-feature
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
#### Removing a Worktree
|
|
37
|
-
|
|
38
|
-
**DANGER: removing a worktree while your shell CWD is inside it permanently breaks the shell.** The ONLY safe procedure:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Step 1: Move CWD to the root repo FIRST (not optional)
|
|
42
|
-
cd /home/duncan/work/code/projects/dirsql
|
|
43
|
-
|
|
44
|
-
# Step 2: Now remove the worktree
|
|
45
|
-
git worktree remove .worktrees/my-feature
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**Do NOT skip step 1. Do NOT substitute `git -C` for `cd`.**
|
|
49
|
-
|
|
50
|
-
### Beads Workflow
|
|
51
|
-
|
|
52
|
-
**Lifecycle:**
|
|
53
|
-
1. **Claim it FIRST**: `bd update <id> --claim` before any work
|
|
54
|
-
2. **Create worktree and branch**
|
|
55
|
-
3. **Link the PR**: `bd update <id> --external-ref "gh-<pr-number>"` after creating the PR
|
|
56
|
-
4. **Close**: `bd close <id>` immediately after the PR is merged
|
|
57
|
-
|
|
58
|
-
### Subagent Workflow
|
|
59
|
-
|
|
60
|
-
New work on beads should be done via subagents in isolated worktrees. Each subagent:
|
|
61
|
-
1. Claims the bead (`bd update <id> --claim`) before starting any work
|
|
62
|
-
2. Creates a worktree and branch for its bead
|
|
63
|
-
3. Does the implementation work (red/green TDD)
|
|
64
|
-
4. Pushes the branch and opens a PR
|
|
65
|
-
5. Monitors the PR and proactively resolves:
|
|
66
|
-
- CI failures
|
|
67
|
-
- GPG signing complaints
|
|
68
|
-
- Merge conflicts
|
|
69
|
-
6. Continues monitoring until the PR is in a mergeable state
|
|
70
|
-
|
|
71
|
-
### Orchestrator Responsibilities
|
|
72
|
-
|
|
73
|
-
The orchestrator (main Claude session) must proactively:
|
|
74
|
-
1. **Monitor all open PRs** -- don't wait for the user to report failures. Check CI status after agent completion and on an ongoing basis.
|
|
75
|
-
2. **Fix CI failures** on open PRs immediately, either directly or by dispatching a fix agent.
|
|
76
|
-
3. **Handle post-merge cleanup** as soon as a PR merges (pull main, remove worktree, delete branch, close bead).
|
|
77
|
-
4. **Keep the user informed** of PR status without being asked.
|
|
78
|
-
5. **Use foreground monitoring** when waiting on CI and there's no other work to do. Background monitoring causes the conversation to go silent -- use it only when there's genuinely parallel work to perform.
|
|
79
|
-
6. **Scripts to `/tmp`**: For polling/monitoring scripts (watching CI, waiting for merges), write the script to `/tmp` then run it via `bash /tmp/script.sh`. Do not use inline bash loops in tool calls.
|
|
80
|
-
|
|
81
|
-
### Post-Merge Cleanup
|
|
82
|
-
|
|
83
|
-
After a PR merges, the agent (or orchestrator) must:
|
|
84
|
-
1. Pull main in the **root repo**: `git -C /home/duncan/work/code/projects/dirsql pull origin main`
|
|
85
|
-
2. **Move CWD to root repo first** (CRITICAL -- never remove a worktree from inside it): `cd /home/duncan/work/code/projects/dirsql`
|
|
86
|
-
3. Remove the worktree: `git worktree remove .worktrees/<name>`
|
|
87
|
-
4. Delete the local branch: `git branch -d <branch-name>`
|
|
88
|
-
5. **Verify the bead is addressed** by the merged PR, then close it: `bd close <id>`
|
|
89
|
-
|
|
90
|
-
## Testing
|
|
91
|
-
|
|
92
|
-
### Red/Green Development
|
|
93
|
-
|
|
94
|
-
Follow **red/green** (test-first) methodology:
|
|
95
|
-
|
|
96
|
-
1. **Write the test first** -- it must capture the desired behavior
|
|
97
|
-
2. **Run it and confirm it fails (RED)** -- do NOT proceed until the test turns red reliably. A test that passes before implementation proves nothing.
|
|
98
|
-
3. **Make the minimal change to pass (GREEN)** -- only then write the implementation
|
|
99
|
-
4. Refactor if needed, keeping tests green
|
|
100
|
-
|
|
101
|
-
### TDD Order: Outside-In
|
|
102
|
-
|
|
103
|
-
Tests are written **before** implementation, starting from the outermost layer:
|
|
104
|
-
|
|
105
|
-
1. **Integration test first** -- proves the feature works from the consumer's perspective
|
|
106
|
-
2. **Unit tests** -- written as you implement each module
|
|
107
|
-
|
|
108
|
-
A feature is not done until integration tests pass and cover the new functionality.
|
|
109
|
-
|
|
110
|
-
### When to Write What
|
|
111
|
-
|
|
112
|
-
**Does the commit change the public-facing API?**
|
|
113
|
-
- Yes -> **integration test required**, plus unit tests as you go
|
|
114
|
-
- No -> Check if adequate integration coverage already exists:
|
|
115
|
-
- Adequate -> unit tests only
|
|
116
|
-
- Gaps -> add the missing integration tests, plus unit tests
|
|
117
|
-
|
|
118
|
-
**Always write unit tests.** The question is whether you also need integration tests.
|
|
119
|
-
|
|
120
|
-
### Test Locations
|
|
121
|
-
|
|
122
|
-
- **Unit tests**: Colocated with source
|
|
123
|
-
- Python: `foo.py` -> `foo_test.py` in same directory
|
|
124
|
-
- Rust: inline `#[cfg(test)]` module at bottom of each source file
|
|
125
|
-
- **Integration tests**: `tests/integration/` -- test the Python SDK layer, mock third-party deps (SQLite, LLM calls). Heavy use of pytest fixtures. Run in CI.
|
|
126
|
-
- **E2E tests**: `tests/e2e/` -- real filesystem, real SQLite, real LLM calls, no mocks. Heavy use of pytest fixtures. **NOT run in CI** (eventual LLM calls make them non-free). Run locally by Claude after significant code changes.
|
|
127
|
-
|
|
128
|
-
### E2E Test Policy
|
|
129
|
-
|
|
130
|
-
E2E tests are your primary feedback mechanism. Run them liberally after significant changes -- they catch issues that integration tests miss because integration tests mock out SQLite and (eventually) LLM calls. But do NOT add them to CI workflows. They are a local development tool.
|
|
131
|
-
|
|
132
|
-
See skillet or karat for examples of test organization, fixtures, and pytest-describe patterns.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|