Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 2.42 KB

File metadata and controls

32 lines (29 loc) · 2.42 KB

🗓️ Update: 2026-07-12

Here's a summary of the recent changes:

  • Project Initialization: Added .gitignore, .shadow-lock (for state tracking), and README.md for project overview and usage instructions.
  • CLI Framework: Introduced commander for command-line interface creation, defining a sync command.
  • Core Logic (sync command):
    • Implemented the main synchronization flow in src/commands/sync.ts and its compiled dist/commands/sync.js.
    • Uses GitManager to check for clean working trees, retrieve commit hashes, get differences between commits, and list project files.
    • Utilizes Store to manage persistent state:
      • Saves the current commit hash in .shadow-lock as a baseline on the first run.
      • Loads previous state and fetches the diff from the last known commit.
      • Appends generated documentation summaries to STRUCTURE.md.
    • Integrates with AIManager to generate documentation summaries.
  • AI Integration (ai.ts):
    • Added src/lib/ai.ts and dist/lib/ai.js to handle AI interactions.
    • Uses @google/generative-ai and dotenv to manage API keys.
    • Defines a prompt for the Gemini API, requesting concise, bullet-pointed summaries of Git diffs, project structure, and existing documentation.
  • Git Utility (git.ts):
    • Created src/lib/git.ts and dist/lib/git.js to encapsulate Git operations using execSync.
    • Includes functions for getting the current HEAD commit, ensuring a clean working tree, retrieving diffs, and listing project files.
  • State Management (store.ts):
    • Developed src/utils/store.ts and dist/utils/store.js for file-based state management.
    • Handles reading and writing to .shadow-lock for commit history and STRUCTURE.md for accumulating documentation.
  • Build & Dependencies:
    • Updated package.json to include dotenv, commander, and chalk as dependencies.
    • Added a build script (npm run build) to compile TypeScript to JavaScript.
    • Modified the bin entry in package.json to point to the compiled dist/index.js.
  • Removed Files: Deleted unused example files git-lab.ts and test-watcher.ts.
  • TypeScript Configuration: Updated tsconfig.json to use esnext module target and bundler module resolution, along with enabling allowImportingTsExtensions and rewriteRelativeImportExtensions.

--