Skip to content

Add guarded Android coding and PR dynamic workflow, Fixes AB#3800277 - #482

Open
Shahzaib (shahzaibj) wants to merge 61 commits into
masterfrom
shjameel-microsoft-feat-coding-workflow
Open

Shahzaib (shahzaibj) wants to merge 61 commits into
masterfrom
shjameel-microsoft-feat-coding-workflow

Conversation

@shahzaibj

Copy link
Copy Markdown
Contributor

Adds a standalone, repository-scoped Copilot Dynamic Workflow (code-feature) under .github/extensions/CodeFeature/ for Android coding and pull request creation, modeled after .github/extensions/DevDesignDoc (design-feature).

Related to AB#3800277 and parent feature AB#3797944.

Approach

  • Register .github/extensions/CodeFeature/extension.mjs with workflow name code-feature and role-scoped custom agents (code-evidence, code-builder, and read-only code-reviewer).
  • Validate revision-bound task approval, requirements, target repository metadata, and AB#<id> work-item linkage; gather repository evidence with revisions and facts before coding.
  • Run code-builder to produce the implementation, unit tests, requirement-to-file/test traceability, and PR metadata.
  • Loop with code-reviewer across up to 3 fix iterations max (fix-1..3): run deterministic structural/diff/workspace checks and an independent 9-point rubric review on each round, returning structured findings to code-builder until zero findings remain (or halting with NO-GO and restoring modified workspace files if 3 fix iterations are exhausted).
  • Prepare or create verified target pull requests (Fixes AB#<id>, requirements traceability table, unit test plan, compatibility and rollout notes) only after all deterministic checks and independent review criteria pass.

Checks

  • node --check .github/extensions/CodeFeature/extension.mjs and node --check .github/extensions/CodeFeature/workflow.mjs passed.
  • All 10 focused Node unit tests in .github/extensions/CodeFeature/workflow.test.mjs passed (plus all 15 DevDesignDoc tests).
  • Verified live extension discovery (project:CodeFeature status running) and zero-agent validation in the Copilot SDK runtime.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shahzaibj
Shahzaib (shahzaibj) requested a review from a team as a code owner October 29, 2026 18:59
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Shahzaib (shahzaibj) and others added 8 commits October 29, 2026 13:52
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…iew skills

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n code-feature

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…redits cap

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…imits

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tree

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ications

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 18 commits October 30, 2026 11:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tance criteria

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n prompt mode

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…seudo-conflicts

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…e unavailable

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…cation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ktrees

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…skill

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nd worktree snapshot guards

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…-observer workflow

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tus blocks, and observer anti-loop

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…d GHE PR rules from E2E log

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rge/changelog rules from past sessions

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… in SKILL.md

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… roles

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… code-feature

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… repo inference

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shahzaib (shahzaibj) and others added 8 commits October 30, 2026 22:22
… normalizeTask

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ons volatile for resume

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ktree sessions

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… PR creation for Authenticator

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…pr-observer

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…DO PR snapshots

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n observer.mjs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
tools: ['view', 'glob', 'grep', 'skill']
---

# Code Feature Evidence Worker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What function does this serve? Isn't this same as codebease-researcher?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question — while code-evidence uses .github/skills/codebase-researcher/SKILL.md for its search discipline, it serves a different contract than the interactive codebase-researcher agent:

  1. Structured Intake & Spec Extraction (slimIntakeSchema / �videnceSchema): Unlike codebase-researcher (which returns freeform markdown prose for a human reader), code-evidence is the Stage 1 intake worker of code-feature: it turns a Design Doc, ADO PBI, or free-form prompt into a normalized �erdict (
    eady / clarify /
    eject), target repository, base branch, extracted requirements, verification commands, and plain-language clarification questions.
  2. Programmatic Tool Lock (infer: false): In workflow.mjs, code-evidence is registered with infer: false and ools: ['view', 'glob', 'grep', 'skill'] so the dynamic workflow runtime enforces read-only access and structured JSON output during Stage 1.

That said, if you'd prefer we consolidate them or rename it, we can!

Comment thread .github/agents/code-evidence.agent.md Resolved
Comment thread .github/agents/code-evidence.agent.md Resolved
…rpts

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread .github/agents/code-reviewer.agent.md Outdated
## Review Rules & Boundaries

- You are strictly read-only: use `view`, `glob`, `grep`, and `skill` to inspect the target worktree. Never edit files, run fixers, commit, push, or post PR comments directly.
- Apply the 9-point fixed rubric (`approvedScopeAndRequirements`, `architectureAndApiCompatibility`, `correctnessAndEdgeCases`, `concurrencyAndThreadSafety`, `securityPrivacyAndLogging`, `performanceAndResourceBounds`, `telemetryAndObservability`, `unitTestsAndVerification`, `prReadinessAndTraceability`).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What is this rubric? Where defined?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is defined in .github/extensions/CodeFeature/workflow.mjs (�xport const rubric = Object.freeze([...]), lines 66–76), and enforced structurally when slimSchemas: false (via
eviewSchema + �alidateReview) and as the 9 review dimensions in slimReviewSchema mode.

In 9707c43, I updated code-reviewer.agent.md to explicitly cite .github/extensions/CodeFeature/workflow.mjs (�xport const rubric) and spell out what each of the 9 dimensions checks right here in the agent file so it's self-contained.

Comment thread .github/agents/code-reviewer.agent.md Outdated
Comment on lines +28 to +29
- `common/.github/skills/code-review/SKILL.md`
- `broker/.github/skills/code-review/SKILL.md`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

are these strictly read by our agent?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes — in workflow.mjs,
esolveRoleSkillGuides('reviewer', task.targets) selects the exact list of files from SKILL_GUIDES.reviewer[repo] for the target repo (common, �roker, msal, �dal, or �uthenticator) and prepends to the code-reviewer prompt:

Read and apply these repository code-review guides: .`n
And because code-reviewer has ools: ['view', 'glob', 'grep', 'skill'], we verified in the E2E runs (7487e9e7 on �roker and 342b0e7d on �uthenticator) that the code-reviewer subagent calls �iew on those exact files at the start of its turn before reviewing the diff. Updated the section header in 9707c43 to note how
esolveRoleSkillGuides injects them per target repo.

Shahzaib (shahzaibj) and others added 16 commits October 31, 2026 12:52
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ee checkouts

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…reaper

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…-config edits

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…et only

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ee mode

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… snapshot

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…equired metadata

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…dle workers

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… PBI

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…se subagent cap

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…without pausing

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ile androidTest only)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…xtract PR ID safely

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

2 participants