Add CLAUDE.md with versioned changelog, update README
- Created CLAUDE.md with instructions to update changelog and README on every commit, version number (v1.2.0), and full changelog from v1.0.0 - Updated README: document-scope BLIGHT:: syntax, processing order, two-line failure format, complete_document() in AI provider section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
45
CLAUDE.md
Normal file
45
CLAUDE.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# CLAUDE.md — BLIGHT: CUE
|
||||
|
||||
## Instructions for Claude
|
||||
|
||||
- **Every commit**: Update the Changelog section below with a summary of what changed and bump the version number if appropriate.
|
||||
- **Every commit**: If the changes affect anything documented in README.md (trigger syntax, failure behavior, setup, project structure, AI provider info, etc.), update README.md in the same commit.
|
||||
|
||||
---
|
||||
|
||||
## Version
|
||||
|
||||
**v1.2.0**
|
||||
|
||||
---
|
||||
|
||||
## Changelog
|
||||
|
||||
### v1.2.0
|
||||
- Fixed loop re-processing: AI responses are sanitized by replacing `BLIGHT:` with `BLIGHT:` before being written to the document, preventing the service's own commits from triggering another processing cycle.
|
||||
- Branch awareness: branch is now extracted from `refs/heads/<branch>` in the push payload and passed to all Gitea read/write calls, so pushes to non-default branches are handled correctly.
|
||||
- Commit messages now include the file path (e.g. `BLIGHT: process triggers in notes/todo.md`).
|
||||
|
||||
### v1.1.0
|
||||
- Added `BLIGHT::` (double colon) document-scope trigger syntax. Unlike `BLIGHT:` which replaces only the trigger line, `BLIGHT::` replaces the entire file content with the AI's rewritten document.
|
||||
- Multiple `BLIGHT::` triggers in one file are processed sequentially, each operating on the result of the previous.
|
||||
- Inline `BLIGHT:` triggers are always processed before `BLIGHT::` triggers.
|
||||
- Both trigger types are now case-insensitive (`blight:`, `BLIGHT:`, `Blight::`, etc. all match).
|
||||
- Failure comments updated to two-line format:
|
||||
```
|
||||
<!-- BLIGHT_FAILED: <instruction> -->
|
||||
<!-- BLIGHT_ERROR: <error message> -->
|
||||
```
|
||||
- Added `complete_document()` to `AIProvider` ABC and `GeminiProvider`, with a dedicated system prompt instructing the model to return the full rewritten document.
|
||||
|
||||
### v1.0.0 — Initial release
|
||||
- Flask webhook server listening for Gitea push events.
|
||||
- HMAC-SHA256 signature verification on all incoming webhooks.
|
||||
- Scans changed `.md` files for `BLIGHT: <instruction>` trigger lines.
|
||||
- Sends full document + instruction to Google Gemini 2.5 Flash-Lite.
|
||||
- Replaces trigger line with AI response in-place and commits back to Gitea.
|
||||
- Retry logic: 3 attempts with exponential backoff (1s, 2s, 4s).
|
||||
- Processes webhooks in background threads to return 200 immediately.
|
||||
- Deduplicates file paths across multiple commits in a single push.
|
||||
- Self-updates on startup via `git pull --ff-only`.
|
||||
- Pluggable `AIProvider` ABC for swapping AI backends.
|
||||
Reference in New Issue
Block a user