Skip to content

Add guided Requirements Builder canvas (Fixes AB#3822851) - #496

Merged
moumighosh merged 5 commits into
masterfrom
moumighosh-requirements-builder-canvas
Nov 16, 2026
Merged

moumighosh merged 5 commits into
masterfrom
moumighosh-requirements-builder-canvas

Conversation

@moumighosh

@moumighosh moumighosh commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Why a shared canvas

Add a team-shared GitHub Copilot repository canvas extension, not a hosted website. The canvas uses Copilot's extension SDK and current-session conversation admission, with local loopback rendering and private session-workspace storage. Keeping the implementation in the repository makes the guided experience discoverable and versioned alongside the existing version-3 requirements template without a hosted service or new package dependencies.

Behavior and boundaries

  • Five guided steps (Outcome, Scope, Journeys, Constraints, Review), with per-question guidance/examples, human answers, explicit Unknown and N/A-with-reason, and editable tables.
  • Private autosave and resume for the same document ID in the same Copilot session; revision checks and exclusive draft locks surface conflicting writes.
  • Explicit per-question assistance through session.send. Proposals remain separate from confirmed answers until a human accepts them; rejection, cancellation and stale-reply checks preserve human edits.
  • Immutable mandatory accessibility baselines, visible gaps, and escaped Markdown preview/export preserving template sections and columns. Export remains a Draft, not approval.
  • Loopback-only rendering with per-panel authorization, Host/Origin validation, bounded input and restrictive page policy. Transient tokens are not persisted in drafts.

No cross-session draft library, link inspection/import, automatic full-document AI generation, publishing to GitHub/ADO, work-item creation, or design/planning/implementation workflow start. Supplied links are not inspected evidence. Human review is required for semantic correctness, completeness and accessibility.

Focused scope

Cherry-picked only 9234b75347f8314b25f3c841179927b88540e9ee, retaining its Copilot App co-author trailer, onto a fresh branch based on master. The complete diff contains exactly nine files in .github/extensions/RequirementsBuilder/ plus the root README discovery paragraph: 10 files, 1,277 insertions. No Android/nested-repository changes, private illustrative drafts, demo exports, screenshots or transient HTTP tokens are included.

Validation

Rerun in this isolated worktree:

node --test .github\extensions\RequirementsBuilder\builder.test.mjs
node --check .github\extensions\RequirementsBuilder\extension.mjs
node --check .github\extensions\RequirementsBuilder\model.mjs
node --check .github\extensions\RequirementsBuilder\store.mjs
node --check .github\extensions\RequirementsBuilder\server.mjs
node --check .github\extensions\RequirementsBuilder\app.js
node --check .github\extensions\RequirementsBuilder\builder.test.mjs
git diff --check
git diff --check origin/master...HEAD
git diff --name-only origin/master...HEAD

Results: 25 tests passed; zero failed, skipped or cancelled. All six module syntax checks passed. Whitespace checks passed, and the complete branch diff matches the 10-file scope above.

The coordinating session additionally reported actual runtime loading and browser verification of save/resume, AI admission/propose/accept/reject, immediate stale warnings and disabled Accept while preserving input focus, table editing, non-UI applicability, and exact privately persisted Markdown export. Those interactive checks were not independently rerun in this publication worktree. Automated tests use a mocked conversation sender; no paid semantic-quality evaluation or formal accessibility audit was performed. Android builds are outside this extension-only scope.

Human review and tracking

Fixes AB#3822851

Tracking PBI: 3822851 - Add shared Requirements Builder canvas, under Android Client Software Factory, Feature 3797944. The PBI has a genuine Azure Boards GitHub pull-request artifact link to this PR.

This PR is ready for human review, not a claim of merge readiness. Required checks and human approval still apply; tracking linkage does not bypass them. Completing the tracking PBI is not deployment or rollout approval. This PR does not modify the previous merged PR or enable automatic merge.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@moumighosh
moumighosh requested a review from a team as a code owner November 14, 2026 03:05
@azure-pipelines

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

@github-actions

Copy link
Copy Markdown

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@moumighosh moumighosh changed the title Add guided Requirements Builder canvas Add guided Requirements Builder canvas (Fixes AB#3822851) Nov 14, 2026
@github-actions

Copy link
Copy Markdown

✅ Work item link check complete. Description contains link AB#3822851 to an Azure Boards work item.

…caping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
try {
for (const [key, change] of pending) {
state = await api("/update", { revision: state.draft.revision, change });
if (pending.get(key) === change) pending.delete(key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can lose edits if someone keeps typing while a save is in flight.

If the same field changes during the await, the newer change stays in pending, but this loop doesn't revisit that key. perform() then continues into the action, which can rerender the editor from the older saved answer.

I reproduced this by holding one save response, clicking Ask AI, and typing a newer answer before releasing the response. After autosave settled, the editor showed the older text even though the newer text was saved, and the UI reported "Saved". Continuing to type in that editor then overwrote the newer saved answer, with no error.

Could we make sure the pending edits are fully drained before proceeding, and preserve any input entered while the action itself is awaiting a response? A browser regression test that types into the same field during an in-flight save would help cover this.

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.

Copilot , can you assess this comment if we should address it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes—this is actionable because a newer local edit can be persisted while the editor is rerendered from an older response. Fixed in 662f925: saves now drain all pending edits, and action responses retain the latest pending input.

if (!Object.hasOwn(draft.metadata, key) || typeof value !== "string" || value.length > 20000) throw new Error("Invalid metadata.");
if (key === "uiKind" && !["unknown", "authenticator", "other-ui", "non-ui"].includes(value)) throw new Error("Invalid UI applicability.");
}
Object.assign(draft.metadata, change.metadata);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we also revalidate the existing accessibility answer when uiKind changes? Right now the N/A check only runs when the answer itself is submitted, so the order of filling out the form changes what is allowed.

For example:

  1. Leave applicability as Not sure yet.
  2. Mark the accessibility section N/A with a reason.
  3. Change applicability to New or changed Authenticator UI.

I verified that the earlier N/A answer survives this transition. The exported accessibility table still says N/A, the detailed mandatory baselines (including the 48dp touch-target requirement) disappear, and the section isn't listed as an unresolved gap. Submitting the same N/A answer after selecting Authenticator correctly fails.

When switching to Authenticator UI, we should flag the incompatible N/A answer for the author to resolve and retain the mandatory baselines, without inventing feature-specific answers. A regression test covering this applicability transition would help keep the requirement consistent.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prior accessibility N/A answers now become Unknown when applicability changes to Authenticator UI. This exposes the gap while restoring mandatory baselines and leaving feature-specific requirements unresolved. Added a transition regression test in 87937eb.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@moumighosh
moumighosh merged commit d488707 into master Nov 16, 2026
5 checks passed
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.

4 participants