Skip to content

Document publication workflow - #78

Merged
neuromechanist merged 4 commits into
devfrom
feature/issue-77-publish-docs
Jan 27, 2026
Merged

neuromechanist merged 4 commits into
devfrom
feature/issue-77-publish-docs

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Overview

Adds comprehensive documentation for the publication workflow (user requests → admin approval → automated orchestration).

Closes #77

What Changed

1. Enhanced CLI Help Text (258 lines)

Added rich help text to all 6 publish commands following the existing pattern from dataset upload and dataset validate:

User commands:

  • dataset publish request - Description, status flow, what happens after approval, examples
  • dataset publish status - All possible statuses, 5-step orchestrator breakdown, examples
  • dataset publish resend - When to use, what it does, examples

Admin commands:

  • admin publish list - Filter options explained, examples
  • admin publish approve - 5-step orchestrator fully explained, resume capability, permanence warning, examples
  • admin publish deny - Reason requirements, email notification flow, examples

2. Auto-Generated Command Reference

  • Updated scripts/generate-docs.ts to include publish subcommands
  • Regenerated docs/commands/*.md from CLI help (single source of truth)

3. Hand-Written Workflow Guide

  • Created docs/guides/publishing.md (367 lines)
    • User perspective: How to request publication, check status, resend notifications
    • Admin perspective: 5-step orchestrator explained in detail, resume capability
    • Troubleshooting: Common issues for both users and admins
    • Email notifications: What each party receives
    • FAQs and best practices

4. Updated README

  • Added "Publication Workflow" section with all commands
  • Organized admin commands by category (user management, publication, DOI)

5. Sprint Review Document

  • .context/sprint_review_publication_workflow.md - Complete assessment of publication infrastructure

Documentation Pattern

✅ Single Source of Truth Achieved:

  • Command syntax & help: Defined once in CLI code (src/commands/*.ts)
  • Command reference: Auto-generated via scripts/generate-docs.ts
  • Workflow guides: Hand-written for conceptual understanding (docs/guides/)

Testing

# Verify help text
bun run src/index.ts dataset publish request --help
bun run src/index.ts admin publish approve --help

# Regenerate docs
bun run scripts/generate-docs.ts

All help text includes:

  • Clear descriptions
  • Examples
  • Status flows (for status command)
  • Orchestrator steps (for approve command)
  • When to use (for resend command)

Files Changed

.context/sprint_review_publication_workflow.md  | 307 +++++ (new)
README.md                                       |  23 ++
docs/commands/admin.md                          |  85 ++++ (regenerated)
docs/commands/auth.md                           |   8 +- (regenerated)
docs/commands/dataset.md                        |  86 ++++ (regenerated)
docs/commands/sandbox.md                        |   7 +- (regenerated)
docs/guides/publishing.md                       | 367 +++++ (new)
scripts/generate-docs.ts                        |  24 +-
src/commands/admin.ts                           |  74 ++++
src/commands/dataset.ts                         |  64 ++++

Total: 1,045 insertions (documentation only, no code changes)

Examples

Before (too minimal)

$ nemar dataset publish request --help
Usage: nemar dataset publish request [options] <dataset-id>

Request publication of a dataset

Arguments:
  dataset-id  Dataset ID (e.g., nm000104)

Options:
  -h, --help  display help for command

After (comprehensive)

$ nemar dataset publish request --help
Usage: nemar dataset publish request [options] <dataset-id>

Request publication of a dataset

Arguments:
  dataset-id  Dataset ID (e.g., nm000104)

Options:
  -h, --help  display help for command

Description:
  Submit a publication request to make your private dataset publicly accessible.
  NEMAR admins will be notified and can approve or deny your request.

  Once approved, your dataset will:
  - Become publicly visible on GitHub
  - Receive a permanent DOI via Zenodo
  - Be protected by branch protection (all changes require PRs)
  - Have S3 Object Lock enabled (prevents data deletion)

  You can only have one active publication request per dataset.

Status Flow:
  requested → approving → published (or denied)

Examples:
  $ nemar dataset publish request nm000104
  $ nemar dataset publish status nm000104     # Check request status

- Update scripts/generate-docs.ts to include publish subcommands
- Regenerate command docs from CLI help (single source of truth)
- Add comprehensive publishing workflow guide (docs/guides/publishing.md)
- Update README with publish commands
- Add sprint review document

Documentation now follows proper pattern:
- Command syntax: defined in CLI help text
- Command reference: auto-generated via scripts/generate-docs.ts
- Workflow guides: hand-written in docs/guides/

Closes #77
- dataset publish request: description, status flow, examples
- dataset publish status: possible statuses, orchestrator steps, examples
- dataset publish resend: when to use, what it does, examples
- admin publish list: filter options, examples
- admin publish approve: 5-step orchestrator explained, resume capability, permanence warning
- admin publish deny: requirements, reason handling, examples

Total: 258 lines of help text added
Regenerated docs automatically via scripts/generate-docs.ts

CLI help is now comprehensive enough to be single source of truth
CRITICAL FIXES:
1. Add missing tag_protect step to status display array (src/commands/dataset.ts:1440)
2. Update all "5-step" references to "6-step" (orchestrator has 6 steps, not 5)
3. Document step 6 (notify_user) in all help texts and guide
4. Remove false branch protection claims (orchestrator does NOT apply branch protection)
5. Fix interactive confirmation to show all 6 steps correctly (src/commands/admin.ts)

IMPORTANT FIXES:
6. Add comprehensive step 6 documentation in publishing guide
7. Fix resume example wording for clarity ("retries step 3, then continues with 4-6")

MINOR FIXES:
8. Remove --json example from status help (option doesn't exist)

ALL ISSUES from PR review addressed:
- Status command now displays all 6 steps including tag_protect
- Help text accurately reflects 6-step orchestrator
- Branch protection claims removed (replaced with tag protection)
- Step 6 (notify_user) fully documented
- Interactive confirmation shows correct steps
- Resume example is clear about behavior
- FAQ updated to remove incorrect PR requirement claim

Regenerated docs via scripts/generate-docs.ts
@github-actions

github-actions Bot commented Jan 27, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR78

Version: 0.3.7-PR78.aa7cd4e
Commit: aa7cd4e


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

PR Review Fixes Applied ✅

All issues identified in the comprehensive PR review have been addressed:

Critical Issues Fixed (Must Fix)

  1. ✅ Missing tag_protect in status display - Added to steps array in src/commands/dataset.ts:1440
  2. ✅ Orchestrator step count wrong - Changed all "5-step" references to "6-step" throughout documentation
  3. ✅ Step 6 (notify_user) undocumented - Added comprehensive documentation in all help texts and guide
  4. ✅ False branch protection claims - Removed all incorrect claims about branch protection being applied
  5. ✅ Interactive confirmation wrong - Updated to show all 6 steps correctly in src/commands/admin.ts

Important Issues Fixed

  1. ✅ Step 6 details missing - Added full section in publishing guide with purpose, actions, and failure handling
  2. ✅ Resume example misleading - Clarified wording: "Skips completed steps 1-2, retries step 3, then continues with 4-6"

Minor Issues Fixed

  1. ✅ Non-existent --json flag - Removed --json example from status help (option doesn't exist)
  2. ✅ Lint formatting - Fixed biome formatting for steps array

Changes Summary

docs/commands/admin.md    |  5 +++--
docs/commands/dataset.md  |  4 ++--
docs/guides/publishing.md | 23 ++++++++++++++++----
src/commands/admin.ts     | 12 +++++++-----
src/commands/dataset.ts   | 15 +++++++------
5 files changed, 42 insertions(+), 18 deletions(-)

Verification

All help text now accurately reflects the 6-step orchestrator:

  1. CI Check
  2. Make Public
  3. Tag Protection ← Previously missing from status display
  4. Create DOI
  5. S3 Lock
  6. Notify User ← Completely undocumented before
# Verify fixes
bun run src/index.ts dataset publish status --help  # Shows all 6 steps
bun run src/index.ts admin publish approve --help   # Shows 6-step orchestrator

Ready to merge! 🎉

@neuromechanist
neuromechanist merged commit fa31423 into dev Jan 27, 2026
@neuromechanist
neuromechanist deleted the feature/issue-77-publish-docs branch January 27, 2026 20:29
neuromechanist added a commit that referenced this pull request Nov 24, 2026
* Move nemar-floor and nemar-ica to 1.0.0-b2

Registry versions, regenerated progress vectors (NEMAR_WRITE_PROGRESS_VECTORS=1) and the tests that assert the current version. Targeted tests, typecheck and lint pass.

* Accept plugin steps in CHECKPOINTS pre-PLUGINS

nemar-process #78 lists quality/nemar-quality in nemar-ica's CHECKPOINTS before declaring PLUGINS. The drift test now accepts all or none of the plugin steps until PLUGINS is declared. Passes against nemar-process acf2690.

* Changelog: recipes at 1.0.0-b2

* Keep the b1 changelog entry whole

* Choose drift CHECKPOINTS by plugin mention

expectedCheckpoints picks the whole map once PLUGINS is declared or CHECKPOINTS name any plugin step, else the map without them; fixed-text cases for none, whole, partial, wrong checkpoint and PLUGINS without the step. Drift test passes against nemar-process acf2690.

This branch was previously deployed

1 inactive deployment
npm — aa7cd4e5 Deployed Jan 27, 2026 by neuromechanist
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