Skip to content

History

History commands enrich the current index with Git-derived signals. Use them to understand churn, materialize historical snapshots, and inspect how a file or symbol changed over time.

Example

Sync recent history

Populates recent churn signals from Git history.

$ agide history sync
history sync: 11 commit(s) scanned, 1 file(s) signaled (window=90d)

Materialization builds temporal intervals from commits so historical symbol queries can answer against concrete snapshots.

Example

Materialize history

Builds temporal file and symbol intervals from Git history.

$ agide history materialize
history materialize: 0 commit(s) processed, 0 file(s) changed
  file intervals:   opened=0 closed=0
  symbol intervals: opened=0 closed=0

File history answers which commits touched a path.

Example

Show file history

Shows commits that touched the tutorial TypeScript file.

$ agide history log src/applyMiddleware.ts
history log: src/applyMiddleware.ts
  b24dd6832316  Raúl Sánchez — Merge branch 'master' into enable-prefer-type-only-imports
  ac804a58126d  Nathan Bierema — Add PreloadedState generic
  5a084a62fda9  Nathan Bierema — Fix type of next parameter in StoreEnhancer type
  692cf5cbb054  Raul Sanchez — Enables prefer type-only imports
  312a170df246  Mark Erikson — More formatting
  2de004ca8ed2  Mark Erikson — Formatting?
  239fbc0fc1f3  Tim Dorr — Update formatting for Prettier 2.3
  8551ba827112  Nathan Bierema — Tighten applyMiddleware types (#3766)
  9e71b4c18e62  Jed Mao — fix TSDoc comments (#3560)
  066fa8103c0a  Gregory Beaver — fix replaceReducer with a store enhancer (#3524)
  8112c956a987  Gregory Beaver — add overloads to compose.ts and applyMiddleware.ts (#3558)
...

Output shortened for readability.

Symbol history tracks quality snapshots for a qname.

Example

Show symbol history

Shows temporal quality snapshots for the selected ranked symbol.

$ agide history symbol src.createStore.createStore
history symbol: src.createStore.createStore
  commit        ord         complexity  cognitive     size    loc  side_effects
  94afef689a45  0                   24         31   5771.8    300    1.00

As-of queries read a symbol’s metrics at a specific ref.

Example

Read a symbol as of a ref

Reads one symbol's historical metrics at HEAD after materialization.

$ agide history as-of HEAD --qname src.createStore.createStore
history as-of: src.createStore.createStore @ 38faff513dc213bac08002f188243d6f23a1b74c
  complexity   24
  cognitive    31
  size         5771.79
  lines        300
  side_effects       1.000
  body hash    645427e00eed0b50