Skip to content

Publish documents to CALM Hub via calm workspace #2983

Description

@LeighFinegold

Feature Proposal

Target Project:

cli (calm workspace), integrating with calm-hub (the new Document endpoint).

Description of Feature:

Extend the CALM Workspace flow so a user can publish a document to CALM Hub from their workspace and we can demo the published document end-to-end. This is the user-facing slice that ties the PoC together, and it realises the agreement in #2866 that documents are "version controlled and pushed to CALM Hub with the same mechanism as calm workspace".

User Stories:

  • As an architect, I want calm workspace push to publish my document to CALM Hub so that I can demonstrate a document going from local workspace to a live Hub registry, versioned alongside its architecture.
  • As a reviewer, I want to open the published document from CALM Hub after a push so that the demo proves the full loop.

Current Limitations:

Proposed Implementation:

  • Extend calm workspace push (or add a dedicated publish step) to send the workspace's document(s) to the new namespace-scoped documents endpoint (/api/calm/namespaces/{namespace}/documents/{document-type}), honouring CALM Hub auth.
  • Because documents ride the existing workspace mechanism, workspace check (drift detection) and bump (coordinated versioning) apply automatically - the document is versioned alongside its architecture.
  • Record the published document's Hub location/id back into the workspace manifest so list reflects publish state.
  • Demo path (local, no-auth / standalone Hub):
    1. Initialise a workspace and add a sample architecture + a document.
    2. calm workspace push → validates + publishes the document.
    3. Retrieve it from CALM Hub (API or UI) to confirm the loop.
  • Dependencies: the Document endpoint and validation issues must land first.

Alternatives Considered:

  • A separate calm publish command decoupled from workspace - possible, but the PoC goal is to demo the workspace publishing a document, so integrate with workspace.
  • Manual upload via the API - rejected; the value is an automated, versioned publish.

Testing Strategy:

  • CLI unit tests for the push→publish path (mocked Hub client) and manifest update.
  • A scripted end-to-end demo against a local CALM Hub asserting the document is retrievable after push.

Documentation Requirements:

  • calm workspace documentation: the publish flow and the demo steps.

Implementation Checklist:

  • Design reviewed and approved
  • Implementation completed
  • Tests written and passing
  • Documentation updated
  • Relevant workflows updated (if needed)
  • Performance impact assessed

Additional Context:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions