unchartable 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- unchartable-0.1.0/.agents/skills/data-driven-tests/SKILL.md +64 -0
- unchartable-0.1.0/.agents/skills/di-config-ownership/SKILL.md +51 -0
- unchartable-0.1.0/.agents/skills/docker-dev-workflow/SKILL.md +34 -0
- unchartable-0.1.0/.agents/skills/fresh-context-review/SKILL.md +78 -0
- unchartable-0.1.0/.agents/skills/github-plugin/SKILL.md +41 -0
- unchartable-0.1.0/.agents/skills/project-docs/SKILL.md +108 -0
- unchartable-0.1.0/.agents/skills/skill-eval-gate/SKILL.md +87 -0
- unchartable-0.1.0/.agents/skills/ub-mode/SKILL.md +176 -0
- unchartable-0.1.0/.agents/skills/user-stories/SKILL.md +56 -0
- unchartable-0.1.0/.agents/skills/write-requirements/SKILL.md +58 -0
- unchartable-0.1.0/.cursor/skills/data-driven-tests/SKILL.md +64 -0
- unchartable-0.1.0/.cursor/skills/di-config-ownership/SKILL.md +51 -0
- unchartable-0.1.0/.cursor/skills/docker-dev-workflow/SKILL.md +34 -0
- unchartable-0.1.0/.cursor/skills/fresh-context-review/SKILL.md +78 -0
- unchartable-0.1.0/.cursor/skills/github-plugin/SKILL.md +41 -0
- unchartable-0.1.0/.cursor/skills/project-docs/SKILL.md +108 -0
- unchartable-0.1.0/.cursor/skills/skill-eval-gate/SKILL.md +87 -0
- unchartable-0.1.0/.cursor/skills/ub-mode/SKILL.md +176 -0
- unchartable-0.1.0/.cursor/skills/user-stories/SKILL.md +56 -0
- unchartable-0.1.0/.cursor/skills/write-requirements/SKILL.md +58 -0
- unchartable-0.1.0/AGENTS.md +63 -0
- unchartable-0.1.0/CHANGELOG.md +14 -0
- unchartable-0.1.0/LICENSE +21 -0
- unchartable-0.1.0/MANIFEST.in +14 -0
- unchartable-0.1.0/PKG-INFO +114 -0
- unchartable-0.1.0/README.md +87 -0
- unchartable-0.1.0/docs/architecture/README.md +7 -0
- unchartable-0.1.0/docs/architecture/charting-library.md +43 -0
- unchartable-0.1.0/docs/architecture/object-model-proposal.md +140 -0
- unchartable-0.1.0/docs/architecture/socials-migration.md +34 -0
- unchartable-0.1.0/docs/architecture/static-widgets.md +88 -0
- unchartable-0.1.0/docs/guides/audio-graphs.md +286 -0
- unchartable-0.1.0/docs/guides/chart-workbench.md +145 -0
- unchartable-0.1.0/docs/guides/consumer-adapters.md +155 -0
- unchartable-0.1.0/docs/guides/publishing.md +76 -0
- unchartable-0.1.0/docs/inspiration/trouble-skill-evals-and-review-2026-10-29.md +87 -0
- unchartable-0.1.0/docs/meta/COMMON-THREADS.md +29 -0
- unchartable-0.1.0/docs/meta/initial-review.md +16 -0
- unchartable-0.1.0/docs/meta/template-import.md +15 -0
- unchartable-0.1.0/docs/reference/charts/area-share.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/area-stacked.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/area.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/bar-share.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/bar-stacked.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/bar.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/bubble.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/connection-arrows.rst +70 -0
- unchartable-0.1.0/docs/reference/charts/connection-cable.rst +70 -0
- unchartable-0.1.0/docs/reference/charts/connection-fuse.rst +70 -0
- unchartable-0.1.0/docs/reference/charts/density.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/directed.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/doughnut.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/grid.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/heatmap.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-acoustic.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-control.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-electrical.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-multichannel-bus.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-musical-events.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line-recorded-value.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/line.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/meter.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/mixed.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/panels.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/pie.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/rings.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/scatter.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/schematic.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/skin-aqua.rst +70 -0
- unchartable-0.1.0/docs/reference/charts/skin-benthic.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/skin-dark-symbols.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/skin-dusk.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/skin-light-symbols.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/skin-neutral.rst +70 -0
- unchartable-0.1.0/docs/reference/charts/skin-skittles.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/skin-watercolor.rst +74 -0
- unchartable-0.1.0/docs/reference/charts/spectrum.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/symbols.rst +68 -0
- unchartable-0.1.0/docs/reference/charts/waveform.rst +66 -0
- unchartable-0.1.0/docs/reference/charts/window.rst +66 -0
- unchartable-0.1.0/docs/reference/public-api.md +131 -0
- unchartable-0.1.0/docs/reference/support-policy.md +33 -0
- unchartable-0.1.0/docs/requirements/README.md +24 -0
- unchartable-0.1.0/docs/requirements/charting-library.md +47 -0
- unchartable-0.1.0/docs/requirements/engineering-practice.md +69 -0
- unchartable-0.1.0/docs/requirements/example-gallery.md +42 -0
- unchartable-0.1.0/docs/requirements/local-env.md +33 -0
- unchartable-0.1.0/docs/requirements/public-api.md +63 -0
- unchartable-0.1.0/docs/requirements/requirements-style.md +46 -0
- unchartable-0.1.0/docs/requirements/validation-and-ci.md +33 -0
- unchartable-0.1.0/examples/compare_renderers.py +50 -0
- unchartable-0.1.0/examples/render_arrow_styles.py +30 -0
- unchartable-0.1.0/examples/render_audio_cables.py +23 -0
- unchartable-0.1.0/examples/render_audio_display.py +25 -0
- unchartable-0.1.0/examples/render_audio_graphs.py +64 -0
- unchartable-0.1.0/examples/render_bomb_nodes.py +30 -0
- unchartable-0.1.0/examples/render_chart_workbench.py +60 -0
- unchartable-0.1.0/examples/render_connection_palettes.py +26 -0
- unchartable-0.1.0/examples/render_consumer_adapters.py +63 -0
- unchartable-0.1.0/examples/render_fuse_connections.py +42 -0
- unchartable-0.1.0/examples/render_gallery.py +18 -0
- unchartable-0.1.0/examples/render_model_hierarchy.py +57 -0
- unchartable-0.1.0/examples/render_submediant_component.py +46 -0
- unchartable-0.1.0/examples/render_submediant_studio.py +28 -0
- unchartable-0.1.0/examples/render_symbol_skins.py +37 -0
- unchartable-0.1.0/examples/render_windows.py +39 -0
- unchartable-0.1.0/examples/site_gallery.py +110 -0
- unchartable-0.1.0/pyproject.toml +28 -0
- unchartable-0.1.0/run_checks.sh +4 -0
- unchartable-0.1.0/scripts/api_documents.py +114 -0
- unchartable-0.1.0/scripts/build_site.py +71 -0
- unchartable-0.1.0/scripts/check_distribution.py +94 -0
- unchartable-0.1.0/scripts/check_project_metadata.py +15 -0
- unchartable-0.1.0/scripts/import_submediant_symbols.py +60 -0
- unchartable-0.1.0/scripts/release_manifest.py +49 -0
- unchartable-0.1.0/scripts/run_checks.py +19 -0
- unchartable-0.1.0/scripts/smoke_installed.py +45 -0
- unchartable-0.1.0/setup.cfg +4 -0
- unchartable-0.1.0/site/index.html +14 -0
- unchartable-0.1.0/src/unchartable/__init__.py +77 -0
- unchartable-0.1.0/src/unchartable/audio_displays.py +101 -0
- unchartable-0.1.0/src/unchartable/chart_axes.py +173 -0
- unchartable-0.1.0/src/unchartable/chart_config.py +182 -0
- unchartable-0.1.0/src/unchartable/chart_layout.py +184 -0
- unchartable-0.1.0/src/unchartable/chart_model.py +235 -0
- unchartable-0.1.0/src/unchartable/chart_service.py +41 -0
- unchartable-0.1.0/src/unchartable/compat.py +19 -0
- unchartable-0.1.0/src/unchartable/components.py +431 -0
- unchartable-0.1.0/src/unchartable/composition_layout.py +307 -0
- unchartable-0.1.0/src/unchartable/connection_curves.py +53 -0
- unchartable-0.1.0/src/unchartable/connection_palette.py +45 -0
- unchartable-0.1.0/src/unchartable/connection_skin.py +279 -0
- unchartable-0.1.0/src/unchartable/data/schematic/symbols.json +8385 -0
- unchartable-0.1.0/src/unchartable/directed_graph.py +220 -0
- unchartable-0.1.0/src/unchartable/figure_service.py +51 -0
- unchartable-0.1.0/src/unchartable/font_provider.py +13 -0
- unchartable-0.1.0/src/unchartable/graph_layout.py +173 -0
- unchartable-0.1.0/src/unchartable/graph_routing.py +49 -0
- unchartable-0.1.0/src/unchartable/neostudio_adapter.py +208 -0
- unchartable-0.1.0/src/unchartable/node_shapes.py +84 -0
- unchartable-0.1.0/src/unchartable/radial_charts.py +207 -0
- unchartable-0.1.0/src/unchartable/render_api.py +67 -0
- unchartable-0.1.0/src/unchartable/renderers/__init__.py +5 -0
- unchartable-0.1.0/src/unchartable/renderers/base.py +35 -0
- unchartable-0.1.0/src/unchartable/renderers/pillow_renderer.py +126 -0
- unchartable-0.1.0/src/unchartable/renderers/svg_renderer.py +55 -0
- unchartable-0.1.0/src/unchartable/scene.py +152 -0
- unchartable-0.1.0/src/unchartable/schematic_style.py +55 -0
- unchartable-0.1.0/src/unchartable/schematic_symbols.py +54 -0
- unchartable-0.1.0/src/unchartable/scientific_charts.py +380 -0
- unchartable-0.1.0/src/unchartable/socials_adapter.py +185 -0
- unchartable-0.1.0/src/unchartable/socials_panels.py +240 -0
- unchartable-0.1.0/src/unchartable/submediant_adapter.py +31 -0
- unchartable-0.1.0/src/unchartable/submediant_graph.py +97 -0
- unchartable-0.1.0/src/unchartable/text_layout.py +86 -0
- unchartable-0.1.0/src/unchartable/widget_skin.py +159 -0
- unchartable-0.1.0/src/unchartable.egg-info/PKG-INFO +114 -0
- unchartable-0.1.0/src/unchartable.egg-info/SOURCES.txt +185 -0
- unchartable-0.1.0/src/unchartable.egg-info/dependency_links.txt +1 -0
- unchartable-0.1.0/src/unchartable.egg-info/requires.txt +16 -0
- unchartable-0.1.0/src/unchartable.egg-info/top_level.txt +1 -0
- unchartable-0.1.0/tests/fixtures/consumers/neostudio-linux.json +101 -0
- unchartable-0.1.0/tests/fixtures/consumers/neostudio-mock.json +1313 -0
- unchartable-0.1.0/tests/fixtures/consumers/provenance.json +33 -0
- unchartable-0.1.0/tests/fixtures/consumers/socials-panels.json +12 -0
- unchartable-0.1.0/tests/fixtures/consumers/submediant-ensemble.json +809 -0
- unchartable-0.1.0/tests/test_api_doctests.py +55 -0
- unchartable-0.1.0/tests/test_audio_displays.py +18 -0
- unchartable-0.1.0/tests/test_chart_axes.py +82 -0
- unchartable-0.1.0/tests/test_chart_rendering.py +118 -0
- unchartable-0.1.0/tests/test_composition_layout.py +46 -0
- unchartable-0.1.0/tests/test_composition_widgets.py +31 -0
- unchartable-0.1.0/tests/test_connection_curves.py +23 -0
- unchartable-0.1.0/tests/test_connection_palette.py +28 -0
- unchartable-0.1.0/tests/test_connection_skin.py +69 -0
- unchartable-0.1.0/tests/test_consumer_adapters.py +190 -0
- unchartable-0.1.0/tests/test_desktop.py +17 -0
- unchartable-0.1.0/tests/test_directed_graph.py +129 -0
- unchartable-0.1.0/tests/test_figure_components.py +44 -0
- unchartable-0.1.0/tests/test_font_provider.py +27 -0
- unchartable-0.1.0/tests/test_node_shapes.py +30 -0
- unchartable-0.1.0/tests/test_release_artifacts.py +35 -0
- unchartable-0.1.0/tests/test_render_api.py +34 -0
- unchartable-0.1.0/tests/test_schematic_style.py +75 -0
- unchartable-0.1.0/tests/test_scientific_charts.py +73 -0
- unchartable-0.1.0/tests/test_site_gallery.py +75 -0
- unchartable-0.1.0/tests/test_text_layout.py +51 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-driven-tests
|
|
3
|
+
description: >-
|
|
4
|
+
Prefer declarative fixture matrices over near-duplicate test functions. Use
|
|
5
|
+
when adding tests, expanding coverage, parametrizing cases, converting tests
|
|
6
|
+
to data-driven form, or when the user mentions fixtures, case matrices, or
|
|
7
|
+
test proliferation.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Data-driven tests
|
|
11
|
+
|
|
12
|
+
Prefer **one interpreter + many fixtures** over N test functions that rebuild
|
|
13
|
+
the same arrange/act/assert with slight input tweaks.
|
|
14
|
+
|
|
15
|
+
## When to apply
|
|
16
|
+
|
|
17
|
+
**Do** when several tests share setup and differ mainly by inputs/expects; when
|
|
18
|
+
covering a decision matrix; when new coverage would be another near-clone.
|
|
19
|
+
|
|
20
|
+
**Skip** when the check is a unique structural/DI/import smoke test, or when a
|
|
21
|
+
fixture DSL would be longer than one focused unit test.
|
|
22
|
+
|
|
23
|
+
## Layout
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
tests/
|
|
27
|
+
fixtures/<domain>/ # one case file per scenario; id == stem preferred
|
|
28
|
+
support/<domain>_cases.py # load, build doubles, assert_expect (or equiv.)
|
|
29
|
+
test_<domain>.py # parametrize over iter_cases(); tiny structural tests aside
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Name the **domain** at the leaf (see `unambiguous-names` rule) — not `cases` / `matrix`.
|
|
33
|
+
|
|
34
|
+
## Case shape (minimum)
|
|
35
|
+
|
|
36
|
+
| Field | Role |
|
|
37
|
+
|-------|------|
|
|
38
|
+
| `id` | Stable case id (default: filename stem) |
|
|
39
|
+
| `description` | Why this case exists |
|
|
40
|
+
| inputs… | Domain arrange data |
|
|
41
|
+
| `expect` | Outcomes the interpreter understands |
|
|
42
|
+
|
|
43
|
+
Prefer scripted modes (`succeed`, `fail_n_then_succeed`, `raise`) over embedding
|
|
44
|
+
code in fixtures. Put branching in the interpreter once.
|
|
45
|
+
|
|
46
|
+
## Interpreter rules
|
|
47
|
+
|
|
48
|
+
1. Call the **public** API; assert on results/events/payloads.
|
|
49
|
+
2. One `assert_expect(...)` with clear `case {id}: …` messages.
|
|
50
|
+
3. No `if case.id == …` forks in the test module — extend the schema instead.
|
|
51
|
+
4. Assert matrix size / unique ids so empty dirs fail loudly.
|
|
52
|
+
|
|
53
|
+
## Coverage bar (default)
|
|
54
|
+
|
|
55
|
+
For each functional change: cover success paths touched by the change; cover
|
|
56
|
+
identified edge cases aggressively; leave the suite green via project
|
|
57
|
+
`run_checks` / CI (see `validation-gates` rule).
|
|
58
|
+
|
|
59
|
+
## Unchartable rendering
|
|
60
|
+
|
|
61
|
+
For CHART-05 and CHART-06, exercise public services across chart kinds and both
|
|
62
|
+
backends. Include signed/zero values, missing observations, invalid inputs, and
|
|
63
|
+
stack/share geometry. Parse SVG and decode PNG; do not accept merely nonempty
|
|
64
|
+
output as proof of correct geometry. Check injected renderer substitutions.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: di-config-ownership
|
|
3
|
+
description: >-
|
|
4
|
+
Keep shared Settings slim: service and provider knobs belong on owning
|
|
5
|
+
injectables and Config hooks. Use when adding Settings fields, backends,
|
|
6
|
+
providers, connections, from_env wiring, or when tempted to put URLs, OAuth,
|
|
7
|
+
or service instances on Settings. For pyiv DI-first projects.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# DI config ownership
|
|
11
|
+
|
|
12
|
+
**Settings is not a provider bag.** Injectables that need configuration own it.
|
|
13
|
+
|
|
14
|
+
## When to apply
|
|
15
|
+
|
|
16
|
+
- Adding or changing `Settings` / `*Settings` fields
|
|
17
|
+
- Adding a backend, provider, reader/writer, or HTTP connection
|
|
18
|
+
- Tempted to put `*_base_url`, credentials, codec options, or service instances on Settings
|
|
19
|
+
|
|
20
|
+
## Checklist
|
|
21
|
+
|
|
22
|
+
1. **Name the owner injectable** — connection config, strategy/provider, nested config type — not Settings.
|
|
23
|
+
2. **Put knobs on that type** — constructor args and/or `from_env()` on that type.
|
|
24
|
+
3. **Expose via Config hook** — e.g. `get_*_connection()`, `get_*_provider()`, `get_*_class()`. Register in `configure()`.
|
|
25
|
+
4. **Env for operators** — document env on the owning type; do not mirror every env into Settings. Prefer files under `.env/` for local secrets (see `env-secrets` rule).
|
|
26
|
+
5. **Do not add to Settings** unless the knob is truly cross-cutting run surface — and prefer shrinking Settings over time.
|
|
27
|
+
6. **Never** store provider/strategy/service **instances** as Settings attributes.
|
|
28
|
+
|
|
29
|
+
## Anti-patterns
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# BAD
|
|
33
|
+
Settings.judge_base_url = ...
|
|
34
|
+
Settings.writer = AvroChunkWriter(...)
|
|
35
|
+
|
|
36
|
+
# GOOD
|
|
37
|
+
SimpleHttpConnectionConfig.from_env() # or explicit ctor
|
|
38
|
+
class AppConfig(ProjectConfig):
|
|
39
|
+
def get_writer_class(self):
|
|
40
|
+
return AvroChunkWriter
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Flavors of the same type use qualified bindings (`Named` / `Key` / `Matched`), not a second Settings map.
|
|
44
|
+
|
|
45
|
+
See `.cursor/rules/di-first.mdc`.
|
|
46
|
+
|
|
47
|
+
## Unchartable renderer wiring
|
|
48
|
+
|
|
49
|
+
Apply CHART-04 in `docs/requirements/charting-library.md`: override
|
|
50
|
+
`ChartConfig.get_renderer_class()` and owning option hooks; retain
|
|
51
|
+
`super().configure()`. Keep chart input and scene types independent of pyiv.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docker-dev-workflow
|
|
3
|
+
description: >-
|
|
4
|
+
Run project CLI, tests, and tooling inside Docker for reproducible
|
|
5
|
+
environments. Use when adding dependencies, writing run scripts, debugging
|
|
6
|
+
environment drift, or when the user mentions Docker, containers, or host vs
|
|
7
|
+
container execution.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Docker dev workflow
|
|
11
|
+
|
|
12
|
+
Prefer a **project container** (or Compose service) for CLI tools and test runs
|
|
13
|
+
so host language/tool versions do not drift.
|
|
14
|
+
|
|
15
|
+
## Defaults
|
|
16
|
+
|
|
17
|
+
1. If no Dockerfile exists and the user wants isolation, add a minimal one and a
|
|
18
|
+
thin wrapper script (`run_checks.sh`, `scripts/docker.sh`, etc.).
|
|
19
|
+
2. Mount the project directory into the container; keep durable/local data under
|
|
20
|
+
`.env/` on the host (see `env-secrets` rule) and bind-mount as needed.
|
|
21
|
+
3. Add runtime OS packages and language toolchains to the image — not ad-hoc on
|
|
22
|
+
the developer laptop — when those tools are required to build or test.
|
|
23
|
+
4. Document the one command humans and agents should run (e.g. `./run_checks.sh`).
|
|
24
|
+
|
|
25
|
+
## Do not
|
|
26
|
+
|
|
27
|
+
- Assume host-installed toolchains when the project standardized on Docker.
|
|
28
|
+
- Commit image-local state or bind-mounted `.env/` contents.
|
|
29
|
+
- `COPY` `.env/` into images (see `.dockerignore`).
|
|
30
|
+
|
|
31
|
+
## When Docker is optional
|
|
32
|
+
|
|
33
|
+
Pure library work with a locked local toolchain may skip containers; still keep
|
|
34
|
+
`run_checks.sh` as the single entry for CI parity.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fresh-context-review
|
|
3
|
+
description: >-
|
|
4
|
+
Independent specification review with no author-context leakage. Use when
|
|
5
|
+
preparing a significant design or user-story change, reviewing inspiration
|
|
6
|
+
dossiers, requesting fresh-context or EGM-style critique, independent design
|
|
7
|
+
review, or when the user mentions PT-REVIEW-01 or fresh reviewer context.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Fresh-context review
|
|
11
|
+
|
|
12
|
+
An independent reviewer evaluates a self-contained specification from **only**
|
|
13
|
+
the document, cited sources, and repository state — not the author’s drafting
|
|
14
|
+
chat — so unstated assumptions and hidden dependencies surface before
|
|
15
|
+
implementation.
|
|
16
|
+
|
|
17
|
+
Story: **PT-REVIEW-01**. Research:
|
|
18
|
+
`docs/inspiration/trouble-skill-evals-and-review-2026-10-29.md`.
|
|
19
|
+
|
|
20
|
+
Stay agent-neutral: do not require any one plugin. Patterns from Elephant-Goldfish
|
|
21
|
+
Model (separated draft/review/resolve) are useful; this skill owns the quality
|
|
22
|
+
bar for development-agent instructions.
|
|
23
|
+
|
|
24
|
+
## When to use
|
|
25
|
+
|
|
26
|
+
- Significant design, architecture, or user-story changes.
|
|
27
|
+
- Inspiration PR / story dossiers that claim source fidelity.
|
|
28
|
+
- Any review where same-context self-critique would hide author assumptions.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Fresh-context review:
|
|
34
|
+
- [ ] 1. Author finishes a self-contained spec (acceptance, touchpoints, source map)
|
|
35
|
+
- [ ] 2. Build a reviewer input manifest: exact files, commit SHA, permitted URLs
|
|
36
|
+
- [ ] 3. Spawn a fresh reviewer context with ONLY that package — no author chat,
|
|
37
|
+
draft CoT, or prior reviewer verdicts
|
|
38
|
+
- [ ] 4. Reviewer emits typed findings (location, severity/impact, evidence,
|
|
39
|
+
reproducible question or counterexample)
|
|
40
|
+
- [ ] 5. Author resolves each finding: accept / reject / defer + rationale
|
|
41
|
+
- [ ] 6. For important revisions, a second fresh reviewer checks the final doc
|
|
42
|
+
- [ ] 7. Readiness: a new implementation agent can locate sources and judge
|
|
43
|
+
acceptance without the author’s chat
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Acceptance rules
|
|
47
|
+
|
|
48
|
+
1. The reviewer input manifest enumerates everything provided (code commit +
|
|
49
|
+
source URLs). No implicit author-history access.
|
|
50
|
+
2. “Looks good” without checks is insufficient. Findings are typed and evidence-
|
|
51
|
+
backed.
|
|
52
|
+
3. The resolution log keeps accepted **and** rejected findings with reasons.
|
|
53
|
+
Reviewers must not silently rewrite normative requirements.
|
|
54
|
+
4. When fresh-context execution is unavailable, record a **blocked** independent-
|
|
55
|
+
review stage — do not relabel same-context self-review as independent.
|
|
56
|
+
5. A seeded spec missing a required failure scenario must yield a finding; a
|
|
57
|
+
control that explicitly scopes something out must not be penalised for that
|
|
58
|
+
omission.
|
|
59
|
+
6. Final readiness includes whether a cold implementation agent can proceed from
|
|
60
|
+
the package alone.
|
|
61
|
+
|
|
62
|
+
## Finding shape (minimal)
|
|
63
|
+
|
|
64
|
+
| Field | Purpose |
|
|
65
|
+
|-------|---------|
|
|
66
|
+
| `location` | Section / claim / path |
|
|
67
|
+
| `severity` | Impact if wrong |
|
|
68
|
+
| `evidence` | Cite spec line, source, or repo fact |
|
|
69
|
+
| `question_or_counterexample` | Reproducible challenge |
|
|
70
|
+
| `resolution` | accept / reject / defer + why (author) |
|
|
71
|
+
|
|
72
|
+
## Do not
|
|
73
|
+
|
|
74
|
+
- Feed the reviewer the author’s private conversation or prior verdicts.
|
|
75
|
+
- Treat blocked fresh review as passed.
|
|
76
|
+
- Require Google EGM or any single host plugin.
|
|
77
|
+
- Promote inspiration notes to `docs/requirements/` authority without an explicit
|
|
78
|
+
requirements revision (REQ-04).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-plugin
|
|
3
|
+
description: Use the GitHub plugin for Unchartable repository operations, publishing commits, branches and pull requests instead of gh CLI. Applies when interacting with remote GitHub state, not ordinary local Git work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitHub plugin preference
|
|
7
|
+
|
|
8
|
+
For this project, prefer the connected GitHub plugin over `gh` for remote reads
|
|
9
|
+
and writes. Discover its current tools before selecting a workflow. Local `git`
|
|
10
|
+
remains appropriate for status, diffs, commits and object verification.
|
|
11
|
+
|
|
12
|
+
- Use the plugin's authentication; do not require `gh auth login` or repair CLI
|
|
13
|
+
credentials when the plugin can perform the requested operation.
|
|
14
|
+
- If a necessary capability is unavailable, explain the specific gap and use a
|
|
15
|
+
suitable fallback within the user's authorization. Honour explicit tool choices.
|
|
16
|
+
- This preference does not authorize publishing, merging or messaging by itself.
|
|
17
|
+
Continue already-authorized work without asking for the same permission again.
|
|
18
|
+
|
|
19
|
+
## Publishing local commits through the plugin
|
|
20
|
+
|
|
21
|
+
Prefer a native push capability if available. If using Git tree/commit/ref APIs:
|
|
22
|
+
|
|
23
|
+
1. Inspect the remote branch head and local pending history. Preserve unrelated
|
|
24
|
+
remote work; do not replace a branch from a stale local snapshot.
|
|
25
|
+
2. Upload the intended committed changes, preserving paths, executable modes,
|
|
26
|
+
file bytes and deletions. Exclude untracked/generated files unless explicitly
|
|
27
|
+
included in the intended commit. Handle binary files with the appropriate API.
|
|
28
|
+
3. Verify each resulting tree SHA against the corresponding local tree before
|
|
29
|
+
publishing. API-created commits may have new IDs because metadata differs;
|
|
30
|
+
do not claim the original commit IDs were pushed.
|
|
31
|
+
4. Move the remote ref with the observed head as an expected-SHA lease and no
|
|
32
|
+
force. On a lease conflict, inspect the new remote head before proceeding.
|
|
33
|
+
5. Confirm the remote head. Reconcile local history only after verifying tree
|
|
34
|
+
equality and preserving the original commits on a backup branch. Prefer a
|
|
35
|
+
normal fetch of the published objects. If exact objects cannot be obtained
|
|
36
|
+
and verified, report local divergence rather than inventing or guessing refs.
|
|
37
|
+
6. Report what was published and any remaining local synchronization issue.
|
|
38
|
+
|
|
39
|
+
Keep sandbox/Git-metadata permissions distinct from GitHub authentication.
|
|
40
|
+
A working plugin does not grant local filesystem permissions. Respect approval
|
|
41
|
+
rejections and do not route around them with another tool.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-docs
|
|
3
|
+
description: >-
|
|
4
|
+
Create and maintain project documentation under docs/ and keep README short.
|
|
5
|
+
Use when writing, updating, restructuring, or reviewing docs; syncing README;
|
|
6
|
+
architecture notes; guides; reference pages; or docs/requirements/.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Project docs
|
|
10
|
+
|
|
11
|
+
`docs/` is the source of truth. `README.md` stays a short entry surface.
|
|
12
|
+
|
|
13
|
+
## Layout (adapt names to the stack)
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
docs/
|
|
17
|
+
index.md # TOC / home (optional but preferred)
|
|
18
|
+
architecture/ # or architecture.md — design and boundaries
|
|
19
|
+
guides/ # task-oriented how-tos
|
|
20
|
+
reference/ # stable contracts (CLI, API, types)
|
|
21
|
+
requirements/ # normative MUST/SHOULD
|
|
22
|
+
inspiration/ # non-normative research (REQ-04); not authority
|
|
23
|
+
adr/ # decision records (optional)
|
|
24
|
+
|
|
25
|
+
README.md # pitch, install/quick start, links into docs/
|
|
26
|
+
AGENTS.md # agent entry — link skills/rules, do not duplicate long guides
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Audience | Location |
|
|
30
|
+
|----------|----------|
|
|
31
|
+
| Maintainer agents | `.cursor/skills/`, `.cursor/rules/` |
|
|
32
|
+
| Humans + agents (product truth) | `docs/` |
|
|
33
|
+
| Downstream consumers (libraries) | optional `agent-skills/` kept in sync with public APIs |
|
|
34
|
+
|
|
35
|
+
## Workflow
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Docs task:
|
|
39
|
+
- [ ] 1. Audience + type (guide / reference / architecture / requirement / ADR)
|
|
40
|
+
- [ ] 2. Read current code + existing docs
|
|
41
|
+
- [ ] 3. Create or update the page (kebab-case filenames)
|
|
42
|
+
- [ ] 4. Update docs/index.md TOC if needed
|
|
43
|
+
- [ ] 5. Touch README only if the entry surface changed
|
|
44
|
+
- [ ] 6. Verify commands, paths, and env names against the repo
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
After public behavior changes: update `docs/reference/` (or requirements) first, then guides, then architecture if the design shifted. Do not invent APIs — read the code.
|
|
48
|
+
|
|
49
|
+
## Writing rules
|
|
50
|
+
|
|
51
|
+
- Lead with what the reader can do, then how.
|
|
52
|
+
- Use real module/CLI paths.
|
|
53
|
+
- No secrets in examples; point at `.env/` + tracked examples instead.
|
|
54
|
+
- Prefer relative links inside `docs/`.
|
|
55
|
+
|
|
56
|
+
## Unchartable migration checklist
|
|
57
|
+
|
|
58
|
+
When documenting or implementing the charting migration:
|
|
59
|
+
|
|
60
|
+
1. Read `docs/requirements/charting-library.md` (CHART-01–CHART-03).
|
|
61
|
+
2. Keep Python chart semantics and layout independent of output backends.
|
|
62
|
+
3. Inspect the relevant socials implementation; record ported and deferred
|
|
63
|
+
capabilities without claiming unimplemented compatibility.
|
|
64
|
+
4. Update requirements and public API documentation together with behaviour
|
|
65
|
+
tests when a capability is implemented. Distinguish planned API from shipped API.
|
|
66
|
+
|
|
67
|
+
## Public gallery maintenance
|
|
68
|
+
|
|
69
|
+
For chart types, chart modes, skins, palettes, or website changes, follow
|
|
70
|
+
`docs/requirements/example-gallery.md` (GALLERY-01–GALLERY-07):
|
|
71
|
+
|
|
72
|
+
1. Inventory supported models, modes and skins before changing coverage.
|
|
73
|
+
2. Add deterministic examples in `examples/site_gallery.py` in the same change
|
|
74
|
+
as each new chart kind, materially distinct mode, named palette or skin.
|
|
75
|
+
3. Place each example on its family page; include a representative rendered
|
|
76
|
+
example and family link on the homepage. Keep public copy and sample labels
|
|
77
|
+
independent of downstream project names.
|
|
78
|
+
4. Use identical data for skin comparisons, real library rendering and pyiv
|
|
79
|
+
Config hooks. Keep generated files under `build/site/`.
|
|
80
|
+
5. Extend coverage checks in `tests/test_site_gallery.py`; run
|
|
81
|
+
`./run_checks.sh` and `python scripts/build_site.py`. Inspect rendered examples
|
|
82
|
+
for clipped labels, unreadable contrast and incorrect scales.
|
|
83
|
+
6. Check navigation, descriptive alt text, full-size SVG links and source access.
|
|
84
|
+
|
|
85
|
+
This gallery procedure's isolated before/after/no-skill evaluation is unverified;
|
|
86
|
+
repository checks establish example coverage, not agent-skill efficacy.
|
|
87
|
+
|
|
88
|
+
## Public API and doctests
|
|
89
|
+
|
|
90
|
+
Follow `docs/requirements/public-api.md` (API-01–API-07) when changing public
|
|
91
|
+
chart APIs or their documentation:
|
|
92
|
+
|
|
93
|
+
1. Keep the recommended surface in `docs/reference/public-api.md` explicit.
|
|
94
|
+
Preserve existing exports; use `render()` for beginner examples and explain
|
|
95
|
+
Config/service hooks separately.
|
|
96
|
+
2. Write docstrings alongside definitions: parameters/defaults, units and input
|
|
97
|
+
shapes, return types, validation errors and important limits. Include a
|
|
98
|
+
complete rendering doctest for each chart constructor/helper.
|
|
99
|
+
3. Add a self-contained `.rst` recipe under `docs/reference/charts/` for every
|
|
100
|
+
gallery entry. Include installation, imports/data, rendering, saving under
|
|
101
|
+
`build/`, format selection and common errors. Do not assume prior page state.
|
|
102
|
+
4. Generate reference pages from docstrings and recipe pages/previews from the
|
|
103
|
+
tested recipe itself. Update `scripts/api_documents.py`'s API index when the
|
|
104
|
+
recommended public surface grows.
|
|
105
|
+
5. Run `./run_checks.sh`: it discovers package doctests and every recipe, checks
|
|
106
|
+
documentation coverage, and validates generated local links. Inspect the
|
|
107
|
+
chart result as well as test outcomes. Do not claim isolated skill efficacy
|
|
108
|
+
from these repository checks.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-eval-gate
|
|
3
|
+
description: >-
|
|
4
|
+
Prove a skill change before promoting it with before/after/no-skill isolated
|
|
5
|
+
evals. Use when rewriting or dieting a skill, promoting a skill revision,
|
|
6
|
+
comparing skill candidates, running skill-diet style checks, or when the user
|
|
7
|
+
mentions eval-gated skills, skill evaluation, or PT-SKILL-01.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill eval gate
|
|
11
|
+
|
|
12
|
+
Promote a shorter or updated `.cursor/skills/*/SKILL.md` only when representative
|
|
13
|
+
tasks still pass against a frozen baseline — including a **no-skill** condition.
|
|
14
|
+
|
|
15
|
+
Story: **PT-SKILL-01**. Research:
|
|
16
|
+
`docs/inspiration/trouble-skill-evals-and-review-2026-10-29.md`.
|
|
17
|
+
|
|
18
|
+
This skill is the workflow and quality bar. It does **not** ship a host eval
|
|
19
|
+
runner; adapters may live elsewhere (e.g. MechaHarness). If a fresh isolated
|
|
20
|
+
agent adapter or reproducible sandbox is unavailable, record the result as
|
|
21
|
+
**unverified** — never “passed”.
|
|
22
|
+
|
|
23
|
+
## When to use
|
|
24
|
+
|
|
25
|
+
- Editing an existing project skill in a material way (diet, rewrite, trigger
|
|
26
|
+
change, safety-critical guidance).
|
|
27
|
+
- Claiming a candidate skill is better (tokens, clarity, currency) than the
|
|
28
|
+
baseline.
|
|
29
|
+
- Investigating whether skill text is redundant with tool help/errors.
|
|
30
|
+
|
|
31
|
+
Skip for typo-only or link-only edits with no behavioural claim.
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Skill eval gate:
|
|
37
|
+
- [ ] 1. Freeze baseline revision + versioned tasks BEFORE editing the candidate
|
|
38
|
+
- [ ] 2. Include hard cases, wrong flags, a should-not-invoke task, and one
|
|
39
|
+
failure the baseline already handles
|
|
40
|
+
- [ ] 3. Record host, model, tool versions, skill path, task IDs, expected
|
|
41
|
+
outputs, token accounting, run count
|
|
42
|
+
- [ ] 4. Produce candidate SKILL.md (+ conditional references if any)
|
|
43
|
+
- [ ] 5. Run fresh isolated sessions: before / after / no-skill (same tasks,
|
|
44
|
+
tools, budgets, scoring)
|
|
45
|
+
- [ ] 6. Validate isolation (no alternate skill leakage), path/link integrity,
|
|
46
|
+
and real tool help — not string-only drift checks
|
|
47
|
+
- [ ] 7. Rerun the originally motivating failure
|
|
48
|
+
- [ ] 8. Promote or reject with a written evidence record
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Acceptance rules
|
|
52
|
+
|
|
53
|
+
1. Every task and scoring rule exists **before** the candidate edit. Test-fixture
|
|
54
|
+
changes are separately reviewed — never silently tuned to pass the candidate.
|
|
55
|
+
2. Prefer machine-readable per-task outcomes (calls, tokens, versions, evidence).
|
|
56
|
+
Unknown tool names or ignored flags are **drift**, not silent success.
|
|
57
|
+
3. Losing a previously passing **safety-critical** task rejects the candidate
|
|
58
|
+
even if average tokens drop. Noncritical regressions follow an explicit
|
|
59
|
+
threshold policy; a tiny sample is not a universal guarantee.
|
|
60
|
+
4. A no-skill baseline exposes redundant guidance. Prefer moving rules that the
|
|
61
|
+
tool’s own help/errors already enforce out of the skill, while keeping the
|
|
62
|
+
tool-level guard.
|
|
63
|
+
5. No fresh adapter / sandbox → **unverified**, not passed.
|
|
64
|
+
6. Promotion records old/new revisions, per-layer token footprint, per-task pass
|
|
65
|
+
rates, costs, changed references, and accept/reject rationale.
|
|
66
|
+
7. Interrupted re-runs stay idempotent on task/run IDs and must not mix results
|
|
67
|
+
from different skill revisions.
|
|
68
|
+
|
|
69
|
+
## Failure / reject signals
|
|
70
|
+
|
|
71
|
+
Task fixture contaminated by candidate text; broken reference anchors; tool
|
|
72
|
+
version changed mid-eval; zero discrimination (all variants fail); skill never
|
|
73
|
+
loaded; dangerous command accepted; partial timeout; unknown token accounting.
|
|
74
|
+
|
|
75
|
+
## Smoke matrix (when an adapter exists)
|
|
76
|
+
|
|
77
|
+
Three representative tasks × three conditions × at least three runs. Seed a known
|
|
78
|
+
regression that must reject. Keep fake-adapter scoring checks separate from live
|
|
79
|
+
agent evaluation reports.
|
|
80
|
+
|
|
81
|
+
## Do not
|
|
82
|
+
|
|
83
|
+
- Copy upstream eval scripts blindly into this template.
|
|
84
|
+
- Claim pass when isolation was same-context self-check.
|
|
85
|
+
- Promote on token savings alone.
|
|
86
|
+
- Turn this into a normative MUST in `docs/requirements/` without a real runner
|
|
87
|
+
and an explicit requirements revision (REQ-04 / REQ-06).
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ub-mode
|
|
3
|
+
description: >-
|
|
4
|
+
Disciplined change workflow: First Make it Work, then Make it Right, then
|
|
5
|
+
Practice. Use when the user runs /ub-mode, asks for the reduced principles,
|
|
6
|
+
Uncle Bob mode, or wants TDD / root-cause / subtract-before-add discipline on
|
|
7
|
+
a change. Adapted from unclebob/ub-mode for this template.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ub-mode
|
|
11
|
+
|
|
12
|
+
Every change follows:
|
|
13
|
+
|
|
14
|
+
1. **First Make it Work**
|
|
15
|
+
2. **Then Make it Right**
|
|
16
|
+
3. **Practice**
|
|
17
|
+
|
|
18
|
+
Normative stubs: `docs/requirements/engineering-practice.md`.
|
|
19
|
+
Always-on reminder: `.cursor/rules/work-right-practice.mdc`.
|
|
20
|
+
|
|
21
|
+
Upstream inspiration: [unclebob/ub-mode](https://github.com/unclebob/ub-mode)
|
|
22
|
+
(companion tools optional — see Make it Right).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# First Make it Work
|
|
27
|
+
|
|
28
|
+
## Laziness Protocol
|
|
29
|
+
|
|
30
|
+
- One decision lives in one place.
|
|
31
|
+
- Ship the smallest edit that solves the problem.
|
|
32
|
+
|
|
33
|
+
## Foundational Thinking
|
|
34
|
+
|
|
35
|
+
- Get the data shape right before you write the logic.
|
|
36
|
+
- Do first whatever helps every later phase.
|
|
37
|
+
- If a concurrent writer would matter, do not share state.
|
|
38
|
+
|
|
39
|
+
## TDD
|
|
40
|
+
|
|
41
|
+
- Write the failing test before you change the code.
|
|
42
|
+
- See it fail for the reason you expect.
|
|
43
|
+
- Make the smallest change that makes it pass.
|
|
44
|
+
- If an honest test is impractical, do not write a bad one — prefer
|
|
45
|
+
`data-driven-tests` matrices when covering a decision space.
|
|
46
|
+
|
|
47
|
+
## Redesign From First Principles
|
|
48
|
+
|
|
49
|
+
- Do not bolt a new requirement onto the old design.
|
|
50
|
+
- Ask what you would have built if it had been there from the start; deliver
|
|
51
|
+
that design in pieces.
|
|
52
|
+
- If the change is a durable constraint, update `docs/requirements/` and sync
|
|
53
|
+
skills (`requirements-skills-sync`).
|
|
54
|
+
|
|
55
|
+
## Attack the Premise
|
|
56
|
+
|
|
57
|
+
- When two fixes that share one premise fail the same gate, write that premise
|
|
58
|
+
in one sentence and count which actors hold the imbalance.
|
|
59
|
+
- Remove the assignment.
|
|
60
|
+
- Do not start another fix until you have done that.
|
|
61
|
+
|
|
62
|
+
## Subtract Before You Add
|
|
63
|
+
|
|
64
|
+
- Take complexity out before you add anything.
|
|
65
|
+
|
|
66
|
+
## Outcome-Oriented Execution
|
|
67
|
+
|
|
68
|
+
- Aim at the end state you can check.
|
|
69
|
+
- A break in the middle is allowed when you planned it and can undo it.
|
|
70
|
+
|
|
71
|
+
## Build the Lever
|
|
72
|
+
|
|
73
|
+
- If the work is not obvious at a glance, build the tool that does it.
|
|
74
|
+
- Do one unit by hand, then make the tool match that unit.
|
|
75
|
+
|
|
76
|
+
## Architecture
|
|
77
|
+
|
|
78
|
+
### Model the Domain
|
|
79
|
+
|
|
80
|
+
- Put the domain in a structure that makes illegal states impossible.
|
|
81
|
+
- Maintain a glossary of domain terms when the domain is non-trivial.
|
|
82
|
+
- If the code is already clear and local, leave it.
|
|
83
|
+
|
|
84
|
+
### Boundary Discipline
|
|
85
|
+
|
|
86
|
+
- Check the data where it enters. Inside, trust it.
|
|
87
|
+
- Keep business logic in pure functions when practical.
|
|
88
|
+
- For pyiv DI projects, keep Settings slim — see `di-config-ownership`.
|
|
89
|
+
|
|
90
|
+
### Type System Discipline
|
|
91
|
+
|
|
92
|
+
- Make the illegal value impossible to write.
|
|
93
|
+
- Parse outside data once, where it comes in.
|
|
94
|
+
- Do not silence the type checker / compiler.
|
|
95
|
+
|
|
96
|
+
### Make Operations Idempotent
|
|
97
|
+
|
|
98
|
+
- Running twice, or after a crash halfway through, ends in the same state.
|
|
99
|
+
|
|
100
|
+
### Separate Before Serializing Shared State
|
|
101
|
+
|
|
102
|
+
- If they do not need the same mutable thing, give each its own.
|
|
103
|
+
- If they do, allow one writer, and enforce that in the structure.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
# Then Make it Right
|
|
108
|
+
|
|
109
|
+
## Fix Root Causes
|
|
110
|
+
|
|
111
|
+
- Reproduce it. Fix the cause. A guard that only hides the crash is not a fix.
|
|
112
|
+
|
|
113
|
+
## Sequence work into verifiable units
|
|
114
|
+
|
|
115
|
+
- Finish one small unit and check it. Then start the next.
|
|
116
|
+
- Prefer the project `run_checks` entrypoint (`validation-gates`).
|
|
117
|
+
|
|
118
|
+
## Test Behavior, Not Implementation
|
|
119
|
+
|
|
120
|
+
- The test calls the code the way its user does and checks the result that
|
|
121
|
+
user would see.
|
|
122
|
+
- If the test would still pass when every function returned nothing, throw it out.
|
|
123
|
+
|
|
124
|
+
## Optional quality-gate tools
|
|
125
|
+
|
|
126
|
+
When these CLIs are installed and relevant to the stack, use them; otherwise
|
|
127
|
+
rely on `run_checks` + focused behavior tests. Do **not** block bootstrap
|
|
128
|
+
projects on missing tools.
|
|
129
|
+
|
|
130
|
+
| Tool | Intent | Upstream |
|
|
131
|
+
|------|--------|----------|
|
|
132
|
+
| **crapper** | Keep functions under CRAP 10 (split and/or test) | [unclebob/crapper](https://github.com/unclebob/crapper) |
|
|
133
|
+
| **dryer** | Eliminate duplication ranked ≥ 0.8 | [unclebob/dryer](https://github.com/unclebob/dryer) |
|
|
134
|
+
| **mutator** | Cover uncovered code; kill surviving mutants; delete dead code | [unclebob/mutator](https://github.com/unclebob/mutator) |
|
|
135
|
+
|
|
136
|
+
## Refactoring
|
|
137
|
+
|
|
138
|
+
- Pin what the code does. Change the structure. Prove the behavior did not change.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
# Practice
|
|
143
|
+
|
|
144
|
+
## Keep a Log
|
|
145
|
+
|
|
146
|
+
- Keep a short log of actions and why.
|
|
147
|
+
- On completion, report the log (or an equivalent summary): what changed and
|
|
148
|
+
how you proved it.
|
|
149
|
+
|
|
150
|
+
## Guard the Context Window
|
|
151
|
+
|
|
152
|
+
- Keep the main thread small.
|
|
153
|
+
- Send bulk exploration elsewhere; keep the summary.
|
|
154
|
+
|
|
155
|
+
## Worktree Cleanup
|
|
156
|
+
|
|
157
|
+
- Reclaim what is safe to remove only after confirming nothing in use needs it.
|
|
158
|
+
- Uncommitted work waits for a user decision.
|
|
159
|
+
|
|
160
|
+
## Commit and Push (template override)
|
|
161
|
+
|
|
162
|
+
- Commit and push **only when the user explicitly asks**.
|
|
163
|
+
- When committing: small ordered commits; message says **why**; include how you
|
|
164
|
+
proved it when non-obvious.
|
|
165
|
+
- Do not push to main/remote unprompted.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
# Completion checklist
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
ub-mode:
|
|
173
|
+
- [ ] 1. Work: smallest edit; honest failing test when practical
|
|
174
|
+
- [ ] 2. Right: root cause; behavior checks; optional quality gates if present
|
|
175
|
+
- [ ] 3. Practice: summary/log; commit/push only if requested
|
|
176
|
+
```
|