We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kunwarVivek/mcp-github-project-manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
---
phase: 06-sub-issues-status-updates
plan: 04
type: execute
wave: 3
depends_on: ["06-02", "06-03"]
files_modified:
- tests/infrastructure/github/repositories/GitHubSubIssueRepository.test.ts
- tests/infrastructure/github/repositories/GitHubStatusUpdateRepository.test.ts
- tests/infrastructure/tools/sub-issue-tools.test.ts
- tests/infrastructure/tools/status-update-tools.test.ts
- docs/TOOLS.md
autonomous: true
must_haves:
truths:
- "Repository unit tests pass for all sub-issue operations"
- "Repository unit tests pass for all status update operations"
- "Tool tests verify schema validation and executor behavior"
- "Tool count increased from 85 to 93 (8 new tools)"
artifacts:
- path: "tests/infrastructure/github/repositories/GitHubSubIssueRepository.test.ts"
provides: "Unit tests for GitHubSubIssueRepository"
min_lines: 100
- path: "tests/infrastructure/github/repositories/GitHubStatusUpdateRepository.test.ts"
provides: "Unit tests for GitHubStatusUpdateRepository"
min_lines: 80
- path: "tests/infrastructure/tools/sub-issue-tools.test.ts"
provides: "Tests for sub-issue MCP tools"
min_lines: 100
- path: "tests/infrastructure/tools/status-update-tools.test.ts"
provides: "Tests for status update MCP tools"
min_lines: 80
- path: "docs/TOOLS.md"
provides: "Updated tool documentation with all 93 tools"
contains: "add_sub_issue"
key_links:
- from: "GitHubSubIssueRepository.test.ts"
to: "GitHubSubIssueRepository"
via: "import and test"
pattern: "import.*GitHubSubIssueRepository"
- from: "sub-issue-tools.test.ts"
to: "sub-issue-tools"
via: "import and test"
pattern: "import.*sub-issue-tools"
---
<objective>
Add comprehensive tests for Phase 6 components and update documentation.
Purpose: Ensure all new repositories and tools have proper test coverage and are documented.
Output: ~40 new tests across 4 test files, updated TOOLS.md with 8 new tools documented.
</objective>
<execution_context>
@/Users/vivek/.claude/get-shit-done/workflows/execute-plan.md
@/Users/vivek/.claude/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/06-sub-issues-status-updates/06-01-SUMMARY.md
@.planning/phases/06-sub-issues-status-updates/06-02-SUMMARY.md
@.planning/phases/06-sub-issues-status-updates/06-03-SUMMARY.md
@tests/infrastructure/github/repositories/GitHubIssueRepository.test.ts
@tests/infrastructure/tools/health-tools.test.ts
@docs/TOOLS.md
</context>
<tasks>
<task type="auto">
<name>Task 1: Create repository unit tests</name>
<files>tests/infrastructure/github/repositories/GitHubSubIssueRepository.test.ts, tests/infrastructure/github/repositories/GitHubStatusUpdateRepository.test.ts</files>
<action>
**GitHubSubIssueRepository.test.ts:**
Create tests following existing GitHubIssueRepository.test.ts patterns:
1. Setup: Mock Octokit with jest.mock, create factory and repository instances
2. Use beforeEach with jest.resetAllMocks() for test isolation
Test cases for GitHubSubIssueRepository:
- `addSubIssue` returns created relationship
- `addSubIssue` with replaceParent=true succeeds when issue has parent
- `addSubIssue` handles GraphQL errors (issue not found)
- `listSubIssues` returns paginated list with summary
- `listSubIssues` handles empty result
- `listSubIssues` with cursor returns next page
- `getParentIssue` returns parent when exists
- `getParentIssue` returns null when no parent
- `reprioritizeSubIssue` moves to beginning (afterId=null)
- `reprioritizeSubIssue` moves after specific issue
- `removeSubIssue` succeeds
- `removeSubIssue` handles not found error
- Verify sub_issues feature header is included in all calls
**GitHubStatusUpdateRepository.test.ts:**
Test cases for GitHubStatusUpdateRepository:
- `createStatusUpdate` with body only
- `createStatusUpdate` with all options (status, startDate, targetDate)
- `createStatusUpdate` handles invalid project ID
- `listStatusUpdates` returns paginated list
- `listStatusUpdates` handles empty result
- `listStatusUpdates` with cursor for pagination
- `getStatusUpdate` returns status update when exists
- `getStatusUpdate` returns null when not found
Mock GraphQL responses with realistic data structures from 06-RESEARCH.md.
</action>
<verify>`npm test -- --testPathPattern="GitHubSubIssueRepository|GitHubStatusUpdateRepository"` passes all tests.</verify>
<done>~20 repository unit tests pass covering all methods and edge cases.</done>
</task>
<task type="auto">
<name>Task 2: Create MCP tool tests</name>
<files>tests/infrastructure/tools/sub-issue-tools.test.ts, tests/infrastructure/tools/status-update-tools.test.ts</files>
<action>
**sub-issue-tools.test.ts:**
Create tests following health-tools.test.ts patterns:
Test cases:
- Schema validation tests:
- `AddSubIssueInputSchema` rejects missing required fields
- `AddSubIssueInputSchema` accepts valid input
- `ListSubIssuesInputSchema` accepts valid input with defaults
- (Similar for other input schemas)
- Tool definition tests:
- `addSubIssueTool` has correct name, title, annotations
- `addSubIssueTool` has updateIdempotent annotation
- `listSubIssuesTool` has readOnly annotation
- `removeSubIssueTool` has delete annotation with destructiveHint
- (Similar for other tools)
- Executor tests (with mocked repository):
- `executeAddSubIssue` calls repository with correct params
- `executeListSubIssues` returns structured result
- `executeGetParentIssue` returns null for issue without parent
- `executeReprioritizeSubIssue` passes afterId correctly
- `executeRemoveSubIssue` returns success message
- Error handling: missing token returns appropriate error
**status-update-tools.test.ts:**
Test cases:
- Schema validation tests for all 3 input schemas
- Tool definition tests (name, title, annotations)
- Executor tests:
- `executeCreateStatusUpdate` creates with body only
- `executeCreateStatusUpdate` creates with all options
- `executeListStatusUpdates` returns paginated list
- `executeGetStatusUpdate` returns null when not found
- Error handling tests
Use jest.mock for GitHubRepositoryFactory and repositories.
</action>
<verify>`npm test -- --testPathPattern="sub-issue-tools|status-update-tools"` passes all tests.</verify>
<done>~20 tool tests pass covering schemas, definitions, and executors.</done>
</task>
<task type="auto">
<name>Task 3: Update documentation and verify phase</name>
<files>docs/TOOLS.md, STATUS.md</files>
<action>
**Update docs/TOOLS.md:**
Add new section for Sub-issues tools (after Issue tools section):
```markdown
## Sub-issue Tools
### add_sub_issue
Adds an existing issue as a sub-issue of a parent issue.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| owner | string | Yes | Repository owner |
| repo | string | Yes | Repository name |
| parentIssueNumber | number | Yes | Parent issue number |
| subIssueNumber | number | Yes | Issue to add as sub-issue |
| replaceParent | boolean | No | Replace existing parent (default: false) |
**Example:**
\`\`\`json
{
"owner": "myorg",
"repo": "myrepo",
"parentIssueNumber": 1,
"subIssueNumber": 5
}
\`\`\`
### list_sub_issues
... (similar documentation for all 5 sub-issue tools)
## Status Update Tools
### create_status_update
Creates a new status update for a GitHub project.
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| projectId | string | Yes | Project node ID (PVT_...) |
| body | string | Yes | Status update body (markdown) |
| status | string | No | ON_TRACK, AT_RISK, OFF_TRACK, COMPLETE, INACTIVE |
| startDate | string | No | ISO date (YYYY-MM-DD) |
| targetDate | string | No | ISO date (YYYY-MM-DD) |
... (similar documentation for all 3 status update tools)
```
**Update STATUS.md:**
- Update tool count from 85 to 93
- Add Phase 6 completion entry
**Run full verification:**
1. `npm run build` - TypeScript compiles
2. `npm test` - All tests pass (590 + ~40 new = ~630)
3. Count tools in ToolRegistry to verify 93 total
</action>
<verify>`npm test` passes all tests. `grep -c "tool" docs/TOOLS.md` increased. Tool count is 93.</verify>
<done>TOOLS.md documents all 8 new tools. STATUS.md updated. All tests pass.</done>
</task>
</tasks>
<verification>
1. `npm run build` succeeds with no TypeScript errors
2. `npm test` passes all tests (previous 590 + ~40 new)
3. `grep -c "sub_issue\|status_update" docs/TOOLS.md` shows documentation
4. Tool count in ToolRegistry is 93 (85 + 8 new)
5. All Phase 6 requirements (GHAPI-01 to GHAPI-08) are implemented
</verification>
<success_criteria>
- GitHubSubIssueRepository has 12+ unit tests
- GitHubStatusUpdateRepository has 8+ unit tests
- Sub-issue tools have 10+ tests
- Status update tools have 8+ tests
- TOOLS.md documents all 8 new tools with parameters and examples
- STATUS.md reflects 93 total tools
- `npm test` reports 0 failures
</success_criteria>
<output>
After completion, create `.planning/phases/06-sub-issues-status-updates/06-04-SUMMARY.md`
</output>