Publish
PIN-4 Order: #4 Construction Has Dependencies
Updated 3 weeks, 2 days ago
Guidance
Purpose
Create the Milestone and Issues from the execution manifest, on GitHub or GitLab. Ask user before creating. The Milestone becomes MIN's operational ground truth — it must contain the full YAML manifest inline.
Prerequisites
- Execution manifest YAML from PIN-03 (
ITER-*.yaml) withmilestone_number: nullplaceholder - All skeleton commits on iteration branch
- GitHub CLI (
gh) or GitLab CLI (glab) authenticated
Step 0 — Platform Detection
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
if echo "$REMOTE" | grep -q "github.com"; then
PLATFORM=github
gh auth status || { echo "Run: gh auth login"; exit 1; }
elif echo "$REMOTE" | grep -q "gitlab"; then
PLATFORM=gitlab
glab auth status || { echo "Run: glab auth login"; exit 1; }
else
echo "Cannot detect platform from git remote. Set PLATFORM=github or PLATFORM=gitlab manually."
exit 1
fi
echo "Platform: $PLATFORM"
Step 1 — User Gate
Ask: "Platform detected: {github|gitlab}. Create milestone and issues from the manifest? (yes/no)"
- No → write manifest to
docs/plans/iterations/only. Stop. Inform user: "Manifest saved. Invoke MIN manually when ready." - Yes → continue.
Step 2 — Bootstrap Labels
GitHub: See GitHub Issue Operations skill — Bootstrap Labels section.
GitLab: See GitLab Issue Operations skill — Bootstrap Labels section.
Step 3 — Create Milestone
GitHub:
MILESTONE_NUMBER=$(gh api repos/{owner}/{repo}/milestones \
--method POST \
--field title="ITER-YYYYMMDD | {iteration_goal}" \
--field description="<!-- MANIFEST -->
$(cat {manifest_path})
<!-- /MANIFEST -->
## Iteration Goal
{iteration_goal}
## Scenarios
{list}" \
--jq '.number')
echo "Milestone: #$MILESTONE_NUMBER"
GitLab:
PROJECT=$(glab api projects/:fullpath --jq '.id')
MILESTONE_NUMBER=$(glab api "projects/$PROJECT/milestones" \
--method POST \
--field title="ITER-YYYYMMDD | {iteration_goal}" \
--field description="<!-- MANIFEST -->$(cat {manifest_path})<!-- /MANIFEST -->" \
--jq '.iid')
echo "Milestone: #$MILESTONE_NUMBER"
Step 4 — Create Issues (one per scenario)
For each scenario in manifest order:
GitHub: See GitHub Issue Operations skill — Pattern 2.
GitLab: See GitLab Issue Operations skill — Pattern 2.
Issue body must include inline:
- <!-- SCENARIO --> YAML block
- <!-- FEATURE_EXECUTION_GRAPH --> YAML block (full graph for this scenario)
- Context Map table
- Do Not Do list
- SAO.md Sections
- Implementation Plan (full text from BPE-01)
- Acceptance Criteria checklist — one checkbox per graph node plus scenario rollup checkpoint
Labels: status-queued, parallel-group-{X}
Dependency issues reference each other in body.
Step 5 — Update Manifest with Milestone Number and Issue Numbers
After the milestone is created (Step 3) and all issues are created (Step 4), update the manifest:
# Write milestone_number into the iteration block
python3 -c "
import re
content = open('{manifest_path}').read()
content = re.sub(r'milestone_number: null', 'milestone_number: {milestone_number}', content, count=1)
open('{manifest_path}', 'w').write(content)
"
# Also add github_issue or gitlab_issue per scenario (as before)
# Edit the manifest YAML to add the issue number under each scenario key
Commit both updates together:
git add docs/plans/iterations/
git commit -m "chore(pin): add milestone #{milestone_number} and issue numbers to manifest ITER-YYYYMMDD"
Verification: milestone_number in the manifest must now be an integer, not null. MIN-01 uses this field to locate the correct manifest. Do not proceed to PIN-05 if it is still null.
Step 6 — Verify
GitHub:
gh milestone view {milestone_number}
gh issue list --milestone {milestone_number}
GitLab:
glab api "projects/:fullpath/milestones" --jq '.[] | select(.title | contains("ITER"))'
glab issue list --milestone "{milestone_title}" --label "status-queued"
Success Criteria
- Milestone created with full
<!-- MANIFEST -->YAML block - One Issue per scenario with inline
<!-- SCENARIO -->+<!-- FEATURE_EXECUTION_GRAPH -->+ context map + do-not-do + implementation plan - All issues labelled
status-queued+parallel-group-{X} milestone_numberwritten back to manifest (not null)- Local manifest updated with milestone number + issue numbers and committed
Skills
- GitHub Issue Operations (gh CLI)
- GitLab Issue Operations (glab CLI)
Details
- Order:
- #4
- Phase:
- Predecessor:
- PIN-3 Contract
- Created:
- May 20, 2026
- Last Updated:
- Aug 28, 2026
Workflow
Plan Iteration
Dark-factory sprint planning. Use PIN when ESM, DTA, DSP, and BSP are complete and you want to deliver a full …
View WorkflowAssigned Agent
No agent assigned
Required Skills
- GitHub Issue Operations GITHUB_ISSUE GitHub CLI
Rules
No rules linked.
Input Artifacts
No input artifacts
Output Artifacts
No output artifacts