Context
HDIM needs a sustainable content distribution workflow for LinkedIn — the primary channel for reaching healthcare payers, ACOs, and clinical quality leaders. Manual posting is inconsistent; fully automated posting is reputationally risky for a pre-revenue startup. A middle path is needed: AI drafts, human gates, then publishes.
Two sub-problems to solve:
Decision
Implement a Claude Code command (/social:linkedin) that:
--topic (primary) and optional --mode and --tag arguments[A]pprove / [E]dit / [R]egenerate / [X]Rejectdocs/outreach/linkedin-posts.mdOAuth lifecycle is managed by scripts/linkedin-auth.sh (initial setup + refresh).
Alternatives Considered
Alternative 1: Standalone Python service with scheduled posting
Rejected because:
Alternative 2: Zapier/Buffer integration with manual triggering
Rejected because:
Alternative 3: Claude Code command (chosen)
Accepted because:
/social/generate commanddocs/outreach/linkedin-posts.md in source controlDesign Details
`--mode` parameter
Three modes with distinct voice and structural rules:
| Mode | Voice | Key Constraint |
|------|-------|----------------|
| thought-leadership | Practitioner insight | No HDIM mentions, no pitch |
| product-announce | Founder, proof points | Technical facts, no buzzwords |
| customer-milestone | Relationship-aware | No customer name without explicit permission |
Default: thought-leadership (lowest risk, most shareable).
Token lifecycle
LinkedIn access tokens expire every 60 days. Refresh tokens expire after 365 days.
scripts/linkedin-auth.sh handles initial OAuth code flow and stores credentials in .env.linkedin/social:linkedin checks expiry before every publish attemptPhase 1 / Phase 2 boundary
Phase 1 (this ADR): Manual engagement tracking. The docs/outreach/linkedin-posts.md table has Impressions and Comments columns filled manually after checking LinkedIn analytics.
Phase 2 (future ADR): scripts/linkedin-engagement-sync.sh — nightly cron pulling impressions and comments via LinkedIn Analytics API. This is explicitly deferred. The tracking table schema is forward-compatible.
Consequences
Positive
docs/outreach/linkedin-posts.md)Negative / Risks
w_member_social scope beyond personal use.env.linkedin — must remain gitignored (enforced)Mitigations
.env.linkedin in .gitignore (committed in this ADR's PR)scripts/linkedin-auth.sh --status provides clear token health visibilityMahoosuc OS Pattern Reuse
This implementation borrows conceptually from Mahoosuc OS:
/social/generate command (voice rules, platform-specific formatting)marketing-intelligence-engine-approval-workflow-api.md (pending → approved/rejected)/social/schedule command (referenced for Phase 2 design)No code is shared (different repositories), but the design philosophy is consistent across both systems.
References
scripts/linkedin-auth.sh — OAuth setup and refresh.claude/commands/social/linkedin.md — Command implementationdocs/outreach/linkedin-posts.md — Post tracking log