gg_dna 4.1.2
gg_dna: ^4.1.2 copied to clipboard
The DNA engine - resolves DNA packages declared as dev-dependencies, merges their dna folders and instantiates configs, docs, scripts and agent skills into the target repo.
Changelog #
4.1.2 - 2026-08-12 #
Removed #
- BREAKING: File-naming conversion at instantiation. DNA files now
instantiate under exactly the name they carry in the layer — no
kebab/snake/camel conversion, and no rewriting of references to renamed
files. The
fileNamingconfig key is gone; a_dna.jsonstill setting it now warns as an unknown key. Layers that relied on conversion must rename their DNA files to the name the target should see. - BREAKING: The
dot_dot escape.dot-is the only accepted form; thedot_variant only existed for snake_case layers, which the removal of file-naming conversion makes obsolete. The placed DNA test now rejects adot_-escaped path indna/before instantiating and reports the rename to make (Rename dna/dot_vscode to dna/dot-vscode.) instead of silently instantiating a literaldot_vscode/folder. - Remove auto renaming of dna files. Did break links.
4.1.1 - 2026-08-12 #
Changed #
- A
dna/folder withoutdna/_dna.jsonis a hard error instead of silently falling back to"role": "project"— that fallback let the engine treat a hand-authored DNA as generated content. - Ensure correct naming, Require dna/_dna.json
Fixed #
- The snake_case dot escape
dot_is decoded likedot-, sodna/dot_vscode/settings.jsonalso instantiates to.vscode/settings.json.
4.0.1 - 2026-08-08 #
Added #
- Dotfiles in DNA content are escaped with a
dot-prefix:dna/dot-vscode/settings.jsoninstantiates to.vscode/settings.json. Without itdart pub publishsilently drops them. - Layer resolution goes through the manifests and their lock files
(
pubspec.lock,pnpm-lock.yaml): the lock supplies the ecosystem, the resolved version and the installed-name index, while.dart_tool/package_config.jsonandnode_modules/supply the folder. - The npm scope is dropped when folding a package name to its layer
identity, so a DNA published to both registries (
@tssuite/base-dnaandbase_dna) is one layer, not two. A warning fires when the two copies carry differentdna/trees.
Changed #
- Distribute DNA using npm and dart package inheritance
- Set version back to 1
Changed — breaking #
- DNA configuration moved from
.gg/dna.jsontodna/_dna.json.dart pub publishdrops every path with a leading dot, so a config below.gg/never reached a pub-installed consumer — the layer silently fell back to defaults.dna/is the one folder both ecosystems publish. dna/_dna.jsonis hand-authored and the engine only ever reads it. Everything the engine writes moved todna/_generated.json, which also absorbeddna/_instances.json.- Layers are declared explicitly in
layersand referenced by the package name they are declared under inpubspec.yaml/package.json. The oldorderkey is gone, and so is the inference from dependency declaration order — a dependency that is not listed is not a layer. - Path overrides (
dependencies: { x: { path: … } }) were removed. Local checkouts are wired up by gg_localize_refs, which writespubspec_overrides.yaml/pnpm-workspace.yamland thereby repoints.dart_tool/package_config.jsonand thenode_modulessymlink. - A package is a DNA layer only if its
dna/_dna.jsondeclares"role": "dna". Adna/folder alone no longer qualifies. config.claude.claude_md.includeflattened toclaude.claudeMdInclude."version": 1is required in both files.- pnpm is the only supported npm package manager;
package-lock.jsonandyarn.lockare not read. - No migration path:
.gg/dna.json,dna.yamlanddna:blocks inpubspec.yaml/package.jsonare simply no longer read, and format version 5 files are rejected.
Fixed #
resolvedVersionreadpackage.jsoneven for pub-resolved packages. A pub tarball ships both manifests, so a pub layer reported the npm version. The version now comes from the lock file of the ecosystem that provided the copy, and from the on-disk manifest for localized checkouts.- A
dna/_generated.jsonthat exists but cannot be read now throws instead of being treated as "never instantiated" — the latter made every instance count as unowned and overwrote hand edits without the hand-modified check ever firing. - Fix versions
4.0.0 - 2026-08-07 #
Added #
- Instances: every public file of the merged
dna/replica (path segments not starting with_) is copied to its project location, with ownership tracking, adoption of existing files, and removal of files the DNA no longer produces — including the folders they leave empty - Inheritance tree: DNAs are declared as dev-dependencies
(npm/pub); parent DNAs are regular dependencies of their child DNA;
gg_dna resolves the tree recursively from
node_modules/and.dart_tool/package_config.json(diamond dedup, cycle detection) - JSON overrides: sidecar
X.overrides.jsonmerges intoX.json— objects deep-merge,nulldeletes,"key!"replaces outright,"key+"joins arrays (deduplicated); JSONC (comments, trailing commas) is tolerated - Variables:
dna/_vars.json(deep-merged across layers, overridable viavarsin.gg/dna.json); referencesdnaMyVar,DnaMyVar,dna_my_var,DNA_MY_VAR,dna-my-varare replaced case-adaptively; non-identifier values verbatim - File-naming conversion: DNA files are canonical kebab-case and are
converted per target (
pubspec.yaml→ snake_case,package.json→ camelCase, configurable viafileNaming); references to renamed files are rewritten in text instances gg_dna init: places the DNA wrapper test (Dart and/or vitest), a.gg/dna.jsonskeleton and the!.gg/dna.jsongitignore exception- Public engine API:
instantiateDna()andrunDnaTest()(package:gg_dna/gg_dna.dart); the engine core is free ofdart:ioand compilable to WebAssembly (host access via injectableDnaHost) - Per-file guard: an existing file that carries uncommitted work is never overwritten or deleted — the run names those files and writes nothing; unrelated dirty files do not block it
- Everything the DNA generates is committed right away as
#gg: generated DNA(path-limited, so unrelated changes stay in the working tree); without a repository or git identity the files are kept for a manual commit - Provenance in every failure report: generated files are reported with
the DNA source they are produced from (
edit instead: base_dna/dna/doc/develop.md), so hand edits go into the DNA instead of the generated copy (DnaInstantiationResult.sources) global.overrides.mdin the src root of any layer: its string blocks rewrite{{@tag:…}}placeholders in every merged.mdfile; file-specific overrides of the same layer win, heading-form blocks warn- Warnings (file + line) for leftover pre-4.0 tag notation
Changed #
- BREAKING:
dna/srcis gone — a DNA'sdna/folder itself mirrors the project root (public/private via the_prefix convention) - BREAKING: DNA configuration lives only in
.gg/dna.json;dna:blocks inpubspec.yaml/package.jsonanddna.yamlare migration errors - BREAKING:
gg_dna syncwas replaced bygg_dna init— the instantiation runs inside the placed test on every test run (hand-modified instances fail, DNA updates are written and committed) - BREAKING: git layers were removed — declare DNAs as dev-dependencies;
path:overrides in.gg/dna.jsonremain for local development - BREAKING: the bookkeeping is split in two and renamed —
dna/_dna.json(format v5:layerswithpackage/via, hashes) anddna/_instances.json(the files the DNA owns); leftover.dna.json/.instances.jsonfiles are read once, so ownership survives, and then removed - BREAKING: the effective variables are no longer duplicated into the
bookkeeping —
dna/_vars.jsonis their only home - BREAKING:
config: claude: skills:was removed — skills ship as normal instances atdna/.claude/skills/<name>; only the managed CLAUDE.md block (claude_md: include:) remains special - Base DNA restructured: human documentation at
dna/doc/**(conventions, guides — English), skills atdna/.claude/skills/** - BREAKING: every DNA source ships its mergeable DNA under
dna/src— the gg_dna base DNA, git layers, and path layers; sources withoutdna/srcare an error with a migration hint - BREAKING:
<target>/dna/srcis the implicit last layer — it survives the sync verbatim, is never listed in the config (layer namesrcis reserved), and replacesdna/_override; path layers pointing into<target>/dnaare an error - BREAKING: override files are named
<file>.overrides.md— the old.tag.mdsuffix is a hard error with a rename hint - BREAKING: new tag notation
## [@tag] …and{{@tag:default}}(comment markers<!-- @tag -->); the old notation without@is no longer recognized - BREAKING:
.dna.jsonmanifest format v4 (records the implicit src layer;--checkreports older manifests as outdated — rungg_dna sync)
Removed #
gg_dna sync(including--check,--source,--target), git tag resolution, the skills mirroring and the staging/backup folders (.gg_dna_staging,.gg_dna_backupare no longer created)
3.1.1 - 2026-08-07 #
Added #
- Add .prettierignore and .prettierrc to dna
Changed #
- BREAKING: TypeScript projects instantiate with
kebab-casefile names —package.jsonno longer defaults tocamelCase(the value stays selectable viafileNaming); Dart projects keepsnake_case - Rework DNA repos
- Provide first DNA, i.e. installation and .vscode settings
- Define dna repos
3.1.0 - 2026-08-04 #
Note: released out of order — this version shipped after 4.0.0 and contains the rename below on top of the 4.0.0 changes.
Changed #
- Rename .master to .ocean with automatic migration at next start
3.0.0 - 2026-07-24 #
Added #
dna: config: claude:section:claude_md: include:maintains a managed@-import block in the target's CLAUDE.md (files stay as-is, folders expand to their.mdfiles);skills: include:mirrors skill folders into.claude/skills— only skills gg_dna installed are overwritten or removed, hand-installed skills are never touchedgg_dna synccreates CLAUDE.md when missing and removes leftover pre-3.0gg_dna:conventionsblocksgg_dna sync --checkalso verifies the CLAUDE.md block and the installed skills
Changed #
- BREAKING: layers now live under
dna: dependencies:— the pre-3.0 syntax (layer maps directly underdna:) is rejected with a migration hint - BREAKING:
gg_dna syncis fully non-interactive — theinstall-skillsandapply-conventionssubcommands, all prompts, and the--no-installflag were removed; everything is driven by thedna: config:block - BREAKING:
.dna.jsonmanifest format v3 (adds theclaudesection;--checkreports older manifests as outdated — rungg_dna synconce)
2.1.1 - 2026-07-24 #
2.1.0 - 2026-07-15 #
Changed #
- Support dna config via dna.yaml and package.json for non-Dart repos
- Harden dna config discovery: require dna block in dna.yaml, tolerate foreign package.json dna fields and undecodable sibling files
2.0.0 - 2026-07-15 #
Added #
- Add init-architecture skill that creates/updates README.architecture.md
- Add dna sync manifest with hash/check support and overlay tracking
- Multi-layer DNA: layers are configured in the target pubspec.yaml
dna:block — git layers (optionally pinned via a semverversion:constraint resolved against the repo tags), local path layers, and repo-local layers likedna/_overridethat survive the sync verbatim - Markdown tag overrides:
### [tag]sections and{{tag|default}}strings can be overridden per layer viaX.tag.mdfiles; all markers are rendered away in the synced output
Changed #
- BREAKING:
gg_dna syncno longer accepts a positional overlay argument — configure layers via thedna:block in the target pubspec.yaml - BREAKING: the overlay stored in
.dna.jsonis no longer auto-reused - BREAKING:
.dna.jsonmanifest format v2 (ordered layer list;--checkreports pre-2.0 manifests as outdated) - Release 2.0.0 docs: changelog, readme, dna config example
- Sync builds the new dna tree in a staging folder and swaps it in via
renames — errors can no longer destroy the existing
dna/(in particular in-dna override layers likedna/_override); interrupted swaps are recovered from the backup folder on the next run - Layers are resolved in parallel (clones, ls-remotes) — also in
--check - Prefer stable tags over prereleases in semver resolution
- Doc-comment density rule (max 3 lines before classes, 1 per member) added to the shipped code conventions
- Use MIT license and shorten package description for pub.dev
Fixed #
- Crash (
RangeError) when the same section tag appeared on nested headings - Crash (
TypeError) in--checkon structurally malformed.dna.json - Longer code fences now nest shorter ones (CommonMark closing rule), so fenced markdown examples inside fences stay untouched
- Layer hashes ignore
.git/and are line-ending agnostic — no more false--checkdrift after git activity in a layer folder or CRLF checkouts - A foreign
[tag]in a replacement heading is replaced instead of double-prefixed; mixed line endings normalize to the dominant one - A configured but missing in-dna layer (e.g.
dna/_overrideon a fresh clone — git does not track empty folders) is skipped as empty instead of failing the sync;--checkagrees - Backslash
path:values in the pubspec work on every platform - Fix negative hex hash rendering and cwd race between parallel test suites
1.1.0 - 2026-05-26 #
Added #
- Initial boilerplate.
- Add install-skills tests and .gitattributes; refactor for testability
- Add convention docs and apply-conventions command
- Add sync command and refactor install-skills/apply-conventions
- Add install.bat script and ignore .aicode in .gitignore
- Add workflow and commit discipline guides for gg-kidney and rljson
- Add init skill guide for generating project-aware CLAUDE.md
Changed #
- migrate claude/ configs to agents/, update references throughout
- Move dna files to dna folder