Skip to content

Simplify campaign specs with intelligent defaults and move goals to markdown#11849

Merged
mnkiefer merged 6 commits intomainfrom
copilot/refactor-campaign-specs-format
Jan 26, 2026
Merged

Simplify campaign specs with intelligent defaults and move goals to markdown#11849
mnkiefer merged 6 commits intomainfrom
copilot/refactor-campaign-specs-format

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Campaign specs mixed pure configuration with natural language goals in YAML frontmatter, making them verbose and opinionated. This PR moves objectives, KPIs, and other narrative content to the markdown body, and adds intelligent defaults for repetitive configuration fields.

Changes

Code

  • Removed Objective string and KPIs []CampaignKPI fields from CampaignSpec
  • Removed CampaignKPI struct definition
  • Removed objective/KPI validation rules from schema and validator
  • Updated CampaignPromptData and orchestrator templates to not inject these fields
  • Updated interactive campaign creation to not separately prompt for objective
  • Added intelligent defaults in loader for 7+ fields based on campaign ID:
    • state defaults to "active"
    • tracker-label auto-generated as z_campaign_{id}
    • memory-paths auto-generated as ["memory/campaigns/{id}/**"]
    • metrics-glob auto-generated as memory/campaigns/{id}/metrics/*.json
    • cursor-glob auto-generated as memory/campaigns/{id}/cursor.json
    • allowed-repos defaults to current repository
    • discovery-repos defaults to allowed-repos

Examples

Before (21 lines of frontmatter):

---
id: security-audit
version: v1
state: planned
objective: "Reduce vulnerabilities to zero critical"
kpis:
  - name: "Critical Vulnerabilities"
    priority: primary
    baseline: 3
    target: 0
    time-window-days: 90
tracker-label: z_campaign_security-audit
memory-paths: [memory/campaigns/security-audit/**]
metrics-glob: memory/campaigns/security-audit/metrics/*.json
cursor-glob: memory/campaigns/security-audit/cursor.json
discovery-repos: [org/repo]
workflows: [security-scanner]
---

After (5 lines of frontmatter):

---
id: security-audit
project-url: https://github.com/orgs/org/projects/1
workflows: [security-scanner]
---

## Objective
Reduce vulnerabilities to zero critical.

## KPIs
### Primary: Critical Vulnerabilities
- Baseline: 3 issues
- Target: 0 issues
- Time Window: 90 days

Documentation

  • Updated campaign specs guide to reflect frontmatter as pure config
  • Added markdown body content guidelines (objectives, KPIs, timelines, etc.)
  • Removed KPI specification section from frontmatter reference
  • Added "Minimal example" showing 5-line campaign
  • Added "Fields with defaults" section explaining auto-generated values

Result

Campaign specs now require only 3 essential fields (id, project-url, workflows). All repetitive configuration is auto-generated with sensible defaults. Natural language content (objectives, KPIs, timelines) lives in markdown where it belongs. Campaigns are now easy to define, setup, and interpret.

Original prompt

Make campaign specs less opinionated and minimal by moving goals/KPIs, etc. and anything that more naturally fits into the natural language instructions from YAML frontmatter into the Markdown body. Frontmattter should be reserved for pure configs like id, workflows, caps, etc.


💡 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.

Copilot AI and others added 4 commits January 26, 2026 10:34
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor campaign specs to reduce opinionation Move campaign objectives and KPIs from frontmatter to markdown body Jan 26, 2026
Copilot AI requested a review from mnkiefer January 26, 2026 10:50
@mnkiefer mnkiefer marked this pull request as ready for review January 26, 2026 10:56
@mnkiefer
Copy link
Contributor

@copilot Simplify frontmatter even more and focus only on what's really necessary. Set defaults where you can so as not to clutter up the spec (i.e. memory paths, etc.). A campaign should be easy to define, setup and interpret.

- Auto-generate tracker-label, memory-paths, metrics-glob, cursor-glob from campaign ID
- Default state to "active"
- Default discovery-repos to allowed-repos (current repository)
- Remove validation requirement for discovery scope (now has default)
- Simplify example campaign files by removing redundant fields
- Update documentation to show minimal example and explain defaults

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 26, 2026

@copilot Simplify frontmatter even more and focus only on what's really necessary. Set defaults where you can so as not to clutter up the spec (i.e. memory paths, etc.). A campaign should be easy to d...

Simplified frontmatter significantly with intelligent defaults. Campaign specs now require only 3 fields (id, project-url, workflows) - down from 10+ fields.

Auto-generated from campaign ID:

  • state: active
  • tracker-label: z_campaign_{id}
  • memory-paths, metrics-glob, cursor-glob
  • allowed-repos, discovery-repos

Example campaigns reduced from ~45 lines to ~20 lines of frontmatter. See commit 89a29cb.

Copilot AI changed the title Move campaign objectives and KPIs from frontmatter to markdown body Simplify campaign specs with intelligent defaults and move goals to markdown Jan 26, 2026
Copilot AI requested a review from mnkiefer January 26, 2026 11:11
@mnkiefer mnkiefer merged commit 37db5cc into main Jan 26, 2026
120 checks passed
@mnkiefer mnkiefer deleted the copilot/refactor-campaign-specs-format branch January 26, 2026 11:24
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