Skip to content

feat(loop): the digest judges intent from the content, not the file type - #124

Merged
wu908 merged 1 commit into
mainfrom
feat/digest-judges-intent-from-content
Sep 16, 2026
Merged

wu908 merged 1 commit into
mainfrom
feat/digest-judges-intent-from-content

Conversation

@wu908

@wu908 wu908 commented Sep 16, 2026

Copy link
Copy Markdown
Owner

The intent on a digest deliverable came from the input medium:

INTENT_BY_KIND = {"text": "solve", "link": "solve", "idea": "share",
                  "image": "record", "voice": "record"}

So a piece of text that tells a story was classified 解决, and an image captioning a process was classified 记录. The creator never sees this happen — they see the consequences: the system asks a solve-flavoured question and watches solve-flavoured signals for a piece that is not one. Same class as the 展示作品被问转折 bug, different root: not too few buckets, but the wrong evidence for the bucket.

What changed

The model already reads the whole material, so it now judges it too:

  • the judgment contract gains content_intent (one of the three, or null);
  • the prompt says to judge by content, and explicitly not to pick solve just because the material is text;
  • the JSON example carries the field (a described-but-not-exemplified field is the shape behind bug fix(loop): make the digest AI draft actually parse #85);
  • when there is no model — or it declines to judge — the medium mapping still applies, unchanged.

Verified against the real model, with a deliberate contrast

material medium says model judged
「第一次办展那天…」 — text, but a story solve share ← the broken case
「租房合同这三条…」 — text and a method solve solve, and it drafted the two solve fields from the material
model declines null → falls back to the medium

Reverting the change fails the new test (an image item whose caption is an experience must come out share).

Full backend suite: 503 passed.

Not in this PR

The next slice would stop the taxonomy being three values at all: separating what the content is (open, AI-named) from which finite behaviour to run (the routing key). That is a migration — the CHECK constraint, 139 references across 12 files, ADR 0002's NULL semantics, E2E copy — so it wants its own plan rather than being smuggled in here.

The intent on a digest deliverable came from the input medium:

    INTENT_BY_KIND = {"text": "solve", "link": "solve", "idea": "share",
                      "image": "record", "voice": "record"}

So a piece of text that *tells a story* was classified 解决, and an image
captioning a *process* was classified 记录. The creator never sees this
happening — they see the consequences: the system asks a solve-flavoured
question and watches solve-flavoured signals for a piece that is not one. That
is the same class as the 展示作品被问转折 bug, with a different root: not too few
buckets, but the wrong evidence for the bucket.

The model already reads the whole material, so it now judges it too: the
judgment contract gains `content_intent` (one of the three, or null), the prompt
says to judge by content and explicitly not to pick solve just because the
material is text, and the JSON example carries the field. When there is no model
— or it declines to judge — the medium mapping still applies, unchanged.

Verified against the real model with a deliberate contrast:

- 「第一次办展那天…」 — **text**, but a story → judged **share** (the medium would
  have said solve). This is the case that was broken.
- 「租房合同这三条…」 — text and a method → **solve**, and it drafted the two solve
  fields from the material.
- The model can also decline: `null` falls back to the medium.

Reverting the change fails the new test that feeds an image item whose caption is
an experience and requires `share`.

Full backend suite: 503 passed.

Next slice (not in this PR): separating "what the content is" (open, AI-named)
from "which finite behaviour to run" (the routing key), which is what would let
the taxonomy stop being three values at all — a migration touching the CHECK
constraint and 139 references.
@wu908
wu908 merged commit cf611cd into main Sep 16, 2026
2 checks passed
@wu908
wu908 deleted the feat/digest-judges-intent-from-content branch September 16, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant