mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 22:36:33 +00:00
d96971b050
Add .cursor autodevelopment system
5.4 KiB
5.4 KiB
Project Integration
Prerequisite Guardrails (BLOCKING)
Before any research begins, verify the input context exists. Do not proceed if guardrails fail.
Project mode:
- Check INPUT_DIR exists — STOP if missing, ask user to create it and provide problem files
- Check
problem.mdin INPUT_DIR exists and is non-empty — STOP if missing - Check
restrictions.mdin INPUT_DIR exists and is non-empty — STOP if missing - Check
acceptance_criteria.mdin INPUT_DIR exists and is non-empty — STOP if missing - Check
input_data/in INPUT_DIR exists and contains at least one file — STOP if missing - Read all files in INPUT_DIR to ground the investigation in the project context
- Create OUTPUT_DIR and RESEARCH_DIR if they don't exist
Standalone mode:
- Check INPUT_FILE exists and is non-empty — STOP if missing
- Resolve BASE_DIR: use the caller-specified directory if provided; otherwise default to
_standalone/ - Resolve OUTPUT_DIR (
BASE_DIR/01_solution/) and RESEARCH_DIR (BASE_DIR/00_research/) - Warn if no
restrictions.mdoracceptance_criteria.mdwere provided alongside INPUT_FILE — proceed if user confirms - Create BASE_DIR, OUTPUT_DIR, and RESEARCH_DIR if they don't exist
Mode Detection
After guardrails pass, determine the execution mode:
- Scan OUTPUT_DIR for files matching
solution_draft*.md - No matches found → Mode A: Initial Research
- Matches found → Mode B: Solution Assessment (use the highest-numbered draft as input)
- User override: if the user explicitly says "research from scratch" or "initial research", force Mode A regardless of existing drafts
Inform the user which mode was detected and confirm before proceeding.
Solution Draft Numbering
All final output is saved as OUTPUT_DIR/solution_draft##.md with a 2-digit zero-padded number:
- Scan existing files in OUTPUT_DIR matching
solution_draft*.md - Extract the highest existing number
- Increment by 1
- Zero-pad to 2 digits (e.g.,
01,02, ...,10,11)
Example: if solution_draft01.md through solution_draft10.md exist, the next output is solution_draft11.md.
Working Directory & Intermediate Artifact Management
Directory Structure
At the start of research, must create a working directory under RESEARCH_DIR:
RESEARCH_DIR/
├── 00_ac_assessment.md # Mode A Phase 1 output: AC & restrictions assessment
├── 00_question_decomposition.md # Step 0-1 output
├── 01_source_registry.md # Step 2 output: all consulted source links
├── 02_fact_cards.md # Step 3 output: extracted facts
├── 03_comparison_framework.md # Step 4 output: selected framework and populated data
├── 04_reasoning_chain.md # Step 6 output: fact → conclusion reasoning
├── 05_validation_log.md # Step 7 output: use-case validation results
└── raw/ # Raw source archive (optional)
├── source_1.md
└── source_2.md
Save Timing & Content
| Step | Save immediately after completion | Filename |
|---|---|---|
| Mode A Phase 1 | AC & restrictions assessment tables | 00_ac_assessment.md |
| Step 0-1 | Question type classification + sub-question list | 00_question_decomposition.md |
| Step 2 | Each consulted source link, tier, summary | 01_source_registry.md |
| Step 3 | Each fact card (statement + source + confidence) | 02_fact_cards.md |
| Step 4 | Selected comparison framework + initial population | 03_comparison_framework.md |
| Step 6 | Reasoning process for each dimension | 04_reasoning_chain.md |
| Step 7 | Validation scenarios + results + review checklist | 05_validation_log.md |
| Step 8 | Complete solution draft | OUTPUT_DIR/solution_draft##.md |
Save Principles
- Save immediately: Write to the corresponding file as soon as a step is completed; don't wait until the end
- Incremental updates: Same file can be updated multiple times; append or replace new content
- Preserve process: Keep intermediate files even after their content is integrated into the final report
- Enable recovery: If research is interrupted, progress can be recovered from intermediate files
Output Files
Required files (automatically generated through the process):
| File | Content | When Generated |
|---|---|---|
00_ac_assessment.md |
AC & restrictions assessment (Mode A only) | After Phase 1 completion |
00_question_decomposition.md |
Question type, sub-question list | After Step 0-1 completion |
01_source_registry.md |
All source links and summaries | Continuously updated during Step 2 |
02_fact_cards.md |
Extracted facts and sources | Continuously updated during Step 3 |
03_comparison_framework.md |
Selected framework and populated data | After Step 4 completion |
04_reasoning_chain.md |
Fact → conclusion reasoning | After Step 6 completion |
05_validation_log.md |
Use-case validation and review | After Step 7 completion |
OUTPUT_DIR/solution_draft##.md |
Complete solution draft | After Step 8 completion |
OUTPUT_DIR/tech_stack.md |
Tech stack evaluation and decisions | After Phase 3 (optional) |
OUTPUT_DIR/security_analysis.md |
Threat model and security controls | After Phase 4 (optional) |
Optional files:
raw/*.md- Raw source archives (saved when content is lengthy)