Skip to content

Expand language ecosystem inference for network.allowed in create-agentic-workflow prompt#18271

Merged
pelikhan merged 2 commits intomainfrom
copilot/expand-language-inference-network
Feb 25, 2026
Merged

Expand language ecosystem inference for network.allowed in create-agentic-workflow prompt#18271
pelikhan merged 2 commits intomainfrom
copilot/expand-language-inference-network

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

The create-agentic-workflow prompt was telling agents to ask the user about network.allowed configuration, and its ecosystem-to-file indicator mappings lacked explicit domain names and some common indicators (.nvmrc, setup.cfg, uv.lock).

Changes

  • Auto-infer instead of ask: Changed "explicitly ask about configuring network: allowlist" to "automatically infer from repository language files; only ask if context is insufficient"
  • Explicit domain mappings: Each ecosystem entry now shows which registries are enabled, so agents understand what they're allowing:
    • node → enables registry.npmjs.org
    • python → enables pypi.org, files.pythonhosted.org
    • go → enables proxy.golang.org, sum.golang.org
    • ruby → enables rubygems.org
  • Expanded file indicators:
    • Node.js: added .nvmrc
    • Python: added setup.cfg, uv.lock
  • Both the detailed guidance section and the quick-reference checklist section were updated consistently

Example

A workflow for a Python repo with pyproject.toml should now automatically produce:

network:
  allowed:
    - defaults
    - python   # pypi.org, files.pythonhosted.org

without requiring the user to mention the stack.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Expand language ecosystem inference for network.allowed in create-agentic-workflow prompt</issue_title>
<issue_description>## Objective

Improve language/ecosystem inference in the create-agentic-workflow prompt so the agent automatically adds the correct package registry domains to network.allowed based on detected stack indicators, without requiring explicit user prompting.

Context

From Agent Persona Exploration discussion github/gh-aw#18250, the agent sometimes needs explicit prompting to add the right ecosystem to network.allowed (e.g., registry.npmjs.org for Node, pypi.org for Python, proxy.golang.org for Go). It relies on the user mentioning the stack rather than inferring it from context clues.

Approach

  1. Locate the create-agentic-workflow prompt/skill
  2. Expand the language indicator list with explicit mappings:
    • Node.js / npm: detect package.json, .nvmrc, node_modulesregistry.npmjs.org
    • Python / pip: detect requirements.txt, pyproject.toml, setup.pypypi.org, files.pythonhosted.org
    • Go: detect go.mod, go.sumproxy.golang.org, sum.golang.org
    • Ruby: detect Gemfilerubygems.org
  3. Add prompt guidance: "If running tests or installing packages, infer the ecosystem from the repository's language files and add the appropriate registries to network.allowed"
  4. This complements the existing network permission guidance

Files to Modify

  • Update: the create-agentic-workflow prompt/skill with expanded language inference indicators

Acceptance Criteria

  • Prompt includes explicit ecosystem → network domain mappings
  • Agent infers package registry from repo language indicators without user prompting
  • Agent correctly suggests network.allowed entries for all major ecosystems (Node, Python, Go, Ruby)

Generated by Plan Command for issue #discussion #18250

  • expires on Feb 27, 2026, 4:46 AM UTC

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…te-agentic-workflow prompt

- Update guidance to automatically infer network ecosystem from repository
  language files rather than asking the user
- Add .nvmrc to Node.js file indicators
- Add setup.cfg and uv.lock to Python file indicators
- Add explicit domain names to each ecosystem entry so agents know what
  registries are being enabled (registry.npmjs.org, pypi.org,
  files.pythonhosted.org, proxy.golang.org, sum.golang.org, rubygems.org)
- Update both the detailed section (~line 200) and quick-ref section (~line 586)

Fixes #discussion #18250

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve language ecosystem inference for allowed network Expand language ecosystem inference for network.allowed in create-agentic-workflow prompt Feb 25, 2026
@pelikhan pelikhan marked this pull request as ready for review February 25, 2026 05:38
Copilot AI review requested due to automatic review settings February 25, 2026 05:38
@pelikhan pelikhan merged commit a916278 into main Feb 25, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/expand-language-inference-network branch February 25, 2026 05:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the create-agentic-workflow authoring prompt to have agents infer network.allowed ecosystem entries from repository file indicators (instead of prompting the user), and expands the indicator lists with more common language/tooling files plus clearer registry/domain guidance.

Changes:

  • Switches guidance from “ask the user about network: allowlist” to “infer ecosystem from repo files; only ask if insufficient context”.
  • Adds explicit ecosystem → registry/domain notes for Node, Python, Go, and Ruby.
  • Expands language indicator lists (e.g., .nvmrc, setup.cfg, uv.lock) in both the detailed guidance and the quick-reference checklist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +202 to +206
- `requirements.txt`, `pyproject.toml`, `setup.py`, `setup.cfg`, `Pipfile`, `uv.lock` → add `python` (enables `pypi.org`, `files.pythonhosted.org` for pip/conda)
- `package.json`, `.nvmrc`, `yarn.lock`, `pnpm-lock.yaml` → add `node` (enables `registry.npmjs.org` for npm/yarn/pnpm)
- `go.mod`, `go.sum` → add `go` (enables `proxy.golang.org`, `sum.golang.org` for go module downloads)
- `pom.xml`, `build.gradle`, `build.gradle.kts` → add `java` (for Maven/Gradle)
- `Gemfile`, `*.gemspec` → add `ruby` (for Bundler/RubyGems)
- `Gemfile`, `*.gemspec` → add `ruby` (enables `rubygems.org` for Bundler/RubyGems)
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added domain callouts look incomplete/inaccurate compared to the canonical ecosystem/domain mapping in .github/aw/github-agentic-workflows.md (see table around lines 1528-1537). In particular, python mentions “pip/conda” but only lists PyPI domains (conda uses conda.anaconda.org, etc.), and node/go/ruby omit other key domains listed there. Suggest either (a) switch these parentheticals to “e.g.” and avoid implying exhaustiveness, and/or (b) align the listed domains with the table (including conda/yarn/pkg.go.dev where appropriate).

See below for a potential fix:

     - `requirements.txt`, `pyproject.toml`, `setup.py`, `setup.cfg`, `Pipfile`, `uv.lock` → add `python` (enables package indexes for pip/conda, e.g., `pypi.org`, `files.pythonhosted.org`, `conda.anaconda.org`)
     - `package.json`, `.nvmrc`, `yarn.lock`, `pnpm-lock.yaml` → add `node` (enables npm ecosystem registries, e.g., `registry.npmjs.org`, `registry.yarnpkg.com` for npm/yarn/pnpm)
     - `go.mod`, `go.sum` → add `go` (enables Go module endpoints, e.g., `proxy.golang.org`, `sum.golang.org`, `pkg.go.dev` for module downloads)
     - `pom.xml`, `build.gradle`, `build.gradle.kts` → add `java` (for Maven/Gradle)
     - `Gemfile`, `*.gemspec` → add `ruby` (enables RubyGems endpoints, e.g., `rubygems.org` for Bundler/RubyGems)

Copilot uses AI. Check for mistakes.
Comment on lines +588 to +592
- `requirements.txt`/`pyproject.toml`/`setup.py`/`uv.lock` → `network: { allowed: [defaults, python] }` (enables `pypi.org`, `files.pythonhosted.org`)
- `package.json`/`.nvmrc`/`yarn.lock` → `network: { allowed: [defaults, node] }` (enables `registry.npmjs.org`)
- `go.mod`/`go.sum` → `network: { allowed: [defaults, go] }` (enables `proxy.golang.org`, `sum.golang.org`)
- `pom.xml`/`build.gradle` → `network: { allowed: [defaults, java] }` (Maven/Gradle)
- `Gemfile` → `network: { allowed: [defaults, ruby] }` (Bundler)
- `Gemfile`/`*.gemspec` → `network: { allowed: [defaults, ruby] }` (enables `rubygems.org`)
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This quick-reference indicator list is now inconsistent with the earlier “Key indicators” list above: it adds uv.lock but omits setup.cfg, and it adds .nvmrc but omits pnpm-lock.yaml (and Pipfile / *.gemspec consistency is mixed). If the intent is to keep both sections aligned (as described in the PR), consider updating this checklist list to match the indicators you just added earlier.

See below for a potential fix:

     - `requirements.txt`/`pyproject.toml`/`setup.py`/`setup.cfg`/`Pipfile` → `network: { allowed: [defaults, python] }` (enables `pypi.org`, `files.pythonhosted.org`)
     - `package.json`/`pnpm-lock.yaml`/`yarn.lock` → `network: { allowed: [defaults, node] }` (enables `registry.npmjs.org`)
     - `go.mod`/`go.sum` → `network: { allowed: [defaults, go] }` (enables `proxy.golang.org`, `sum.golang.org`)
     - `pom.xml`/`build.gradle` → `network: { allowed: [defaults, java] }` (Maven/Gradle)
     - `Gemfile` → `network: { allowed: [defaults, ruby] }` (enables `rubygems.org`)

Copilot uses AI. Check for mistakes.
@@ -196,14 +196,14 @@ These resources contain workflow patterns, best practices, safe outputs, and per
- What should trigger the workflow (`on:` — e.g., issues, pull requests, schedule, slash command)?
- What should the agent do (comment, triage, create PR, fetch API data, etc.)?
- If the user says “campaign”, “KPI”, “pacing”, “cadence”, or “stop-after”, consult `.github/aw/campaign.md` (it’s still an agentic workflow; this is just a pattern).
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List indentation appears inconsistent here (- bullets at 196-198 vs the newly added bullets starting at 199). The extra leading space before - ⚠️ ... (and subsequent bullets) may render as a deeper nested list level in some Markdown parsers. Suggest normalizing indentation so all bullets under “Interact and Clarify” are at the same nesting level.

Suggested change
- If the user says “campaign”, “KPI”, “pacing”, “cadence”, or “stop-after”, consult `.github/aw/campaign.md` (it’s still an agentic workflow; this is just a pattern).
- If the user says “campaign”, “KPI”, “pacing”, “cadence”, or “stop-after”, consult `.github/aw/campaign.md` (it’s still an agentic workflow; this is just a pattern).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Expand language ecosystem inference for network.allowed in create-agentic-workflow prompt

3 participants