Skip to content

Commit 00db358

Browse files
committed
updates
1 parent b1e5502 commit 00db358

File tree

4 files changed

+55
-46
lines changed

4 files changed

+55
-46
lines changed

README.md

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -796,54 +796,64 @@ Options are:
796796
<summary>Projects</summary>
797797

798798
- **project_read** - Read project information
799-
- `after`: Forward pagination cursor. Use ONLY if the previous response pageInfo.hasNextPage=true. Supply pageInfo.nextCursor as 'after' and immediately request the next page. LOOP UNTIL pageInfo.hasNextPage=false (don't stop early). Keep query, fields, and per_page identical for every page. (string, optional)
799+
- `after`: Forward pagination cursor. Use when the previous response's pageInfo.hasNextPage=true. Supply pageInfo.nextCursor as 'after' and immediately request the next page. LOOP UNTIL pageInfo.hasNextPage=false (don't stop early). Keep query, fields, and per_page identical for every page. (string, optional)
800800
- `before`: Backward pagination cursor (rare): supply to move to the preceding page using pageInfo.prevCursor. Not needed for normal forward iteration. (string, optional)
801801
- `field_id`: Field ID (required for get_project_field) (number, optional)
802802
- `fields`: Field IDs to include (e.g. ["102589", "985201"]). CRITICAL: Always provide to get field values. Without this, only titles returned. Get IDs from list_project_fields first. (string[], optional)
803803
- `item_id`: Item ID (required for get_project_item) (number, optional)
804804
- `method`: Read operation: get_project, list_projects, get_project_field, list_project_fields (call FIRST for IDs), get_project_item, list_project_items (use query + fields) (string, required)
805805
- `owner`: GitHub username or org name (case-insensitive) (string, required)
806806
- `owner_type`: Owner type: 'user' or 'org' (string, required)
807-
- `per_page`: Results per page (max 20). Keep constant across paginated requests; changing mid-sequence can complicate page traversal. (number, optional)
807+
- `per_page`: Results per page (max 50). Keep constant across paginated requests; changing mid-sequence can complicate page traversal. (number, optional)
808808
- `project_number`: Project number (required for most methods) (number, optional)
809-
- `query`: Query string to filter project items (highly recommended for list_project_items).
810-
CRITICAL: Always include this when calling list_project_items.
811-
812-
list_project_items instructions:
813-
814-
Derive the query from the user's natural language intent BEFORE invoking the tool. Map phrases directly:
815-
- "open issues" => state:open is:issue
816-
- "merged PRs" => state:merged is:pr
817-
- "assigned to me" => assignee:@me is:issue
818-
- "high priority bugs" => state:open is:issue label:bug priority:high
819-
- "review-ready PRs" => is:pr status:"Ready for Review"
820-
821-
Content Type:
822-
- Issues: is:issue
823-
- Pull requests: is:pr (or is:pull-request)
824-
Without one you'll get mixed types.
825-
826-
Logical Combination:
827-
- Space-separated qualifiers = AND
828-
- Commas inside a single qualifier = OR (label:bug,critical)
829-
- Negation with leading dash: -label:wontfix
830-
831-
Format Rules:
832-
- Qualifiers with spaces use hyphens: sprint-name, team-name, parent-issue
833-
- Values with spaces use quotes: sprint-name:"Q1 Planning" status:"In Review"
834-
- Single word values: no quotes (state:open priority:high)
835-
836-
Examples:
837-
- state:open is:issue sprint-name:"Q1 Planning"
838-
- is:pr team-name:"Backend Team" status:"In Review"
839-
- parent-issue:"github/repo#123"
840-
841-
Common Filters:
842-
is:issue/pr state:open/closed/merged assignee:@me/username label:name status:value priority:p1 updated:>@today-7d title:*text* -label:wontfix label:bug,critical priority:1..3 no:assignee has:label iteration:@current
843-
844-
Pagination:
845-
When pageInfo.hasNextPage=true, use after=nextCursor to request the next page. Keep query, fields, and per_page identical for every page. Repeat until pageInfo.hasNextPage=false.
846-
(string, optional)
809+
- `query`: Query string (used ONLY with list_projects and list_project_items).
810+
811+
Pattern Split:
812+
813+
1. list_projects (project metadata only):
814+
Scope: title text + open/closed state.
815+
PERMITTED qualifiers: is:open, is:closed (state), simple title terms.
816+
FORBIDDEN: is:issue, is:pr, assignee:, label:, status:, sprint-name:, parent-issue:, team-name:, priority:, etc.
817+
Examples:
818+
- roadmap is:open
819+
- is:open feature planning
820+
Reject & switch method if user intends items.
821+
822+
2. list_project_items (issues / PRs inside ONE project):
823+
MUST reflect user intent; strongly prefer explicit content type if narrowed:
824+
- "open issues" → state:open is:issue
825+
- "merged PRs" → state:merged is:pr
826+
- "items updated this week" → updated:>@today-7d (omit type only if mixed desired)
827+
Query Construction Heuristics:
828+
a. Extract type nouns: issues → is:issue | PRs, Pulls, or Pull Requests → is:pr | tasks/tickets → is:issue (ask if ambiguity)
829+
b. Map temporal phrases: "this week" → updated:>@today-7d
830+
c. Map negations: "excluding wontfix" → -label:wontfix
831+
d. Map priority adjectives: "high/sev1/p1" → priority:high OR priority:p1 (choose based on field presence)
832+
e. Map blocking relations: "blocked by 123" → parent-issue:"owner/repo#123"
833+
834+
Syntax Essentials (items):
835+
AND: space-separated.
836+
OR: comma inside one qualifier (label:bug,critical).
837+
NOT: leading '-' (-label:wontfix).
838+
Hyphenate multi-word field names.
839+
Quote multi-word values.
840+
Ranges: points:1..3, updated:<@today-30d.
841+
Wildcards: title:*crash*, label:bug*.
842+
843+
Common Qualifier Glossary (items):
844+
is:issue | is:pr | state:open|closed|merged | assignee:@me|username | label:NAME | status:VALUE |
845+
priority:p1|high | sprint-name:@current | team-name:"Backend Team" | parent-issue:"org/repo#123" |
846+
updated:>@today-7d | title:*text* | -label:wontfix | label:bug,critical | no:assignee | has:label
847+
848+
Pagination Mandate:
849+
Do not analyze until ALL pages fetched (loop while pageInfo.hasNextPage=true). Always reuse identical query, fields, per_page.
850+
851+
Recovery Guidance:
852+
If user provides ambiguous request ("show project activity") → ask clarification OR return mixed set (omit is:issue/is:pr). If user mixes project + item qualifiers in one phrase → split: run list_projects for discovery, then list_project_items for detail.
853+
854+
Never:
855+
- Infer field IDs; fetch via list_project_fields.
856+
- Drop 'fields' param on subsequent pages if field values are needed. (string, optional)
847857

848858
- **project_write** - Modify project items
849859
- `item_id`: For add: issue/PR ID. For update/delete: project item ID (not issue/PR ID) (number, required)

0 commit comments

Comments
 (0)