## 1. Immutable Journal Domain - [x] 1.1 Implement artifact coordinates, Journal versions, content digests, metadata, releases, dependencies, policy rules, and complete Journal snapshots with immutable construction invariants. - [x] 1.2 Implement canonical version expressions and immutable expression-set membership, union, subtraction, and subset operations. ## 2. Format Version 1 Parsing - [x] 2.1 Add the strict internal reference line parser and public Journal exception with source/line diagnostics, comment handling, ordering, duplicates, quoted text, URI, timestamp, release, and digest validation. - [x] 2.2 Add dependency and policy parsing plus cross-field validation for declared targets, preferred subsets, exact recommendations, and preserved descriptions. ## 3. Read-only Journal Service State - [x] 3.1 Implement internal atomic filesystem-independent ingestion, exact-text SHA-256 identity, idempotency/conflicts, and linear per-artifact chain validation. - [x] 3.2 Implement immutable coordinate, chronological, latest, exact, as-of, and selected-release queries for the read-only service. ## 4. Lifecycle and Filesystem Service Manager - [x] 4.1 Implement strict root/directory/filename discovery, UTF-8 chronological loading, placement validation, ignored example files, and explicit idempotent refresh in the service manager. - [x] 4.2 Separate ordinary read-only Journal queries from lifecycle, data-root, initial-loading, and refresh administration. ## 5. Migration and Documentation - [x] 5.1 Move and rewrite the three artifact-scoped example Journals into revision directories with valid format-version-1 content covering the documented features. - [x] 5.2 Rewrite `docs/Nenjim.md`, `docs/Terminologi.md`, and `docs/Nenjim-public.html` for the implemented Journal model, `Service`/`ServiceManager` split, and clearly separated future functionality. - [x] 5.3 Remove the obsolete Journal/module/JournalId skeleton files, dummy behavior, imports, and dead references. ## 6. Verification - [x] 6.1 Run strict OpenSpec validation and verify the change remains active, unsynced, and unarchived. - [x] 6.2 Compile the complete project through Gradle/Detag and run focused temporary probes covering example parsing, chain behavior, version expressions, invalid input diagnostics, and filesystem refresh. - [x] 6.3 Review the final diff for issue scope, out-of-scope exclusions, immutability, and absence of generated-source edits. ## 7. CIDv1 Canonicality Follow-up - [x] 7.1 Require exact canonical unpadded lowercase Base32 round-tripping and minimal, overflow-safe unsigned varints for every CIDv1 envelope field. - [x] 7.2 Remove the obsolete `JournalId` tag from the versioned and active Detag configuration. - [x] 7.3 Run temporary CID canonicality probes, strict OpenSpec validation, `compileJava`, `assemble`, and `git diff --check`, then verify that the change remains active, unsynced, and unarchived. ## 8. Service Architecture Migration - [x] 8.1 Reconcile proposal, design, and delta specs with the updated authoritative issue and remove the old `JournalManager`/filesystem-`JournalService` responsibility split. - [x] 8.2 Move the public composed models, value types, and exception into their mandated packages; add only the two central service interfaces directly under `com.r35157.nenjim.service.journal`; remove the superseded package without aliases. - [x] 8.3 Implement `JournalServiceImpl`, lifecycle-aware `JournalServiceManagerImpl`, and internal `JournalTextParser` with non-public ingestion, complete initial loading, refresh, chain atomicity, and existing query behavior. - [x] 8.4 Update the three required documents and terminology for the general `Service`/`ServiceManager` concepts, Journal responsibilities, package boundary, and current/future scope. - [x] 8.5 Run all required build, example, package-boundary, lifecycle, ingestion, chain/query, OpenSpec, generated-source, and diff verifications while leaving the change active, unsynced, and unarchived. ## 9. Direct Recommendation Construction Invariants - [x] 9.1 Specify that direct `JournalPolicy` construction rejects non-exact recommendations and direct `Journal` construction rejects recommendations for releases absent from the same snapshot. - [x] 9.2 Enforce the recommendation invariants in the public model constructors while retaining parser diagnostics and valid policy overlaps. - [x] 9.3 Run temporary direct-construction and example-parsing probes, strict OpenSpec validation, `compileJava`, `assemble`, `git diff --check`, and generated-source checks while leaving the change active, unsynced, and unarchived.