From principled-github
Ingest a GitHub issue into the principled pipeline. Fetches the issue, determines what documents are needed (proposal, plan, or both), creates them pre-populated from issue content, and comments on the issue with links to the new documents on a feature branch.
How this skill is triggered — by the user, by Claude, or both
Slash command
/principled-github:ingest-issueThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Ingest a GitHub issue into the principled documentation pipeline. Automatically determines what documents are needed and creates them pre-populated from the issue content.
Ingest a GitHub issue into the principled documentation pipeline. Automatically determines what documents are needed and creates them pre-populated from the issue content.
/ingest-issue <issue-number> [--module <path>] [--root]
| Argument | Required | Description |
|---|---|---|
<issue-number> | Yes | GitHub issue number to ingest |
--module <path> | No | Target module path for documents. Defaults to current module. |
--root | No | Create documents at the repo root level (docs/) |
--dry-run | No | Show what would be created without making changes |
gh CLI must be installed and authenticatedVerify prerequisites. Check that gh is available and authenticated:
bash scripts/check-gh-cli.sh
If not available, report: "The gh CLI is required. Install it from https://cli.github.com/."
Fetch the issue. Extract issue metadata:
bash scripts/extract-issue-metadata.sh --number <issue-number>
Returns: title, body, labels, author, created date, comments, and state.
Check for existing principled documents. Search for an existing sync marker linking this issue to principled documents:
bash scripts/find-ingested-docs.sh --issue <issue-number>
If documents already exist, report them and ask if the user wants to update or create additional ones.
Normalize issue metadata. Before classifying, ensure the issue has well-structured metadata. Fix gaps directly on GitHub:
Title: If the issue title is vague, overly broad, or unclear (e.g., "fix thing", "it's broken", "update"), edit it to be descriptive:
gh issue edit <issue-number> --title "<improved-title>"
Component/scope labels: If the issue clearly affects specific modules or areas, add component labels. If urgency is evident, add priority labels:
gh issue edit <issue-number> --add-label "<labels>"
Do not add type labels (bug, enhancement, feature) in this step --- type classification happens in step 5 based on issue content analysis, and principled lifecycle labels are applied in step 10. Adding type labels here would create a feedback loop where step 5 classifies based on labels the agent just invented rather than human intent.
Body: If the issue body is empty or minimal but the title implies a concrete task, do not modify the body --- the created documents will provide the structure.
Report any metadata changes made to the user.
If --dry-run is set, report what changes would be made and stop. Do not proceed to step 5.
Classify the issue. Analyze the issue to determine what documents to create. Read reference/classification-guide.md for guidance. Classify based on issue content --- the body text and any pre-existing human-applied labels. Consider:
bug, enhancement, feature, etc. (only labels that were present before step 4)Classification outcomes:
Determine target directory. Based on arguments:
--root: target is docs/ at the repo root--module <path>: target is <path>/docs/Get the next sequence number(s). For each document type to create, determine the next available NNN in the target directory.
Create documents. For each document type:
If creating a proposal (RFC):
templates/ingested-proposal.md<!-- principled-ingested-from: #<issue-number> --><target>/proposals/NNN-<slug>.mdIf creating a plan:
templates/ingested-plan.md<!-- principled-ingested-from: #<issue-number> --><target>/plans/NNN-<slug>.mdComment on the GitHub issue. Add a comment linking to the created documents:
gh issue comment <issue-number> --body "$(cat <<'EOF'
## Principled Pipeline
This issue has been ingested into the principled documentation pipeline:
- **RFC-NNN**: [`docs/proposals/NNN-slug.md`](link) — Status: draft
- **Plan-NNN**: [`docs/plans/NNN-slug.md`](link) — Status: active
Documents are the source of truth. Use `/sync-issues` to keep this issue updated.
<!-- principled-ingest-comment -->
EOF
)"
Apply labels. Add principled lifecycle labels to the issue based on what was created:
If RFC + Plan were created:
gh issue edit <issue-number> --add-label "type:rfc,proposal:draft"
If Plan only was created:
gh issue edit <issue-number> --add-label "type:plan,plan:active"
Report results. Summarize what was created:
The issue title is converted to a slug:
Every ingested document contains: <!-- principled-ingested-from: #<issue-number> -->. This enables detecting that an issue has already been ingested.
scripts/check-gh-cli.sh --- Verify gh CLI availability and auth status (copy from sync-issues)scripts/extract-issue-metadata.sh --- Fetch and parse a GitHub issuescripts/find-ingested-docs.sh --- Search for existing docs linked to an issuetemplates/ingested-proposal.md --- Proposal template pre-populated from issue contenttemplates/ingested-plan.md --- Plan template pre-populated from issue contentreference/classification-guide.md --- How to classify issues into document typesnpx claudepluginhub alexnodeland/principled --plugin principled-githubCreates structured GitHub issues with implementation plans from task descriptions by analyzing docs, designs, and code. Updates existing issues by number using gh CLI.
Manages full GitHub issue lifecycle: create with conventional commit titles, sub-issues, cross-repo links, edit/view/list, dump trees to markdown/YAML, push from files, comment/label/close.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.