This document explains the relationship between GitHub Next's Agentic Workflows research project and the Coding Context CLI tool, and how they complement each other in the broader AI-powered software development ecosystem.
GitHub Next's Agentic Workflows is a research initiative exploring how AI agents can autonomously execute multi-step workflows using GitHub's infrastructure. The key concepts include:
- Autonomous Execution: AI agents can define, plan, and execute complex multi-step workflows without continuous human intervention
- GitHub Actions Integration: Leverages GitHub Actions as the execution environment for agent-driven tasks
- Tool Coordination: Agents orchestrate multiple tools, APIs, and services to accomplish goals
- Context-Aware Decision Making: Agents make decisions based on repository state, code changes, test results, and other contextual information
- Iterative Refinement: Agents can observe outcomes and adjust their approach dynamically
The Coding Context CLI serves as a context preparation and assembly tool that complements agentic workflows by addressing a critical challenge: providing rich, relevant context to AI agents.
AI agents need comprehensive context to make informed decisions:
- Project-specific coding standards and conventions
- Repository structure and architecture
- Technology stack and dependencies
- Team practices and guidelines
- Task-specific requirements and constraints
Manually assembling this context for each task is tedious and error-prone. This is where Coding Context CLI excels.
┌─────────────────────────────────────────────────────────────────┐
│ Agentic Workflow Ecosystem │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌─────────────────────┐ │
│ │ Context Layer │────────▶│ Execution Layer │ │
│ ├──────────────────┤ ├─────────────────────┤ │
│ │ │ │ │ │
│ │ Coding Context │ │ GitHub Actions │ │
│ │ CLI │ │ (Agentic Workflows)│ │
│ │ │ │ │ │
│ │ • Rules │ │ • Workflow def │ │
│ │ • Guidelines │ │ • Step execution │ │
│ │ • Tasks │ │ • Tool calling │ │
│ │ • Parameters │ │ • State mgmt │ │
│ └──────────────────┘ └─────────────────────┘ │
│ │ │ │
│ │ │ │
│ └──────────────┬───────────────┘ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ AI Agent │ │
│ │ (Claude, GPT, │ │
│ │ Gemini, etc.) │ │
│ └─────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
| Aspect | Coding Context CLI | Agentic Workflows |
|---|---|---|
| Purpose | Context preparation | Workflow execution |
| When | Before agent invocation | During task execution |
| What | Assembles rules, guidelines, task prompts | Orchestrates multi-step processes |
| Where | Runs locally or in CI/CD | Runs in GitHub Actions |
| Output | Formatted context for AI models | Completed tasks, PRs, updates |
Use Coding Context CLI to prepare context before initiating an agentic workflow:
# .github/workflows/agentic-code-review.yml
name: Agentic Code Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Assemble Context
run: |
coding-context-cli \
-s task=code-review \
-p pr_number=${{ github.event.pull_request.number }} \
code-review > context.txt
- name: Execute AI Review
uses: github/agent-action@v1
with:
context-file: context.txt
task: review-pull-requestAgents can invoke Coding Context CLI during workflow execution to get task-specific context:
# .github/workflows/agentic-bugfix.yml
name: Agentic Bug Fix
on:
issues:
types: [labeled]
jobs:
fix-bug:
if: contains(github.event.issue.labels.*.name, 'bug')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Bug Context
id: context
run: |
coding-context-cli \
-s severity=${{ github.event.issue.labels[0].name }} \
-p issue_number=${{ github.event.issue.number }} \
fix-bug > context.txt
- name: Agent Fix Bug
uses: github/agent-action@v1
with:
context-file: context.txt
task: implement-fixComplex workflows can use different context assemblies for different stages:
# .github/workflows/agentic-feature.yml
name: Agentic Feature Development
on: workflow_dispatch
jobs:
plan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Planning Context
run: coding-context-cli -s stage=planning plan-feature > plan-context.txt
- name: Create Plan
uses: github/agent-action@v1
with:
context-file: plan-context.txt
implement:
needs: plan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Implementation Context
run: coding-context-cli -s stage=implementation implement-feature > impl-context.txt
- name: Implement Feature
uses: github/agent-action@v1
with:
context-file: impl-context.txt
test:
needs: implement
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Testing Context
run: coding-context-cli -s stage=testing test-feature > test-context.txt
- name: Run Tests
uses: github/agent-action@v1
with:
context-file: test-context.txtStore your .agents/rules and .agents/tasks in version control alongside your code:
.agents/
├── rules/
│ ├── coding-standards.md
│ ├── architecture.md
│ ├── testing.md
│ └── security.md
└── tasks/
├── code-review.md
├── fix-bug.md
├── implement-feature.md
└── refactor.md
Leverage frontmatter selectors to provide precise context:
---
task_name: fix-bug
severity: critical
language: go
---
# Critical Bug Fix Guidelines
When fixing critical bugs:
- Prioritize data integrity
- Add regression tests
- Document the root causeUse parameters to inject runtime information:
---
task_name: review-pr
---
# Pull Request Review: #${pr_number}
Review the following pull request with focus on:
- Code quality
- Test coverage
- Security implications
PR: ${pr_url}Use bootstrap scripts to fetch real-time information:
#!/bin/bash
# .agents/rules/jira-bootstrap
# Fetch issue details from Jira
curl -s "https://jira.example.com/api/issue/${JIRA_ISSUE}" \
| jq -r '.fields.description' \
> /tmp/jira-context.txtStructure rules to match your workflow stages:
.agents/rules/
├── planning/
│ ├── requirements.md
│ └── architecture-decisions.md
├── implementation/
│ ├── coding-standards.md
│ └── api-guidelines.md
└── validation/
├── testing-requirements.md
└── code-review-checklist.md
The Coding Context CLI already supports GitHub Copilot's configuration format:
.github/copilot-instructions.md- Global instructions for Copilot.github/agents/*.md- Agent-specific configurations
This allows seamless integration with GitHub's official AI tooling:
.github/
├── copilot-instructions.md # Shared instructions
├── agents/
│ ├── code-review-agent.md # Code review agent config
│ ├── testing-agent.md # Testing agent config
│ └── documentation-agent.md # Docs agent config
└── workflows/
└── agentic-*.yml # Workflow definitions
As agentic workflows evolve, this tool could be extended to:
- Workflow Context Injection: Automatically inject workflow state into context
- Agent Memory: Persist and retrieve context across workflow runs
- Context Validation: Validate that assembled context meets agent requirements
- Dynamic Rule Selection: Use AI to select relevant rules based on task analysis
- Feedback Loop: Learn from workflow outcomes to improve context assembly
The Coding Context CLI and GitHub's Agentic Workflows are complementary technologies:
- Coding Context CLI ensures agents have the right information (context)
- Agentic Workflows ensure agents can act on that information (execution)
Together, they enable sophisticated, autonomous software development workflows where AI agents can understand project requirements, follow team conventions, and execute complex tasks with minimal human intervention.
By investing in well-structured context rules and task definitions, teams can build a foundation for increasingly capable agentic workflows that leverage institutional knowledge and best practices encoded in the repository.