diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..39b76e80 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.go] +indent_style = tab +indent_size = 4 + +[*.dart] +indent_size = 2 + +[Makefile] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index 8a5f649f..41fc9a28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,188 +1,82 @@ -# ---> Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class +# -- Flutter / Dart (app/) ---------------------------------------------- +/app/.dart_tool/ +/app/.packages +/app/.flutter-plugins +/app/.flutter-plugins-dependencies +/app/build/ +/app/.idea/ +/app/.vscode/ +/app/*.iml +/app/ios/Pods/ +/app/macos/Pods/ +/app/windows/flutter/ephemeral/ +/app/linux/flutter/ephemeral/ +/app/macos/Flutter/ephemeral/ +# pubspec.lock is committed (supply-chain policy). -# C extensions -*.so +# -- Go sidecar --------------------------------------------------------- +/sidecar/bin/ +/sidecar/dist/ +/sidecar/vendor/ +/clide +/clide.exe -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST +# -- Test, coverage, profile output ------------------------------------ +*.test +*.out +*.prof +*.pprof +coverage.* +/tmp/ -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec -!clide.spec +# -- Go module / workspace artefacts (we don't vendor or use workspaces) +/go.work +/go.work.sum -# Installer logs -pip-log.txt -pip-delete-this-directory.txt +# -- pql per-repo state (clide dogfoods against itself; pql's index lands +# here when running queries locally). Mirror what `pql init` writes. +/.pql/ -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ +# -- SQLite index files (defensive; should never land at repo root) ---- +*.sqlite +*.sqlite-journal +*.sqlite-wal +*.sqlite-shm +*.db -# Translations -*.mo -*.pot +# -- Editor / IDE ------------------------------------------------------ +.vscode/ +.idea/ +*.swp +*.swo -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal +# -- OS cruft ---------------------------------------------------------- +.DS_Store +._* +Thumbs.db -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments +# -- Secrets ----------------------------------------------------------- .env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Ruff stuff: -.ruff_cache/ - -# PyPI configuration file -.pypirc - - -# Clide specific -.config/ -snapshot_report.html -logs/ - -# Credentials +.env.local +.env.*.local *-credentials.md -# Claude Code — user-specific settings only; project-level settings and skills are committed +# -- Claude Code — user-specific settings only; project-level settings +# and skills are committed .claude/settings.local.json + +# -- Legacy Python clide (under legacy/, pre-dating the Flutter rebuild). +# Narrowly scoped so repo-root ignores stay focused on the current +# toolchain. +legacy/.venv/ +legacy/.ruff_cache/ +legacy/**/__pycache__/ +legacy/**/*.py[cod] +legacy/**/*$py.class +legacy/**/.pytest_cache/ +legacy/**/.mypy_cache/ +legacy/**/.ruff_cache/ +legacy/**/*.egg-info/ +legacy/**/htmlcov/ +legacy/**/.coverage +legacy/**/.coverage.* diff --git a/CHANGELOG.md b/CHANGELOG.md index bfe3ee67..6e252516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ heading, and (b) bumping `project.yaml` `version:` in the same commit. ## [Unreleased] +### Changed + +- `.gitignore` rewritten for the new toolchain: Flutter (build output under `app/`), Dart (`.dart_tool/`), Go sidecar (`sidecar/bin/`, `sidecar/dist/`, the legacy `/clide` binary), plus the usual test/OS/editor/secret rules. Python-specific rules narrow to `legacy/**` where they still apply. + ### Added - Architectural decision records carried forward from the short-lived @@ -25,6 +29,7 @@ heading, and (b) bumping `project.yaml` `version:` in the same commit. [ADR 0002](docs/ADRs/0002-sidecar-language-go.md) — Sidecar language: Go. [ADR 0003](docs/ADRs/0003-pql-as-supporter-tool.md) — pql as supporter tool; wrap, don't duplicate; pql is a Clide subsystem when present. [ADR 0004](docs/ADRs/0004-ignore-file-strategy.md) — Ignore file strategy (`ignore_files:` in `.pql/config.yaml`, layered). +- Project identity files for the Flutter rebuild at the repo root: `project.yaml` (single source of truth for version + module path, version 2.0.0-dev), a fresh `README.md`, MIT `LICENSE`, and `.editorconfig`. The Python clide's manifest and README are preserved under `legacy/`. - [`docs/initial-plan.md`](docs/initial-plan.md) — the north-star design document for the Flutter rebuild. Captures what we kept from Python Clide (pane model, git skills, Claude-always-visible), what we took from Obsidian (canvas and graph — no vault, no bases, no plugin inheritance), what Claudian's short experiment contributed (Go sidecar, CLI-first, pql-as-subsystem, ignore-file strategy), and the tier roadmap (Tier 0 app+sidecar handshake → Tier 5 canvas+graph). - Claude Code configuration under `.claude/`: project-level allow/deny permissions and two skills — `skill-create` (generic diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..27a337df --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Jeroen Schweitzer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..ad0a92e1 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# clide + +A Flutter desktop IDE for Claude Code. Markdown-first content, pql-powered queries, canvas and graph surfaces, a Go sidecar handling PTYs / subprocesses / git / pql. Claude drives the UI through a `clide` CLI. + +Currently pre-v2.0, scaffolding. The north-star design lives in [`docs/initial-plan.md`](docs/initial-plan.md); architectural decisions are captured in [`docs/ADRs/`](docs/ADRs/). The Python Textual v1.2.0 implementation is archived under [`legacy/`](legacy/) for reference. + +## Three surfaces, one tool + +- **`app/`** — Flutter desktop application (Linux / macOS; Windows is a stretch). +- **`sidecar/`** — Go sidecar/CLI, single binary with two modes: `clide ` (one-shot for Claude) and `clide --daemon` (long-running sidecar for the app). Owns PTYs, subprocesses, file watchers, git, pql invocations. +- **[`pql`](https://github.com/postmeridiem/pql)** — external supporter tool. clide wraps it for every query surface; never re-implements it. + +## Why the rebuild? + +The Python Textual implementation (`legacy/`) proved the pane model but capped at terminal-only rendering. A short-lived experiment (`claudian`, April 2026) explored an Obsidian-plugin approach and was abandoned because Obsidian is Electron, and the user's history with terminal-in-Electron ruled that host out. + +Flutter desktop resolves both constraints: native Skia rendering avoids Electron's failure modes, `xterm.dart` gives us a solid terminal surface, and the pane model can be rebuilt natively. The Obsidian ideas worth keeping (canvas, graph) fold in; everything else (vault concept, inline query tables, plugin ecosystem inheritance) doesn't. + +## Status + +No build yet beyond the repo scaffold. Tier 0 acceptance: sidecar daemon runs, Flutter app connects, empty IDE shell appears with placeholders. + +## License + +MIT. See [`LICENSE`](LICENSE). diff --git a/project.yaml b/project.yaml new file mode 100644 index 00000000..35e8f2a3 --- /dev/null +++ b/project.yaml @@ -0,0 +1,47 @@ +# clide — project manifest +# +# Single source of truth for project metadata. Read by: +# - the Makefile (VERSION ldflag for the sidecar) +# - the Flutter app's build-info surface +# - any future Claude Code skill (compatibility check) +# - any other consumer that needs to know "what is this project, +# what version of it is on disk right now" +# +# Convention: this file declares the version the codebase *claims to be*. +# Local `make build` stamps that version + git short SHA + dirty marker +# into the sidecar binary and (when wired) into the Flutter app. +# Tagged releases use the git tag for binaries; project.yaml `version:` +# is bumped in the post-release commit alongside the changelog move. +# +# Lineage: Python clide reached v1.2.0 under legacy/. The Flutter +# rebuild starts fresh at v2.0.0-dev to signal a clean break. + +name: clide +description: Flutter desktop IDE for Claude Code — markdown-first, pql-powered, with a Go sidecar. +version: 2.0.0-dev +status: pre-v2.0, scaffolding (Tier 0 — Flutter app + sidecar handshake — is next) + +repository: ssh://git@git.schweitz.net:2222/jpmschweitzer/clide.git +license: MIT +# Go sidecar module path. Gitea-hosted; Go module resolution works if +# the host serves the meta tags, otherwise a vanity path can be added. +module: git.schweitz.net/jpmschweitzer/clide/sidecar + +# Toolchain pins. Mirror in sidecar/go.mod and app/pubspec.yaml when bumping. +go_version: ">=1.25" +flutter_channel: stable +dart_sdk: ">=3.5.0 <4.0.0" + +maintainers: + - name: Jeroen Schweitzer + email: jpmschweitzer@gmail.com + +keywords: + - ide + - flutter + - claude-code + - markdown + - pql + - canvas + - graph + - agent-tools