diene_api_engine
The generic, pure-Dart library template for the Diene family. It ships a
small, replaceable sample domain — a Note value type with a JSON wire codec
and a pure summariser — inside the reusable template machinery (strict analysis,
targeted coverage, a dependency-light TestHelper, a C0 fixture harness, package
hygiene, and a shipped usage skill).
import 'package:diene_api_engine/diene_api_engine.dart';
const Note note = Note(title: 'Release', body: 'Ship the template.');
final String summary = summarizeNote(note); // 'Release — Ship the template.'
final Note decoded = Note.fromJson(note.toJson()); // round-trips through JSON
Public surface
Note— immutabletitle/bodyvalue type with value equality and a JSON wire codec (Note.fromJson/toJson).summarizeNote(note, {maxLength})— a pure single-line summariser.defaultSummaryLength— the default summary cap.
TestHelper
Consumer tests may import package:diene_api_engine/test_helper.dart for
assertNoteSummary, a dependency-light assertion that throws
NoteAssertionFailure on mismatch and pulls in no test framework.
Read the package doc for the full API, wire contract, C0 harness, and guidance on replacing the sample.
Using this template
This is a template: a materialized child retokenizes the package identity to
diene_<name> / AtomiCloud/diene.dart_<name>, replaces lib/src/** with its
own domain, and re-points the barrel exports. See
skills/diene-api-engine-usage/patterns.md.
Development
pls setupresolves the workspace dependencies.pls testruns the unit, C0 conformance, and TestHelper meta suites.pls test:coverageenforces the separate unit and meta ledgers.pls deadcoderuns the repository and production-only dead-code passes.pls package:validateruns the release guard, publish dry-run, and pana.
Libraries
- diene_api_engine
- diene_api_engine — the typed OA3 backend-client engine for the Dart family.
- test_helper
- diene_api_engine test helpers — a DEPENDENCY-LIGHT sub-library
(
package:diene_api_engine/test_helper.dart). It ships fakes, plain-throw assertions, and builders with NO test-framework dependency, so it adds nothing to a consumer's production graph.