Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .abcd/development/brief/04-surfaces/21-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ Sub-verbs: none.
| Flag | Type |
|---|---|
| `--answer` | string |
| `--change` | string |
| `--full` | bool |
| `--seen` | bool |

Expand Down
7 changes: 7 additions & 0 deletions .abcd/development/release/surface.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030746316432
slug: the-full-news-groups-each-release-s
date: 2026-12-03
---
2026-12-03 — The full news groups each release's changes by kind, new or fixed, as the area: the release digest carries no area field, and adding one would change the digest schema and the release cut that writes it, which is more than the fix for iss-2612021706041724 needs; a change's impact is the only area-like fact the digest holds, and a hand-kept keyword taxonomy would drift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030746321009
slug: the-full-news-draws-only-code-spans-and
date: 2026-12-03
---
2026-12-03 — The full news draws only code spans and strong emphasis as terminal styling, the two markdown constructs the 976 lines of the release digest use, pairing code spans through mdrecord.CodeSpanRanges and termsafe.PairCodeSpan and masking every line with termsafe.SanitizeLine first; abcd has no markdown-to-terminal renderer to reuse (mdrender writes HTML for the site), so the small reader lives beside the full news in internal/core/afterupdate (iss-2612021706041724)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030746325377
slug: the-headline-changes-of-a-release-in-the
date: 2026-12-03
---
2026-12-03 — The headline changes of a release in the full news are its changes whose changelog paragraph opens with a bold lead, at most five, in changelog order, each shown as that lead; a change with no lead is shown as its first sentence (iss-2612021706041724)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: dcn-2612030746332849
slug: a-change-s-whole-text-is-shown-on
date: 2026-12-03
---
2026-12-03 — A change's whole text is shown on request with abcd update news --change <record-id>, naming any record the change cites, over the same releases --full lists; the plain form (off a terminal and in --json lines) is the coloured drawing with its styling removed and nothing cut to a width (iss-2612021706041724)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ origin: researcher-authored
production_mode: hand-written
found_at: "internal/core/afterupdate/afterupdate.go"
remedy: "Render the full news for a terminal person: per release, a short coloured summary first (what needs you, checked against this machine, then the few headline changes in one line each), the rest grouped by area and collapsed to one line per change with its record id, markdown rendered as terminal styling rather than printed raw, and the whole paragraph text only on request for a named change; plain output keeps the same structure without colour when the output is not a terminal."
resolution: "update news --full now draws each release as a summary (what needs the person, headline changes) then the rest as new or fixed, one line per change with its record id, styled and fitted at a terminal and plain elsewhere; --change <record-id> shows one change whole"
impact: fix
resolved_by:
commit: "bd7b4cd94"
---

abcd update news --full cannot be read by a person. After an update across four releases it printed 169 changes as one unbroken wall of plain text: each change is a whole changelog paragraph of up to ten lines written for agents (configuration keys, refusal rules, record ids), with no headings beyond the release line, no grouping by what a change means for the person, no colour, no emphasis the terminal renders (the markdown asterisks and backticks print literally), and no ordering by importance. The two changes marked as needing the person sit in the middle of a release's list in the same type as everything else. The person found it overwhelming and useless. Sibling of iss-2612021704499060, which covers whether a needs-you item applies to this machine at all.
18 changes: 12 additions & 6 deletions commands/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,18 @@ person's, and a mark written there would hide the news and the offer from the
person's next session.

**On request.** When the person asks for details, run
`"${CLAUDE_PLUGIN_ROOT}/abcd" update news --full` and relay it: every
change of the releases since the last update, those that need action first,
each with the record it cites, then what waits in this repository. It writes
nothing, so it can be shown again at any time, and it is the way to see the
summary on a host that runs no session-start hook. `--answer` takes neither
`--full` nor `--seen`.
`"${CLAUDE_PLUGIN_ROOT}/abcd" update news --full` and relay it: per
release, what needs the person first, then the few headline changes, then
the rest as new or fixed, one line per change with the record it cites, then
what waits in this repository. At a terminal it is drawn in colour and fitted
to the window; elsewhere the same lines come plain. When the person asks
about one change, run
`"${CLAUDE_PLUGIN_ROOT}/abcd" update news --change <record-id>` with the
record its line names, which prints that change's whole text. Neither writes
anything, so either can be shown again at any time, and `--full` is the way
to see the summary on a host that runs no session-start hook. `--answer`
takes neither `--full` nor `--seen`, and `--change` takes neither `--answer`
nor `--seen`.

<!-- generated: command-facts -->
**Command facts, format version 3.** Where this block and `"${CLAUDE_PLUGIN_ROOT}/abcd" explain update` from the running binary disagree, follow the binary.
Expand Down
4 changes: 3 additions & 1 deletion docs/how-to/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ one line per release this computer has not been shown, naming how many
changes it made and which of them need you to act. Where the update brings
setup this repository has never answered, the reply also offers to run setup
again. `abcd update news` prints the same lines, and `abcd update news --full`
lists every change.
lists every change: per release, what needs you first, then the headline
changes, then the rest as new or fixed, one line each with the record it
cites. `abcd update news --change <record-id>` prints one change in full.

For a stronger root of trust than same-origin checksums, build from source —
`go build ./cmd/abcd` — and place the binary in the plugin root and on your
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/cli/commands.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/reference/cli/commands/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"not-now"
]
},
{
"name": "change",
"type": "string"
},
{
"name": "full",
"type": "bool"
Expand Down
71 changes: 19 additions & 52 deletions internal/core/afterupdate/afterupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,7 @@ func Moment(cwd string) (MomentLines, error) {
// the repository's setup version, else the running release alone. What
// waits is listed where the repository's setup version is an older release.
func Full(cwd, from string) (FullSummary, error) {
running, ok := release(runningVersion())
if !ok {
return FullSummary{}, ErrNotRelease
}
if from == "" {
from = firstRelease(func() (string, bool) { return previousTag(cwd) }, func() (string, bool) { return setupVersion(cwd) })
} else if _, err := launch.ParseReleaseTag(from); err != nil {
return FullSummary{}, releasedigest.ErrNotReleaseTag
}
sum, err := digestRange(from, running)
running, sum, err := fullRange(cwd, from)
if err != nil {
return FullSummary{}, err
}
Expand All @@ -228,10 +219,27 @@ func Full(cwd, from string) (FullSummary, error) {
return FullSummary{}, err
}
}
f.Lines = fullLines(sum, f.Waiting)
f.Lines = RenderFull(f, Style{})
return f, nil
}

// fullRange is the running release and the range the full summary covers:
// after from, or where from is "" after the binary record's previous release,
// else the repository's setup version, else the running release alone.
func fullRange(cwd, from string) (string, releasedigest.Summary, error) {
running, ok := release(runningVersion())
if !ok {
return "", releasedigest.Summary{}, ErrNotRelease
}
if from == "" {
from = firstRelease(func() (string, bool) { return previousTag(cwd) }, func() (string, bool) { return setupVersion(cwd) })
} else if _, err := launch.ParseReleaseTag(from); err != nil {
return "", releasedigest.Summary{}, releasedigest.ErrNotReleaseTag
}
sum, err := digestRange(from, running)
return running, sum, err
}

// Record records the person's answer to the offer for the repository at cwd
// and the running release, and raises news-seen to that release, since the
// answer was given to the moment that showed it. The answer is created
Expand Down Expand Up @@ -556,44 +564,3 @@ func plural(n int, one, many string) string {
}
return fmt.Sprintf("%d %s", n, many)
}

// fullLines renders the full summary: each release, its entries needing
// action first, each with the records it cites; the releases not described;
// then what waits here.
func fullLines(sum releasedigest.Summary, w ahoy.WaitingSet) []string {
out := []string{}
if len(sum.Releases) == 0 && sum.Gap == nil {
out = append(out, "abcd "+sum.To+": no release to describe after "+sum.From+".")
}
for _, r := range sum.Releases {
head := "abcd " + r.Tag
if r.BaseTag != "" {
head += " (after " + r.BaseTag + ")"
}
out = append(out, head+": "+plural(len(r.Entries), "change", "changes"))
for _, e := range r.Entries {
ids := make([]string, len(e.Records))
for i, rec := range e.Records {
ids[i] = rec.ID
}
mark := " - "
if e.NeedsAction() {
mark = " - needs you to act: "
}
out = append(out, mark+e.Line+" ("+strings.Join(ids, ", ")+")")
}
}
if sum.Gap != nil {
out = append(out, gapLine(*sum.Gap))
}
if len(w.Questions)+len(w.Defaults) > 0 {
out = append(out, "Waiting in this repository:")
for _, q := range w.Questions {
out = append(out, " - setup question: "+q.Title)
}
for _, d := range w.Defaults {
out = append(out, " - changed default: "+d.Title)
}
}
return out
}
9 changes: 6 additions & 3 deletions internal/core/afterupdate/afterupdate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ func TestADevBuildHoldsNothing(t *testing.T) {

// TestFullShowsEveryChangeActionFirstAndAgain: the full summary lists each
// release in the range, its breaking entries first, every entry with the
// record ids it cites, then what waits here; it is the same after the news
// record ids it cites, then the way to read one whole and what waits here; it is the same after the news
// was seen and the offer answered, and an explicit start is honoured.
func TestFullShowsEveryChangeActionFirstAndAgain(t *testing.T) {
w := newWorld(t)
Expand All @@ -406,12 +406,15 @@ func TestFullShowsEveryChangeActionFirstAndAgain(t *testing.T) {
}
want := []string{
"abcd v0.16.0 (after v0.15.0): 9 changes",
" - needs you to act: The bare verb no longer mints a record. (itd-2610161616086564)",
" Needs you (1)",
" ! The bare verb no longer mints a record. (itd-2610161616086564)",
" New (8)",
}
for i := 1; i <= 8; i++ {
want = append(want, fmt.Sprintf(" - Added change %d. (iss-%d)", i, 100+i))
want = append(want, fmt.Sprintf(" - Added change %d. (iss-%d)", i, 100+i))
}
want = append(want,
"The whole text of one change: "+ChangeCommand,
"Waiting in this repository:",
" - setup question: the README question is not answered",
" - setup question: no drain eligibility record in this repository",
Expand Down
Loading
Loading