Skip to content

feat(agents): security-planner SSSC parity (stacked on PR A and #1497)#1642

Open
WilliamBerryiii wants to merge 23 commits into
stack/security-state-schemafrom
stack/security-planner-parity
Open

feat(agents): security-planner SSSC parity (stacked on PR A and #1497)#1642
WilliamBerryiii wants to merge 23 commits into
stack/security-state-schemafrom
stack/security-planner-parity

Conversation

@WilliamBerryiii
Copy link
Copy Markdown
Member

@WilliamBerryiii WilliamBerryiii commented May 24, 2026

Summary

Brings the security-planner agent, its supporting instructions, and the shared RAI capture-coaching guidance up to the same phase-gate, state, and question-cadence parity established by the sssc-planner work in PR #1497. Bundles the planner-startup, cadence Rule 5 ordering, risk-grid grammar, and state-schema test suites that guard those conventions going forward.

Stacking

Changes

Modified (10):

  • .github/agents/security/security-planner.agent.md
  • .github/instructions/security/identity.instructions.md
  • .github/instructions/security/security-model.instructions.md
  • .github/instructions/security/backlog-handoff.instructions.md
  • .github/instructions/rai-planning/rai-capture-coaching.instructions.md
  • .github/prompts/security/security-capture.prompt.md
  • .github/prompts/security/security-plan-from-prd.prompt.md
  • plugins/hve-core-all/README.md (auto-regen)
  • plugins/project-planning/README.md (auto-regen)
  • plugins/security/README.md (auto-regen)

Added (5 Pester suites):

  • scripts/tests/linting/Test-PlannerStateSchema.Tests.ps1 — 8 tests
  • scripts/tests/linting/Test-PlannerStateSchemas.Tests.ps1 — 4 tests
  • scripts/tests/linting/Test-CadenceRule5Ordering.Tests.ps1 — 2 tests
  • scripts/tests/linting/Test-PlannerStartupBlocks.Tests.ps1 — 6 tests
  • scripts/tests/linting/Test-RiskGridGrammar.Tests.ps1 — 7 tests

Validation

Check Result
npm run plugin:validate ✅ 13 collections
npm run lint:md ✅ 211 files, 0 errors
npm run lint:frontmatter ✅ 541 files, 0 errors
npm run lint:md-links
npm run lint:ps
Test-PlannerStateSchema ✅ 8/8
Test-PlannerStateSchemas ✅ 4/4
Test-CadenceRule5Ordering ✅ 2/2
Test-PlannerStartupBlocks ✅ 6/6
Test-RiskGridGrammar ✅ 7/7

Notes for Reviewers

  1. disclaimerShownAt: null in identity state schema — Adds one line to the inline state schema in identity.instructions.md so the canonical state shape declares the field with a default. Full Disclaimer/Attribution Protocol prose that consumes the field remains in PR C (feat(instructions)!: disclaimer SSOT migration (stacked on #1497) #1639). Three-way overlap with PR feat(instructions)!: disclaimer SSOT migration (stacked on #1497) #1639 on this file is expected.

  2. Test-PlannerStateSchemas.Tests.ps1 assertion direction — Authored draft used Should -Not -Contain 'disclaimerShownAt' against the required arrays. Per plan decision DD-06/ID-02 (.copilot-tracking/plans/2026-05-22/stacked-prs-from-pr-1497-plan.instructions.md line 41), the snapshot demotion of disclaimerShownAt/signingManifestPath from required was rejected for uniformity across security-state, rai-state, and sssc-state schemas. Flipped both assertions to Should -Contain so the test now affirms the documented uniformity decision. Schemas themselves are unchanged.

  3. Auto-regenerated plugin READMEsplugins/hve-core-all/README.md, plugins/project-planning/README.md, and plugins/security/README.md reflect descriptive SSSC text drift produced by npm run plugin:generate. Benign; produced by tooling.

  4. Sandbox/environment note — All Pester suites and pwsh-yaml-dependent lints (plugin:generate, plugin:validate, lint:frontmatter, lint:md-links, lint:ps) require unsandboxed execution because the PowerShell-Yaml module is installed under ~/.local/share/powershell/Modules.

Merge Order

This PR is part of a 5-PR stack split from PR #1497. Merge in this order:

  1. feat(planning): add Security Planner state schema with contract suite and fixtures #1638feat(scripts): security-planner state schema (base)
  2. feat(instructions)!: disclaimer SSOT migration (stacked on #1497) #1639feat(prompts): RAI disclaimer/attribution protocol (independent of B, but lands before B for review continuity)
  3. feat(agents): security-planner SSSC parity (stacked on PR A and #1497) #1642 (this PR) — feat(agents): security-planner SSSC parity (depends on feat(planning): add Security Planner state schema with contract suite and fixtures #1638)

Independent of the above sequence:

After #1638 and #1639 merge, rebase this branch onto main before merging.

WilliamBerryiii and others added 22 commits April 30, 2026 16:43
…idation

Bring the SSSC Planner to feature parity with the RAI Planner across identity,
disclaimers, footers, phase prompts, handoff signing, validation, and docs.

Changes by RAI #1287 category:

1. Identity and state — Update sssc-identity.instructions.md to add
   signingRequested, signingManifestPath, and disclaimer acknowledgment fields
   in the state schema; add a JSON schema (sssc-state.schema.json) for
   validation; align session recovery and orchestration language with RAI.

2. Disclaimer infrastructure — Register sssc-full-disclaimer in
   .github/config/disclaimers.yml so the SSSC handoff renders the same
   professional-review notice tier RAI uses.

3. Footer tier — Add sssc-handoff-with-disclaimer to
   .github/config/footer-with-review.yml (Tier 1 + checkbox + Tier 2
   disclaimer, scoped to .github/instructions/security/sssc-*); rename the
   companion RAI tier human-facing-with-disclaimer to
   rai-handoff-with-disclaimer for naming symmetry.

4. Phase instructions and prompts — Refresh sssc-{assessment,gap-analysis,
   standards,backlog,handoff}.instructions.md and sssc-{capture,from-brd,
   from-prd,from-security-plan}.prompt.md for the parity flow, signing
   prompts, and disclaimer wiring.

5. Handoff signing — Update sssc-handoff.instructions.md Phase 6 to invoke
   pwsh scripts/security/Sign-PlannerArtifacts.ps1 with the SSSC manifest and
   to record signingRequested / signingManifestPath in state.

6. Signing script and tests — Add scripts/security/Sign-PlannerArtifacts.ps1
   (planner-agnostic cosign wrapper) plus
   scripts/tests/security/Sign-PlannerArtifacts.Tests.ps1.

7. Validation — Extend scripts/tests/linting/Validate-PlannerArtifacts.Tests.ps1
   to cover the new SSSC tier, the renamed RAI tier, and the JSON schema.

8. Documentation and generated outputs — Update sssc-planner.agent.md, the
   docs/agents/sssc-planning overview, collection markdown for hve-core-all,
   project-planning, and security, regenerate the matching plugins/ READMEs,
   and add SSSC terms to .cspell.json.

Validation: targeted Pester suite Validate-PlannerArtifacts.Tests.ps1 = 31/31
PASS; lint:yaml, lint:md, lint:ps, lint:frontmatter, lint:collections-metadata,
lint:marketplace, lint:version-consistency, lint:permissions,
lint:dependency-pinning, lint:py, spell-check, plugin:validate all PASS.

🤖 Crafted with precision by ✨Copilot following brilliant human instruction,
then carefully refined by our team of discerning human reviewers.
…ction descriptions

🔧 - Generated by Copilot
…th Pester coverage

- replace npm script with pwsh wrapper at scripts/linting/Format-MarkdownTables.ps1
- add 13 Pester tests covering empty repo, no-git, formatted/unformatted tables, dot-prefixed dirs, verbose mode
- guard PS7 Start-Process flush race with WaitForExit + size-check retry + ReadAllText
- surface stdout/stderr byte counts via Should -Because for diagnosability

🧪 - Generated by Copilot
- regenerate vulnerability and principle indexes across owasp-* and secure-by-design skill references
- reformat tables in CUSTOM-AGENTS, instructions README, pull-request instructions
- reformat skill READMEs (powerpoint corpus, video-to-gif examples, jql-reference, pr-reference REFERENCE)
- reformat workflow README and doc-update-check tables

📐 - Generated by Copilot
- Replace removed outputPreferences references with userPreferences.targetSystem to match sssc-state.schema.json

🔒 - Generated by Copilot
…orecardProjection)

- Replace removed adoptionPlaybook/executiveSummary references with the current sbom and scorecardProjection state slots

🔒 - Generated by Copilot
…-state schema

- Move signingRequested under state and expand userPreferences to the five fields defined by sssc-state.schema.json

🔒 - Generated by Copilot
…ce test cleanup catch

- Anchor repo-root boundary check on the OS directory separator to avoid prefix matches across sibling paths

- Replace empty catch in Test-Format-MarkdownTables junction cleanup with Write-Verbose to satisfy PSAvoidUsingEmptyCatchBlock

🔒 - Generated by Copilot
- Add Node 24 setup with npm cache and npm ci so the Pester job has the toolchain expected by the test fixtures

🔒 - Generated by Copilot
…ADMEs

- Bump ms.date to 2026-05-01 to clear freshness check warnings on these long-stable docs

🔒 - Generated by Copilot
…-parity

# Conflicts:
#	.cspell.json
#	package.json
…oration-first planner openers

Introduces a shared coaching-patterns instruction (applyTo rai/security/sssc plans)
that encodes exploration-first opener conventions adapted from Design Thinking
research methods. Bundles it into hve-core-all, project-planning, and security
collections and regenerates plugin outputs. Adds a structural test asserting the
file's frontmatter and nine canonical H2 sections.
…ner to sssc-planner

Aligns the SSSC Planner with the RAI Planner's exploration-first coaching model.
Updates the planner agent, identity/assessment/backlog instructions, and the four
SSSC prompts (capture, from-brd, from-prd, from-security-plan) to share a single
Phase 1 opener pattern, phase-gate transitions, and SSOT references. Adds a test
asserting the inline state schema preserves five canonical context keys.
Introduces canonical JSON schema for Security Planner state.json with three lifecycle fixtures (phase-1 minimal, phase-4 mid, phase-6 complete) and a Pester contract suite. Asserts byte-identical disclaimerShownAt property definitions between security-state and rai-state schemas for cross-planner parity. Also adopts the local superset of ai-artifact-config.schema.json to resolve the cross-PR schema conflict.

Signed-off-by: williamberryiii <wberry@microsoft.com>
Brings the security-planner agent, its supporting instructions, and the

shared RAI capture-coaching guidance up to the same phase-gate, state, and

question-cadence parity established by the sssc-planner work in PR #1497.

Bundles the planner-startup, cadence, risk-grid, and schema test suites that

guard those conventions.

Stacked on PR #1638 (security-state-schema); intended to merge after the

PR #1497 -> PR A cascade completes.
Adds a Common Pitfalls row to docs/rpi/task-reviewer.md so reviewers

expand `-ForEach` arity before flagging a Pester suite as undersized,

and annotates the five planner-linter test files with explicit

effective-case-count `.NOTES` so the same false positive doesn't

recur on visual inspection.

Addresses CR-01 and MJ-01 from the phase-3.1 validation log on PR #1642.
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.

1 participant