aboutsummaryrefslogtreecommitdiff
path: root/docs/specs
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-02 00:24:26 -0400
committerCraig Jennings <c@cjennings.net>2026-07-02 00:24:26 -0400
commit21639cb395bd363f9406694adebd9a3675bf1096 (patch)
treecf4500dd9cab3c0ac16ecb92282f410fa2e69868 /docs/specs
parentf4b64d6141156cf0ee2a2c2a13cda256f0bf0c84 (diff)
downloadrulesets-21639cb395bd363f9406694adebd9a3675bf1096.tar.gz
rulesets-21639cb395bd363f9406694adebd9a3675bf1096.zip
feat(startup): add the spec-sort nudge; notify .emacs.d the convention is live
The Phase A batch gains a read-only probe that prints one line when a project has an unsorted docs pile (a docs/design/ or stray docs/*-spec.org files) and no :LAST_SPEC_SORT: marker. Phase C surfaces the "run spec-sort" offer when the probe fired and stays silent otherwise. The stray-root check uses find instead of the spec's compgen sketch: compgen is bash-only and zsh aborts on an unmatched glob, so the original snippet false-negatived on stray root specs under zsh. The spec's snippet is updated with a note, and the probe is fixture-verified in both shells across the four project shapes. I also fixed startup.org's reference to the encourage-kb-contribution spec's pre-pilot path and sent .emacs.d the convention-live note with the id-index ask.
Diffstat (limited to 'docs/specs')
-rw-r--r--docs/specs/2026-07-01-docs-lifecycle-spec.org6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/specs/2026-07-01-docs-lifecycle-spec.org b/docs/specs/2026-07-01-docs-lifecycle-spec.org
index 656df7f..16e1132 100644
--- a/docs/specs/2026-07-01-docs-lifecycle-spec.org
+++ b/docs/specs/2026-07-01-docs-lifecycle-spec.org
@@ -141,11 +141,13 @@ A synced helper, =spec-sort=, run once per project. *Canonical placement:* like
*The startup nudge — concrete contract.* Phase A's parallel batch gains one read-only probe:
#+begin_src bash
-{ [ -d docs/design ] || compgen -G 'docs/*-spec.org' >/dev/null; } \
+{ [ -d docs/design ] || [ -n "$(find docs -maxdepth 1 -name '*-spec.org' -print -quit 2>/dev/null)" ]; } \
&& ! grep -qs ':LAST_SPEC_SORT:' .ai/notes.org \
- && echo "spec-sort: unsorted docs present"
+ && echo "spec-sort: unsorted docs present" || true
#+end_src
+(Phase 4 refined the stray-root check from =compgen= to =find=: =compgen= is bash-only and zsh aborts on an unmatched glob, so the original snippet false-negatived on stray root specs under zsh.)
+
(The probe also fires on stray =docs/*-spec.org= root files, so a project whose only misfiled specs sit at the =docs/= root still gets nudged.)
Phase C surfaces one line when the probe printed ("this project's docs pile has never been spec-sorted — say 'run spec-sort' to sort it") and stays silent otherwise. Projects with nothing to sort — no =docs/design/= and no stray root specs — never see it; a stamped marker permanently clears it.