feat(audit): declarative activity milestones (ADR-0052 §5b.2)#1952
Merged
Conversation
Demonstrates declarative activity: status/priority changes auto-appear on the
record timeline ("Status: In Progress → In Review") with zero hook code.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Object-level `activityMilestones` — when a watched field transitions INTO a
configured value, the platform emits a templated, semantic activity row
("✅ Task completed: {title}", "Deal won: {name}") on the record timeline, with
zero hook/flow code. Complements field-level `trackHistory` (§5b.1) and takes
precedence over the raw "Field: old → new" summary for the same update. Same
declarative posture as Salesforce Flow / ServiceNow for milestone events.
- spec: `activityMilestones` on ObjectSchema (top-level) + liveness classification
- plugin-audit: matchMilestone() + getObjectDef(); summary precedence
milestone → field-change → generic; milestone may set the activity `type`
- tests: 2 new (interpolated milestone + precedence; no-fire when no transition)
- showcase: showcase_task fires "✅ Task completed: {title}" on status→done
Verified in the showcase browser: status→done renders the milestone row.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADR-0052 §5b.2 — declarative semantic activity milestones, the second tier of "the platform generates activity, apps don't code it" (tier 1 = field-level
trackHistory, shipped in #1948).Object-level
activityMilestones: when a watched field transitions INTO a configured value, the platform emits a templated, semantic activity row on the record timeline —"✅ Task completed: {title}","Deal won: {name}"— with zero hook/flow code. Takes precedence over the raw"Field: old → new"summary for the same update.activityMilestonesonObjectSchema(top-level) + liveness classification (live, consumer cited).matchMilestone()+getObjectDef(); summary precedencemilestone → field-change (§5b.1) → generic; a milestone may set the activitytype.showcase_taskfires"✅ Task completed: {title}"on status→done (+trackHistoryon status/priority).Prior art
Same posture as Salesforce Flow / ServiceNow business rules for semantic events, layered on the declarative field-tracking (Salesforce Feed Tracking / ServiceNow audit / Dataverse column auditing) shipped in #1948.
Verification (in the showcase, via browser)
@objectstack/spec+@objectstack/plugin-auditbuild clean; liveness gate green (object 58 classified, field 52); plugin-audit 18/18 tests (+2 milestone: interpolated summary + precedence; no-fire without a transition).examples/app-showcase: walking a task todonerendered "✅ Task completed: Build homepage" on the timeline (above thetrackHistory"Status: In Progress → In Review" rows) — screenshot in the session.Builds on
#1948 (trackHistory, §5b.1). Remaining ADR-0052 tiers (P0b object-ownership moves; P2 event-bus + email/call/meeting; objectui feed surfacing) are separate, larger efforts — not in this PR.
🤖 Generated with Claude Code