Skip to content

Commit 4354beb

Browse files
[issues] Reuse issue metadata and sync linked pull requests (#152) (#153)
* [issues] Reuse existing issue and project metadata (#152) * Update wiki submodule pointer for PR #153 * [issues] Sync linked issue metadata onto pull requests (#152) * [issues] Clarify project access recovery guidance (#152) * [issues] Add iteration and backfill guidance (#152) * [issues] Generalize inferable project-field guidance (#152) * [ci] Extract workflow automation into local actions (#152) * [wiki] Split preview and maintenance workflows (#152) * [reports] Checkout before local verify actions (#152) * [wiki] Split preview and maintenance entry workflows (#152) * [docs] Align automation docs and agent guidance (#152) * [agents] Refresh automation audit prompts (#152) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 29d5e61 commit 4354beb

72 files changed

Lines changed: 2456 additions & 700 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/agents/agents-maintainer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ accurate setup, workflow, testing, and contribution instructions.
2121
- Preserve the repository's existing instruction structure and terminology.
2222
- Cross-check referenced commands, paths, and generated artifacts before
2323
finalizing updates.
24+
- Cross-check workflow entrypoints in `.github/workflows/`, reusable local
25+
actions in `.github/actions/`, and packaged consumer wrappers in
26+
`resources/github-actions/` before documenting automation behavior.
2427
- Add or refresh notable repository references such as `README.md`, `docs/`,
2528
workflow files, and other canonical local entrypoints when they help agents
2629
navigate the project.
@@ -29,6 +32,8 @@ accurate setup, workflow, testing, and contribution instructions.
2932

3033
- A PR changes setup, development, testing, sync, or contribution workflows
3134
documented in `AGENTS.md`.
35+
- A PR refactors GitHub Actions by moving logic between workflow wrappers and
36+
local actions, or splits one workflow into multiple entrypoints.
3237
- The repository adds, removes, or renames packaged skills or project agents.
3338
- `AGENTS.md` drifted from the current repository behavior.
3439

@@ -37,6 +42,8 @@ accurate setup, workflow, testing, and contribution instructions.
3742
- Do not duplicate or replace `README.md` when a human-facing doc update is the
3843
actual need.
3944
- Do not invent workflows or commands that are not present in the checkout.
45+
- Do not ignore repo-local automation assets just because consumer repositories
46+
only receive wrapper workflows; both surfaces can change the right guidance.
4047
- Do not rewrite unrelated docs trees when only `AGENTS.md` needs maintenance.
4148

4249
## Primary Skill

.agents/agents/consumer-sync-auditor.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,24 @@ wiki/bootstrap assets.
2121
- Check whether changes affect packaged role prompts as well as packaged skills.
2222
- Call out downstream bootstrap, workflow, wiki, or onboarding implications.
2323
- Verify that packaged defaults remain coherent with sync behavior.
24+
- Distinguish between consumer-facing workflow wrappers in
25+
`resources/github-actions/` and repository-only local actions in
26+
`.github/actions/`, and trace when changes in one imply updates to the other.
2427
- Surface when docs or README updates are needed for consumer adoption.
2528

2629
## Use When
2730

2831
- A change touches `resources/`, `.github/workflows/`, `.agents/skills`,
29-
`.agents/agents`, `.editorconfig`, wiki automation, or `dev-tools:sync`.
32+
`.agents/agents`, `.editorconfig`, wiki automation, `.github/actions/`, or
33+
`dev-tools:sync`.
3034
- A PR may affect how consumer repositories adopt or refresh DevTools assets.
3135

3236
## Boundaries
3337

3438
- Do not treat every repository-only change as a consumer sync concern.
39+
- Do not assume `.github/actions/` changes are internal-only; check whether the
40+
consumer-facing wrappers, AGENTS guidance, or sync docs now describe the wrong
41+
automation shape.
3542
- Do not replace the implementation workflow; this role is an impact auditor,
3643
not a separate execution path.
3744

.agents/agents/issue-editor.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ issues for the current repository.
1717
- Draft clear issue titles and English issue bodies.
1818
- Refine problem statements, scope, non-goals, and acceptance criteria.
1919
- Maintain issue lifecycle actions such as comments, updates, and closure notes.
20+
- Choose the most appropriate existing issue metadata the repository already
21+
supports, including type, labels, project placement, and adjacent issue
22+
relationships when they can be inferred safely.
23+
- Fill any existing project field that can be inferred with high confidence
24+
from the issue scope, repository workflow, or linked pull-request history.
25+
- When project metadata matters but GitHub CLI lacks project scope, trigger the
26+
refresh flow and tell the user they MAY need to finish the browser-and-code
27+
verification step before project access becomes available.
2028
- Keep issue language aligned with Fast Forward command, docs, workflow, and
2129
packaging vocabulary.
2230

.agents/agents/quality-pipeline-auditor.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ single command in isolation.
2222
- Recommend the smallest verification set that still covers pipeline risk.
2323
- Watch for drift between command behavior, workflow automation, and generated
2424
outputs.
25+
- Watch for workflow refactors that move quality-pipeline behavior into local
26+
GitHub actions or split one workflow into preview, publication, and
27+
maintenance entrypoints.
2528
- Highlight when a change should update tests, docs, or contributor guidance
2629
together.
2730

.agents/skills/github-issues/SKILL.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: github-issues
3-
description: Draft, create, update, comment on, and close GitHub issues for Fast Forward repositories. Use when an agent needs to turn a brief feature, bug, or task prompt into a production-ready issue, refine existing issue content, publish or update an issue on GitHub, manage labels or milestones, add issue comments, or close tracked work without leaving the local workflow.
3+
description: Draft, create, update, comment on, and close GitHub issues for Fast Forward repositories. Use when an agent needs to turn a brief feature, bug, or task prompt into a production-ready issue, refine existing issue content, publish or update it on GitHub, manage existing metadata such as labels, types, milestones, projects, and project fields, add issue comments, or close tracked work without leaving the local workflow.
44
---
55

66
# Fast Forward GitHub Issues
@@ -24,12 +24,21 @@ Use this skill for the full Fast Forward issue lifecycle: draft implementation-r
2424
- Include CLI examples, flags, paths, generated artifacts, or error cases when the change touches commands, automation, or reports.
2525
- Add explicit non-goals when the prompt could expand into multiple initiatives.
2626
- Ask follow-up questions only when a missing fact would materially change the issue type, acceptance criteria, or target issue. Otherwise make the smallest safe assumption and state it briefly.
27+
- When publishing or updating an issue, explicitly state which metadata was applied or intentionally omitted: issue type, labels, milestone, project assignment, project field values, and related open issues.
2728

2829
## Fast Forward Defaults
2930

3031
- Prefer the current repository checkout when the user asks about "this repo" or "this project".
3132
- Use `gh api` for GitHub write operations.
3233
- Prefer issue types over labels for primary categorization when the organization supports them.
34+
- Reuse only issue types, labels, milestones, projects, and project field options that already exist in the target repository or organization.
35+
- Prefer filling the maximum useful metadata that can be inferred safely from the issue scope and the available GitHub configuration.
36+
- Do not force weak labels, milestones, project assignments, or project field values when the fit is unclear.
37+
- When project metadata matters and GitHub CLI lacks project scope, try `gh auth refresh -h github.com -s read:project -s project` and tell the user they MAY need to complete the browser-and-code flow.
38+
- When no suitable repository or organization project exists, you MAY suggest copying the Fast Forward template project at `https://github.com/orgs/php-fast-forward/projects/2`.
39+
- When a project exposes any field whose value can be inferred with a high degree of confidence, prefer filling it instead of leaving it blank by default.
40+
- Support backfill runs for older issues with missing metadata, but only fill fields that are currently unset unless the user explicitly asks for correction.
41+
- When a new issue appears materially related to another open issue, add that relationship instead of leaving the issues disconnected.
3342
- Treat command or controller layers as orchestration only when drafting implementation issues.
3443
- Prefer dedicated classes for input resolution, domain logic, processing, and output rendering when the change is non-trivial.
3544
- Call out test, README, docs, wiki, sync, or generated report updates when the change clearly affects them.
@@ -45,7 +54,7 @@ Use this skill for the full Fast Forward issue lifecycle: draft implementation-r
4554
| Start from a reusable issue body structure | [references/templates.md](references/templates.md) |
4655
| Paste the correct acceptance-criteria block | [references/architectural-criteria.md](references/architectural-criteria.md) |
4756
| Create, update, comment on, or close an issue | [references/operations.md](references/operations.md) |
48-
| Choose issue types, labels, assignees, and milestones | [references/metadata.md](references/metadata.md) |
57+
| Choose issue types, labels, assignees, milestones, projects, and related issue metadata | [references/metadata.md](references/metadata.md) |
4958
| Perform the final quality and mutation-safety pass | [references/review-checklist.md](references/review-checklist.md) |
5059

5160
## Anti-patterns
@@ -57,3 +66,4 @@ Use this skill for the full Fast Forward issue lifecycle: draft implementation-r
5766
- Do not ask exploratory questions when repository conventions already provide a safe default.
5867
- Do not publish a placeholder issue body or mutate GitHub without restating the target issue first.
5968
- Do not split drafting and publication into separate local skills when this workflow already covers both.
69+
- Do not invent labels, issue types, milestones, projects, project field values, or issue links that are not already supported by the target repository context.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
interface:
22
display_name: "Fast Forward GitHub Issues"
3-
short_description: "Draft and manage Fast Forward GitHub issues"
4-
default_prompt: "Use $github-issues to draft, create, or update this Fast Forward GitHub issue."
3+
short_description: "Draft and manage Fast Forward GitHub issues with existing repository metadata"
4+
default_prompt: "Use $github-issues to draft, create, or update this Fast Forward GitHub issue and apply the most appropriate existing repository metadata."

.agents/skills/github-issues/references/context.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ Useful check:
1818
gh auth status
1919
```
2020

21+
If the request may require project assignment or project-field updates, also
22+
confirm the active token can read and write project metadata. A token that can
23+
mutate issues may still be missing `read:project` or `project` scope.
24+
25+
When project scope is missing but project placement or project-field updates
26+
matter to the request, try to refresh authentication before giving up:
27+
28+
```bash
29+
gh auth refresh -h github.com -s read:project -s project
30+
```
31+
32+
Tell the user that GitHub CLI MAY open a browser and ask them to enter a
33+
verification code before the refreshed token is granted project access.
34+
2135
## Existing Issue Resolution
2236

2337
For updates or comments:
@@ -29,6 +43,7 @@ For creates:
2943

3044
- check whether an obvious duplicate already exists when the prompt strongly suggests current tracked work
3145
- if the repository already has a canonical issue for the request, update or comment on it instead of creating another one
46+
- inspect open issues when the request appears adjacent to current tracked work so related issues can be linked intentionally
3247

3348
## Output Requirement
3449

.agents/skills/github-issues/references/metadata.md

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Metadata Guidance
22

3-
Use this reference when the issue needs labels, types, assignees, or milestones.
3+
Use this reference when the issue needs labels, types, assignees, milestones,
4+
project assignment, project field values, or issue relationships.
5+
6+
## General Rule
7+
8+
- Reuse only metadata that already exists in the target repository or
9+
organization.
10+
- Prefer the maximum useful metadata that can be inferred safely from scope and
11+
repository context.
12+
- Leave a field unset when the fit is weak, ambiguous, or unsupported by the
13+
available token.
14+
- Never create new labels, issue types, projects, project field options, or
15+
milestones as part of normal issue drafting or publication.
416

517
## Issue Types
618

@@ -20,6 +32,9 @@ gh api graphql \
2032
--jq '.data.organization.issueTypes.nodes[].name'
2133
```
2234

35+
Select the closest existing type for the issue scope. Do not downgrade to a
36+
label-only strategy when a fitting issue type exists.
37+
2338
## Labels
2439

2540
Use labels for secondary categorization, not as a replacement for issue type when a type exists.
@@ -31,11 +46,102 @@ Examples that may still be useful:
3146
- `help wanted`
3247
- `question`
3348

49+
Choose labels only from the existing repository label set. Add them when they
50+
materially improve categorization, not as a reflex.
51+
52+
Discovery example:
53+
54+
```bash
55+
gh label list --repo {owner}/{repo} --limit 200
56+
```
57+
3458
## Milestones and Assignees
3559

3660
- Set a milestone only when the repository is actively using milestone-based planning.
3761
- Assign users only when the request or repository workflow clearly calls for it.
3862

63+
Milestone discovery example:
64+
65+
```bash
66+
gh api repos/{owner}/{repo}/milestones
67+
```
68+
69+
If there are no milestones, or none clearly fit the scope, leave the issue
70+
without one.
71+
72+
## Projects
73+
74+
When the repository or organization uses Projects, prefer adding the issue to
75+
the most appropriate existing project instead of leaving project assignment
76+
empty by default.
77+
78+
Project discovery example:
79+
80+
```bash
81+
gh api graphql \
82+
-f query='{ organization(login: "ORG") { projectsV2(first: 20) { nodes { id title number closed } } } }'
83+
```
84+
85+
If project access is unavailable, first try to refresh GitHub CLI scopes:
86+
87+
```bash
88+
gh auth refresh -h github.com -s read:project -s project
89+
```
90+
91+
Warn the user that this command MAY open a browser and ask them to type a
92+
verification code before project access is granted.
93+
94+
If no existing repository or organization project clearly fits, omit the
95+
project assignment instead of guessing. When the repository and organization do
96+
not appear to have any usable project at all, you MAY suggest copying the Fast
97+
Forward template project as a starting point:
98+
99+
```text
100+
https://github.com/orgs/php-fast-forward/projects/2
101+
```
102+
103+
Treat that suggestion as optional guidance for the user, not as a project you
104+
create automatically.
105+
106+
## Project Fields
107+
108+
When a selected project exposes fields whose values can be inferred with a high
109+
degree of confidence, attempt to populate them instead of leaving them blank by
110+
default. Common examples include `Status`, `Priority`, and `Size`, but the same
111+
rule applies to any existing project field that has a clear fit for the issue.
112+
113+
Common guidance:
114+
115+
- `Status`: pick the nearest lifecycle state, often `Backlog` or `Ready` for a
116+
newly created issue.
117+
- `Priority`: prefer the lowest confident priority instead of inflating urgency.
118+
- `Size`: choose a rough estimate only when the issue scope supports it.
119+
- Other fields: populate them only when the issue scope, repository context, or
120+
linked pull-request history makes the right value genuinely clear.
121+
122+
Backfill guidance:
123+
124+
- Support backfill for older issues that are missing project metadata.
125+
- Only backfill fields that are currently unset or obviously incomplete.
126+
- Do not overwrite existing project-field values during a backfill pass unless
127+
the user explicitly asks for correction.
128+
129+
Do not invent new field options, and do not force a value when no safe choice
130+
is evident.
131+
132+
## Related Issues
133+
134+
When a newly drafted issue appears materially related to an existing open issue,
135+
record that relationship instead of leaving the issues disconnected.
136+
137+
Examples of useful relationships:
138+
139+
- dependency or blocker
140+
- follow-up or split from a larger tracked task
141+
- scope overlap that reviewers should see together
142+
143+
Avoid speculative or noisy links when the relationship is weak.
144+
39145
## Title Guidance
40146

41147
- Keep the title specific and actionable.

.agents/skills/github-issues/references/operations.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Add metadata flags only when needed:
2121
-f milestone=1
2222
```
2323

24+
After creation, apply project assignment, project field values, or issue links
25+
through follow-up mutations when the repository context supports them.
26+
2427
## Update Issue
2528

2629
```bash
@@ -33,6 +36,40 @@ gh api repos/{owner}/{repo}/issues/{number} \
3336

3437
Only include the fields that should change.
3538

39+
## Add Issue to an Existing Project
40+
41+
```bash
42+
gh api graphql \
43+
-f query='mutation($project:ID!, $content:ID!) { addProjectV2ItemById(input: {projectId: $project, contentId: $content}) { item { id } } }' \
44+
-f project='PROJECT_ID' \
45+
-f content='ISSUE_NODE_ID'
46+
```
47+
48+
## Set an Existing Project Field Value
49+
50+
For single-select fields such as `Status`, `Priority`, `Size`, or any other
51+
existing single-select field with a safe inferred value:
52+
53+
```bash
54+
gh api graphql \
55+
-f query='mutation($project:ID!, $item:ID!, $field:ID!, $option:String!) { updateProjectV2ItemFieldValue(input: {projectId: $project, itemId: $item, fieldId: $field, value: {singleSelectOptionId: $option}}) { projectV2Item { id } } }' \
56+
-f project='PROJECT_ID' \
57+
-f item='ITEM_ID' \
58+
-f field='FIELD_ID' \
59+
-f option='OPTION_ID'
60+
```
61+
62+
The same principle applies to any other supported project field type: only
63+
write values that can be inferred confidently from the issue scope, repository
64+
workflow, or linked pull-request history.
65+
66+
## Add a Related-Issue Link
67+
68+
When the repository supports issue relationships, prefer the official GitHub
69+
relationship mutation or connector path available in the environment. If that
70+
surface is unavailable, explicitly mention the related issue in the body or an
71+
issue comment rather than silently dropping the relationship.
72+
3673
## Add Comment
3774

3875
```bash
@@ -56,3 +93,7 @@ gh api repos/{owner}/{repo}/issues/{number} \
5693
- Restate the target issue before mutating it.
5794
- Prefer full body replacement only when the body is being intentionally rewritten.
5895
- Use comments for incremental updates that should preserve the issue description.
96+
- For new issues, prefer applying metadata immediately after creation so the
97+
issue lands in GitHub with a complete and reviewable state.
98+
- For backfill passes, update only missing metadata by default and avoid
99+
rewriting fields that already carry intentional values.

.agents/skills/github-issues/references/review-checklist.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Use this checklist before finalizing issue content or mutating GitHub.
1212
- Repository-specific terms, commands, directories, or artifacts are named precisely.
1313
- Non-goals are present when the request could easily expand in scope.
1414
- Tests, docs, README, wiki, sync, or reports are called out when the change obviously affects them.
15+
- The chosen metadata strategy is explicit about what should be applied versus omitted.
1516
- Assumptions are minimal and explicitly stated when inference was necessary.
1617
- The final output contains no meta commentary about prompting or the drafting process.
1718

@@ -22,6 +23,13 @@ Use this checklist before finalizing issue content or mutating GitHub.
2223
- The target issue number is correct for updates, comments, or closure.
2324
- The title and body are final or intentionally partial.
2425
- Metadata changes are explicit and necessary.
26+
- Applied labels, issue type, milestone, project assignment, project field
27+
values, and issue relationships come only from metadata that already exists.
28+
- Any project field that was left empty despite being inferable has a clear
29+
reason, not an accidental omission.
30+
- Backfill writes touched only fields that were previously unset, unless the
31+
user explicitly asked for metadata correction.
32+
- Project or milestone fields were left empty only for a clear reason, not by omission.
2533
- A duplicate issue is not being created accidentally.
2634
- The final response will include the issue number and URL.
2735

0 commit comments

Comments
 (0)