Skip to content

Commit 343be65

Browse files
committed
prompt updates
1 parent 7a18ad7 commit 343be65

7 files changed

Lines changed: 144 additions & 51 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Common Prompt Guidelines
2+
3+
### Placeholders
4+
5+
- Use angle-bracket ALL_CAPS placeholders: `<JIRA_TICKET_KEY>`, `<TICKET_LINK>`, `<REPO>`, `<FEATURE_NAME>`, `<DIRECTORIES>`, `<BRANCH_SOURCE>`, `<BRANCH_TARGET>`, `<SLUGIFIED_TITLE>`, `<TICKET_TEMPLATE_URL>`.
6+
7+
### MCP Guard
8+
9+
- Always include as step 0 where relevant:
10+
- "Confirm whether an active MCP connection is available. If not, terminate with: 'No MCP connection. Execution stopped.'"
11+
12+
### Idempotency
13+
14+
- Avoid duplicate comments/PR review requests. Use unique prefixes like `[AI generated]` and skip if identical content exists.
Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,90 @@
11
Task:
22
<TASK_DESCRIPTION>
33

4-
You are a senior engineer tasked with analyzing the codebase to plan the implementation of the Task described above.
4+
You are a senior engineer tasked with analyzing the codebase to plan the implementation of the task described above.
55

66
77

88
Scope of Analysis
99

10-
The following directories and sources are the known starting points for the coi feature code:
10+
Starting points for the <FEATURE_NAME> (or initial scope discovery):
1111

1212
- <LINK_OR_PATH>
1313
- <LINK_OR_PATH>
1414
- ...
1515

16-
Your task is to analyze the entire codebase from these locations and identify all modules, dependencies, and shared logic related to the task.
16+
Your task is to analyze the entire codebase from these locations and identify all modules, dependencies, data flows, and shared logic related to the task.
17+
18+
Impact Analysis Checklist
19+
20+
- Repository/repositories and primary modules impacted
21+
- Public APIs and internal interfaces touched
22+
- Data model and schema changes (including migrations)
23+
- Feature flags/configuration/env variables
24+
- Security, privacy, authz/authn and PII handling
25+
- Performance considerations and telemetry/metrics
26+
- Test coverage impact (unit/integration/e2e) and test data
27+
- Rollout, monitoring, and rollback strategy
28+
- Risks, edge cases, failure modes, and negative paths
1729

1830
1931

20-
Output Requirements:
32+
Output Requirements
2133

22-
When your analysis is complete, create a ticket for the implementation based on this template ticket: @https://diligentbrands.atlassian.net/browse/AIADT-9
34+
When your analysis is complete, create a ticket for the implementation based on this template ticket: <TICKET_TEMPLATE_URL> (example: @https://diligentbrands.atlassian.net/browse/AIADT-9)
2335

24-
Your Deliverables 0. Verify if you have access to Jira and the template ticket. Stop execution if you don't have access
36+
Your Deliverables 0. Check MCP Access
2537

26-
1. Perform a full impact analysis of code related to the task.
27-
2. Propose a step-by-step removal plan, broken down into actionable engineering tasks.
38+
- Confirm whether an active Atlassian MCP connection is available.
39+
- If no MCP connection is detected, terminate with: "No MCP connection. Execution stopped."
40+
41+
1. Perform a full impact analysis of code related to the task (use the checklist above).
42+
2. Propose a step-by-step implementation plan, broken down into actionable engineering tasks.
2843
3. Format the plan on the Jira ticket description according to the template ticket.
29-
4. Ensure that task description covers happy paths, and negative paths, edge-cases as well.
44+
4. Ensure that the ticket covers happy paths, negative paths, and edge cases.
45+
46+
Ticket Description Template
47+
48+
```
49+
Objective
50+
- <what outcome we need>
51+
52+
Scope
53+
- <in scope>
54+
- <out of scope>
55+
56+
Technical Context
57+
- Repos/Modules: <repo>/<module>
58+
- APIs/Interfaces: <list>
59+
- Data/Schema: <list>
60+
- Flags/Config: <list>
61+
62+
Plan (tasks)
63+
1. <task>
64+
2. <task>
65+
66+
Acceptance Criteria
67+
- <AC 1>
68+
- <AC 2>
69+
70+
Risks & Rollback
71+
- <risk 1>
72+
- <rollback strategy>
73+
74+
References
75+
- <links>
76+
```
77+
78+
Do not proceed with implementation — focus is analysis and ticket creation only. It's okay to ask follow-up questions to improve ticket quality.
79+
80+
Output
3081

31-
Do not proceed with implementation — your focus is analysis and ticket creation only.
32-
It's okay to ask follow-up questions for the ticket quality improvement, if needed.
82+
```
83+
{
84+
"ticket_key": "<JIRA_TICKET_KEY>",
85+
"ticket_url": "<TICKET_LINK>",
86+
"analysis_summary": "<1-3 paragraph summary>",
87+
"open_questions": ["<question>", "<question>"] ,
88+
"next_step": "<what to do next>"
89+
}
90+
```

prompt-library/workflow-prompts/1-initial-review-unified.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ You are a professional fullstack engineer assigned to review and assess readines
22

33
**Jira Ticket**: <JIRA_TICKET_KEY>
44

5-
**Additional COntextual information to review:**
5+
**Additional Context to review:**
66

77
- <LINK_OR_PATH>
88
- ...
99

1010
## Tasks:
1111

1212
0. **Check MCP Access**
13-
   - Confirm whether an active Atlassian MCP connections is available.
14-
   - If no MCP connection is detected, terminate the task immediately and return: "No MCP connection. Execution stopped."
13+
- Confirm whether an active Atlassian MCP connection is available.
14+
- If no MCP connection is detected, terminate with: "No MCP connection. Execution stopped."
1515
1. **Retrieve and read content**:
1616
- For GitHub (if provided): Use MCP to retrieve and read the GitHub issue content
1717
- For Jira (if provided): Use Atlassian MCP to retrieve and read the Jira ticket content
@@ -28,6 +28,14 @@ You are a professional fullstack engineer assigned to review and assess readines
2828
- Embedded links to depth 2
2929
- Source code context (if provided)
3030
4. **Assess implementation readiness**: Check whether the issue/ticket contains all necessary information for a developer or agent to proceed without ambiguity
31+
- Readiness checklist:
32+
- Clear objective/outcome and non-goals
33+
- Testable acceptance criteria
34+
- Technical context: repository, environments, dependencies, API keys/config
35+
- Data model/DB schema impacts and migration notes
36+
- Rollout plan, telemetry/monitoring, and rollback strategy
37+
- Negative paths, edge cases, and decision logic
38+
- Security/privacy considerations (authn/authz, PII)
3139

3240
Validation & Analysis:
3341
Review the ticket comprehensively and confirm it includes:
@@ -38,7 +46,7 @@ Review the ticket comprehensively and confirm it includes:
3846
• Edge cases or decision logic for non-trivial behavior
3947
• Approval or security processes, if applicable
4048

41-
For any missing or unclear areas, generate a list of open questions that need clarification. Ask all the open questions qou have regardless the number of the questions. Focus on:
49+
For any missing or unclear areas, generate a list of open questions that need clarification. Ask all the open questions you have regardless of count. Focus on:
4250
• Ambiguities in the ticket description
4351
• Unclear requirements or edge cases
4452
• Missing technical details
@@ -49,25 +57,22 @@ Propose answers to the open questions and solutions for missing information base
4957

5058
```
5159
Summary of Task:
52-
[Write 2-3 sentence summary of what the ticket is about]
60+
[2-3 sentences]
5361
5462
Context Sources:
55-
- [List ticket links, confluence page links, and all sources you reviewed]
63+
- [ticket links, confluence pages, repos, code paths]
5664
57-
Open Questions or missing or unclear areas (if any):
58-
1. [Question 1]
59-
**Proposal**: [Proposed answer 1]
60-
2. [Question 2]
61-
**Proposal**: [Proposed answer 2]
62-
...
65+
Open Questions (if any):
66+
1. [Question]
67+
Severity: [Blocker | Major | Minor]
68+
Proposal: [Proposed answer]
69+
2. ...
6370
64-
Ticket Readiness: [Yes / No]
71+
Ticket Readiness: [Yes - if no open questions | No - if open questions]
72+
Rationale: [brief reason]
6573
6674
Recommendation:
6775
[What should be added or changed, or confirm readiness]
68-
69-
Prompt for AI-assisted implementation [Add this only if the ticket is ready]:
70-
[Prompt I can use for implementation request]
7176
```
7277

7378
**Important**: If the ticket/issue is ready, explicitly state that no blockers remain.

prompt-library/workflow-prompts/2-iterating-on-questions.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
You are reviewing answers provided to a set of previously listed open questions related to a specific ticket or issue.
22

3-
## Answers:
3+
## Answers (tie each answer to its question ID):
44

5-
1. <QUESTION_1>
6-
Answer: <ANSWER_1>
7-
2 ...
5+
1. Question: <QUESTION_1>
6+
Answer: <ANSWER_1>
7+
2. ...
88

99
1010

@@ -16,13 +16,14 @@ You are reviewing answers provided to a set of previously listed open questions
1616
- Incomplete
1717
- Contradictory
1818

19-
2. Ask Follow-Up Questions (if needed). If any answers are insufficient or require clarification, ask precise follow-up questions. If clarification is needed, STOP here and ignore the rest of the prompt.
19+
2. Ask Follow-Up Questions (if needed). If any answers are insufficient or require clarification, ask precise follow-up questions. If clarification is needed, STOP here and DO NOT post any ticket comment.
2020

2121
3. Summarize and Post Update. If all answers are satisfactory:
2222
- Craft a concise, narrative-style summary that clearly reflects the resolved points and any clarifications provided.
2323
4. Post the Update to the Ticket
24-
- Post the summary as a comment on the related issue or ticket. Consider using MCP. It must be added to the ticket or issue
24+
- Post the summary as a comment on the related issue or ticket. Consider using MCP. It must be added to the ticket or issue.
2525
- Prefix the comment with a line including: `**[AI generated]**` to indicate the source.
26+
- If a previous identical comment exists (same hash of content), skip posting to avoid duplicates.
2627
5. Verification of the updated ticket / issue
2728
- Review the ticket or issue again. Double check if the comment is added.
2829
- Check if all the information provided in the ticket / issue and the related context (e.g. comments) are suffucient for starting the implementation
@@ -35,8 +36,8 @@ You are reviewing answers provided to a set of previously listed open questions
3536

3637
```
3738
Open Questions / Gaps Identified:
38-
1. [Restate unclear question or gap]
39-
**Proposal**: [Your suggestion or specific follow-up question]
39+
1. Restatement: [unclear question or gap]
40+
Proposal: [your suggested follow-up]
4041
2. ...
4142
```
4243

prompt-library/workflow-prompts/3-implmentation-plan-generation.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,21 @@ Instructions 0. Check MCP Access
2828
- If the ticket is complete, continue to generate a task-based implementation prompt
2929
- If the ticket is incomplete, STOP prompt execution
3030
3. Generate a Structured Implementation Plan
31-
- Break down the implementation into sequential tasks
32-
- Be specific about logic, components, files, or APIs involved
31+
- Plan sections (required):
32+
- Objective and Non-goals
33+
- Architecture/Design overview
34+
- Detailed steps (file-by-file edits, functions/classes to add/change)
35+
- Data/Schema changes and migrations
36+
- API contracts and external integrations
37+
- Feature flags/config changes
38+
- Tests (unit/integration/e2e) and test data
39+
- Telemetry/monitoring
40+
- Risks, edge cases, rollback
41+
- Acceptance Criteria mapping to tasks
3342
- Ensure the prompt is self-contained and ready to use by an AI agent
3443
- Use @planning-guide.md
3544
4. Save the Plan as a File
36-
- Save the generated implementation prompt as a Markdown file in the repository: `implementation-plans/<JIRA_TICKET_KEY>-implementation-plan.md` (use kebab-case for the ticket title if included)
45+
- Save the generated implementation prompt as a Markdown file in the repository: `implementation-plans/<JIRA_TICKET_KEY>-<SLUGIFIED_TITLE>-implementation-plan.md`
3746
- Include the file's relative path in the comment in step 5
3847
5. Post the Prompt to the Ticket
3948
- Post the generated prompt as a comment on the related issue or ticket. Consider using MCP. It must be added to the ticket or issue
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1+
0. Pre-flight
2+
- Ensure MCP access if required by steps below
3+
- Ensure clean working tree; create a feature branch if not on one: `<BRANCH_SOURCE>`
4+
- Run tests and lint to establish baseline
15
1. Analyze the Implementation Plan
2-
    - Read and fully understand the implementation plan.
3-
    - Identify all referenced context (e.g., Jira tickets, design docs, issue links).
6+
- Read and fully understand the implementation plan.
7+
- Identify all referenced context (e.g., Jira tickets, design docs, issue links).
48
2. Gather Additional Context
5-
    - Access all linked Jira tickets and relevant references.
6-
    - Extract key functional, technical, and business requirements.
9+
- Access all linked Jira tickets and relevant references.
10+
- Extract key functional, technical, and business requirements.
711
3. Validate Understanding
8-
    - Confirm that the goal, scope, and edge cases of the feature are clear.
9-
    - If not, return a clarification summary or list of missing details.
12+
- Confirm that the goal, scope, and edge cases of the feature are clear.
13+
- If not, return a clarification summary or list of missing details.
1014
4. Implement the Feature
11-
    - Write clean, modular, and testable code that aligns with the implementation plan and context.
12-
    - Use existing project conventions and architecture.
13-
    - Commit the implementation in logically grouped commits with clear messages.
15+
- Write clean, modular, and testable code that aligns with the implementation plan and context.
16+
- Use existing project conventions and architecture.
17+
- Commit using the repository’s convention (e.g., Conventional Commits). Group logically related changes.
18+
- Add or update tests (unit/integration/e2e) and ensure they cover acceptance criteria.
19+
- Run tests and lint; fix issues until green.
1420
5. Final Output
15-
    - Return a summary of what was implemented, referencing key points from the plan and context.
21+
- Return a summary of what was implemented, referencing key points from the plan and context.

prompt-library/workflow-prompts/5-feedback-request-review.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
- Include context on what was changed and how it was verified
1212
3. **Request Review**
1313
- Right after the PR is opened, request a code review from CoPilot (use MCP)
14-
- Execute this cli command: `sleep 90` Wait for it to finish.
15-
- Check if the pull request review finished. If you don't find a new completed code review, wait another 30 secs by running `sleep 30`
14+
- Poll for review completion every 30 seconds up to 10 minutes (20 attempts). Stop early if a new completed review appears.
15+
- If a review request already exists and is pending within the last 10 minutes, do not re-request.
1616
4. **Review and Address Pull request review comments**
1717
- Review the PR comments (if any), and address them
1818
- If the changes make sense to implement
@@ -21,7 +21,7 @@
2121
- Push the changes
2222
- If the changes doesn't make sense
2323
- Add a comment to them explaining why you think they should not be applied
24-
- Use [AI comment] prefix in your comments
24+
- Use [AI comment] prefix in your comments and reference relevant guidelines
2525
5. **Decide in next action**
2626
- If you implemented changes based on the received code review comments, go back to step 3, and request a new code review
2727
- If you did not implemented any changes based on the received code review comments, give this answer:

0 commit comments

Comments
 (0)