Problem
project_register scaffolds the content repo (campaigns/, social/, etc.) but does NOT create a GitHub Projects v2 board. The content calendar (Roadmap view by Publish Date) was designed as a key feature but is missing.
What's needed
In lib/tools/admin/project-register.ts → scaffoldContentRepo() (or a new scaffoldGitHubProject()):
- Create a GitHub Projects v2 project via GraphQL API:
mutation {
createProjectV2(input: { ownerId: $orgId, title: "MarketClaw: <project-name>" }) {
projectV2 { id url }
}
}
- Add custom field
Publish Date (DATE type):
mutation {
addProjectV2Field(input: { projectId: $projectId, dataType: DATE, name: "Publish Date" }) {
projectV2Field { id }
}
}
- Link the repo to the project:
mutation {
linkProjectV2ToRepository(input: { projectId: $projectId, repositoryId: $repoId }) { clientMutationId }
}
-
Create two views:
- Board view (by workflow state label) — default
- Roadmap view (by Publish Date field) — the content calendar
-
Auto-add all open issues to the project on creation.
Notes
- Must be best-effort: if GitHub Projects API fails (permissions, rate limit), log warning but don't fail project registration
- Store
projectId and publishDateFieldId in project config for heartbeat use (scheduled publish dispatch)
- The heartbeat needs
publishDateFieldId to read Publish Date when deciding whether to dispatch Publisher
- GraphQL endpoint:
https://api.github.com/graphql
Problem
project_registerscaffolds the content repo (campaigns/, social/, etc.) but does NOT create a GitHub Projects v2 board. The content calendar (Roadmap view by Publish Date) was designed as a key feature but is missing.What's needed
In
lib/tools/admin/project-register.ts→scaffoldContentRepo()(or a newscaffoldGitHubProject()):Publish Date(DATE type):Create two views:
Auto-add all open issues to the project on creation.
Notes
projectIdandpublishDateFieldIdin project config for heartbeat use (scheduled publish dispatch)publishDateFieldIdto read Publish Date when deciding whether to dispatch Publisherhttps://api.github.com/graphql