Capture: parse leading type keyword; record master-deploy + Element lessons
capture-note.sh reads an optional leading bug:/feature:/chore:/idea: keyword as the inbox type (default idea, always P2). AGENTS.md: capture mode marked live; two durable lessons — the Update button deploys origin/master so commits must land there, and Element intercepts /capture (the thread is the trigger).
This commit is contained in:
+23
-4
@@ -7,14 +7,16 @@
|
||||
# target repo) drains it like any other captured item.
|
||||
#
|
||||
# Deterministic on purpose: no LLM, no token, nothing leaves the Mac except the git push to
|
||||
# Gitea. The "smarts" (real type/priority, repo-routing, phrasing) stay at /triage, where the
|
||||
# human is — and routing message text through a frontier model would break the sovereignty
|
||||
# boundary (D13/D8). Defaults every capture to a raw [idea][P2]; /triage reclassifies.
|
||||
# Gitea. The "smarts" (priority, repo-routing, phrasing) stay at /triage, where the human is —
|
||||
# routing message text through a frontier model would break the sovereignty boundary (D13/D8).
|
||||
# Type comes from an optional leading keyword the user types ("bug: ...", "feature: ...");
|
||||
# anything without one defaults to a raw [idea]. Priority is always P2; /triage sets the real one.
|
||||
#
|
||||
# Why a login shell (-l): git config / PATH live in ~/.zprofile, which a non-login SSH shell
|
||||
# skips — the same seam as launch-claude.sh / ask-claude.sh.
|
||||
|
||||
set -e
|
||||
setopt extended_glob # for whitespace-run trimming below
|
||||
|
||||
standards="$HOME/Projects/standards"
|
||||
inbox="$standards/INBOX.md"
|
||||
@@ -32,7 +34,24 @@ if [[ ! -f "$inbox" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
line="- [ ] ($project) [idea][P2] $note — via matrix, $(date +%F)"
|
||||
# Optional leading type keyword ("bug: ...", "feature: ...", etc.) → that type; default idea.
|
||||
# Only fires when the text before the first colon is exactly one known keyword, so a note that
|
||||
# merely contains a colon ("ratio is 3:1") is left untouched. Types: standards/guides/capture.md.
|
||||
type="idea"
|
||||
if [[ "$note" == *:* ]]; then
|
||||
cand="${(L)note%%:*}" # lowercase the text before the first colon
|
||||
cand="${cand##[[:space:]]#}" # trim surrounding whitespace
|
||||
cand="${cand%%[[:space:]]#}"
|
||||
case "$cand" in
|
||||
bug|feature|idea|chore|skill|agent|project)
|
||||
type="$cand"
|
||||
note="${note#*:}" # drop "keyword:"
|
||||
note="${note##[[:space:]]#}" # trim leading whitespace
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
line="- [ ] ($project) [$type][P2] $note — via matrix, $(date +%F)"
|
||||
|
||||
print -r -- "$line" >> "$inbox"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user