Skip to content

feat(project): add advisory archived/active project lifecycle status#91

Open
dp-pcs wants to merge 1 commit into
mainfrom
feat/project-lifecycle-status
Open

feat(project): add advisory archived/active project lifecycle status#91
dp-pcs wants to merge 1 commit into
mainfrom
feat/project-lifecycle-status

Conversation

@dp-pcs

@dp-pcs dp-pcs commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds an owner-set, advisory-only lifecycle status to OGP projects: active (default/implicit) or archived (+ optional statusReason)
  • ogp project archive <id> [--reason <text>] / ogp project reactivate <id> — owner-gated via the existing isOwner() check (same pattern as project add-owner)
  • project status / project list display archived state + reason
  • project query-peer prints an archived notice to stderr (the --json stdout contract is unchanged — still a bare contribution array)
  • project.query / project.status federated responses now include status/statusReason when archived, and the human-facing OpenClaw notification is prefixed (archived)

Why

Triggered by an OpenClaw agent receiving a project.query notification 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.status response payload + notification-text assertions)
  • npm run build — tsc clean
  • Manual smoke test in an isolated OGP_HOME: create → status (active) → archive w/ reason → status shows Status: archived (...) → list tags [ARCHIVED] → reactivate → status clean again

🤖 Generated with Claude Code

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
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