mirror of
https://github.com/github/spec-kit.git
synced 2026-01-31 13:03:36 +00:00
Implementing Copilot suggested fixes from the PR
This commit is contained in:
@@ -89,7 +89,6 @@ class CompilationConfig:
|
|||||||
placement_config = compilation_config.get('placement', {})
|
placement_config = compilation_config.get('placement', {})
|
||||||
if 'min_instructions_per_file' in placement_config:
|
if 'min_instructions_per_file' in placement_config:
|
||||||
config.min_instructions_per_file = placement_config['min_instructions_per_file']
|
config.min_instructions_per_file = placement_config['min_instructions_per_file']
|
||||||
# max_depth configuration removed - analyze full project structure
|
|
||||||
|
|
||||||
# Source attribution
|
# Source attribution
|
||||||
if 'source_attribution' in compilation_config:
|
if 'source_attribution' in compilation_config:
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ class DistributedAgentsCompiler:
|
|||||||
# Configuration with defaults aligned to Minimal Context Principle
|
# Configuration with defaults aligned to Minimal Context Principle
|
||||||
config = config or {}
|
config = config or {}
|
||||||
min_instructions = config.get('min_instructions_per_file', 1) # Default to 1 for minimal context
|
min_instructions = config.get('min_instructions_per_file', 1) # Default to 1 for minimal context
|
||||||
# max_depth configuration removed - analyze full project depth
|
|
||||||
source_attribution = config.get('source_attribution', True)
|
source_attribution = config.get('source_attribution', True)
|
||||||
debug = config.get('debug', False)
|
debug = config.get('debug', False)
|
||||||
clean_orphaned = config.get('clean_orphaned', False)
|
clean_orphaned = config.get('clean_orphaned', False)
|
||||||
|
|||||||
@@ -380,9 +380,11 @@ class ScriptRunner:
|
|||||||
class PromptCompiler:
|
class PromptCompiler:
|
||||||
"""Compiles .prompt.md files with parameter substitution."""
|
"""Compiles .prompt.md files with parameter substitution."""
|
||||||
|
|
||||||
|
DEFAULT_COMPILED_DIR = Path('.apm/compiled')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Initialize compiler."""
|
"""Initialize compiler."""
|
||||||
self.compiled_dir = Path('.apm/compiled')
|
self.compiled_dir = self.DEFAULT_COMPILED_DIR
|
||||||
|
|
||||||
def compile(self, prompt_file: str, params: Dict[str, str]) -> str:
|
def compile(self, prompt_file: str, params: Dict[str, str]) -> str:
|
||||||
"""Compile a .prompt.md file with parameter substitution.
|
"""Compile a .prompt.md file with parameter substitution.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"""APM Package data models and validation logic."""
|
"""APM Package data models and validation logic."""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import urllib.parse
|
||||||
import yaml
|
import yaml
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
@@ -113,7 +114,6 @@ class DependencyReference:
|
|||||||
repo_part = dependency_str
|
repo_part = dependency_str
|
||||||
|
|
||||||
# SECURITY: Use urllib.parse for all URL validation to avoid substring vulnerabilities
|
# SECURITY: Use urllib.parse for all URL validation to avoid substring vulnerabilities
|
||||||
import urllib.parse
|
|
||||||
|
|
||||||
repo_url = repo_part.strip()
|
repo_url = repo_part.strip()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user