feat(platformctl): implement index generate command to regenerate INDEX.yaml from module manifests #763

Closed
opened 2026-06-08 23:09:24 +02:00 by ollama · 1 comment
Collaborator

Spec sources (whitelist)

  • modules/INDEX.yaml — format and structure to replicate
  • schema/module.schema.json — schema for module.yaml fields to extract
  • control-plane/platformctl/cli.py — where to add new subcommand
  • control-plane/platformctl/validate.py — reference for reading all module manifests

Extracted context

modules/INDEX.yaml currently has this header comment:

# Generated by `platformctl index generate` (anticipated in D-1 prebuild);
# refreshed in CI on push to main. Until then, may lag main.

But platformctl index generate doesn't exist yet. INDEX.yaml is hand-maintained, which has already led to drift (see #752).

Scope

Implement platformctl index generate command that:

  1. Reads all modules/*/module.yaml files
  2. Extracts: id, name, classification (criticality, area, lifecycle), host
  3. Generates modules/INDEX.yaml matching the existing format
  4. Writes atomically (write to temp file, rename)

Output format should match existing INDEX.yaml structure exactly:

modules:
  <id>:
    name: <metadata.name>
    classification:
      criticality: <spec.classification.criticality>
      area: <spec.classification.area>
      lifecycle: <spec.classification.lifecycle>
    host: <spec.runtime.host>

Acceptance criteria

  • platformctl index generate runs without errors
  • Generated INDEX.yaml passes validation (valid YAML, all required fields present)
  • Generated INDEX.yaml matches existing format
  • 715+ existing tests still green (no regressions)
  • CI workflow note: add platformctl index generate as prebuild step (or document it)

Do NOT read

  • Full repo — only the 4 files listed above
  • Do NOT modify INDEX.yaml by hand (command generates it)

Agent notes

  • Recommended executor: Gemini 3.1 Pro (medium complexity, new code)
  • Size: Medium (~100 lines new code + test)
  • Review tier: tier/medium (new platformctl command)
  • Audit ref: state/audit/deepseek-2026-06-08-multiperspective.md §AR2
## Spec sources (whitelist) - `modules/INDEX.yaml` — format and structure to replicate - `schema/module.schema.json` — schema for module.yaml fields to extract - `control-plane/platformctl/cli.py` — where to add new subcommand - `control-plane/platformctl/validate.py` — reference for reading all module manifests ## Extracted context `modules/INDEX.yaml` currently has this header comment: ```yaml # Generated by `platformctl index generate` (anticipated in D-1 prebuild); # refreshed in CI on push to main. Until then, may lag main. ``` But `platformctl index generate` doesn't exist yet. INDEX.yaml is hand-maintained, which has already led to drift (see #752). ## Scope Implement `platformctl index generate` command that: 1. Reads all `modules/*/module.yaml` files 2. Extracts: id, name, classification (criticality, area, lifecycle), host 3. Generates `modules/INDEX.yaml` matching the existing format 4. Writes atomically (write to temp file, rename) Output format should match existing INDEX.yaml structure exactly: ```yaml modules: <id>: name: <metadata.name> classification: criticality: <spec.classification.criticality> area: <spec.classification.area> lifecycle: <spec.classification.lifecycle> host: <spec.runtime.host> ``` ## Acceptance criteria - [ ] `platformctl index generate` runs without errors - [ ] Generated INDEX.yaml passes validation (valid YAML, all required fields present) - [ ] Generated INDEX.yaml matches existing format - [ ] 715+ existing tests still green (no regressions) - [ ] CI workflow note: add `platformctl index generate` as prebuild step (or document it) ## Do NOT read - Full repo — only the 4 files listed above - Do NOT modify INDEX.yaml by hand (command generates it) ## Agent notes - Recommended executor: Gemini 3.1 Pro (medium complexity, new code) - Size: Medium (~100 lines new code + test) - Review tier: tier/medium (new platformctl command) - Audit ref: state/audit/deepseek-2026-06-08-multiperspective.md §AR2
Collaborator

Iskra judgment

Field Value
Target pdurlej/platform#issue#763
Priority p2
Action codex_candidate
Scores reach 4 / impact 4 / confidence 5
Piotr fit high
Effort medium
Labels judge/p2, judge/codex-candidate
Judge iskra via openclaw

Rationale: This is a strong P2 Codex candidate because it replaces a drift-prone hand-maintained module index with a scoped generator tied to existing manifests and CLI patterns.

Caveat: Keep output compatibility with the existing INDEX.yaml format and add tests so generation changes remain reviewable rather than becoming silent churn.

Structured openclaw.judge.v0 payload
<!-- openclaw.judge.v0 -->
{
  "confidence": 5,
  "effort_hint": "medium",
  "escalation": {
    "kind": "none",
    "reason": ""
  },
  "evidence_refs": [
    {
      "note": "Issue scopes a ready implementation of platformctl index generate from module manifests.",
      "type": "forgejo",
      "value": "issue-title-body-labels-and-target-snapshot"
    },
    {
      "note": "Body names whitelist spec sources, required extracted fields, atomic write behavior, and existing drift from hand-maintained INDEX.yaml.",
      "type": "forgejo",
      "value": "issue-body-scope-and-spec-sources"
    },
    {
      "note": "Labels mark this as a medium ready CI/docs feature with process risk.",
      "type": "snapshot",
      "value": "target-labels-and-target-snapshot"
    }
  ],
  "impact": 4,
  "judge_actor": {
    "name": "iskra",
    "runtime": "openclaw"
  },
  "judged_at": "2026-06-19T00:00:00Z",
  "labels_to_apply": [
    "judge/p2",
    "judge/codex-candidate"
  ],
  "piotr_fit": "high",
  "priority": "p2",
  "rationale_summary": "This is a strong P2 Codex candidate because it replaces a drift-prone hand-maintained module index with a scoped generator tied to existing manifests and CLI patterns.",
  "reach": 4,
  "recommended_next_action": "codex_candidate",
  "rerun_reason": "no_prior_judgment",
  "schema": "openclaw.judge.v0",
  "target": {
    "kind": "issue",
    "number": 763,
    "repo": "pdurlej/platform"
  },
  "target_snapshot": {
    "body_hash": "sha256:2c35ce1b3b5bc432026e3ed6a59758e3a940e1de37d82a82ed480819d0c5b0b4",
    "commit_count": null,
    "evidence_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "head_sha": null,
    "labels": [
      "domain:ci",
      "domain:docs",
      "flow/ready",
      "kind/feature",
      "phase/03",
      "priority:p2",
      "risk/process",
      "size/medium"
    ],
    "labels_hash": "sha256:f67df345b42f75261b8cfae37a26783b8402934aad7e8fb6cb871629292141d8",
    "state": "open",
    "title_hash": "sha256:f7f51fb77c22d6ec19b6ad23f59a4af575d7da8f505c4f6903f1373269096540",
    "updated_at": "2026-06-18T00:06:36+02:00"
  },
  "top_caveat": "Keep output compatibility with the existing INDEX.yaml format and add tests so generation changes remain reviewable rather than becoming silent churn."
}
<!-- /openclaw.judge.v0 -->
### Iskra judgment | Field | Value | | --- | --- | | Target | `pdurlej/platform#issue#763` | | Priority | p2 | | Action | codex_candidate | | Scores | reach 4 / impact 4 / confidence 5 | | Piotr fit | high | | Effort | medium | | Labels | `judge/p2`, `judge/codex-candidate` | | Judge | `iskra` via `openclaw` | **Rationale:** This is a strong P2 Codex candidate because it replaces a drift-prone hand-maintained module index with a scoped generator tied to existing manifests and CLI patterns. **Caveat:** Keep output compatibility with the existing INDEX.yaml format and add tests so generation changes remain reviewable rather than becoming silent churn. <details> <summary>Structured openclaw.judge.v0 payload</summary> ```json <!-- openclaw.judge.v0 --> { "confidence": 5, "effort_hint": "medium", "escalation": { "kind": "none", "reason": "" }, "evidence_refs": [ { "note": "Issue scopes a ready implementation of platformctl index generate from module manifests.", "type": "forgejo", "value": "issue-title-body-labels-and-target-snapshot" }, { "note": "Body names whitelist spec sources, required extracted fields, atomic write behavior, and existing drift from hand-maintained INDEX.yaml.", "type": "forgejo", "value": "issue-body-scope-and-spec-sources" }, { "note": "Labels mark this as a medium ready CI/docs feature with process risk.", "type": "snapshot", "value": "target-labels-and-target-snapshot" } ], "impact": 4, "judge_actor": { "name": "iskra", "runtime": "openclaw" }, "judged_at": "2026-06-19T00:00:00Z", "labels_to_apply": [ "judge/p2", "judge/codex-candidate" ], "piotr_fit": "high", "priority": "p2", "rationale_summary": "This is a strong P2 Codex candidate because it replaces a drift-prone hand-maintained module index with a scoped generator tied to existing manifests and CLI patterns.", "reach": 4, "recommended_next_action": "codex_candidate", "rerun_reason": "no_prior_judgment", "schema": "openclaw.judge.v0", "target": { "kind": "issue", "number": 763, "repo": "pdurlej/platform" }, "target_snapshot": { "body_hash": "sha256:2c35ce1b3b5bc432026e3ed6a59758e3a940e1de37d82a82ed480819d0c5b0b4", "commit_count": null, "evidence_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "head_sha": null, "labels": [ "domain:ci", "domain:docs", "flow/ready", "kind/feature", "phase/03", "priority:p2", "risk/process", "size/medium" ], "labels_hash": "sha256:f67df345b42f75261b8cfae37a26783b8402934aad7e8fb6cb871629292141d8", "state": "open", "title_hash": "sha256:f7f51fb77c22d6ec19b6ad23f59a4af575d7da8f505c4f6903f1373269096540", "updated_at": "2026-06-18T00:06:36+02:00" }, "top_caveat": "Keep output compatibility with the existing INDEX.yaml format and add tests so generation changes remain reviewable rather than becoming silent churn." } <!-- /openclaw.judge.v0 --> ``` </details>
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform#763
No description provided.