Skip to content

Commit 9f87330

Browse files
author
codejunkie99
committed
Merge remote-tracking branch 'origin/master' into feat/data-layer-monitor
# Conflicts: # .agent/skills/_index.md # .agent/skills/_manifest.jsonl
2 parents 62f4e6b + ab7e9d1 commit 9f87330

19 files changed

Lines changed: 235 additions & 25 deletions

File tree

.agent/AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ are the exact failure mode this layer prevents.
4141
- Load a full `SKILL.md` only when its triggers match the current task
4242
- Every skill has a self-rewrite hook; invoke it after failures
4343

44+
## Design Systems
45+
- If the project root contains `DESIGN.md`, treat it as the source of truth
46+
for visual design decisions and load `skills/design-md/SKILL.md` when a
47+
task mentions `DESIGN.md`, Google Stitch, design tokens, design system,
48+
or visual design. (The skill's `preconditions` field gates loading on
49+
`DESIGN.md` actually existing — keep this rule in lockstep with
50+
`skills/_manifest.jsonl` to avoid same-task / different-harness drift.)
51+
- Prefer exact tokens, component rules, and design rationale from
52+
`DESIGN.md` over invented colors, typography, spacing, shadows, or motion.
53+
- Do not modify `DESIGN.md` unless the user explicitly asks for a design
54+
system change; implementation work consumes the contract, it doesn't
55+
edit it.
56+
4457
## Protocols
4558
- `protocols/permissions.md` — read before any tool call
4659
- `protocols/tool_schemas/` — typed interfaces for external tools

.agent/memory/semantic/DECISIONS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@
1414
**Rationale:** Each layer has different retention and retrieval needs. Flat memory breaks at ~6 weeks.
1515
**Alternatives considered:** Flat directory (fails at scale), vector store (over-engineered for single user).
1616
**Status:** active
17+
18+
## 2026-04-26: Add `design-md` seed skill (DESIGN.md / Google Stitch)
19+
**Decision:** Ship a sixth seed skill, `design-md`, that points coding agents at a root `DESIGN.md` (Google Stitch format) as the visual-system source of truth. Loads only when `DESIGN.md` exists at the project root, default behavior is read-only on the contract file, and validation prefers `npx @google/design.md lint DESIGN.md` over hand-checks.
20+
**Rationale:** `DESIGN.md` is becoming a de facto contract for AI-driven UI work; without an explicit skill, agents invent ad-hoc tokens that drift from the user's design system. Gating on `DESIGN.md`-existence keeps the skill silent on projects that don't use the format.
21+
**Alternatives considered:** Bundle the rules into `git-proxy` or `skillforge` (wrong scope, wrong triggers); leave it to per-project `.agent/skills/` overrides (loses the cross-harness benefit); broader triggers like "UI"/"frontend"/"components"/"styling" (too generic, loads on every UI task even without DESIGN.md).
22+
**Status:** active

.agent/skills/_index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ Triggers: "data layer", "dashboard", "agent analytics", "resource usage",
3333
"cron monitoring", "daily report", "tokens"
3434
Constraints: local-only by default; no screenshot delivery without explicit user
3535
approval; do not commit private `.agent/data-layer/` exports.
36+
37+
## design-md
38+
Uses a root `DESIGN.md` as the portable visual system contract for
39+
Google Stitch workflows. Loads only when `DESIGN.md` exists at the
40+
project root.
41+
Triggers: "DESIGN.md", "design.md", "Google Stitch", "design tokens",
42+
"design system", "visual design"
43+
Preconditions: DESIGN.md exists at project root.
44+
Constraints: prefer DESIGN.md tokens over invented values, do not modify
45+
DESIGN.md unless the user explicitly asks, preserve unknown sections when
46+
an edit IS authorised, validate with `npx @google/design.md lint DESIGN.md`
47+
when available.

.agent/skills/_manifest.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
{"name":"debug-investigator","version":"2026-01-01","triggers":["debug","why is this failing","investigate","stack trace","bug"],"tools":["bash","memory_reflect"],"preconditions":[],"constraints":["reproduce before fixing","fix root cause, not symptoms"],"category":"engineering"}
55
{"name":"deploy-checklist","version":"2026-01-01","triggers":["deploy","ship","release","go live"],"tools":["bash"],"preconditions":[],"constraints":["all tests passing","no unresolved TODOs in diff","requires human approval for production"],"category":"operations"}
66
{"name":"data-layer","version":"2026-04-25","triggers":["data layer","dashboard","agent analytics","resource usage","cron monitoring","daily report","tokens"],"tools":["bash","git"],"preconditions":[".agent exists"],"constraints":["local-only by default","no screenshot delivery without explicit user approval","do not commit private .agent/data-layer exports"],"category":"operations"}
7+
{"name":"design-md","version":"2026-04-26","triggers":["DESIGN.md","design.md","Google Stitch","Stitch","design tokens","design system","visual design"],"tools":["bash","memory_reflect"],"preconditions":["DESIGN.md exists at project root"],"constraints":["prefer DESIGN.md tokens over invented values","do not modify DESIGN.md unless the user explicitly asks","preserve unknown sections when an edit IS authorised","validate when tooling is available"],"category":"design"}

.agent/skills/design-md/SKILL.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: design-md
3+
version: 2026-04-26
4+
triggers: ["DESIGN.md", "design.md", "Google Stitch", "Stitch", "design tokens", "design system", "visual design"]
5+
tools: [bash, memory_reflect]
6+
preconditions: ["DESIGN.md exists at project root"]
7+
constraints: ["prefer DESIGN.md tokens over invented values", "do not modify DESIGN.md unless the user explicitly asks", "preserve unknown sections when an edit IS authorised", "validate when tooling is available"]
8+
---
9+
10+
# DESIGN.md — portable visual system contract
11+
12+
Use this skill when a task touches Google Stitch's `DESIGN.md` format or
13+
the project explicitly references its design system / design tokens. The
14+
skill loads only when `DESIGN.md` exists at the project root (see
15+
`preconditions` above), so general UI / frontend / component work that
16+
isn't tied to a `DESIGN.md` won't trip it.
17+
18+
## Source of truth
19+
- `DESIGN.md` is a contract file. Read it before changing visual UI.
20+
- Treat YAML front matter tokens as normative values: colors, typography,
21+
spacing, radius, and component tokens are exact inputs to code.
22+
- Treat the Markdown body as design rationale: it explains mood, hierarchy,
23+
interaction intent, and where tokens should or should not be used.
24+
- If no `DESIGN.md` exists this skill is inactive; for new UI, offer to
25+
create one or ask for a brand/reference, but don't generate one
26+
unprompted.
27+
28+
## Default: read-only
29+
**Do not modify `DESIGN.md` unless the user explicitly asks for a design
30+
system change.** Implementation work consumes the contract; it does not
31+
edit it. Token additions, renames, or section restructures land in their
32+
own commit with a clear message and (ideally) a Stitch round-trip.
33+
34+
## Implementation rules
35+
1. Map tokens into the local styling system already in use: CSS variables,
36+
Tailwind theme values, design-token JSON, component props, or native
37+
styles.
38+
2. Use token references and component patterns from `DESIGN.md` instead of
39+
hard-coded one-off values.
40+
3. Keep accessibility constraints intact. Do not weaken contrast, focus,
41+
reduced-motion, or touch-target guidance unless the user explicitly
42+
asks.
43+
44+
## When an edit IS authorised
45+
1. Preserve unknown headings and extra prose; other agents or Stitch may
46+
own them.
47+
2. Express component variants as related entries
48+
(`button-primary`, `button-primary-hover`, etc.).
49+
3. Land token / structure changes in their own commit, separate from the
50+
feature consuming them.
51+
52+
## Validation
53+
- If Node/npm tooling is available, lint with:
54+
55+
```bash
56+
npx @google/design.md lint DESIGN.md
57+
```
58+
59+
- For design system changes, diff before/after:
60+
61+
```bash
62+
npx @google/design.md diff DESIGN.before.md DESIGN.md
63+
```
64+
65+
- If the CLI is unavailable or network/dependency policy blocks it, the
66+
manual fallback is best-effort only — check for broken `{path.to.token}`
67+
references, missing primary color / typography tokens, duplicate section
68+
headings, and section order. The CLI ALSO checks contrast ratios and
69+
orphaned tokens; the manual fallback does not, so re-run the CLI when
70+
you regain network access.
71+
72+
## Expected sections
73+
The Google draft spec uses YAML front matter plus Markdown sections.
74+
Common sections:
75+
76+
- `## Overview`
77+
- `## Colors`
78+
- `## Typography`
79+
- `## Layout`
80+
- `## Elevation & Depth`
81+
- `## Shapes`
82+
- `## Components`
83+
- `## Do's and Don'ts`
84+
85+
## Self-rewrite hook
86+
After every 5 uses OR on any failure:
87+
1. Read the last N skill-specific episodic entries.
88+
2. If a new failure mode has appeared (e.g. tokens drifting away from
89+
DESIGN.md, accessibility rules being weakened, unauthorised edits to
90+
the contract file), append it to this skill's `KNOWLEDGE.md`.
91+
3. If a constraint was violated, escalate to `semantic/LESSONS.md`.
92+
4. Commit: `skill-update: design-md, <one-line reason>`.

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,55 @@ All notable changes to this project.
55
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.10.0] — 2026-04-26
9+
10+
Minor release. Adds the `design-md` seed skill (sixth seed skill in the
11+
brain), and fixes a hard crash on macOS-default Python 3.9 that hit every
12+
brew user on first run.
13+
14+
### Added
15+
- **`design-md` seed skill — DESIGN.md / Google Stitch support.** A new
16+
portable skill that points coding agents at a root `DESIGN.md` (Google
17+
Stitch format) as the visual-system source of truth. Loads only when
18+
`DESIGN.md` exists at the project root; default behavior is read-only on
19+
the contract file, and validation prefers
20+
`npx @google/design.md lint DESIGN.md` over hand-checks. Brings the seed
21+
skill count from five to six. Thanks to @danielfoch for the contribution
22+
(PR #21). Decision recorded in `.agent/memory/semantic/DECISIONS.md`.
23+
24+
### Fixed
25+
- **Python 3.9 crash on first run (#27).** Every brew user on macOS-default
26+
Python 3.9 hit `TypeError: unsupported operand type(s) for |: 'type' and
27+
'type'` immediately after `brew install agentic-stack` because
28+
`harness_manager/` used PEP 604 union syntax (`Path | str`) that requires
29+
Python 3.10+ at runtime. Added `from __future__ import annotations`
30+
(PEP 563) to the eight affected files so all annotations are stored as
31+
strings and never evaluated at import time. Works on Python 3.7+, which
32+
covers every macOS-shipped Python in the wild. Zero-cost vs. the
33+
reporter's suggested `python@3.10` brew dep (~150 MB pull). Thanks to
34+
@WhoLsJohnGalt for the precise repro and the suggested workaround.
35+
36+
### Migration
37+
`brew upgrade agentic-stack` is enough — no on-disk schema changes. Users
38+
on Python 3.9 who hit #27 on v0.9.x can upgrade and the crash goes away.
39+
Users with existing `.pi/extensions/memory-hook.ts` from v0.9.0 already
40+
got the fixes via `./install.sh pi` after the v0.9.1 upgrade; this release
41+
adds the `design-md` skill on top.
42+
43+
### Release
44+
- Tag `v0.10.0` cut from master.
45+
- GitHub release: <https://github.com/codejunkie99/agentic-stack/releases/tag/v0.10.0>
46+
- `Formula/agentic-stack.rb` bumped to v0.10.0 in a follow-up commit
47+
(same flow as v0.8.0 → v0.9.0 → v0.9.1): tag first, compute sha256,
48+
then bump `url` + `sha256` + `version` together so brew always points
49+
at a real installable artifact.
50+
51+
### Credits
52+
- PR #21 by @danielfoch (design-md skill), with cross-model review fixes
53+
applied as a follow-up commit.
54+
- Issue #27 by @WhoLsJohnGalt — clean repro of the macOS Python 3.9 crash
55+
including a working sed-based workaround.
56+
857
## [0.9.1] — 2026-04-26
958

1059
Patch release that closes the gap between v0.9.0 and a working pi adapter.

Formula/agentic-stack.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class AgenticStack < Formula
22
desc "One brain, many harnesses — portable .agent/ folder for AI coding agents"
33
homepage "https://github.com/codejunkie99/agentic-stack"
4-
url "https://github.com/codejunkie99/agentic-stack/archive/refs/tags/v0.9.1.tar.gz"
5-
sha256 "09cc3b8c9ec159cf8b85cf672fc15a29e6bfa9377cc9c59dd270acd441ced568"
6-
version "0.9.1"
4+
url "https://github.com/codejunkie99/agentic-stack/archive/refs/tags/v0.10.0.tar.gz"
5+
sha256 "5d1e7de9478bdeaf684b0b2eb600e597886aeab52dda8494c7e304cceb0f1438"
6+
version "0.10.0"
77
license "Apache-2.0"
88

99
def install

README.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,31 @@ screenshot-ready daily dashboards.
1717
<img src="docs/diagram.svg" alt="agentic-stack architecture" width="880"/>
1818
</p>
1919

20-
### New in v0.9.1 — pi adapter fixes + tz correctness
21-
22-
Patch release. Closes the gap between v0.9.0 and a working pi adapter,
23-
plus a timezone sweep across every Python writer/reader so the dream
24-
cycle stops drifting against the UTC decay window.
25-
26-
- Brew users on v0.9.0 hit `ModuleNotFoundError: harness_manager` on
27-
first run. Formula now installs `harness_manager/` correctly.
28-
- Pi's dream cycle never fired (`session_shutdown` filter rejected every
29-
event because `SessionShutdownEvent` has no `reason` field). Now runs.
30-
- Pi's edit reflections were missing the diff (hook expected MultiEdit
31-
shape; Pi's edit input is flat). Now captures `oldText` / `newText`.
32-
- Naive-local Python timestamps reinterpreted at decay time as UTC
33-
caused silent drift. Every writer now emits aware UTC; every reader
34-
normalises naive entries before comparing.
35-
- `auto_dream` held no lock across its read-modify-write window —
36-
concurrent appenders could be silently truncated. Now holds a single
37-
`flock(LOCK_EX)` on the episodic log for the full cycle.
20+
### New in v0.10.0 — design-md skill + Python 3.9 fix
21+
22+
Minor release. Adds a sixth seed skill and unbreaks `brew install` for
23+
every macOS user on the system Python.
24+
25+
- **`design-md` seed skill.** Drop a Google Stitch-style `DESIGN.md` in
26+
your project root and the skill points coding agents at it as the
27+
visual-system source of truth — colors, typography, spacing, components,
28+
rationale. Loads only when `DESIGN.md` exists; default behavior is
29+
read-only on the contract file.
30+
- **Python 3.9 crash on first run is fixed (#27).** Every brew user on
31+
macOS-default Python 3.9 hit `TypeError: unsupported operand type(s) for
32+
|: 'type' and 'type'` immediately after install. Root cause: PEP 604
33+
union annotations (`Path | str`) that require Python 3.10+. Fixed by
34+
adding `from __future__ import annotations` to the eight affected
35+
`harness_manager/` files; works on Python 3.7+.
3836

3937
See [CHANGELOG.md](CHANGELOG.md) for the full list.
4038

39+
### v0.9.1 — pi adapter fixes + tz correctness
40+
41+
Closed the gap between v0.9.0 and a working pi adapter, plus a timezone
42+
sweep across every Python writer/reader so the dream cycle stops drifting
43+
against the UTC decay window.
44+
4145
### v0.9.0 — harness manager
4246

4347
<p align="center">
@@ -193,7 +197,7 @@ See [`docs/architecture.md`](docs/architecture.md) for the full lifecycle.
193197

194198
Every guide shows the folder structure. This repo gives you the folder
195199
structure **plus the files that actually go inside**: a working portable
196-
brain with five seed skills, four memory layers, enforced permissions, a
200+
brain with six seed skills, four memory layers, enforced permissions, a
197201
nightly staging cycle, host-agent review tools, and adapters for multiple
198202
harnesses.
199203

@@ -206,7 +210,9 @@ harnesses.
206210
a required rationale. No unattended reasoning, no provider coupling.
207211
- **Skills** — progressive disclosure. A lightweight manifest always
208212
loads; full `SKILL.md` files only load when triggers match the task.
209-
Every skill ships with a self-rewrite hook.
213+
Every skill ships with a self-rewrite hook. The bundled `design-md`
214+
skill teaches agents to use a root `DESIGN.md` as the visual source of
215+
truth for UI and Google Stitch workflows.
210216
- **Protocols** — typed tool schemas, a `permissions.md` that the
211217
pre-tool-call hook enforces, and a delegation contract for sub-agents.
212218
- **Data layer** — local-only dashboard exports across every harness sharing
@@ -328,6 +334,8 @@ verify_codex_fixes.py # v0.8.0 regression checks (33 checks)
328334
- **git-proxy** — all git ops, with safety constraints
329335
- **debug-investigator** — reproduce → isolate → hypothesize → verify
330336
- **deploy-checklist** — the fence between staging and production
337+
- **design-md** — uses Google Stitch-style `DESIGN.md` files as portable
338+
design-system context for UI, frontend, and component work
331339

332340
## How it compounds
333341

docs/demo/src/scenes/Outro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { COLORS, FONT } from "../tokens";
33

44
const STATS = [
55
{ value: "7", label: "harnesses" },
6-
{ value: "5", label: "seed skills" },
6+
{ value: "6", label: "seed skills" },
77
{ value: "4", label: "memory layers" },
88
];
99

docs/getting-started.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ Open your harness and ask it anything. The first few days it will feel
4242
stateless. After ~2 weeks you'll notice it checking past lessons, logging
4343
failures with reflection, and (if you let it) proposing skill rewrites.
4444

45+
## Optional: add a visual system with `DESIGN.md`
46+
47+
If your project has UI, drop a Google Stitch-style `DESIGN.md` file in the
48+
project root. The bundled `design-md` skill tells compatible agents to use
49+
that file as the source of truth for colors, typography, spacing, component
50+
rules, and design rationale instead of inventing visual choices.
51+
52+
When Node tooling is available, agents can validate the file with:
53+
54+
```bash
55+
npx @google/design.md lint DESIGN.md
56+
```
57+
4558
## Verify the wiring
4659
```bash
4760
python3 .agent/tools/budget_tracker.py "commit and push"

0 commit comments

Comments
 (0)