Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/worker/prompts/pre-recon-code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Read `.gitignore` and run `git ls-files --others --ignored --exclude-standard --
**Phase Sequence:** **PRE-RECON (You)** → RECON → VULN ANALYSIS (5 agents) → EXPLOITATION (5 agents) → REPORTING

**Your Input:** External scan results from pre-recon tools (nmap, subfinder, whatweb)
**Your Output:** `deliverables/code_analysis_deliverable.md` (feeds all subsequent analysis phases)
**Your Output:** `deliverables/pre_recon_deliverable.md` (feeds all subsequent analysis phases)
**Shared Intelligence:** You create the foundational intelligence baseline that all other agents depend on

**WHAT HAPPENED BEFORE YOU:**
Expand Down Expand Up @@ -132,10 +132,10 @@ After Phase 1 completes, launch all three vulnerability-focused agents in parall
- Copy all discovered schema files to `outputs/schemas/` with descriptive names
- Include schema locations in your attack surface analysis
- **CHUNKED WRITING (MANDATORY):**
1. Use the **Write** tool to create `deliverables/code_analysis_deliverable.md` with the title and first major section
1. Use the **Write** tool to create `deliverables/pre_recon_deliverable.md` with the title and first major section
2. Use the **Edit** tool to append each remaining section — match the last few lines of the file, then replace with those lines plus the new section content
3. Repeat step 2 for all remaining sections
4. Run `save-deliverable` with `--type CODE_ANALYSIS --file-path "deliverables/code_analysis_deliverable.md"`
4. Run `save-deliverable` with `--type CODE_ANALYSIS --file-path "deliverables/pre_recon_deliverable.md"`
- **WARNING:** Do NOT write the entire report in a single tool call — exceeds 32K output token limit. Split into multiple Write/Edit operations.

**EXECUTION PATTERN:**
Expand Down Expand Up @@ -394,7 +394,7 @@ A component is **out-of-scope** if it **cannot** be invoked through the running
- Phase 3: Synthesis and report generation completed

2. **Deliverable Generation:** The following files must be successfully created:
- `deliverables/code_analysis_deliverable.md` (via `save-deliverable` with `--file-path`, not inline `--content`)
- `deliverables/pre_recon_deliverable.md` (via `save-deliverable` with `--file-path`, not inline `--content`)
- `outputs/schemas/` directory with all discovered schema files copied (if any schemas found)

3. **TodoWrite Completion:** All tasks in your todo list must be marked as completed
Expand Down
4 changes: 2 additions & 2 deletions apps/worker/src/session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const AGENTS: Readonly<Record<AgentName, AgentDefinition>> = Object.freez
displayName: 'Pre-recon agent',
prerequisites: [],
promptTemplate: 'pre-recon-code',
deliverableFilename: 'code_analysis_deliverable.md',
deliverableFilename: 'pre_recon_deliverable.md',
modelTier: 'large',
},
recon: {
Expand Down Expand Up @@ -179,7 +179,7 @@ export const PLAYWRIGHT_SESSION_MAPPING: Record<string, PlaywrightSession> = Obj
export const AGENT_VALIDATORS: Record<AgentName, AgentValidator> = Object.freeze({
// Pre-reconnaissance agent - validates the code analysis deliverable created by the agent
'pre-recon': async (sourceDir: string): Promise<boolean> => {
const codeAnalysisFile = path.join(sourceDir, 'deliverables', 'code_analysis_deliverable.md');
const codeAnalysisFile = path.join(sourceDir, 'deliverables', 'pre_recon_deliverable.md');
return await fs.pathExists(codeAnalysisFile);
Comment on lines 180 to 183
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The pre-recon validator now checks for pre_recon_deliverable.md, but the local variable name (codeAnalysisFile) and the preceding comment still refer to “code analysis deliverable”. Renaming the variable/comment to match the new deliverable filename would avoid confusion when debugging validation failures.

Copilot uses AI. Check for mistakes.
},

Expand Down
2 changes: 1 addition & 1 deletion apps/worker/src/types/deliverables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export enum DeliverableType {
* Hard-coded filename mappings from agent prompts
*/
export const DELIVERABLE_FILENAMES: Record<DeliverableType, string> = {
[DeliverableType.CODE_ANALYSIS]: 'code_analysis_deliverable.md',
[DeliverableType.CODE_ANALYSIS]: 'pre_recon_deliverable.md',
[DeliverableType.RECON]: 'recon_deliverable.md',
[DeliverableType.INJECTION_ANALYSIS]: 'injection_analysis_deliverable.md',
[DeliverableType.INJECTION_QUEUE]: 'injection_exploitation_queue.json',
Expand Down
Loading