Skip to content

Commit 722873f

Browse files
authored
Merge pull request #2901 from port-labs/PORT-update-ai-instructions-guide
Update Manage AI Instructions with Port
2 parents 6b1c6bb + 3e47208 commit 722873f

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

docs/guides/all/manage-ai-instructions.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -180,24 +180,25 @@ Before setting up the automation, we need to create an AI agent that will handle
180180
"identifier": "ai_instructions_manager",
181181
"title": "AI Instructions Manager",
182182
"icon": "Details",
183-
"team": [],
184183
"properties": {
185184
"description": "AI agent that manages the AGENTS.md file in repositories via Claude Code",
186185
"status": "active",
187-
"allowed_blueprints": [
188-
"service"
189-
],
190-
"allowed_actions": [
191-
"run_claude_code"
192-
],
193-
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories.\n\nWhen you invoke the `run_claude_code` action:\n1. Set `repo_name` to the target repository.\n2. Construct the `command` so it includes the full new AGENTS.md Markdown provided by Port, not just a placeholder reference. The command must:\n - Clearly instruct Claude to replace the contents of `AGENTS.md` at the root of the repository.\n - Include the full Markdown text from Port inside a fenced code block.\n - End with instructions to commit on a new branch and open a PR with:\n - Title: 'chore: sync AGENTS.md from Port'\n - Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\nExample `command` format:\n\n```\nPlease update the repository by creating or replacing the AGENTS.md file at the root with the following content:\n\n```markdown\n<the full Markdown instructions provided by Port go here>\n```\n\nCommit this change on a new branch and open a pull request titled: 'chore: sync AGENTS.md from Port' with description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n```\n\nAlways embed the actual Markdown content directly. Never leave it as a placeholder or a reference.",
194-
"execution_mode": "Automatic"
186+
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories. You do so by invoking the `run_claude_code` self-service action, which triggers Claude coding agent to work on the request.\n\nWhen you invoke the `run_claude_code` self-service action:\n1. Set `repo_name` to the target repository.\n2. Construct the `prompt` so it includes the full new AGENTS.md Markdown provided by Port, not just a placeholder reference. The prompt must:\n - Clearly instruct Claude to replace the contents of `AGENTS.md` at the root of the repository.\n - Include the full Markdown text from Port inside a fenced code block.\n - End with instructions to commit on a new branch and open a PR with:\n - Title: 'chore: sync AGENTS.md from Port'\n - Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\nExample `prompt` format:\n\n```\nPlease update the repository by creating or replacing the AGENTS.md file at the root with the following content:\n\n```markdown\n<the full Markdown instructions provided by Port go here>\n```\n\nCommit this change on a new branch and open a pull request titled: 'chore: sync AGENTS.md from Port' with description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n```\n\nAlways embed the actual Markdown content directly. Never leave it as a placeholder or a reference.",
187+
"execution_mode": "Automatic",
188+
"tools": [
189+
"^(list|get|search|track|describe)_.*",
190+
"run_run_claude_code"
191+
]
195192
},
196193
"relations": {}
197194
}
198195
```
199196
</details>
200197

198+
:::tip MCP Enhanced Capabilities
199+
The AI agent uses MCP (Model Context Protocol) enhanced capabilities to automatically discover important and relevant blueprint entities via its tools. The `^(list|get|search|track|describe)_.*` pattern allows the agent to access and analyze related entities in your software catalog, providing richer context for AI instructions management. Additionally, we explicitly add `run_run_claude_code` to the tools, which instructs the AI agent to call this specific action to update AGENTS.md files in repositories.
200+
:::
201+
201202
5. Click `Create` to save the agent.
202203

203204
</TabItem>
@@ -217,24 +218,25 @@ Before setting up the automation, we need to create an AI agent that will handle
217218
"identifier": "ai_instructions_manager",
218219
"title": "AI Instructions Manager",
219220
"icon": "Github",
220-
"team": [],
221221
"properties": {
222-
"description": "AI agent that manages coding rules and instructions via GitHub Copilot",
222+
"description": "AI agent that manages the AGENTS.md file in repositories via Github Copilot",
223223
"status": "active",
224-
"allowed_blueprints": [
225-
"service"
226-
],
227-
"allowed_actions": [
228-
"create_github_issue"
229-
],
230-
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories.\n\nWhen you invoke the `create_github_issue` action:\n1. Set the `title` to: 'Update AGENTS.md with latest AI instructions from Port'.\n2. Always include the following labels: ['ai-instructions', 'auto_assign'].\n3. Set the `body` to include **explicit task instructions** for GitHub Copilot, followed by the new Markdown content. Use this template:\n\n---\n## Task for Copilot\nUpdate the `AGENTS.md` file at the root of the repository. Replace its contents entirely with the Markdown provided below. Commit the change on a new branch and open a pull request with:\n- Title: 'chore: sync AGENTS.md from Port'\n- Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\n## New AGENTS.md Content\nMARKDOWN START\n<the full Markdown provided from Port>\nMARKDOWN END\n---\n\nDo not ask for clarification. Always assume the Markdown from Port is final. The issue body above is the full instruction for Copilot.",
231-
"execution_mode": "Automatic"
224+
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories. You do so by invoking the `create_github_issue` self-service action, which triggers GitHub Copilot to work on the request.\n\nWhen you invoke the `create_github_issue` self-service action:\n1. Set the `title` to: 'Update AGENTS.md with latest AI instructions from Port'.\n2. Always include the following labels: ['ai-instructions', 'auto_assign'].\n3. Set the `body` to include **explicit task instructions** for GitHub Copilot, followed by the new Markdown content. Use this template:\n\n---\n## Task for Copilot\nUpdate the `AGENTS.md` file at the root of the repository. Replace its contents entirely with the Markdown provided below. Commit the change on a new branch and open a pull request with:\n- Title: 'chore: sync AGENTS.md from Port'\n- Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\n## New AGENTS.md Content\nMARKDOWN START\n<the full Markdown provided from Port>\nMARKDOWN END\n---\n\nDo not ask for clarification. Always assume the Markdown from Port is final. The issue body above is the full instruction for Copilot.",
225+
"execution_mode": "Automatic",
226+
"tools": [
227+
"^(list|get|search|track|describe)_.*",
228+
"run_create_github_issue"
229+
]
232230
},
233231
"relations": {}
234232
}
235233
```
236234
</details>
237235

236+
:::tip MCP Enhanced Capabilities
237+
The AI agent uses MCP (Model Context Protocol) enhanced capabilities to automatically discover important and relevant blueprint entities via its tools. The `^(list|get|search|track|describe)_.*` pattern allows the agent to access and analyze related entities in your software catalog, providing richer context for AI instructions management. Additionally, we explicitly add `run_create_github_issue` to the tools, which instructs the AI agent to call this specific action to create GitHub issues for AGENTS.md updates.
238+
:::
239+
238240
5. Click `Create` to save the agent.
239241

240242
</TabItem>
@@ -254,24 +256,25 @@ Before setting up the automation, we need to create an AI agent that will handle
254256
"identifier": "ai_instructions_manager",
255257
"title": "AI Instructions Manager",
256258
"icon": "Code",
257-
"team": [],
258259
"properties": {
259260
"description": "AI agent that manages the AGENTS.md file in repositories via Google Gemini",
260261
"status": "active",
261-
"allowed_blueprints": [
262-
"service"
263-
],
264-
"allowed_actions": [
265-
"trigger_gemini_assistant"
266-
],
267-
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories.\n\nWhen you invoke the `trigger_gemini_assistant` action:\n1. Set `repo_name` to the target repository.\n2. Construct the `prompt` so it includes the full new AGENTS.md Markdown provided by Port, not just a placeholder reference. The prompt must:\n - Clearly instruct Gemini to replace the contents of `AGENTS.md` at the root of the repository.\n - Include the full Markdown text from Port inside a fenced code block.\n - End with instructions to commit on a new branch and open a PR with:\n - Title: 'chore: sync AGENTS.md from Port'\n - Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\nExample `prompt` format:\n\n```\nPlease update the repository by creating or replacing the AGENTS.md file at the root with the following content:\n\n```markdown\n<the full Markdown instructions provided by Port go here>\n```\n\nCommit this change on a new branch and open a pull request titled: 'chore: sync AGENTS.md from Port' with description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n```\n\nAlways embed the actual Markdown content directly. Never leave it as a placeholder or a reference.",
268-
"execution_mode": "Automatic"
262+
"prompt": "You are an AI agent responsible for keeping the AGENTS.md file up to date in GitHub repositories. You do so by invoking the `trigger_gemini_assistant` self-service action, which triggers Google Gemini to work on the request.\n\nWhen you invoke the `trigger_gemini_assistant` self-service action:\n1. Set `repo_name` to the target repository.\n2. Construct the `prompt` so it includes the full new AGENTS.md Markdown provided by Port, not just a placeholder reference. The prompt must:\n - Clearly instruct Gemini to replace the contents of `AGENTS.md` at the root of the repository.\n - Include the full Markdown text from Port inside a fenced code block.\n - End with instructions to commit on a new branch and open a PR with:\n - Title: 'chore: sync AGENTS.md from Port'\n - Description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n\nExample `prompt` format:\n\n```\nPlease update the repository by creating or replacing the AGENTS.md file at the root with the following content:\n\n```markdown\n<the full Markdown instructions provided by Port go here>\n```\n\nCommit this change on a new branch and open a pull request titled: 'chore: sync AGENTS.md from Port' with description: 'This PR updates AGENTS.md based on the latest instructions from Port.'\n```\n\nAlways embed the actual Markdown content directly. Never leave it as a placeholder or a reference.",
263+
"execution_mode": "Automatic",
264+
"tools": [
265+
"^(list|get|search|track|describe)_.*",
266+
"run_trigger_gemini_assistant"
267+
]
269268
},
270269
"relations": {}
271270
}
272271
```
273272
</details>
274273

274+
:::tip MCP Enhanced Capabilities
275+
The AI agent uses MCP (Model Context Protocol) enhanced capabilities to automatically discover important and relevant blueprint entities via its tools. The `^(list|get|search|track|describe)_.*` pattern allows the agent to access and analyze related entities in your software catalog, providing richer context for AI instructions management. Additionally, we explicitly add `run_trigger_gemini_assistant` to the tools, which instructs the AI agent to call this specific action to trigger Gemini for AGENTS.md updates.
276+
:::
277+
275278
5. Click `Create` to save the agent.
276279

277280
</TabItem>

0 commit comments

Comments
 (0)