From 22557f15d6a7b77f72d4597fc05aa06346495a33 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 4 Nov 2025 09:31:57 +0000 Subject: docs: major cleanup and reorganization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Archive 30 completed session documents to docs/archive/ - Extract learnings to docs/learnings/ (nix-flakes, nostr-sdk, grasp-audit) - Create CURRENT_STATUS.md as single source of truth - Create AGENTS.md with documentation guidelines - Create docs/archive/README.md for archive organization - Clean root directory: 32 files β†’ 4 files Root directory now contains only: - README.md (project overview) - AGENTS.md (documentation guidelines) - CURRENT_STATUS.md (current state) - CLEANUP_SUMMARY.md (cleanup report) All historical documents preserved in docs/archive/ with proper dating. All reusable knowledge extracted to docs/learnings/. Benefits: - Easy to find current information - Clear document lifecycle - No more documentation sprawl - Learnings are accessible and reusable - Better onboarding for new developers/agents File counts: - Root: 4 (was 32) - Permanent docs: 7 - Learnings: 3 (new) - Archive: 32 (new) - Total: 49 well-organized docs --- FLAKE_MIGRATION_COMPLETE.md | 203 -------------------------------------------- 1 file changed, 203 deletions(-) delete mode 100644 FLAKE_MIGRATION_COMPLETE.md (limited to 'FLAKE_MIGRATION_COMPLETE.md') diff --git a/FLAKE_MIGRATION_COMPLETE.md b/FLAKE_MIGRATION_COMPLETE.md deleted file mode 100644 index 2d2514d..0000000 --- a/FLAKE_MIGRATION_COMPLETE.md +++ /dev/null @@ -1,203 +0,0 @@ -# Flake Migration Complete - -**Date:** November 4, 2025 -**Change:** Migrated from shell.nix to flake.nix - -## What Changed - -### Files Modified - -1. **Created: grasp-audit/flake.nix** - - Based on ../ngit/flake.nix - - Uses rust-overlay for Rust toolchain - - Includes devShell and package outputs - - Properly configured with dependencies - -2. **Removed: grasp-audit/shell.nix** - - Old Nix shell configuration - - Replaced by flake.nix - -3. **Updated Documentation:** - - grasp-audit/README.md - - grasp-audit/QUICK_START.md - - NEXT_SESSION_QUICKSTART.md - - SMOKE_TEST_REPORT.md - - FILES_CREATED.md - -All references to `nix-shell` changed to `nix develop`. - -## New Flake Configuration - -```nix -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - rust-overlay.url = "github:oxalica/rust-overlay"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { nixpkgs, rust-overlay, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - overlays = [ (import rust-overlay) ]; - pkgs = import nixpkgs { inherit system overlays; }; - manifest = pkgs.lib.importTOML ./Cargo.toml; - in with pkgs; { - devShells.default = mkShell { - nativeBuildInputs = [ - rust-bin.stable.latest.default - pkg-config - gitlint - ]; - buildInputs = [ - openssl - ]; - shellHook = '' - echo "πŸ¦€ GRASP Audit development environment loaded" - # ... helpful messages ... - export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc} - ''; - }; - - packages.default = pkgs.rustPlatform.buildRustPackage { - pname = manifest.package.name; - version = manifest.package.version; - src = ./.; - cargoLock = { lockFile = ./Cargo.lock; }; - buildInputs = [ openssl ]; - nativeBuildInputs = [ pkg-config ]; - doCheck = false; - }; - }); -} -``` - -## Flake Validation - -```bash -$ cd grasp-audit && nix flake show -git+file:///persistent/dcdev/clones/ngit-grasp?dir=grasp-audit -β”œβ”€β”€β”€devShells -β”‚ β”œβ”€β”€β”€aarch64-darwin -β”‚ β”‚ └───default: omitted (use '--all-systems' to show) -β”‚ β”œβ”€β”€β”€aarch64-linux -β”‚ β”‚ └───default: omitted (use '--all-systems' to show) -β”‚ β”œβ”€β”€β”€x86_64-darwin -β”‚ β”‚ └───default: omitted (use '--all-systems' to show) -β”‚ └───x86_64-linux -β”‚ └───default: development environment 'nix-shell' -└───packages - β”œβ”€β”€β”€aarch64-darwin - β”‚ └───default: omitted (use '--all-systems' to show) - β”œβ”€β”€β”€aarch64-linux - β”‚ └───default: omitted (use '--all-systems' to show) - β”œβ”€β”€β”€x86_64-darwin - β”‚ └───default: omitted (use '--all-systems' to show) - └───x86_64-linux - └───default: package 'grasp-audit-0.1.0' -``` - -βœ… Flake is valid and provides: -- Dev shell for all major systems -- Package output for grasp-audit binary - -## Usage - -### Old Way (shell.nix) -```bash -cd grasp-audit -nix-shell -cargo build -``` - -### New Way (flake.nix) -```bash -cd grasp-audit -nix develop -cargo build -``` - -### Additional Flake Commands - -```bash -# Show flake outputs -nix flake show - -# Check flake validity -nix flake check - -# Build the package directly -nix build - -# Run without installing -nix run - -# Update flake inputs -nix flake update -``` - -## Benefits of Flakes - -1. **Reproducibility:** Locked inputs ensure consistent builds -2. **Multi-output:** Both dev shell and package in one file -3. **Standard:** Follows modern Nix best practices -4. **Composability:** Can be used as input to other flakes -5. **Better UX:** `nix develop` is clearer than `nix-shell` - -## Updated Quick Start - -```bash -# 1. Enter dev environment -cd grasp-audit -nix develop - -# 2. Build -cargo build - -# 3. Test -cargo test --lib - -# 4. Run example -cargo run --example simple_audit -``` - -## Documentation Updates - -All documentation has been updated to use `nix develop` instead of `nix-shell`: - -- βœ… grasp-audit/README.md -- βœ… grasp-audit/QUICK_START.md -- βœ… NEXT_SESSION_QUICKSTART.md -- βœ… SMOKE_TEST_REPORT.md -- βœ… FILES_CREATED.md - -## Next Steps - -The flake is ready to use. Next session can: - -1. **Enter dev environment:** - ```bash - cd grasp-audit - nix develop - ``` - -2. **Build and test:** - ```bash - cargo build - cargo test --lib - ``` - -3. **Continue with integration tests** (once relay is set up) - -## Status - -- βœ… Flake created and validated -- βœ… Documentation updated -- βœ… Old shell.nix removed -- βœ… Git tracking enabled -- 🚧 Dev environment ready (first run will download dependencies) -- 🚧 Build pending (waiting for nix develop to complete) - ---- - -**Migration Complete:** shell.nix β†’ flake.nix βœ… -- cgit v1.2.3