Skip to content

Improve roundtrip fidelity and optimize Git import process - #43

Merged
leefaus merged 20 commits into
devfrom
experiment/atomic-vault
May 5, 2026
Merged

leefaus merged 20 commits into
devfrom
experiment/atomic-vault

Conversation

@leefaus

@leefaus leefaus commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to the atomic-cli's repository initialization and git import workflows, with a focus on automating knowledge vault setup, improving import fidelity, and enhancing project-type detection. It also adds new CLI options for more flexible initialization and import behavior.

Key changes include:

Git Import Workflow Enhancements

  • After importing git history, the working copy is now materialized from the graph, then restored from git to ensure file fidelity, and finally the file index is rebuilt so atomic status reports a clean state. This sequence addresses issues with file content accuracy after large imports. [1] [2] [3]
  • The import process now initializes .atomicignore and the knowledge vault after import and materialization, ensuring these files are tracked cleanly and not overwritten. Vault setup can be skipped via a new --no-vault flag. [1] [2] [3]
  • Project kind for .atomicignore is auto-detected (or can be specified with --kind) to generate appropriate ignore templates for various languages. [1] [2]

Repository Initialization Improvements

  • The atomic init command now supports --vault and --no-vault flags to control whether a shared knowledge vault is created, with vault enabled by default. [1] [2]
  • .atomicignore is always created with at least a minimal template, and is added and recorded as the first change. If a project kind is specified, a language-specific template is used.
  • Vault initialization creates the directory structure, adds all files to tracking, and records them as a separate change, ensuring a clean initial status.

Internal and Dependency Updates

  • The workspace adds atomic-semantic as a new member and dependency, and bumps the workspace version to 0.5.3. [1] [2]
  • The import command now checks for an Atomic repository only in the current directory, avoiding false positives from global config directories.
  • Uses create_shared_view instead of create_view for branch views during import, aligning with multi-user workflows. [1] [2]

These changes streamline the onboarding and import process, improve correctness, and provide better defaults for new and existing users.


References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

leefaus added 4 commits April 13, 2026 21:16
- Use `sort_by_key` with `Reverse` instead of manual comparison
- Replace `match` with `.is_some()` for simple existence checks
- Implement `FromStr` trait instead of custom `from_str` method
- Use `std::slice::from_ref` to avoid allocating single-element vec
- Dereference hash instead of cloning
- Simplify heading detection logic with `find` instead of `skip_while`
- Reorder variable initialization for clarity
@leefaus
leefaus changed the base branch from release to dev April 15, 2026 17:56
leefaus added 16 commits April 15, 2026 14:07
- Add 'Vault — Shared Project Brain' section with usage examples
- Add 'Knowledge Graph Queries with LLM Assist' section with RAG pipeline
- Add Vault Commands table to CLI Reference
- Add experiment/** branch pattern to CI push trigger
- Fix 10 clippy -D warnings across atomic-core, atomic-repository, atomic-cli
- Add 'Vault — Shared Project Brain' section with usage examples
- Add 'Knowledge Graph Queries with LLM Assist' section with RAG pipeline
- Add Vault Commands table to CLI Reference
- Add experiment/** branch pattern to CI push trigger
- Fix 10 clippy -D warnings across atomic-core, atomic-repository, atomic-cli
- Escape square brackets in KG table doc comments (broken intra-doc links)
- Wrap generic types in backticks in query.rs doc comment (invalid HTML tags)
- Remove broken intra-doc link to vault_store_kg
Tests asserted 2-char tokens (rs, in, am) were included, but
tokenize_for_fts filters at >= 3 chars. Also fixed assertion for
'the' which is a stop word.
- Fix 3 vault deflation tests: add trailing newlines to default vault
  source files (MEMORY.md, system_prompt.md, code-intelligence.md) so
  content hash roundtrips correctly through materialize/scan cycle
- Fix test_options_new_returns_defaults: assert record_empty_files is
  true (matching the Default impl)
- Fix test_status_clean_after_record: status() is an exception-reporter
  that omits clean files; assert absence from non-clean lists instead
- Fix test_diff_end_to_end_multiple_files: same status().clean() pattern
- Fix atomic-cli compile errors: add missing Init and Promote match arms
  in vault/mod.rs and view/mod.rs test helpers

Pre-existing failures not addressed:
- test_three_sequential_modifications (graph overlay content retrieval)
- test_log_run_json_empty (test isolation / working directory issue)
- Fix test_empty_file: record_empty_files defaults to true, so empty
  file recording succeeds; test both true and false behaviors
- Fix test_log_run_json_empty: add missing #[serial] to CWD-mutating
  tests in init.rs and status.rs that raced with serial log tests
Introduces `atomic-teams` crate with organization and team management,
plus workspace/project storage APIs. New CLI commands for managing orgs
(create, list, show, update, delete, upgrade, switch) and teams (list,
create, show, update, delete), with member and permission grant
management.
Feature-gated behind the `teams` flag in the CLI.

Key additions:
- `atomic-teams`: Domain logic for org/team CRUD, member management,
  grants, domain aliases
- `atomic-remote`: `StorageClient` HTTP API for workspace/project
  operations
- CLI commands: `atomic org`, `atomic team`, `atomic workspace`, `atomic
  project`
- Knowledge graph expansion: `PART_OF` and `INCLUDES` edge kinds
- Infrastructure: Content search index powered by syntext, agentic LLM
  tool-use system
Tests the full CLI ↔ atomic-storage round-trip for organizations,
workspaces, projects, teams, members, and identity resolution. Includes
server availability check, multi-user workflows, resource CRUD
operations,
and cleanup. Also hardens helpers.sh against unbound variable errors on
bash <4.4 when arrays are empty under `set -u`.
Backfill and use a new CHANGE_DEPS index to expand view dependency
closures without loading .change files. Add MutTxn::put_change_deps,
pristine table support, reader/writer implementations and tests.
Wire repository to populate the index on insert and expose
repo.repair_change_dependency_index with a new
`doctor repair-dependency-index` CLI command. Also add a fast
mtime-only status check in the agent to skip unnecessary records.
Add FileIndexEntry/FileIndexMetadata aliases and export them from
pristine traits; update implementations and callers to use the new
types.
Change the AI repo tool to return a structured file outline for large
files
instead of erroring when no line range is provided. Misc minor cleanups
and formatting tweaks (hidden-dir check, small refactors)
Remove push branch triggers from ci.yml so CI runs on PRs to dev.
Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable
and adjust inputs (use 'targets' for matrix builds) in release.yml.
Update CI toolchain usages, refresh Cargo.lock to pick roaring 0.11.4,
and remove the atomic-repository pin on roaring 0.11.3 so syntext's
dependency can upgrade.
@leefaus
leefaus merged commit a9363db into dev May 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant