From 9b127e049d836a129cacaa9d30a74bb24f1b3bbd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 06:34:55 +0000 Subject: [PATCH 1/4] Initial plan From 1967b59786e7f819122a1348a779b11858edad42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 06:37:38 +0000 Subject: [PATCH 2/4] Fix syntax error in apply-config.js - missing const declaration Co-authored-by: AstroSteveo <34114851+AstroSteveo@users.noreply.github.com> --- apply-config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apply-config.js b/apply-config.js index 7ba74b5..7fc1dc1 100755 --- a/apply-config.js +++ b/apply-config.js @@ -237,6 +237,7 @@ function copyFile(sourcePath, destPath) { * @returns {Object} Summary of the number of files removed per section. */ function cleanupDisabledFiles(outputDir, effectivelyEnabledSets, rootDir) { + const removedCounts = { prompts: 0, instructions: 0, chatmodes: 0 From 9367292d958fdedf45cd6281e968aae849bc6d4c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 06:39:47 +0000 Subject: [PATCH 3/4] Enhance precedence rules documentation with explicit boolean behaviors and detailed examples Co-authored-by: AstroSteveo <34114851+AstroSteveo@users.noreply.github.com> --- README.md | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 647d0ff..25ea21b 100644 --- a/README.md +++ b/README.md @@ -89,14 +89,22 @@ See [CONFIG.md](CONFIG.md) for detailed configuration documentation. #### ⚖️ Configuration Precedence Rules -Awesome Copilot uses an **effective state system** that respects explicit overrides while allowing collections to provide convenient defaults: +Awesome Copilot uses an **effective state system** that respects explicit overrides while allowing collections to provide convenient defaults. The effective state computation follows these precise rules: -1. **Explicit Settings Override Everything** +**Boolean Value Behavior:** +- `true` → **enabled** (explicit override) +- `false` → **disabled** (explicit override) +- `undefined` → **inherit from collections** (union of enabled collections) + +**Precedence Hierarchy:** + +1. **Explicit Per-Item Overrides Take Precedence Over Collections** ```yaml collections: - testing-automation: true # Enables 11 items + testing-automation: true # Enables 11 items including playwright-generate-test prompts: playwright-generate-test: false # Explicitly disabled, overrides collection + create-readme: true # Explicitly enabled, regardless of collections ``` 2. **Collections Enable Groups of Items** @@ -106,18 +114,35 @@ Awesome Copilot uses an **effective state system** that respects explicit overri testing-automation: true # Enables testing tools and frameworks ``` -3. **Undefined Items Follow Collections** - - Items not explicitly listed inherit from enabled collections - - Only explicitly set true/false values override collection settings - - This allows collections to work as intended while preserving explicit choices +3. **Undefined Items Inherit from Collections (Union Behavior)** + - Items not explicitly listed (`undefined`) inherit from enabled collections + - **Effective state = explicit override OR union of enabled collections** + - Multiple enabled collections combine their items (union operation) + - Only explicitly set `true`/`false` values override collection settings + +**Detailed Examples:** + +```yaml +# Configuration example showing precedence rules +collections: + testing-automation: true # Enables: playwright-generate-test, csharp-nunit, etc. + frontend-web-dev: true # Enables: react-component, vue-component, etc. + +prompts: + playwright-generate-test: false # Explicitly disabled (overrides testing-automation) + create-readme: true # Explicitly enabled (regardless of collections) + # vue-component: undefined # Inherits from frontend-web-dev → enabled + # api-testing: undefined # Not in any enabled collection → disabled +``` -**Examples:** ```bash # See effective states and why each item is enabled awesome-copilot list prompts -# [✓] create-readme (explicit) -# [✓] playwright-generate-test (collection) -# [ ] react-component +# [✓] create-readme (explicit: true) +# [✓] vue-component (collection: frontend-web-dev) +# [✓] react-component (collection: frontend-web-dev) +# [ ] playwright-generate-test (explicit: false - overrides collection) +# [ ] api-testing (disabled: not in any enabled collection) # Collection toggle shows what will change awesome-copilot toggle collections frontend-web-dev on From b02893cdeef84eb6ee8474d8a606517febcb2438 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 13:54:45 +0000 Subject: [PATCH 4/4] Fix cleanupDisabledFiles function to use correct variable names Co-authored-by: AstroSteveo <34114851+AstroSteveo@users.noreply.github.com> --- apply-config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apply-config.js b/apply-config.js index 7fc1dc1..62bea4c 100755 --- a/apply-config.js +++ b/apply-config.js @@ -263,13 +263,13 @@ function cleanupDisabledFiles(outputDir, effectivelyEnabledSets, rootDir) { if (!effectivelyEnabledSets[section.name].has(itemName)) { const filePath = path.join(sectionDir, fileName); fs.unlinkSync(filePath); - cleanupSummary[section.name]++; + removedCounts[section.name]++; console.log(`🗑️ Removed: ${section.name}/${fileName}`); } } } - return cleanupSummary; + return removedCounts; } // CLI usage