hstack 0.1.0 → 0.3.0
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.
- package/CHANGELOG.md +35 -9
- package/VERSION +1 -1
- package/dist/manifest.js +1 -0
- package/dist/manifest.js.map +1 -1
- package/package.json +1 -1
- package/template/.claude/agents/kernel-fit-analyst.md +137 -0
- package/template/.claude/agents/spec-author.md +7 -2
- package/template/.claude/skills/hstack-adr-new/SKILL.md +6 -1
- package/template/.claude/skills/hstack-change-new/SKILL.md +7 -5
- package/template/.claude/skills/hstack-help/SKILL.md +6 -1
- package/template/.claude/skills/hstack-implement/SKILL.md +2 -2
- package/template/.claude/skills/hstack-kernel-fit-promote/SKILL.md +164 -0
- package/template/.claude/skills/hstack-kernel-fit-scan/SKILL.md +180 -0
- package/template/.claude/skills/hstack-kernel-fit-triage/SKILL.md +159 -0
- package/template/.claude/skills/hstack-ship/SKILL.md +6 -5
- package/template/.claude/skills/hstack-story-draft/SKILL.md +7 -5
- package/template/.claude/skills/hstack-telemetry/SKILL.md +3 -2
- package/template/.claude/skills/hstack-ui-brief/SKILL.md +1 -1
- package/template/CLAUDE.md +26 -0
- package/template/scripts/telemetry/insights/kernel_fit.py +438 -0
- package/template/scripts/telemetry/render.py +73 -0
- package/template/scripts/telemetry/report.py +4 -1
- package/template/scripts/telemetry/run_kernel_fit.py +91 -0
- package/template/templates/adr.md +2 -1
- package/template/templates/change-spec.md +3 -1
- package/template/templates/kernel-fit-finding.md +62 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: KF-<NNNN>-<slug>
|
|
3
|
+
type: kernel-fit-finding
|
|
4
|
+
status: open # open | acknowledged | dismissed | promoted | superseded | archived
|
|
5
|
+
owner: null # git-handle of the triager; null until first triage
|
|
6
|
+
pattern: <KF-P1 | KF-P2 | KF-P3 | …> # detector pattern that fired; enumerated in scripts/telemetry/insights/kernel_fit.py
|
|
7
|
+
confidence: medium # high | medium | low
|
|
8
|
+
detected-by: kernel-fit-analyst
|
|
9
|
+
detected-at: <ISO-8601 timestamp>
|
|
10
|
+
evidence-row-count: 0 # integer; must equal len(evidence-rows) per KF-01
|
|
11
|
+
evidence-rows: [] # YAML array of {change|adr|td, signal} dicts; one entry per row counted above
|
|
12
|
+
related-findings: [] # KF ids — prior or adjacent findings on the same kernel surface
|
|
13
|
+
promoted-to: null # `adr:<ADR-NNNN-slug>` | `tech-debt:<TD-NNNN-slug>` | null; reciprocal with the target artifact's `promoted-from-kernel-fit`; required when status: promoted
|
|
14
|
+
dismissed-reason: null # ≥50 chars of prose; required when status: dismissed (per KF-05)
|
|
15
|
+
superseded-by: null # KF id when status: superseded
|
|
16
|
+
created: <YYYY-MM-DD>
|
|
17
|
+
updated: <YYYY-MM-DD>
|
|
18
|
+
schema-version: 1
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Title
|
|
22
|
+
|
|
23
|
+
_Short noun phrase naming the kernel-fit gap. Example: "Category-A claim spans production paths — engineer likely meant Category B."_
|
|
24
|
+
|
|
25
|
+
## Pattern fired
|
|
26
|
+
|
|
27
|
+
_Name the detector pattern (KF-P1 / KF-P2 / KF-P3 / …) and one paragraph describing what the detector found. Quote the pattern's defining condition from `kernel_fit.py` if helpful._
|
|
28
|
+
|
|
29
|
+
## Evidence
|
|
30
|
+
|
|
31
|
+
_Per evidence row, a 2–3 sentence prose summary with at least one inline citation (change-id, ADR-id, TD-id, commit-sha, kernel section). KF-01 requires `len(evidence-rows)` in frontmatter to equal `evidence-row-count`; the prose here must cite each row at least once. No prose without a citation._
|
|
32
|
+
|
|
33
|
+
1. ...
|
|
34
|
+
2. ...
|
|
35
|
+
|
|
36
|
+
## Kernel surface implicated
|
|
37
|
+
|
|
38
|
+
_Single-sentence pointer to the kernel section, template, validator rule, or Skill flow that the finding suggests revising. Examples: "`template/CLAUDE.md § Frontmatter contract` — the `internal-tooling` field"; "`template/templates/change-spec.md` frontmatter — `surfaces` enum"; "`/hstack:adversarial-review` precondition check at SKILL.md line 61"._
|
|
39
|
+
|
|
40
|
+
## Proposed direction
|
|
41
|
+
|
|
42
|
+
_One paragraph. Name a direction the kernel revision could take — split a flag, add an enum case, add a Skill precondition, amend a section. This is NOT a full ADR — that work is done by `spec-author` if and when the engineer invokes `/hstack:kernel-fit-promote`. Keep this as a sketch, not a specification._
|
|
43
|
+
|
|
44
|
+
## Counter-explanations (challenge prompt — mandatory)
|
|
45
|
+
|
|
46
|
+
_Two reasons this finding might NOT warrant a kernel change. If you cannot produce two, the analyst auto-downgrades `confidence` to `low` per KF-03. The challenge defends against false-positives the same way `## Consequences` § "name two consequences that look bad" defends ADRs._
|
|
47
|
+
|
|
48
|
+
1. ...
|
|
49
|
+
2. ...
|
|
50
|
+
|
|
51
|
+
## Confidence rationale
|
|
52
|
+
|
|
53
|
+
_One paragraph defending the `confidence` enum value against the validator rules. `high` requires `evidence-row-count >= 3` AND ≥2 distinct change-specs cited (KF-02). `medium` is the conservative default. `low` carries no notification and is appropriate when evidence is thin or the challenge prompts substantially weaken the finding._
|
|
54
|
+
|
|
55
|
+
## Triage Log
|
|
56
|
+
|
|
57
|
+
_Populated by `/hstack:kernel-fit-triage` and `/hstack:kernel-fit-promote` as the finding's status transitions. Section is empty until the first transition out of `open`._
|
|
58
|
+
|
|
59
|
+
- `status: open → acknowledged` on `<YYYY-MM-DD>` by `<owner>`. Triggered by `/hstack:kernel-fit-triage <id> --action acknowledge`.
|
|
60
|
+
- `status: open → dismissed` on `<YYYY-MM-DD>` by `<owner>`. Reason: `<dismissed-reason>`.
|
|
61
|
+
- `status: acknowledged → promoted` on `<YYYY-MM-DD>` by `<owner>`. Promoted to: `<promoted-to>`. Triggered by `/hstack:kernel-fit-promote <id> --slug <adr-slug>`.
|
|
62
|
+
- `status: open → superseded` on `<YYYY-MM-DD>` by the next `kernel-fit-analyst` run. Superseded by: `<superseded-by>`.
|