# dave/dst

Decorated Syntax Tree - manipulate Go source with perfect fidelity.

Repository: https://github.com/dave/dst
Canonical: https://ross.abutalabs.com/products/dst
Language: Go
License: NOASSERTION
License Family: other
Last push: 2026-04-14T08:05:29+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 77, release rhythm 35, longevity 100
- inputs: {"age_days": 2909, "days_push": 141, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1438, forks 64 (observed 2026-08-28T04:04:43.857886+00:00)

## What it is
A Go library providing a Decorated Syntax Tree (dst) that allows manipulation of Go source code with perfect fidelity, preserving comments, spacing, and formatting as nodes are modified. It serves as a drop-in alternative to go/ast for source-to-source transformations.

## Use cases
- rewrite Go source code while preserving comments and formatting
- reorder or refactor Go statements without breaking comment attachment
- build automated Go code refactoring tools
- inject or modify comments in Go AST nodes
- convert between go/ast and a fidelity-preserving syntax tree
- generate Go code transformations for codemods

## When to choose
- you need to programmatically modify Go source and keep comments and spacing intact
- go/ast round-tripping loses or misplaces comments in your transformations
- you are building a Go refactoring, linting, or codemod tool
- you need reliable parse-modify-print of Go code

## When to avoid
- you only need to read or analyze Go code without modifying it - go/ast or go/types suffice
- you are working with languages other than Go
- you need type checking or semantic analysis - pair it with go/types instead

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, programming-languages, parsers
- platform: go, cross-platform
- tags: go-ast, source-code-manipulation, syntax-tree, code-generation, decorations, comments-preservation

## Member repositories
- dave/dst (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:43.857886+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:39.755822+00:00, confidence not recorded.
  - readme: https://github.com/dave/dst (fetched 2026-08-28T04:04:43.857886+00:00, sha 0077b90404d9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
