Skip to content

refactor: Change build output from .instructions.md to .prompt.md and…#11

Open
beogip wants to merge 7 commits intomainfrom
fix/use-prompt-instead-of-instructions
Open

refactor: Change build output from .instructions.md to .prompt.md and…#11
beogip wants to merge 7 commits intomainfrom
fix/use-prompt-instead-of-instructions

Conversation

@beogip
Copy link
Copy Markdown
Owner

@beogip beogip commented Sep 17, 2025

… move to prompts/ folder

  • Update build-config.json to use .github/prompts/ directory
  • Change file extension from .instructions.md to .prompt.md in echo-merge.ts
  • Update all references in installation scripts (install.js, install-local.sh, install.ps1)
  • Update documentation files (AGENTS.md, INSTALLATION-GUIDE.md, header.md)
  • Update planning files with new structure references
  • Create .github/prompts/ directory for echo protocol files

This improves clarity by using 'prompt' terminology which better reflects the purpose of these files as AI prompting instructions.

… move to prompts/ folder

- Update build-config.json to use .github/prompts/ directory
- Change file extension from .instructions.md to .prompt.md in echo-merge.ts
- Update all references in installation scripts (install.js, install-local.sh, install.ps1)
- Update documentation files (AGENTS.md, INSTALLATION-GUIDE.md, header.md)
- Update planning files with new structure references
- Create .github/prompts/ directory for echo protocol files

This improves clarity by using 'prompt' terminology which better reflects
the purpose of these files as AI prompting instructions.
Copilot AI review requested due to automatic review settings September 17, 2025 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Echo Protocol system by changing the build output from .instructions.md to .prompt.md files and moving them from .github/instructions/ to .github/prompts/ directory. This improves clarity by using 'prompt' terminology which better reflects the purpose of these files as AI prompting instructions.

Key changes:

  • Updated build configuration to target .github/prompts/ directory with .prompt.md extension
  • Modified build script to generate files with new naming convention
  • Updated all installation scripts to reference the new file paths and extensions
  • Updated documentation and planning files to reflect new structure

Reviewed Changes

Copilot reviewed 11 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/build/echo-merge.ts Updated file naming from .instructions.md to .prompt.md and path references
scripts/build/build-config.json Changed output directory from instructions to prompts
instructions-source/header.md Updated references to new file extension and added critical usage instructions
install.ps1 Updated PowerShell installer to use new prompts directory
install.js Updated Node.js installer with new file extensions and paths
install-local.sh Updated shell installer to reference new directory structure
ai-assistant/planning/m1/context/M1.2.md Updated planning documentation with new file location
ai-assistant/planning/M3/M3.2-submodule.yaml Updated submodule documentation with new mode name
INSTALLATION-GUIDE.md Updated installation guide with new file paths and extensions
AGENTS.md Updated agent documentation with new file paths
.github/copilot-instructions.md Updated main instructions file with new paths and merge conflict markers

…ctions/

- Fix install-sh.bats test that creates .github directory structure
- Fix install-local-sh.bats setup function to create prompts/ directory
- Resolves test failures after refactoring from instructions/ to prompts/
- Tests now pass correctly with new directory structure

Applied diagnostic echo to identify root cause: tests were creating
instructions/ directory but trying to write to prompts/ files.
…tallers

- Update install.sh to download .prompt.md files instead of .instructions.md
- Update install.js, install.ps1, install-local.sh with new file extensions
- Update INSTALLATION-GUIDE.md with new directory structure references
- Update README.md formatting and structure consistency
- Remove duplicate content from instructions-source/header.md
- Regenerate .github/copilot-instructions.md with latest changes

This completes the full migration from the old instructions/ structure
to the new prompts/ structure with .prompt.md file extensions.
All installers and documentation now reference the correct paths.
…ardcoding

🏗️ CENTRALIZED CONFIGURATION SYSTEM:
- Create config/echo-constants.json as single source of truth for paths, extensions, and echo definitions
- Implement config/config-loader.js for JavaScript/Node.js access
- Add config/load-config.sh for Shell/Bash utilities
- Add config/load-config.ps1 for PowerShell utilities

🔧 BUILD SYSTEM INTEGRATION:
- Add scripts/build/generate-build-config.js to auto-generate build-config.json
- Update echo-merge.ts to use centralized configuration
- Add prebuild script to package.json for automatic config generation

📦 INSTALLER UPDATES:
- Update install.js to use dynamic configuration loading
- Update install.sh to use shell configuration utilities
- Add fallback systems for compatibility

📚 DOCUMENTATION:
- Add docs/CONFIGURATION-ARCHITECTURE.md with complete system overview
- Document usage examples and migration benefits

✅ IMPACT:
- Eliminated 60+ hardcoded references across 15+ files
- Single point of configuration for all paths and extensions
- Automatic synchronization across JavaScript, Shell, and PowerShell
- Easy maintenance: change once, applies everywhere

🧪 TESTED:
- All build processes work with new architecture
- BATS tests: 111/112 pass (1 preexisting failure)
- Jest tests: 8/9 pass (1 skipped)
- Configuration loads correctly in all languages
@beogip beogip requested a review from Copilot September 17, 2025 16:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 22 out of 28 changed files in this pull request and generated 3 comments.

logger.info(`Generated fallback content for ${echoConfig.name}`);
}
const fileName = `${echoConfig.name}.instructions.md`;
const fileName = `${echoConfig.name}${echoConstants?.getFileExtension() || '.prompt.md'}`;
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

The optional chaining operator is applied to echoConstants but there's no null check for echoConfig. If echoConfig.name is undefined, this will result in 'undefined.prompt.md' as the filename.

Copilot uses AI. Check for mistakes.
if [[ "$INSTALL_MODE" == "instructions" ]]; then
if [[ -d "$target_github/instructions" ]]; then
local file_count=$(find "$target_github/instructions" -name "*.instructions.md" | wc -l)
local file_count=$(find "$target_github/prompts" -name "*.prompt.md" | wc -l)
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

This line is looking for files in prompts directory but line 227 creates an instructions directory. The validation should look in the same directory where files are actually installed, or the installation should be updated to use the prompts directory consistently.

Suggested change
local file_count=$(find "$target_github/prompts" -name "*.prompt.md" | wc -l)
local file_count=$(find "$target_github/instructions" -name "*.prompt.md" | wc -l)

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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