Spaces:
Sleeping
docs(ai-standards): apply skill-system delta (slice 4, C12/C15/C16) (#24)
Browse filesApplies the upstream decode-ai-standards delta 81c3f17..22b8883
(commits 36a576c skill-system + 22b8883 self-apply). Docs-only; no
app-code edits.
C12 (domain language + ADRs):
- docs/domain/glossary.md: repo-specific terms, aliases to avoid, relationships
- docs/adr/README.md + docs/adr/0001-deploy-on-push-to-main.md
C15 (bootstrap record + registry consistency):
- .claude/skills/repo_skill_bootstrap/SKILL.md
- docs/reference/skill-registry.md
C16 (high-value skills; existing capability reused, not duplicated):
- new: triage_work, diagnose_issue, handoff
- mapped to existing: test-first->tdd, prototype cleanup->deslop
Also: docs/INDEX.md links the new docs; standards-sync manifest adds
slice-4 (pending_ref 22b8883, applied_ref held at 81c3f17 until the
issue #13 audit refresh) and corrects slice-3 to merged (PR #10);
slice-integration-overview.md refreshed to current state (issue #12).
- .claude/manifests/standards-sync.yaml +30 -4
- .claude/skills/diagnose_issue/SKILL.md +47 -0
- .claude/skills/handoff/SKILL.md +42 -0
- .claude/skills/repo_skill_bootstrap/SKILL.md +63 -0
- .claude/skills/triage_work/SKILL.md +49 -0
- docs/INDEX.md +11 -1
- docs/adr/0001-deploy-on-push-to-main.md +33 -0
- docs/adr/README.md +27 -0
- docs/domain/glossary.md +65 -0
- docs/progress/slice-integration-overview.md +20 -6
- docs/reference/skill-registry.md +42 -0
|
@@ -22,6 +22,12 @@ applied_ref: "81c3f17"
|
|
| 22 |
applied_at: "2026-05-21"
|
| 23 |
applied_to_branch: main
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
alignment_style: wrapping
|
| 26 |
# This repo had the DECODE Claude Code hardening gates pre-installed via
|
| 27 |
# commits 1878a50..c7599a7 before the formal audit ran. The audit + slice
|
|
@@ -50,10 +56,10 @@ slices:
|
|
| 50 |
|
| 51 |
- id: slice-3
|
| 52 |
name: agent_contract_slice_shrunk
|
| 53 |
-
pr:
|
| 54 |
-
merge_commit:
|
| 55 |
-
merged_at:
|
| 56 |
-
status:
|
| 57 |
notes: |
|
| 58 |
Shrunken because the DECODE hardening commits (1878a50..c7599a7) had
|
| 59 |
already installed the executable agent surface (.claude/settings.json,
|
|
@@ -61,6 +67,26 @@ slices:
|
|
| 61 |
Slice 3 covers only the residual documentation + this standards-sync
|
| 62 |
manifest + the freshness-check skill.
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
- id: slice-2b
|
| 65 |
name: workflow_hardening_slice
|
| 66 |
pr: null
|
|
|
|
| 22 |
applied_at: "2026-05-21"
|
| 23 |
applied_to_branch: main
|
| 24 |
|
| 25 |
+
# Slice 4 (in_progress) applies the 81c3f17..22b8883 skill-system delta.
|
| 26 |
+
# Per the operational rule above, applied_ref is NOT bumped to 22b8883 until
|
| 27 |
+
# the audit refresh re-runs the checklist and writes a fresh audit-result.yaml.
|
| 28 |
+
# That refresh is tracked as issue #13.
|
| 29 |
+
pending_ref: "22b8883"
|
| 30 |
+
|
| 31 |
alignment_style: wrapping
|
| 32 |
# This repo had the DECODE Claude Code hardening gates pre-installed via
|
| 33 |
# commits 1878a50..c7599a7 before the formal audit ran. The audit + slice
|
|
|
|
| 56 |
|
| 57 |
- id: slice-3
|
| 58 |
name: agent_contract_slice_shrunk
|
| 59 |
+
pr: 10
|
| 60 |
+
merge_commit: 2509f31
|
| 61 |
+
merged_at: "2026-05-21T16:40:27Z"
|
| 62 |
+
status: merged
|
| 63 |
notes: |
|
| 64 |
Shrunken because the DECODE hardening commits (1878a50..c7599a7) had
|
| 65 |
already installed the executable agent surface (.claude/settings.json,
|
|
|
|
| 67 |
Slice 3 covers only the residual documentation + this standards-sync
|
| 68 |
manifest + the freshness-check skill.
|
| 69 |
|
| 70 |
+
- id: slice-4
|
| 71 |
+
name: skill_system_delta_slice
|
| 72 |
+
pr: null
|
| 73 |
+
merge_commit: null
|
| 74 |
+
merged_at: null
|
| 75 |
+
status: in_progress
|
| 76 |
+
delta_ref: "81c3f17..22b8883"
|
| 77 |
+
notes: |
|
| 78 |
+
Applies the C12 / C15 / C16 delta introduced by upstream commits
|
| 79 |
+
36a576c (Integrate skill-system standards) + 22b8883 (Self-apply AI
|
| 80 |
+
standards), landed after slice 3 was applied at 81c3f17. Docs-only,
|
| 81 |
+
no app-code edits:
|
| 82 |
+
- C12: docs/domain/glossary.md (domain language) + docs/adr/ (ADR
|
| 83 |
+
location + ADR-0001).
|
| 84 |
+
- C15: .claude/skills/repo_skill_bootstrap/ (bootstrap record) +
|
| 85 |
+
docs/reference/skill-registry.md (registry consistency).
|
| 86 |
+
- C16: new skills triage_work, diagnose_issue, handoff; test-first
|
| 87 |
+
and prototype-cleanup mapped to existing tdd / deslop (no
|
| 88 |
+
duplication).
|
| 89 |
+
|
| 90 |
- id: slice-2b
|
| 91 |
name: workflow_hardening_slice
|
| 92 |
pr: null
|
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: diagnose_issue
|
| 3 |
+
description: Debug a bug, regression, intermittent failure, or performance problem by building a pass/fail feedback loop BEFORE changing production code. Use whenever you are about to "fix" something you cannot yet reliably reproduce.
|
| 4 |
+
allowed-tools: Read, Bash, Grep
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Diagnose issue
|
| 8 |
+
|
| 9 |
+
Never patch what you cannot reproduce. Construct a falsifiable loop first, then
|
| 10 |
+
fix against it.
|
| 11 |
+
|
| 12 |
+
## When to use
|
| 13 |
+
|
| 14 |
+
- A bug, regression, intermittent failure, or performance problem in `icat_app`.
|
| 15 |
+
|
| 16 |
+
## Required loop
|
| 17 |
+
|
| 18 |
+
1. **Reproduce, or raise the reproduction rate.** Get a command or manual path
|
| 19 |
+
that fails reliably (or at a known rate for intermittent issues). For this
|
| 20 |
+
Streamlit app that usually means `streamlit run app.py` plus the exact tab,
|
| 21 |
+
input file, and clicks that trigger it.
|
| 22 |
+
2. **Rank falsifiable hypotheses.** List candidate causes, most-likely first,
|
| 23 |
+
each phrased so an observation can refute it.
|
| 24 |
+
3. **Instrument one prediction at a time.** Add a probe (log/print/assert) that
|
| 25 |
+
confirms or kills the top hypothesis. One probe per cycle.
|
| 26 |
+
4. **Fix with a regression signal.** Once the cause is confirmed, fix it and
|
| 27 |
+
capture a check that would catch a recurrence (a test, or a documented repro).
|
| 28 |
+
5. **Remove debug probes.** Strip every temporary probe before commit.
|
| 29 |
+
|
| 30 |
+
## Constraints
|
| 31 |
+
|
| 32 |
+
- Probes and fixes to `app.py`, `tabN.py`, `helper.py` touch the deploy
|
| 33 |
+
boundary — they still require the reviewer gate before commit (see
|
| 34 |
+
`CLAUDE.md`) and trigger an HF redeploy on merge to `main`.
|
| 35 |
+
|
| 36 |
+
## Outputs
|
| 37 |
+
|
| 38 |
+
- `repro_command_or_artifact`
|
| 39 |
+
- `confirmed_cause`
|
| 40 |
+
- `regression_proof` — the test or documented repro that guards it
|
| 41 |
+
- `cleanup_notes` — confirmation all probes were removed
|
| 42 |
+
|
| 43 |
+
## Failure modes
|
| 44 |
+
|
| 45 |
+
- "Fixing" before reproducing → you change code and can't prove it helped.
|
| 46 |
+
- Changing several things at once → you can't attribute the fix.
|
| 47 |
+
- Leaving debug probes in → slop ships to the live Space.
|
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: handoff
|
| 3 |
+
description: Compress the state of a piece of work into a short, referenceable handoff so the next session or person can resume without re-deriving context. Use at the end of a work session, before a context reset, or when passing work to someone else.
|
| 4 |
+
allowed-tools: Read, Bash
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Handoff
|
| 8 |
+
|
| 9 |
+
Produce a compact handoff that points to artifacts instead of copying them.
|
| 10 |
+
|
| 11 |
+
## When to use
|
| 12 |
+
|
| 13 |
+
- Ending a work session with unfinished work.
|
| 14 |
+
- Before a likely context reset.
|
| 15 |
+
- Passing work to another agent or person.
|
| 16 |
+
|
| 17 |
+
## Principle
|
| 18 |
+
|
| 19 |
+
**Reference, don't copy.** Link PRs, issues, ADRs, commits, plans, and diffs by
|
| 20 |
+
identifier. A good handoff is short because it points outward.
|
| 21 |
+
|
| 22 |
+
## Procedure
|
| 23 |
+
|
| 24 |
+
1. State the goal and current status in 1–2 sentences.
|
| 25 |
+
2. List what changed, by reference: PR numbers, commit SHAs, files touched.
|
| 26 |
+
3. List what's left, as concrete next steps.
|
| 27 |
+
4. Note blockers and any open decisions (link the issue, don't re-argue it).
|
| 28 |
+
5. Suggest the next skills to invoke.
|
| 29 |
+
|
| 30 |
+
## Outputs
|
| 31 |
+
|
| 32 |
+
- `summary` — goal + status, ≤2 sentences
|
| 33 |
+
- `changed` — referenced PRs/commits/files
|
| 34 |
+
- `next_steps` — ordered, concrete
|
| 35 |
+
- `blockers_or_open_decisions` — with issue/ADR references
|
| 36 |
+
- `suggested_next_skills`
|
| 37 |
+
|
| 38 |
+
## Failure modes
|
| 39 |
+
|
| 40 |
+
- Pasting whole diffs/logs instead of linking → the handoff rots and bloats.
|
| 41 |
+
- Omitting the deploy-boundary status → next session doesn't know if `main` is
|
| 42 |
+
mid-change.
|
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: repo_skill_bootstrap
|
| 3 |
+
description: Record the setup facts that other repo skills depend on — issue tracker, triage states, domain doc layout, ADR location, and skill-registry consistency. Use when first adding or refreshing repo-facing skills, or when another skill needs that context.
|
| 4 |
+
allowed-tools: Read, Bash
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Repo skill bootstrap
|
| 8 |
+
|
| 9 |
+
The bootstrap record for `icat_app`. Other skills (triage, diagnose, handoff)
|
| 10 |
+
read these facts instead of rediscovering them each time. Satisfies checklist
|
| 11 |
+
item **C15** (bootstrap record for issue tracker, triage, domain, ADR, registry).
|
| 12 |
+
|
| 13 |
+
Keep this file accurate — it is the single source of truth for "where do things
|
| 14 |
+
live in this repo." If a fact below changes, update it here first.
|
| 15 |
+
|
| 16 |
+
## Setup facts
|
| 17 |
+
|
| 18 |
+
### issue_tracker_location
|
| 19 |
+
GitHub Issues on `implicitdiagnosticsandsolutions/icat_app`
|
| 20 |
+
(`gh issue list --repo implicitdiagnosticsandsolutions/icat_app`).
|
| 21 |
+
The repo also has Projects and Wiki enabled, but Issues is the working tracker.
|
| 22 |
+
|
| 23 |
+
### triage_state_mapping
|
| 24 |
+
The repo uses GitHub's **default label set** (no custom triage labels yet). Map
|
| 25 |
+
the standard `triage_work` readiness states onto existing labels until/unless
|
| 26 |
+
dedicated labels are added:
|
| 27 |
+
|
| 28 |
+
| Standard state | icat_app today |
|
| 29 |
+
|---|---|
|
| 30 |
+
| `needs-triage` | (no label) — newly opened, unlabeled |
|
| 31 |
+
| `needs-info` | `question` |
|
| 32 |
+
| `ready-for-agent` | `good first issue` and/or `help wanted` |
|
| 33 |
+
| `ready-for-human` | `enhancement` / `bug` (no agent brief attached) |
|
| 34 |
+
| `wontfix` | `wontfix` |
|
| 35 |
+
|
| 36 |
+
If the team wants crisper triage, add `needs-triage` / `ready-for-agent` labels;
|
| 37 |
+
this table is the migration anchor.
|
| 38 |
+
|
| 39 |
+
### domain_doc_layout
|
| 40 |
+
- `docs/domain/glossary.md` — canonical repo language (no `CONTEXT-MAP.md`;
|
| 41 |
+
single-domain app).
|
| 42 |
+
|
| 43 |
+
### adr_location
|
| 44 |
+
- `docs/adr/` — hard-to-reverse decisions only. Index in `docs/adr/README.md`.
|
| 45 |
+
|
| 46 |
+
### skill_registry_consistency
|
| 47 |
+
- `docs/reference/skill-registry.md` lists every skill under `.claude/skills/`
|
| 48 |
+
and maps the standard high-value skills to this repo's implementations.
|
| 49 |
+
- Consistency rule: every directory under `.claude/skills/` MUST appear in the
|
| 50 |
+
registry, and every registry row MUST point to a real skill or a documented
|
| 51 |
+
reuse. Verify with:
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
ls .claude/skills/
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
and reconcile against `docs/reference/skill-registry.md`.
|
| 58 |
+
|
| 59 |
+
## Outputs
|
| 60 |
+
|
| 61 |
+
When invoked, report: `issue_tracker_location`, `triage_state_mapping`,
|
| 62 |
+
`domain_doc_layout`, `adr_location`, `skill_registry_consistency` — each as the
|
| 63 |
+
current value above, flagging any that are now stale.
|
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: triage_work
|
| 3 |
+
description: Classify incoming work (issues, requests) into explicit readiness states before any implementation starts. Use when creating, refining, or routing an issue in icat_app, so agents and humans know what is actually actionable.
|
| 4 |
+
allowed-tools: Read, Bash
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Triage work
|
| 8 |
+
|
| 9 |
+
Decide whether a piece of work is ready to act on, and for whom. Triage happens
|
| 10 |
+
**before** implementation — never start coding on an untriaged issue.
|
| 11 |
+
|
| 12 |
+
## When to use
|
| 13 |
+
|
| 14 |
+
- Creating, refining, or routing a GitHub issue.
|
| 15 |
+
- Deciding whether an item is agent-actionable or needs a human.
|
| 16 |
+
|
| 17 |
+
## Readiness states
|
| 18 |
+
|
| 19 |
+
| State | Meaning |
|
| 20 |
+
|---|---|
|
| 21 |
+
| `needs-triage` | Just opened; not yet assessed. |
|
| 22 |
+
| `needs-info` | Blocked on missing context/repro/decision. |
|
| 23 |
+
| `ready-for-agent` | Self-contained, has acceptance criteria, no open product decision. |
|
| 24 |
+
| `ready-for-human` | Needs human judgment (product call, deploy-boundary change, ambiguous scope). |
|
| 25 |
+
| `wontfix` | Out of scope or won't be done. |
|
| 26 |
+
|
| 27 |
+
Label mapping (default GitHub labels are used in this repo) lives in
|
| 28 |
+
[`repo_skill_bootstrap`](../repo_skill_bootstrap/SKILL.md) → `triage_state_mapping`.
|
| 29 |
+
|
| 30 |
+
## Procedure
|
| 31 |
+
|
| 32 |
+
1. Read the issue. Restate the goal in one sentence.
|
| 33 |
+
2. Check for: clear acceptance criteria, a repro (if a bug), and whether any
|
| 34 |
+
product/architecture decision is still open.
|
| 35 |
+
3. Anything touching the deploy boundary (`app.py`, `tabN.py`, `helper.py`,
|
| 36 |
+
`requirements.txt`, workflows) → at least `ready-for-human`. See
|
| 37 |
+
[`../../docs/guides/protected-boundary-policy.md`](../../docs/guides/protected-boundary-policy.md).
|
| 38 |
+
4. Assign a state and record what's missing.
|
| 39 |
+
|
| 40 |
+
## Outputs
|
| 41 |
+
|
| 42 |
+
- `recommended_state`
|
| 43 |
+
- `missing_context` — what's needed to advance the state (empty if ready)
|
| 44 |
+
- `agent_brief_or_human_reason` — a short brief if agent-ready, else why a human is needed
|
| 45 |
+
|
| 46 |
+
## Failure modes
|
| 47 |
+
|
| 48 |
+
- Marking `ready-for-agent` without acceptance criteria → agent guesses scope.
|
| 49 |
+
- Skipping the deploy-boundary check → an agent edits production-critical files.
|
|
@@ -9,10 +9,20 @@ This tree is for **human + AI contributors**. Operational base rules live in `/C
|
|
| 9 |
- [`architecture/repository-erd.md`](architecture/repository-erd.md) — topology: `app.py` → `tab1..tab8.py` → `helper.py`, plus the HF Space deploy pipe.
|
| 10 |
- [`architecture/active-surface.md`](architecture/active-surface.md) — which helpers each tab consumes (helper.py is a 1293-line shared utility module).
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
## reference
|
| 13 |
|
| 14 |
- [`reference/command-registry.md`](reference/command-registry.md) — every discoverable command, what it does, where it runs (local / pre-commit / CI).
|
| 15 |
- [`reference/agent-guide.md`](reference/agent-guide.md) — single starting page for an AI agent: identity, do's, don'ts, reading order.
|
|
|
|
| 16 |
|
| 17 |
## guides
|
| 18 |
|
|
@@ -37,6 +47,6 @@ This tree is for **human + AI contributors**. Operational base rules live in `/C
|
|
| 37 |
|
| 38 |
## not yet present (planned)
|
| 39 |
|
| 40 |
-
(All previously-planned docs have landed. The next remediation work is the deferred slice 2b — workflow SHA pinning + `permissions:` blocks. That slice will not add new docs to this index; it will edit existing CI workflow files.)
|
| 41 |
|
| 42 |
When you add a new doc, link it from this index. If you remove a doc, remove the link too — broken links here are a bug.
|
|
|
|
| 9 |
- [`architecture/repository-erd.md`](architecture/repository-erd.md) — topology: `app.py` → `tab1..tab8.py` → `helper.py`, plus the HF Space deploy pipe.
|
| 10 |
- [`architecture/active-surface.md`](architecture/active-surface.md) — which helpers each tab consumes (helper.py is a 1293-line shared utility module).
|
| 11 |
|
| 12 |
+
## domain
|
| 13 |
+
|
| 14 |
+
- [`domain/glossary.md`](domain/glossary.md) — repo-specific language (IcAt, tool/tab, asset, stim, block, canvas, HF Space), aliases to avoid, key relationships.
|
| 15 |
+
|
| 16 |
+
## adr
|
| 17 |
+
|
| 18 |
+
- [`adr/README.md`](adr/README.md) — Architecture Decision Records: when to add one (hard-to-reverse decisions only), format, index.
|
| 19 |
+
- [`adr/0001-deploy-on-push-to-main.md`](adr/0001-deploy-on-push-to-main.md) — push to `main` = HF deploy; one tool = one tab file.
|
| 20 |
+
|
| 21 |
## reference
|
| 22 |
|
| 23 |
- [`reference/command-registry.md`](reference/command-registry.md) — every discoverable command, what it does, where it runs (local / pre-commit / CI).
|
| 24 |
- [`reference/agent-guide.md`](reference/agent-guide.md) — single starting page for an AI agent: identity, do's, don'ts, reading order.
|
| 25 |
+
- [`reference/skill-registry.md`](reference/skill-registry.md) — index of every `.claude/skills/` skill + mapping of the standard's high-value skills onto this repo.
|
| 26 |
|
| 27 |
## guides
|
| 28 |
|
|
|
|
| 47 |
|
| 48 |
## not yet present (planned)
|
| 49 |
|
| 50 |
+
(All previously-planned docs have landed, including the slice-4 skill-system delta — `domain/`, `adr/`, and `reference/skill-registry.md`. The next remediation work is the deferred slice 2b — workflow SHA pinning + `permissions:` blocks. That slice will not add new docs to this index; it will edit existing CI workflow files.)
|
| 51 |
|
| 52 |
When you add a new doc, link it from this index. If you remove a doc, remove the link too — broken links here are a bug.
|
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ADR 0001 — Push to `main` is the deploy trigger; one tool = one tab file
|
| 2 |
+
|
| 3 |
+
- **Status:** Accepted
|
| 4 |
+
- **Date:** 2026-05-29
|
| 5 |
+
|
| 6 |
+
## Context
|
| 7 |
+
|
| 8 |
+
`icat_app` is hosted on the Hugging Face Space `DecodeMarketing/decode_tools`.
|
| 9 |
+
The Space is wired to redeploy whenever `main` updates. There is no separate
|
| 10 |
+
release, tag, or promotion step. Separately, the app's UI is composed of 8
|
| 11 |
+
independent tools, each historically kept in its own `tabN.py` file.
|
| 12 |
+
|
| 13 |
+
Both facts are load-bearing and surprising to newcomers, and both are expensive
|
| 14 |
+
to change after the fact (the deploy wiring lives outside the repo on HF; the
|
| 15 |
+
tab split is assumed by `app.py` and every contributor convention).
|
| 16 |
+
|
| 17 |
+
## Decision
|
| 18 |
+
|
| 19 |
+
1. **`main` is the production branch.** Any commit that lands on `main` deploys
|
| 20 |
+
to the live HF Space. Treat every change to `main` as a production change.
|
| 21 |
+
2. **One tool = one tab = one file** (`tab1.py`–`tab8.py`). New tools are added
|
| 22 |
+
as a new tab file, never folded into `app.py` or an existing tab.
|
| 23 |
+
|
| 24 |
+
## Consequences
|
| 25 |
+
|
| 26 |
+
- Changes touching deploy-relevant files (`app.py`, `tabN.py`, `helper.py`,
|
| 27 |
+
`requirements.txt`, `runtime.txt`, `.streamlit/`) require the protected-boundary
|
| 28 |
+
caution in [`../guides/protected-boundary-policy.md`](../guides/protected-boundary-policy.md).
|
| 29 |
+
- The repo default branch is `dev`; PRs must explicitly target `main`
|
| 30 |
+
(`gh pr create --base main`) to reach production. See
|
| 31 |
+
[`../guides/git-and-pr-rules.md`](../guides/git-and-pr-rules.md).
|
| 32 |
+
- Splitting `helper.py` or restructuring the tab model is a future decision that
|
| 33 |
+
would supersede part 2 of this ADR — record it as a new ADR if pursued.
|
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Architecture Decision Records (ADRs)
|
| 2 |
+
|
| 3 |
+
This folder records **only hard-to-reverse, surprising tradeoff decisions** that
|
| 4 |
+
future agents and contributors should not silently re-litigate.
|
| 5 |
+
|
| 6 |
+
Satisfies checklist item **C12** (ADR location declared). Per the standard, ADRs
|
| 7 |
+
are deliberately scarce: routine notes belong in plans, PRs, runbooks, or the
|
| 8 |
+
slice tracker — **not** here. If a decision is cheap to reverse, it is not an ADR.
|
| 9 |
+
|
| 10 |
+
## When to add an ADR
|
| 11 |
+
|
| 12 |
+
Add one only when **all** of these hold:
|
| 13 |
+
|
| 14 |
+
- The decision is costly or disruptive to undo later.
|
| 15 |
+
- A reasonable contributor might be surprised by it or try to "fix" it.
|
| 16 |
+
- The reasoning needs to outlive the PR that introduced it.
|
| 17 |
+
|
| 18 |
+
## Format
|
| 19 |
+
|
| 20 |
+
One file per decision: `NNNN-short-kebab-title.md`, numbered sequentially.
|
| 21 |
+
Keep it short: Context → Decision → Consequences. Mark status
|
| 22 |
+
(`Accepted` / `Superseded by NNNN`).
|
| 23 |
+
|
| 24 |
+
## Index
|
| 25 |
+
|
| 26 |
+
- [`0001-deploy-on-push-to-main.md`](0001-deploy-on-push-to-main.md) — push to
|
| 27 |
+
`main` is the production deploy trigger; one tool = one tab file. **Accepted.**
|
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Domain glossary
|
| 2 |
+
|
| 3 |
+
Repo-specific language for `icat_app`. Defines the terms, the aliases to avoid,
|
| 4 |
+
and the key relationships an agent needs before touching this codebase.
|
| 5 |
+
|
| 6 |
+
Satisfies checklist item **C12** (domain-language artifacts versioned in-repo).
|
| 7 |
+
If a monorepo with multiple domains ever emerges, add a `CONTEXT-MAP.md`; today
|
| 8 |
+
`icat_app` is a single-domain app, so this one glossary is sufficient.
|
| 9 |
+
|
| 10 |
+
## What this app is
|
| 11 |
+
|
| 12 |
+
`icat_app` is a Streamlit web application bundling **8 brand-asset tools** used by
|
| 13 |
+
DECODE. It runs on Hugging Face Spaces (Python 3.12, Streamlit 1.32.2) and
|
| 14 |
+
deploys automatically on push to `main`.
|
| 15 |
+
|
| 16 |
+
It is **not** the IcAt PPTX report generator — that is a separate codebase. The
|
| 17 |
+
shared "IcAt" prefix refers to the same DECODE product family (Iconic Asset
|
| 18 |
+
Test), but this repo only handles asset preparation, not report charting.
|
| 19 |
+
|
| 20 |
+
## Core terms
|
| 21 |
+
|
| 22 |
+
| Term | Meaning |
|
| 23 |
+
|---|---|
|
| 24 |
+
| **IcAt** | Iconic Asset Test — DECODE's product family for testing brand assets. Here it names the toolbox, not a single test. |
|
| 25 |
+
| **Tool / Tab** | One self-contained feature. One tool = one tab = one file (`tab1.py`–`tab8.py`). |
|
| 26 |
+
| **Asset** | A brand image/graphic processed by the tools (logo, pack shot, key visual). |
|
| 27 |
+
| **Stim** (stimulus) | An asset prepared for use in a study/survey. "Name Stims by Block" labels stims by their study block. |
|
| 28 |
+
| **Block** | A grouping unit in a study; stims are named/numbered per block, with a sub-block letter. |
|
| 29 |
+
| **Canvas** | The fixed-size backing area an asset is placed on. "Place on Canvas" centers/fits an asset; "Canvas White to Transparent" removes a white background. |
|
| 30 |
+
| **Re-run Matrix** | The tool that regenerates the asset comparison matrix. |
|
| 31 |
+
| **HF Space** | The Hugging Face Space `DecodeMarketing/decode_tools` where the app is hosted and which redeploys on push to `main`. |
|
| 32 |
+
|
| 33 |
+
## The 8 tools (canonical order = tab order)
|
| 34 |
+
|
| 35 |
+
1. **Extract Images from Excel** — pull embedded images out of an Excel file.
|
| 36 |
+
2. **Name Assets by Brand** — rename asset files by brand.
|
| 37 |
+
3. **Canvas White to Transparent** — make a white background transparent.
|
| 38 |
+
4. **Asset Overview (PDF)** — produce a PDF contact-sheet of assets.
|
| 39 |
+
5. **Name Stims by Block** — name stims by study block + sub-block letter.
|
| 40 |
+
6. **Re-run Matrix** — regenerate the asset matrix.
|
| 41 |
+
7. **Resize** — resize assets to target dimensions.
|
| 42 |
+
8. **Place on Canvas** — center/fit an asset onto a fixed canvas.
|
| 43 |
+
|
| 44 |
+
## Aliases to avoid
|
| 45 |
+
|
| 46 |
+
- Do **not** call a tab a "page" — Streamlit "pages" are a different multi-page
|
| 47 |
+
construct this app does not use. Use **tool** or **tab**.
|
| 48 |
+
- Do **not** call `helper.py` a "library" or "package" — it is a single shared
|
| 49 |
+
utility module (~1.3k lines) imported by the tabs.
|
| 50 |
+
- Do **not** conflate **Stim** with **Asset**: every stim is an asset, but an
|
| 51 |
+
asset only becomes a stim once it is prepared/named for a study.
|
| 52 |
+
- "Deploy" here always means **the HF Space redeploy triggered by push to
|
| 53 |
+
`main`** — there is no separate release step.
|
| 54 |
+
|
| 55 |
+
## Key relationships
|
| 56 |
+
|
| 57 |
+
```
|
| 58 |
+
app.py ──imports──> tab1.py … tab8.py ──import──> helper.py
|
| 59 |
+
│
|
| 60 |
+
└── push to main ──> Hugging Face Space "DecodeMarketing/decode_tools" (auto-deploy)
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
See [`../architecture/repository-erd.md`](../architecture/repository-erd.md) for the
|
| 64 |
+
full topology and [`../architecture/active-surface.md`](../architecture/active-surface.md)
|
| 65 |
+
for which helpers each tab consumes.
|
|
@@ -1,30 +1,44 @@
|
|
| 1 |
# Slice integration overview
|
| 2 |
|
| 3 |
-
_Last updated: 2026-05-
|
| 4 |
|
| 5 |
This file tracks the decode-ai-standards remediation slices for `icat_app`. It is the in-repo working copy of the plan held in the audit work folder (`C:\Users\JulianeMatussek\decode-ai-standards-work\icat_app\remediation-plan.md`).
|
| 6 |
|
| 7 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
- readiness: `at_risk`
|
| 10 |
- `pass`: 0 / 36
|
| 11 |
- `partial`: 21 / 36
|
| 12 |
- `fail`: 15 / 36
|
| 13 |
|
| 14 |
-
Movement from the pre-hardening baseline at `2e95e07` (which scored 2 pass / 4 partial / 30 fail) is documented in the audit work folder's `delta-summary.md`. 14 checks moved from FAIL to PARTIAL because of the DECODE hardening commits (CLAUDE.md, .githooks, .claude/{hooks,skills,settings.json}, scripts/{setup,language-gate,reviewer-hash}.sh, gate.yml).
|
| 15 |
|
| 16 |
## Slices
|
| 17 |
|
| 18 |
```
|
| 19 |
-
[
|
| 20 |
target checks: C01 C04 C09 C11 C12 C18 C21 C23 C25 C26 C27 C29 C31 C32
|
| 21 |
|
| 22 |
-
[
|
| 23 |
target checks: C03 C05 C06 C10 C28 C33
|
| 24 |
|
| 25 |
-
[
|
| 26 |
target checks: C13 C14 C15 C16 C17 C20 C22 C24 C30 C34 C36
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
[ ] deferred architecture_hardening_slice (split helper.py)
|
| 29 |
[ ] deferred test_lane_slice (add pytest + integration tests)
|
| 30 |
```
|
|
|
|
| 1 |
# Slice integration overview
|
| 2 |
|
| 3 |
+
_Last updated: 2026-05-29 (slices 1–3 merged; slice 4 in progress)._
|
| 4 |
|
| 5 |
This file tracks the decode-ai-standards remediation slices for `icat_app`. It is the in-repo working copy of the plan held in the audit work folder (`C:\Users\JulianeMatussek\decode-ai-standards-work\icat_app\remediation-plan.md`).
|
| 6 |
|
| 7 |
+
## Status snapshot
|
| 8 |
+
|
| 9 |
+
Slices 1–3 are merged to `main` (PRs #7, #9, #10). Slice 4 (this PR) applies the
|
| 10 |
+
upstream skill-system delta. A formal audit refresh against the post-slice-3 ref
|
| 11 |
+
`2509f31` has **not** yet been re-run — it is tracked as issue #13, so the
|
| 12 |
+
numeric readiness counts below are the last recorded values from `c7599a7` and
|
| 13 |
+
understate the current (post-remediation) state.
|
| 14 |
+
|
| 15 |
+
## Last recorded readiness (from `audit-result.yaml` at `c7599a7`, pre-slices)
|
| 16 |
|
| 17 |
- readiness: `at_risk`
|
| 18 |
- `pass`: 0 / 36
|
| 19 |
- `partial`: 21 / 36
|
| 20 |
- `fail`: 15 / 36
|
| 21 |
|
| 22 |
+
Movement from the pre-hardening baseline at `2e95e07` (which scored 2 pass / 4 partial / 30 fail) is documented in the audit work folder's `delta-summary.md`. 14 checks moved from FAIL to PARTIAL because of the DECODE hardening commits (CLAUDE.md, .githooks, .claude/{hooks,skills,settings.json}, scripts/{setup,language-gate,reviewer-hash}.sh, gate.yml). Slices 1–4 then address the remaining partials/fails; the refresh (issue #13) will record where they land.
|
| 23 |
|
| 24 |
## Slices
|
| 25 |
|
| 26 |
```
|
| 27 |
+
[x] slice 1 orientation_and_deploy_boundary_slice (PR #7, merged 7a5c442)
|
| 28 |
target checks: C01 C04 C09 C11 C12 C18 C21 C23 C25 C26 C27 C29 C31 C32
|
| 29 |
|
| 30 |
+
[x] slice 2 structure_and_dependency_slice (PR #9, merged 975d390)
|
| 31 |
target checks: C03 C05 C06 C10 C28 C33
|
| 32 |
|
| 33 |
+
[x] slice 3 agent_contract_slice (shrunk) (PR #10, merged 2509f31)
|
| 34 |
target checks: C13 C14 C15 C16 C17 C20 C22 C24 C30 C34 C36
|
| 35 |
|
| 36 |
+
[~] slice 4 skill_system_delta_slice (this PR)
|
| 37 |
+
applies upstream 81c3f17..22b8883: C12 (domain + ADR),
|
| 38 |
+
C15 (bootstrap record + skill registry), C16 (triage/diagnose/
|
| 39 |
+
handoff skills; test-first→tdd, prototype→deslop)
|
| 40 |
+
|
| 41 |
+
[ ] deferred slice 2b workflow_hardening_slice (SHA-pin checkout + permissions blocks)
|
| 42 |
[ ] deferred architecture_hardening_slice (split helper.py)
|
| 43 |
[ ] deferred test_lane_slice (add pytest + integration tests)
|
| 44 |
```
|
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Skill registry
|
| 2 |
+
|
| 3 |
+
Index of every skill under `.claude/skills/`, plus how the standard's
|
| 4 |
+
high-value skills map onto this repo. Satisfies the **C15** "skill index or
|
| 5 |
+
registry consistency" requirement and **C16** (each skill states purpose,
|
| 6 |
+
tools, outputs, failure modes).
|
| 7 |
+
|
| 8 |
+
**Consistency rule:** every directory under `.claude/skills/` MUST have a row
|
| 9 |
+
here; every row MUST point to a real skill file or a documented reuse. The
|
| 10 |
+
`repo_skill_bootstrap` skill checks this.
|
| 11 |
+
|
| 12 |
+
## Skills present in this repo
|
| 13 |
+
|
| 14 |
+
| Skill | Purpose | Source |
|
| 15 |
+
|---|---|---|
|
| 16 |
+
| [`repo_skill_bootstrap`](../../.claude/skills/repo_skill_bootstrap/SKILL.md) | Record setup facts other skills depend on | repo-native |
|
| 17 |
+
| [`triage_work`](../../.claude/skills/triage_work/SKILL.md) | Classify incoming work into explicit readiness states | repo-native |
|
| 18 |
+
| [`diagnose_issue`](../../.claude/skills/diagnose_issue/SKILL.md) | Build a pass/fail loop before changing production code | repo-native |
|
| 19 |
+
| [`handoff`](../../.claude/skills/handoff/SKILL.md) | Compress session state into a referenceable handoff | repo-native |
|
| 20 |
+
| [`tdd`](../../.claude/skills/tdd/SKILL.md) | Test-first vertical slices (red-green-refactor) | repo-native |
|
| 21 |
+
| [`deslop`](../../.claude/skills/deslop/SKILL.md) | Final cleanup pass before commit | repo-native |
|
| 22 |
+
| [`check_decode_ai_standards_updates`](../../.claude/skills/check_decode_ai_standards_updates/SKILL.md) | Compare applied standards ref against upstream HEAD | repo-native |
|
| 23 |
+
|
| 24 |
+
## Standard high-value skills → this repo
|
| 25 |
+
|
| 26 |
+
The standard names a set of high-value skills (C16). Rather than duplicate
|
| 27 |
+
existing capability, the registry maps them to what already exists — duplication
|
| 28 |
+
is itself an anti-pattern the standard warns against.
|
| 29 |
+
|
| 30 |
+
| Standard skill | Mapped to |
|
| 31 |
+
|---|---|
|
| 32 |
+
| repo-native workflow reuse | `command-registry.md` + `repo_skill_bootstrap` |
|
| 33 |
+
| protected-boundary assessment | `docs/guides/protected-boundary-policy.md` |
|
| 34 |
+
| erd updates | `docs/architecture/repository-erd.md` (kept current by hand) |
|
| 35 |
+
| remediation planning | audit work folder `remediation-plan.md` + slice tracker |
|
| 36 |
+
| skill-mediated git flow | `docs/guides/git-and-pr-rules.md` + `.githooks/` gates |
|
| 37 |
+
| issue-readiness triage | `triage_work` |
|
| 38 |
+
| diagnose / repro loop | `diagnose_issue` |
|
| 39 |
+
| test-first vertical slices | **`tdd`** (existing — not duplicated) |
|
| 40 |
+
| prototype cleanup | **`deslop`** (existing — not duplicated) |
|
| 41 |
+
| handoff compression | `handoff` |
|
| 42 |
+
| standards-sync (aligned repos) | `check_decode_ai_standards_updates` |
|