feat(project): add advisory archived/active project lifecycle status#91
Open
dp-pcs wants to merge 1 commit into
Open
feat(project): add advisory archived/active project lifecycle status#91dp-pcs wants to merge 1 commit into
dp-pcs wants to merge 1 commit into
Conversation
An OpenClaw agent notified about a project.query on a months-old test project (GreekGods) had no way to tell it was dead — Project only tracked createdAt/updatedAt, so an agent seeing query traffic has to escalate to a human just to find out "is this worth bothering you about." Add an owner-set, advisory-only status: 'active' (default/implicit, no field) | 'archived' (+ optional statusReason). Not enforced — archived projects still accept contributions/queries — this only adds a signal. - projects.ts: Project.status/statusReason, setProjectStatus() - cli/project.ts: `project archive [--reason]` / `project reactivate` (owner-gated via existing isOwner()); `project status`/`list` display it; `query-peer` prints an archived notice to stderr (JSON stdout unchanged) - message-handler.ts: project.query/project.status responses include status/statusReason when archived, and the human-facing OpenClaw notification is prefixed "(archived)" — this is what lets a querying peer's agent (or the human) self-resolve staleness without escalating
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.
Summary
active(default/implicit) orarchived(+ optionalstatusReason)ogp project archive <id> [--reason <text>]/ogp project reactivate <id>— owner-gated via the existingisOwner()check (same pattern asproject add-owner)project status/project listdisplay archived state + reasonproject query-peerprints an archived notice to stderr (the--jsonstdout contract is unchanged — still a bare contribution array)project.query/project.statusfederated responses now includestatus/statusReasonwhen archived, and the human-facing OpenClaw notification is prefixed(archived)Why
Triggered by an OpenClaw agent receiving a
project.querynotification for a months-old test project (GreekGods) with no way to know it was dead — it had contribution counts and timestamps but no liveness signal, so it had to ask the human what to do. This closes that gap: an owner can mark a project archived once, and any peer querying it later (agent or human) sees the reason inline instead of escalating.Deliberately minimal — two states, advisory only (never blocks contributions/queries), no new signed envelope or federated intent. Extendable later if a real need for more states (e.g. deprecated-with-successor) shows up.
Test plan
npm test— 602 tests pass (15 new:setProjectStatus, CLI owner-gating for archive/reactivate,project.query/project.statusresponse payload + notification-text assertions)npm run build— tsc cleanOGP_HOME: create → status (active) → archive w/ reason → status showsStatus: archived (...)→ list tags[ARCHIVED]→ reactivate → status clean again🤖 Generated with Claude Code