@friedbotstudio/create-baseline 0.2.1 → 0.4.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.
Files changed (87) hide show
  1. package/README.md +17 -7
  2. package/bin/cli.js +197 -119
  3. package/obj/template/.claude/commands/grant-push.md +19 -0
  4. package/obj/template/.claude/commands/init-project.md +26 -4
  5. package/obj/template/.claude/hooks/consent_gate_grant.mjs +107 -0
  6. package/obj/template/.claude/hooks/git_commit_guard.mjs +224 -0
  7. package/obj/template/.claude/hooks/harness_continuation.sh +101 -34
  8. package/obj/template/.claude/hooks/lib/common.mjs +283 -0
  9. package/obj/template/.claude/hooks/lib/common.sh +1 -1
  10. package/obj/template/.claude/hooks/memory_session_start.sh +20 -6
  11. package/obj/template/.claude/hooks/memory_stop.sh +161 -2
  12. package/obj/template/.claude/hooks/spec_approval_guard.sh +1 -1
  13. package/obj/template/.claude/hooks/swarm_approval_guard.sh +1 -1
  14. package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +7 -7
  15. package/obj/template/.claude/hooks/tests/fixtures/memory_stop_landmark_baseline.txt +21 -0
  16. package/obj/template/.claude/hooks/tests/fixtures/regenerate-ac008.sh +47 -0
  17. package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +7 -3
  18. package/obj/template/.claude/hooks/tests/memory_stop_intent_test.sh +329 -0
  19. package/obj/template/.claude/hooks/tests/regenerate_ac008_test.sh +99 -0
  20. package/obj/template/.claude/memory/README.md +8 -3
  21. package/obj/template/.claude/memory/backlog.md +12 -0
  22. package/obj/template/.claude/project.json +6 -1
  23. package/obj/template/.claude/settings.json +3 -4
  24. package/obj/template/.claude/skills/audit-baseline/audit.sh +28 -16
  25. package/obj/template/.claude/skills/audit-baseline/tests/fixtures/_pending_opener_only.md +3 -0
  26. package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_full_empty_body.md +4 -0
  27. package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_full_with_entries.md +9 -0
  28. package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_no_opener.md +3 -0
  29. package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_opener_only.md +3 -0
  30. package/obj/template/.claude/skills/audit-baseline/tests/preamble_check_test.sh +147 -0
  31. package/obj/template/.claude/skills/changelog/SKILL.md +69 -0
  32. package/obj/template/.claude/skills/changelog/changelog.mjs +163 -0
  33. package/obj/template/.claude/skills/changelog/classifier.mjs +49 -0
  34. package/obj/template/.claude/skills/changelog/state-writer.mjs +19 -0
  35. package/obj/template/.claude/skills/changelog/tests/consent-expired_test.sh +126 -0
  36. package/obj/template/.claude/skills/changelog/tests/golden-path_test.sh +191 -0
  37. package/obj/template/.claude/skills/changelog/tests/idempotent-reentry_test.sh +121 -0
  38. package/obj/template/.claude/skills/changelog/tests/keepachangelog-unreleased-preserved_test.mjs +149 -0
  39. package/obj/template/.claude/skills/changelog/tests/non-git-shortcircuit_test.sh +98 -0
  40. package/obj/template/.claude/skills/changelog/tests/preview-only_test.sh +96 -0
  41. package/obj/template/.claude/skills/changelog/tests/run.sh +28 -0
  42. package/obj/template/.claude/skills/changelog/unreleased-writer.mjs +155 -0
  43. package/obj/template/.claude/skills/changelog/version-preview.mjs +124 -0
  44. package/obj/template/.claude/skills/chore/SKILL.md +5 -3
  45. package/obj/template/.claude/skills/commit/SKILL.md +5 -4
  46. package/obj/template/.claude/skills/copywriting/LICENSE +21 -0
  47. package/obj/template/.claude/skills/copywriting/NOTICE +23 -0
  48. package/obj/template/.claude/skills/copywriting/SKILL.md +1 -1
  49. package/obj/template/.claude/skills/design-ui/SKILL.md +23 -5
  50. package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +26 -5
  51. package/obj/template/.claude/skills/design-ui/references/orchestration.md +1 -0
  52. package/obj/template/.claude/skills/design-ui/references/state-machine.md +5 -3
  53. package/obj/template/.claude/skills/documentation/LICENSE +202 -0
  54. package/obj/template/.claude/skills/documentation/NOTICE +22 -0
  55. package/obj/template/.claude/skills/harness/SKILL.md +5 -1
  56. package/obj/template/.claude/skills/humanizer/LICENSE +21 -0
  57. package/obj/template/.claude/skills/humanizer/NOTICE +21 -0
  58. package/obj/template/.claude/skills/impeccable/LICENSE +202 -0
  59. package/obj/template/.claude/skills/impeccable/NOTICE +24 -0
  60. package/obj/template/.claude/skills/memory-flush/SKILL.md +20 -4
  61. package/obj/template/.claude/skills/memory-flush/sweep.py +74 -6
  62. package/obj/template/.claude/skills/memory-flush/tests/run.sh +300 -1
  63. package/obj/template/.claude/skills/tdd/SKILL.md +2 -1
  64. package/obj/template/.claude/skills/tdd/drift_check.py +180 -0
  65. package/obj/template/.claude/skills/tdd/tests/drift_check_test.sh +190 -0
  66. package/obj/template/.claude/skills/tdd/tests/run.sh +21 -0
  67. package/obj/template/.claude/skills/technical-tutorials/LICENSE +21 -0
  68. package/obj/template/.claude/skills/technical-tutorials/NOTICE +23 -0
  69. package/obj/template/.claude/skills/technical-tutorials/SKILL.md +1 -1
  70. package/obj/template/.claude/skills/triage/SKILL.md +11 -5
  71. package/obj/template/CLAUDE.md +36 -25
  72. package/obj/template/docs/init/seed.md +39 -24
  73. package/obj/template/manifest.json +73 -33
  74. package/package.json +5 -2
  75. package/src/CLAUDE.template.md +36 -25
  76. package/src/cli/merge.js +15 -10
  77. package/src/cli/tui/doctor.js +56 -0
  78. package/src/cli/tui/install.js +79 -0
  79. package/src/cli/tui/meta.js +30 -0
  80. package/src/cli/tui/tokens.js +38 -0
  81. package/src/cli/tui/upgrade.js +100 -0
  82. package/src/memory/backlog.template.md +12 -0
  83. package/src/project.template.json +6 -1
  84. package/src/seed.template.md +39 -24
  85. package/src/settings.template.json +3 -4
  86. package/obj/template/.claude/hooks/consent_gate_grant.sh +0 -89
  87. package/obj/template/.claude/hooks/git_commit_guard.sh +0 -93
@@ -21,7 +21,7 @@ The first invocation creates the directory if it does not exist (`mkdir -p`). Su
21
21
  "step_index": <int, 0-based; index of the NEXT step to run>,
22
22
  "invocations": [InvocationRecord, ...],
23
23
  "verifications": [VerificationRecord, ...],
24
- "state": "in_progress" | "complete" | "needs_human" | "blocked" | "not_a_design_task",
24
+ "state": "in_progress" | "complete" | "needs_human" | "blocked" | "not_a_design_task" | "mixed_brief",
25
25
  "next_actions": ["<human-readable action>", ...]
26
26
  }
27
27
  ```
@@ -69,7 +69,7 @@ Every state file MUST carry these fields. Stage 3's checkpoint writes them all o
69
69
  | `step_index` | yes | The position to resume from. 0 = nothing run yet; N = N steps completed. |
70
70
  | `invocations` | yes | Append-only list. Each step's invocation appears here. |
71
71
  | `verifications` | yes | Subset of invocations[] limited to evaluation steps (audit, critique). |
72
- | `state` | yes | One of the five terminal/transitional states. |
72
+ | `state` | yes | One of the six terminal/transitional states. |
73
73
 
74
74
  Optional fields:
75
75
  - `register`, `updated_at`, `next_actions` — present when the orchestration has produced them; absent before Stage 1 completes the capture.
@@ -77,7 +77,7 @@ Optional fields:
77
77
 
78
78
  ## Terminal states
79
79
 
80
- The five values of `state` and their meaning:
80
+ The six values of `state` and their meaning:
81
81
 
82
82
  | State | Meaning | Caller action |
83
83
  |---|---|---|
@@ -86,6 +86,7 @@ The five values of `state` and their meaning:
86
86
  | `needs_human` | Loop cap fired (3 iterations on audit→polish or critique-driven refine). P1 issues remain unresolved. | Caller decides whether to surface and stop, or warn and continue. Per `/tdd` Step 6 policy: warn and continue. |
87
87
  | `blocked` | A gate fired. P0 blockers, register conflict declined, target_files parent missing, malformed state file, user refused recipe. | Caller surfaces the reason and stops the immediate flow. |
88
88
  | `not_a_design_task` | Stage 0 classified the intent as development or copy. Set on the first checkpoint write of the orchestration. | Caller routes to `correct_lane` (`/tdd` or `/document`). |
89
+ | `mixed_brief` | Stage 0 classified the task_brief as spanning ≥ 2 lanes (multi-lane misroute). Set on the first checkpoint write of the orchestration; `lane_split` is persisted alongside. | Caller reads `lane_split` and fans out per row; see `references/orchestration.md` caller-policy. |
89
90
 
90
91
  ## Resume logic
91
92
 
@@ -99,6 +100,7 @@ On any `Skill(design-ui, task_brief)` invocation:
99
100
  - **Present and `state` is `needs_human`** → caller must signal intent to resume. If `task_brief` is identical to the stored intent and the caller is re-invoking explicitly, restart the loop from `step_index` (which points at the audit that fired the cap). The user is asserting that conditions have changed (e.g., P1 issues were addressed externally) and the loop should re-run.
100
101
  - **Present and `state` is `blocked`** → return the existing Report with the blocker reason. User must materially change the input (re-state intent, expand write_set, etc.) before progress.
101
102
  - **Present and `state` is `not_a_design_task`** → return the existing Report; the misroute is sticky for this slug.
103
+ - **Present and `state` is `mixed_brief`** → return the existing Report (including the cached `lane_split`); the misroute is sticky for this slug (mirrors `not_a_design_task`). Delete the state file to re-classify.
102
104
  - **Present but malformed JSON** → return `Report { final_state: "blocked", reason: "state file malformed", state_file }`. Do NOT overwrite — preserve for human inspection.
103
105
 
104
106
  The resume rule: **skip steps prior to `step_index`; start at `step_index`**. Completed steps are never re-run unless the user explicitly requests it (e.g., by deleting the state file and re-invoking).
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,22 @@
1
+ documentation
2
+ =============
3
+
4
+ This skill is vendored from the `claude-code-setup` plugin published by
5
+ Anthropic and is redistributed here under the terms of the Apache License,
6
+ Version 2.0 (see LICENSE in this directory).
7
+
8
+ Upstream:
9
+ Plugin name: claude-code-setup
10
+ Author: Anthropic <support@anthropic.com>
11
+ Skill: documentation/
12
+
13
+ Vendored into: .claude/skills/documentation/
14
+ Vendored on: 2026-05-15 (this commit) — prior install date unknown; LICENSE
15
+ + NOTICE added retroactively as part of the licensing-attribution
16
+ drift fix in the branch-aware-git-policy workflow.
17
+
18
+ Local changes:
19
+ - Frontmatter `owner: baseline` added so the audit-baseline drift check
20
+ tracks this file as a shipped baseline artifact. The Apache 2.0 license
21
+ permits redistribution under attribution; this NOTICE file fulfills the
22
+ notice-preservation requirement.
@@ -105,12 +105,14 @@ The phases the harness loops through, in order:
105
105
 
106
106
  ```
107
107
  intake → scout → research → spec → /approve-spec → tdd → simplify →
108
- security → integrate → document → archive → /grant-commit commit
108
+ security → integrate → document → archive → memory-flush
109
+ /grant-commit → changelog → commit
109
110
  ```
110
111
 
111
112
  - Phases listed in `workflow.json → exceptions` are skipped.
112
113
  - Non-git projects auto-except `grant-commit` and `commit`; the workflow ends after `/archive`.
113
114
  - The four-pillar framing (Intake analysis · Track alignment · Implementation · Tying open ends) is documentary; the actual execution model is one phase per loop iteration, with the loop continuing through every non-gated boundary until it exits cleanly.
115
+ - Inside `/tdd`'s seeded worker chain, the harness inlines a **drift-check-tick** task between the last `design-ui-tick` (or `verify-tick` when no design rows) and `tdd-finalize`. It invokes `python3 .claude/skills/tdd/drift_check.py --slug <slug>` against the approved spec and the branch diff. Exit 0 (zero unresolved) → continue to `tdd-finalize`; exit 1 (≥ 1 unresolved) → EXIT LOOP with YIELD (`reason: "drift analysis: <N> unresolved items"`). Drift failures stop-and-surface (NO auto-loop) — the user fixes the impl gap or amends the spec + re-`/approve-spec`s. The drift report lands at `.claude/state/drift/<slug>.md`. `chore`-track workflows (no spec on disk) exit 0 with "no spec; skipped" and proceed to `tdd-finalize`.
114
116
 
115
117
  ### Swarm vs solo at Phase 6
116
118
 
@@ -156,6 +158,8 @@ On each `/harness` invocation, read `workflow.json` and decide whether to enter
156
158
  | `completed` contains `spec` **and** approval token present, but `tdd`/`swarm-dispatch` not in `completed` | Enter loop; decide swarm-vs-solo at first iteration; invoke the next phase |
157
159
  | `completed` contains `swarm-plan` but no `swarm_approvals/<slug>.approval` | Enter loop; loop exits with `state: yielded` (approve-swarm gate) |
158
160
  | `completed` contains `archive` but no `commit_consent` (git project) | Enter loop; loop exits with `state: yielded` (grant-commit gate) |
161
+ | `completed` contains `grant-commit` consent (token fresh) but no `changelog` | Enter loop; invoke `Skill(changelog)` (Phase 11.5); on success continue to commit |
162
+ | `completed` contains `changelog` but no commit yet (git project) | Enter loop; invoke `Skill(commit)` (Phase 11) |
159
163
  | Phase skill returned an error this invocation | Loop exits with phase-failure reason; user investigates |
160
164
 
161
165
  ## Constraints
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) blader (https://github.com/blader/humanizer)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ humanizer
2
+ =========
3
+
4
+ This skill is vendored from the `humanizer` skill published by @blader and is
5
+ redistributed here under the terms of the MIT License (see LICENSE in this
6
+ directory).
7
+
8
+ Upstream:
9
+ Repository: https://github.com/blader/humanizer
10
+ Author: @blader
11
+
12
+ Vendored into: .claude/skills/humanizer/
13
+ Vendored on: 2026-05-15 (this commit) — prior install date unknown; LICENSE
14
+ + NOTICE added retroactively as part of the licensing-attribution
15
+ drift fix in the branch-aware-git-policy workflow.
16
+
17
+ Local changes:
18
+ - Frontmatter `owner: baseline` added so the audit-baseline drift check
19
+ tracks this file as a shipped baseline artifact. The MIT license permits
20
+ this redistribution; attribution is preserved in the SKILL.md frontmatter
21
+ `description` block, which retains the upstream credit line.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,24 @@
1
+ impeccable
2
+ ==========
3
+
4
+ This skill is vendored from the `impeccable` repository published by Phil
5
+ Bakaus (pbakaus) and is redistributed here under the terms of the Apache
6
+ License, Version 2.0 (see LICENSE in this directory).
7
+
8
+ Upstream:
9
+ Repository: https://github.com/pbakaus/impeccable
10
+ Author: Phil Bakaus (pbakaus)
11
+
12
+ Vendored into: .claude/skills/impeccable/
13
+ Vendored on: 2026-05-15 (this commit) — prior install date unknown; LICENSE
14
+ + NOTICE added retroactively as part of the licensing-attribution
15
+ drift fix in the branch-aware-git-policy workflow.
16
+
17
+ Local changes:
18
+ - Frontmatter `owner: baseline` added so the audit-baseline drift check
19
+ tracks this file as a shipped baseline artifact. The Apache 2.0 license
20
+ permits redistribution under attribution; this NOTICE file fulfills the
21
+ notice-preservation requirement.
22
+ - PROJECT_NOTES.md captures local annotations made in the course of using
23
+ impeccable within the baseline. The vendored SKILL.md and agents/* files
24
+ are otherwise unmodified from upstream.
@@ -1,9 +1,19 @@
1
1
  ---
2
2
  name: memory-flush
3
3
  owner: baseline
4
- description: Review the auto-extracted candidates in `.claude/memory/_pending.md` and commit keepers to the canonical memory files (`landmarks.md`, `libraries.md`, `decisions.md`, `landmines.md`, `conventions.md`, `pending-questions.md`). Invoke at session start when the SessionStart hook reports pending candidates, or any time `_pending.md` has accumulated entries you want to curate. Reset the pending body after flushing.
4
+ description: Review the auto-extracted candidates in `.claude/memory/_pending.md` and commit keepers to the canonical memory files (`landmarks.md`, `libraries.md`, `decisions.md`, `landmines.md`, `conventions.md`, `pending-questions.md`, `backlog.md`). Invoke at session start when the SessionStart hook reports pending candidates, or any time `_pending.md` has accumulated entries you want to curate. Reset the pending body after flushing.
5
5
  ---
6
6
 
7
+ # When invoked as Phase 10.6
8
+
9
+ This skill runs as **Phase 10.6** of every workflow track (intake / spec / tdd / chore), between `/archive` (Phase 10.5) and `/grant-commit` (Phase 11). The harness loop reads `.claude/memory/_pending.md` body, runs Step 0 canonical sweeps unconditionally, and on **empty pending** (zero `## CANDIDATE:` blocks) short-circuits the **fast-path**: Steps 1–5 are skipped, Step 6 emits a one-line "no pending candidates" report, and the skill returns success. This keeps the no-op cost bounded at ≤ 3 sweep.py invocations per Phase 10.6 invocation.
10
+
11
+ The skill is also user-invokable outside the workflow (ad-hoc curation). When invoked ad-hoc and `_pending.md` is non-empty, the full Steps 1–5 flow runs identically. The fast-path activates per-invocation based on `_pending.md` body state, not on workflow context.
12
+
13
+ `/commit` (Phase 11) refuses to proceed unless `memory-flush` is in `workflow.json → completed` (or in `exceptions`). Empty-pending fast-path still appends `"memory-flush"` to `completed` — the prereq is satisfied either way.
14
+
15
+ (See "Method" below for the full Step 0 / Steps 1–5 / Step 6 flow.)
16
+
7
17
  # memory-flush — curate auto-extracted memory candidates
8
18
 
9
19
  The `memory_stop.sh` hook appends candidates to `.claude/memory/_pending.md` after every turn. This skill reviews them in main context (where conversation richness is preserved), commits the keepers to the right canonical file with proper metadata, and resets the pending body.
@@ -18,13 +28,13 @@ The hook is a passive collector. **You are the curator.** Discard noise, promote
18
28
  - field: value
19
29
  - field: value
20
30
  ```
21
- - The six canonical files at `.claude/memory/<name>.md`. Read each before deciding where a candidate lands and whether it duplicates existing content.
31
+ - The seven canonical files at `.claude/memory/<name>.md`. Read each before deciding where a candidate lands and whether it duplicates existing content.
22
32
 
23
33
  # Method
24
34
 
25
35
  ## Step 0 — Canonical sweep (closure semantics)
26
36
 
27
- Before reviewing `_pending.md`, sweep the six canonical files for closed entries and stale entries. The `sweep.py` helper at `.claude/skills/memory-flush/sweep.py` is the deterministic actuator; this SOP composes the three modes.
37
+ Before reviewing `_pending.md`, sweep the seven canonical files for closed entries and stale entries. The `sweep.py` helper at `.claude/skills/memory-flush/sweep.py` is the deterministic actuator; this SOP composes the three modes.
28
38
 
29
39
  ### Step 0a — Auto-close structured closure fields
30
40
 
@@ -55,6 +65,10 @@ For each entry without a structured closure field, the helper scans the body aga
55
65
 
56
66
  You drive this step interactively: ask the user `Close <key> from <file>? (y / n / skip)` for each entry the helper surfaces, then feed the answers to the helper one per line.
57
67
 
68
+ ### Step 0a-bis — Stamp-closure mode (invoked from /commit, not from /memory-flush)
69
+
70
+ `sweep.py` also exposes a `--mode stamp-closure --backlog-keys <csv>` mode that writes `status: picked-up` + `superseded-at: <today>` to each named `backlog.md` entry. This mode is NOT invoked by `/memory-flush` Step 0; it is invoked by `/commit` Step 6 when `workflow.json → source_backlog_keys` is non-empty. The mode is idempotent (re-running on stamped entries rewrites `superseded-at:` to today; reports them under `already_closed`). The next `/memory-flush` Step 0a auto-close sweep then deletes the stamped entries per the existing `superseded-at:` closure trigger — so `/memory-flush`'s contract is unchanged; it just sees more closures in its `auto-close` step. Report shape: `{"stamped": N, "missing": [keys], "already_closed": [keys]}`.
71
+
58
72
  ### Step 0c — Stale sweep
59
73
 
60
74
  Only run when `memory_session_start.sh` reported stale > 0 this session, or the user asks. Invoke:
@@ -76,9 +90,11 @@ Read `_pending.md` in full. Then read the canonical file each candidate targets
76
90
  For each `## CANDIDATE:` block, decide one of:
77
91
 
78
92
  - **Promote.** The candidate is signal. Build the canonical entry shape (see `.claude/memory/README.md`) and append to the right file. If the candidate's stable key already exists in the canonical file → **replace** that entry; do not duplicate.
79
- - **Discard.** The candidate is noise (touched-once file with no clear role; a context7 query that resolved nothing useful; a path under generated/vendored code). No canonical write.
93
+ - **Discard.** The candidate is noise (touched-once file with no clear role; a context7 query that resolved nothing useful; a path under generated/vendored code; an intent line that was a passing chat phrase rather than real future work). No canonical write.
80
94
  - **Defer.** Useful but you don't have enough context to write a clean entry. Move the candidate verbatim to `pending-questions.md` as a `Q-NNN` entry phrased as "Should X be a landmark?" so the next session can decide. The pending body still gets reset at the end.
81
95
 
96
+ **Backlog candidates** (`## CANDIDATE: backlog → <slug>-<4hash>`) route to `backlog.md` with the canonical entry shape plus these fields: `status: open` (the initial state; transitions to `picked-up` or `dropped` are later edits), `raised-on: <ISO>`, `raised-in-context: <slug-or-(no active workflow)>`, the verbatim blockquote of the user/assistant intent line. Provenance is `source: user-instruction` for `role: user` candidates or `source: assistant-deferral` for `role: assistant` candidates. The verbatim is REQUIRED for both — `/memory-flush` SHALL reject promotion without it (per `.claude/memory/README.md → Source provenance`).
97
+
82
98
  ## Step 3 — Verify before promoting
83
99
 
84
100
  Per the project memory contract: every entry on the canonical files must have a `verified-at:` field. Verify the candidate's claim before writing: