alpiecode 10.8.7__tar.gz → 10.8.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {alpiecode-10.8.7 → alpiecode-10.8.9}/PKG-INFO +1 -1
- {alpiecode-10.8.7 → alpiecode-10.8.9}/pyproject.toml +1 -1
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/PKG-INFO +1 -1
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/__init__.py +1 -1
- alpiecode-10.8.9/src/codeagent/blueprints.py +598 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/orchestrator.py +146 -10
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/prompt.py +103 -22
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/rephraser.py +6 -1
- alpiecode-10.8.9/src/codeagent/skills/api-design/SKILL.md +57 -0
- alpiecode-10.8.9/src/codeagent/skills/frontend-engineering/SKILL.md +94 -0
- alpiecode-10.8.9/src/codeagent/skills/responsive-design/SKILL.md +43 -0
- alpiecode-10.8.9/src/codeagent/skills/systematic-debugging/SKILL.md +48 -0
- alpiecode-10.8.9/src/codeagent/skills/test-engineering/SKILL.md +49 -0
- alpiecode-10.8.9/test/test_lifecycle_and_portfolio.py +276 -0
- alpiecode-10.8.7/src/codeagent/blueprints.py +0 -297
- alpiecode-10.8.7/src/codeagent/skills/api-design/SKILL.md +0 -33
- alpiecode-10.8.7/src/codeagent/skills/frontend-engineering/SKILL.md +0 -33
- alpiecode-10.8.7/src/codeagent/skills/responsive-design/SKILL.md +0 -32
- alpiecode-10.8.7/src/codeagent/skills/systematic-debugging/SKILL.md +0 -38
- alpiecode-10.8.7/src/codeagent/skills/test-engineering/SKILL.md +0 -38
- alpiecode-10.8.7/test/test_lifecycle_and_portfolio.py +0 -139
- {alpiecode-10.8.7 → alpiecode-10.8.9}/README.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/setup.cfg +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode/__init__.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/SOURCES.txt +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/dependency_links.txt +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/entry_points.txt +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/requires.txt +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/alpiecode.egg-info/top_level.txt +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/agent.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/assessment.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/backends/__init__.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/backends/base.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/backends/local_backend.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/backends/openai_backend.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/cache.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/cli.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/client.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/compaction.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/config.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/context.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/diff_preview.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/discovery.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/doctor.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/dream_rsi.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/executor.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/git_ops.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/github.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/guardian.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/guardrails.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/ipython_ext.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/local_model.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/media.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/memory.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/metrics.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/paths.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/progress.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/project_template.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/server.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/session.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/accessibility-audit/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/accessibility-testing/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/accessibility-ui-components/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/agentic-workflows/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/architecture-design/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/backend-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/browser-automation/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/cli-development/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/cloud-infrastructure/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/code-generation/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/code-review/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/codebase-onboarding/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/cost-optimization/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/data-analysis/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/data-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/database-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/dependency-management/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/dependency-security/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/dependency-upgrades/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/devops-ci-cd/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/docker-containers/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/documentation/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/documentation-site/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/e2e-testing/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/error-handling-resilience/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/feature-development/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/git-workflow/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/incident-response/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/legacy-code-modernization/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/llm-application-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/localization-i18n/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/mcp-server-development/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/migration-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/mobile-development/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/model-evaluation/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/nodejs-services/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/observability/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/performance-optimization/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/privacy-data-protection/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/prompt-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/python-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/rag-retrieval/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/react-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/release-management/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/requirements-analysis/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/safe-refactoring/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/secure-coding/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/technical-planning/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/technical-research/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/technical-writing/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/tool-integration/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/typescript-engineering/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/visual-regression-testing/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/web-performance/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/web-security-testing/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills/workflow-automation/SKILL.md +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/skills.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/slash.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/subagent.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/system1.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/tools.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/updater.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/verifier.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/vscode_installer.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/src/codeagent/walkthrough.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_adaptive_resilience.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_cli_ui.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_context_and_trajectory.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_deloop_and_sessions.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_dream_rsi.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_local_model_download.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_non_thinking_and_local_stream.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_project_templates.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_skills_engine.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_slash_and_diff.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_subagents.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_task_assessment.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_verifier.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_walkthrough.py +0 -0
- {alpiecode-10.8.7 → alpiecode-10.8.9}/test/test_web_resilience_and_guardrails.py +0 -0
|
@@ -17,7 +17,7 @@ Supports:
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import Optional, Any, Dict
|
|
19
19
|
|
|
20
|
-
__version__ = "10.8.
|
|
20
|
+
__version__ = "10.8.9"
|
|
21
21
|
|
|
22
22
|
def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
|
|
23
23
|
"""Run an autonomous coding task programmatically."""
|
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pre-Flight Domain Blueprint Engine for AlpieCode.
|
|
3
|
+
|
|
4
|
+
Binds concrete, unambiguous engineering blueprints to user tasks:
|
|
5
|
+
- WEB_APP : Browser-first HTML5, CSS Grid/Flexbox, Vanilla JS, python3 http.server
|
|
6
|
+
- CLI_SCRIPT : Self-contained, standard library, argparse, zero bloat
|
|
7
|
+
- REST_API : FastAPI / Flask with in-process TestClient verification
|
|
8
|
+
- NATIVE_CPP : POSIX sockets/HTTP UI, const-correct mutexes, standard algorithms
|
|
9
|
+
- GAME : Complete loop, collision, input, rendering, game over/restart
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from dataclasses import dataclass, field
|
|
13
|
+
from enum import Enum
|
|
14
|
+
from typing import Dict, List, Optional
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BlueprintType(str, Enum):
|
|
18
|
+
WEB_APP = "web_app"
|
|
19
|
+
WEB_REACT = "web_react"
|
|
20
|
+
WEB_VUE = "web_vue"
|
|
21
|
+
WEB_ANGULAR = "web_angular"
|
|
22
|
+
WEB_GOLANG = "web_golang"
|
|
23
|
+
PORTFOLIO = "portfolio"
|
|
24
|
+
CLI_SCRIPT = "cli_script"
|
|
25
|
+
REST_API = "rest_api"
|
|
26
|
+
NATIVE_CPP = "native_cpp"
|
|
27
|
+
RUST = "rust"
|
|
28
|
+
GOLANG = "golang"
|
|
29
|
+
JAVA = "java"
|
|
30
|
+
GAME = "game"
|
|
31
|
+
AI_ML = "ai_ml"
|
|
32
|
+
AGENT_SYNTHESIZER = "agent_synthesizer"
|
|
33
|
+
RESEARCH_SYNTHESIS = "research_synthesis"
|
|
34
|
+
GENERAL = "general"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class DomainBlueprint:
|
|
39
|
+
name: str
|
|
40
|
+
blueprint_type: BlueprintType
|
|
41
|
+
target_files: List[str]
|
|
42
|
+
entry_point: str
|
|
43
|
+
execution_runner: str
|
|
44
|
+
prohibitions: List[str] = field(default_factory=list)
|
|
45
|
+
architecture_rules: List[str] = field(default_factory=list)
|
|
46
|
+
|
|
47
|
+
def render_contract(self) -> str:
|
|
48
|
+
"""Render strict execution contract markdown for prompt injection."""
|
|
49
|
+
files_str = ", ".join(f"`{f}`" for f in self.target_files) if self.target_files else "Application files"
|
|
50
|
+
prohib_md = "\n".join(f"- ⛔ {p}" for p in self.prohibitions)
|
|
51
|
+
rules_md = "\n".join(f"- ✅ {r}" for r in self.architecture_rules)
|
|
52
|
+
|
|
53
|
+
return f"""## Pre-Flight Domain Blueprint: {self.name.upper()}
|
|
54
|
+
- **Primary Deliverables**: {files_str}
|
|
55
|
+
- **Entry Point**: `{self.entry_point}`
|
|
56
|
+
- **Execution / Runner**: `{self.execution_runner}`
|
|
57
|
+
|
|
58
|
+
### Architecture Rules
|
|
59
|
+
{rules_md}
|
|
60
|
+
|
|
61
|
+
### Strict Prohibitions
|
|
62
|
+
{prohib_md}
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# ── Specialized Domain Blueprint Definitions ───────────────────────────
|
|
67
|
+
|
|
68
|
+
def get_web_app_blueprint(task: str) -> DomainBlueprint:
|
|
69
|
+
return DomainBlueprint(
|
|
70
|
+
name="Browser-First Web Application",
|
|
71
|
+
blueprint_type=BlueprintType.WEB_APP,
|
|
72
|
+
target_files=["index.html", "styles.css", "app.js"],
|
|
73
|
+
entry_point="index.html",
|
|
74
|
+
execution_runner="python3 -m http.server 8000 (view at http://localhost:8000)",
|
|
75
|
+
architecture_rules=[
|
|
76
|
+
"Architecture: 100% Pure Vanilla Web Stack (HTML5 + CSS3 + Vanilla JavaScript IIFE). Fast, zero dependencies, zero build step, instant load.",
|
|
77
|
+
"Design Aesthetic: Light-Mode-First Default (clean white/slate surfaces `#ffffff`/`#f8fafc`, rich dark slate text `#0f172a`, subtle 1px border dividers `#e2e8f0`, soft elevated card shadows). Modern, crisp, and professional (Apple/Stripe/Vercel standard).",
|
|
78
|
+
"Dual-Theme Switch: Every website MUST include a Theme Toggle switch button in the header/navbar (`#theme-toggle`) with Sun ☀️ and Moon 🌙 SVG icons.",
|
|
79
|
+
"Turn 1 (`index.html`): Write FIRST with rich semantic markup: Sticky Header/Navbar with brand, navigation links, and `#theme-toggle` button; Pre-rendered hero banner, responsive cards/containers, interactive forms, and modal structure. <html lang='en'> MUST NOT have data-theme='dark' or class='dark'. Initial page load MUST display Light Mode first! NEVER leave an empty body or empty `<div id='app'>`.",
|
|
80
|
+
"Include an on-screen Error Boundary in `index.html` via `window.addEventListener('error', ...)` to display any JavaScript exceptions visually instead of a blank white screen.",
|
|
81
|
+
"Turn 2 (`styles.css`): Modern, responsive CSS defining custom properties in `:root` (--bg: #f8fafc, --surface: #ffffff, --text: #0f172a, --text-muted: #64748b, --border: #e2e8f0, --primary: #2563eb, --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05)) and dark overrides strictly under `[data-theme='dark']` with smooth 200ms transitions. Body MUST use background-color: var(--bg); color: var(--text);. NEVER write an unconditional @media (prefers-color-scheme: dark) block that turns the site dark without the toggle.",
|
|
82
|
+
"Turn 3 (`app.js`): Universal vanilla JavaScript IIFE `(function() { 'use strict'; ... })();`. Implement: 1) Theme toggle logic: initialize with `const saved = localStorage.getItem('theme') || 'light'; document.documentElement.setAttribute('data-theme', saved);` and add click listener on `#theme-toggle` to flip between 'light' and 'dark' and save to localStorage (DO NOT auto-switch to dark on load); 2) Interactive features (filtering, cart, modals, event handlers); 3) Form submission validation with visual toast/alert feedback. Keep `app.js` concise and modular (< 350 lines).",
|
|
83
|
+
"Visual Assets: Use `download_asset` or curated Unsplash CDN URLs / 100% clean inline SVGs for all imagery and icons to ensure ZERO 404 broken images.",
|
|
84
|
+
"Write EXACTLY ONE complete file per turn in order (Turn 1: index.html, Turn 2: styles.css, Turn 3: app.js).",
|
|
85
|
+
"Verify all files exist and validate JavaScript with `node --check app.js` before completing.",
|
|
86
|
+
],
|
|
87
|
+
prohibitions=[
|
|
88
|
+
"NEVER load React, ReactDOM, Babel Standalone (`@babel/standalone`), Vue, or Angular via `<script>` CDN in `index.html`. Browser web applications MUST run natively in standard browsers without in-browser compilation.",
|
|
89
|
+
"NEVER write React JSX syntax (`<Component />` or HTML tags inside JS) in `.js` or `.jsx` files. Node cannot run JSX, and browsers without build tools cannot parse JSX. Use `document.createElement`, template literals, or `innerHTML`.",
|
|
90
|
+
"NEVER write oversized JavaScript files (> 350 lines) with gigantic mock datasets. Keep mock data focused and clean (6-8 items).",
|
|
91
|
+
"NEVER generate an empty `<div id='app'></div>` without pre-rendered static HTML fallback markup (prevents blank white screens).",
|
|
92
|
+
"NEVER use ES module `import`/`export` in browser scripts without a bundler -- use self-executing functions so it works on both `file://` and `http://localhost`.",
|
|
93
|
+
"NEVER write utility files like `utils/formatPrice.js` before `index.html` exists.",
|
|
94
|
+
"NEVER start blocking daemon servers with `&` or real `sleep` in terminal commands.",
|
|
95
|
+
],
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def get_react_blueprint(task: str) -> DomainBlueprint:
|
|
100
|
+
return DomainBlueprint(
|
|
101
|
+
name="React.js Web Application",
|
|
102
|
+
blueprint_type=BlueprintType.WEB_REACT,
|
|
103
|
+
target_files=["index.html", "src/App.jsx", "src/main.jsx", "src/index.css", "package.json"],
|
|
104
|
+
entry_point="src/App.jsx",
|
|
105
|
+
execution_runner="npm run build || node --check src/main.jsx",
|
|
106
|
+
architecture_rules=[
|
|
107
|
+
"Modern React Architecture: Use functional components and modern React hooks (`useState`, `useEffect`, `useCallback`). Do NOT use legacy class components.",
|
|
108
|
+
"Light-Mode-First Default: Surfaces `#ffffff`/`#f8fafc`, typography dark slate `#0f172a`, subtle 1px border dividers `#e2e8f0`, soft elevated card shadows.",
|
|
109
|
+
"Theme Toggle Component: Implement accessible `<ThemeToggle />` component in the navbar with Sun ☀️ and Moon 🌙 SVG icons toggling `data-theme` on document.documentElement and persisting in `localStorage`.",
|
|
110
|
+
"State & Modularity: Clean component separation, interactive state management (filtering, cart, modals), and toast feedback.",
|
|
111
|
+
"Zero Broken Assets: 100% clean inline SVGs or curated Unsplash CDN URLs via `download_asset`.",
|
|
112
|
+
],
|
|
113
|
+
prohibitions=[
|
|
114
|
+
"NEVER use deprecated React class components (`class ... extends React.Component`).",
|
|
115
|
+
"NEVER mutate state directly (e.g. `state.items.push()`); always use setter functions.",
|
|
116
|
+
"NEVER default initial page load to dark mode.",
|
|
117
|
+
],
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def get_vue_blueprint(task: str) -> DomainBlueprint:
|
|
122
|
+
return DomainBlueprint(
|
|
123
|
+
name="Vue.js 3 Web Application",
|
|
124
|
+
blueprint_type=BlueprintType.WEB_VUE,
|
|
125
|
+
target_files=["index.html", "src/App.vue", "src/main.js", "src/style.css", "package.json"],
|
|
126
|
+
entry_point="src/App.vue",
|
|
127
|
+
execution_runner="npm run build",
|
|
128
|
+
architecture_rules=[
|
|
129
|
+
"Vue 3 Composition API: Use modern `<script setup>` syntax with `ref`, `computed`, and `onMounted`.",
|
|
130
|
+
"Light-Mode-First Default: Crisp light surfaces (`#ffffff`/`#f8fafc`), dark slate typography `#0f172a`, subtle 1px border dividers `#e2e8f0`.",
|
|
131
|
+
"Dual-Theme Toggle: Header navbar includes accessible theme toggle button with Sun ☀️ / Moon 🌙 SVG icons and `localStorage` persistence.",
|
|
132
|
+
"Visual Assets: 100% inline SVG vector icons and curated Unsplash assets (zero 404 broken images).",
|
|
133
|
+
],
|
|
134
|
+
prohibitions=[
|
|
135
|
+
"NEVER use outdated Vue 2 Options API (`new Vue({ ... })`).",
|
|
136
|
+
"NEVER hardcode dark mode on initial load.",
|
|
137
|
+
],
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def get_angular_blueprint(task: str) -> DomainBlueprint:
|
|
142
|
+
return DomainBlueprint(
|
|
143
|
+
name="Angular TypeScript Web Application",
|
|
144
|
+
blueprint_type=BlueprintType.WEB_ANGULAR,
|
|
145
|
+
target_files=["src/index.html", "src/app/app.component.ts", "src/app/app.component.html", "src/app/app.component.css", "package.json"],
|
|
146
|
+
entry_point="src/app/app.component.ts",
|
|
147
|
+
execution_runner="ng build || npm run build",
|
|
148
|
+
architecture_rules=[
|
|
149
|
+
"Standalone Components: Use modern Angular `standalone: true` components with typed TypeScript models and signals/reactive state.",
|
|
150
|
+
"Light-Mode-First Default: Crisp light surfaces, dark typography, subtle 1px dividers, card hover lifts.",
|
|
151
|
+
"Theme Toggle: Accessible navbar theme toggle with Sun ☀️ / Moon 🌙 SVG icons and `localStorage` persistence.",
|
|
152
|
+
],
|
|
153
|
+
prohibitions=[
|
|
154
|
+
"NEVER use untyped `any` in component interfaces.",
|
|
155
|
+
"NEVER default initial page load to dark mode.",
|
|
156
|
+
],
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def get_golang_web_blueprint(task: str) -> DomainBlueprint:
|
|
161
|
+
return DomainBlueprint(
|
|
162
|
+
name="Go Web Application (net/http + HTML Templates)",
|
|
163
|
+
blueprint_type=BlueprintType.WEB_GOLANG,
|
|
164
|
+
target_files=["main.go", "main_test.go", "templates/index.html", "static/styles.css", "static/app.js"],
|
|
165
|
+
entry_point="main.go",
|
|
166
|
+
execution_runner="go test -v ./... && go run main.go",
|
|
167
|
+
architecture_rules=[
|
|
168
|
+
"Go Standard Library Server: Use `net/http` to serve static assets (`/static/`), render HTML templates (`templates/index.html`), and handle REST API endpoints (`/api/...`).",
|
|
169
|
+
"Light-Mode-First UI: Responsive CSS with `:root` light tokens, dark overrides under `[data-theme='dark']`, and navbar `#theme-toggle` button with Sun/Moon SVG icons.",
|
|
170
|
+
"Client JS Logic: Clean vanilla JS in `static/app.js` handling theme switching, API fetch calls, and interactive DOM updates.",
|
|
171
|
+
"Unit Testing: Table-driven unit tests in `main_test.go` using `net/http/httptest` verifying HTTP status codes and responses in < 0.05s.",
|
|
172
|
+
],
|
|
173
|
+
prohibitions=[
|
|
174
|
+
"NEVER start blocking background servers in tests -- use `httptest.NewServer` or `httptest.ResponseRecorder`.",
|
|
175
|
+
"NEVER ignore error returns from template parsing or JSON encoding.",
|
|
176
|
+
],
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def get_cli_script_blueprint(task: str) -> DomainBlueprint:
|
|
181
|
+
return DomainBlueprint(
|
|
182
|
+
name="Self-Contained CLI / Utility",
|
|
183
|
+
blueprint_type=BlueprintType.CLI_SCRIPT,
|
|
184
|
+
target_files=["main.py"],
|
|
185
|
+
entry_point="main.py",
|
|
186
|
+
execution_runner="python3 main.py",
|
|
187
|
+
architecture_rules=[
|
|
188
|
+
"Implement complete, working logic in Turn 1 with zero stubs or placeholders.",
|
|
189
|
+
"Use standard library `argparse` for flexible command-line argument parsing.",
|
|
190
|
+
"Handle edge cases and invalid inputs gracefully with clear error messages.",
|
|
191
|
+
"Verify by running `python3 main.py` or writing a quick hermetic unit test.",
|
|
192
|
+
],
|
|
193
|
+
prohibitions=[
|
|
194
|
+
"NEVER split simple utility scripts across multiple unnecessary files.",
|
|
195
|
+
"NEVER leave placeholder functions (`pass` or `...`). Implement real working code.",
|
|
196
|
+
],
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def get_rest_api_blueprint(task: str) -> DomainBlueprint:
|
|
201
|
+
return DomainBlueprint(
|
|
202
|
+
name="REST API Service",
|
|
203
|
+
blueprint_type=BlueprintType.REST_API,
|
|
204
|
+
target_files=["app.py", "test_app.py"],
|
|
205
|
+
entry_point="app.py",
|
|
206
|
+
execution_runner="pytest test_app.py",
|
|
207
|
+
architecture_rules=[
|
|
208
|
+
"Define modular endpoints with input validation, proper HTTP status codes, and JSON responses.",
|
|
209
|
+
"ALWAYS test endpoints using in-process test clients (`TestClient(app)` for FastAPI or `app.test_client()` for Flask).",
|
|
210
|
+
"Verify with `pytest` in under 0.1 seconds.",
|
|
211
|
+
],
|
|
212
|
+
prohibitions=[
|
|
213
|
+
"NEVER start background servers with `uvicorn &` or `flask run &` and curl -- use TestClient.",
|
|
214
|
+
"NEVER leave unhandled exceptions in request routes.",
|
|
215
|
+
],
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def get_native_cpp_blueprint(task: str) -> DomainBlueprint:
|
|
220
|
+
return DomainBlueprint(
|
|
221
|
+
name="Native C/C++ System",
|
|
222
|
+
blueprint_type=BlueprintType.NATIVE_CPP,
|
|
223
|
+
target_files=["main.cpp"],
|
|
224
|
+
entry_point="main.cpp",
|
|
225
|
+
execution_runner="g++ -std=c++17 -O2 -o app main.cpp && ./app",
|
|
226
|
+
architecture_rules=[
|
|
227
|
+
"Always include required standard headers: `<algorithm>`, `<memory>`, `<mutex>`, `<thread>`.",
|
|
228
|
+
"Mutexes locked in `const` methods MUST be declared `mutable std::mutex mtx;`.",
|
|
229
|
+
"Never use the same identifier for member variables and accessor functions (e.g. `m_isPaused` vs `isPaused()`).",
|
|
230
|
+
"If the user asked for a website in C++, serve an HTML5/Canvas UI from a C++ HTTP server, never an ASCII terminal app.",
|
|
231
|
+
"Verify compilation with `g++ -std=c++17 -O2` with exit code 0.",
|
|
232
|
+
],
|
|
233
|
+
prohibitions=[
|
|
234
|
+
"NEVER claim completion if compilation fails with exit code != 0.",
|
|
235
|
+
"NEVER access private class members from helper functions without accessors.",
|
|
236
|
+
],
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def get_rust_blueprint(task: str) -> DomainBlueprint:
|
|
241
|
+
return DomainBlueprint(
|
|
242
|
+
name="Idiomatic Rust Application",
|
|
243
|
+
blueprint_type=BlueprintType.RUST,
|
|
244
|
+
target_files=["Cargo.toml", "src/main.rs"],
|
|
245
|
+
entry_point="src/main.rs",
|
|
246
|
+
execution_runner="cargo test && cargo run",
|
|
247
|
+
architecture_rules=[
|
|
248
|
+
"Idiomatic Error Handling: Use Result<T, E> and the `?` operator. Avoid unhandled `unwrap()` or `expect()` in production paths.",
|
|
249
|
+
"Ownership & Lifetimes: Respect the Rust borrow checker; prefer borrowing (`&T`, `&str`) over unnecessary `.clone()`.",
|
|
250
|
+
"Testing: Implement comprehensive unit tests inside a `#[cfg(test)] mod tests` block verifying edge cases.",
|
|
251
|
+
"Dependencies: Declare clean, minimal crates in Cargo.toml (e.g. `serde`, `serde_json`, `tokio` if async).",
|
|
252
|
+
],
|
|
253
|
+
prohibitions=[
|
|
254
|
+
"NEVER leave compiler warnings or unused variable errors.",
|
|
255
|
+
"NEVER panic without informative error context.",
|
|
256
|
+
],
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def get_golang_blueprint(task: str) -> DomainBlueprint:
|
|
261
|
+
return DomainBlueprint(
|
|
262
|
+
name="Idiomatic Go Application",
|
|
263
|
+
blueprint_type=BlueprintType.GOLANG,
|
|
264
|
+
target_files=["main.go", "main_test.go"],
|
|
265
|
+
entry_point="main.go",
|
|
266
|
+
execution_runner="go test -v ./... && go run main.go",
|
|
267
|
+
architecture_rules=[
|
|
268
|
+
"Idiomatic Error Handling: Check errors explicitly with `if err != nil { return ..., fmt.Errorf(...) }`.",
|
|
269
|
+
"Concurrency Safety: Use channels, `sync.WaitGroup`, and `sync.Mutex` safely without goroutine leaks or data races.",
|
|
270
|
+
"Testing: Write table-driven unit tests in `main_test.go` covering edge cases and boundary conditions.",
|
|
271
|
+
"Formatting & Conventions: Clean package structure, exported symbols with doc comments, standard library usage.",
|
|
272
|
+
],
|
|
273
|
+
prohibitions=[
|
|
274
|
+
"NEVER ignore returned errors with `_` in critical I/O, parsing, or network calls.",
|
|
275
|
+
"NEVER trigger data races in concurrent goroutines.",
|
|
276
|
+
],
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def get_java_blueprint(task: str) -> DomainBlueprint:
|
|
281
|
+
return DomainBlueprint(
|
|
282
|
+
name="Idiomatic Java Application",
|
|
283
|
+
blueprint_type=BlueprintType.JAVA,
|
|
284
|
+
target_files=["Main.java", "MainTest.java"],
|
|
285
|
+
entry_point="Main.java",
|
|
286
|
+
execution_runner="javac Main.java MainTest.java && java Main",
|
|
287
|
+
architecture_rules=[
|
|
288
|
+
"Modern Java Standards: Use modern Java 17+ idioms (records for immutable data, Pattern Matching, Stream API).",
|
|
289
|
+
"Object-Oriented Design: Proper encapsulation (private fields, public accessors), robust exception handling with custom exceptions.",
|
|
290
|
+
"Testing: Implement standalone unit tests in `MainTest.java` verifying core logic and edge cases.",
|
|
291
|
+
"Hermetic Execution: Ensure self-contained execution via standard compiler (`javac`) with zero classpath errors.",
|
|
292
|
+
],
|
|
293
|
+
prohibitions=[
|
|
294
|
+
"NEVER use raw types or ignore compiler type warnings.",
|
|
295
|
+
"NEVER catch generic `Throwable` or silence exceptions with empty catch blocks.",
|
|
296
|
+
],
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def get_research_synthesis_blueprint(task: str) -> DomainBlueprint:
|
|
301
|
+
return DomainBlueprint(
|
|
302
|
+
name="Autonomous Technical Research & Synthesis",
|
|
303
|
+
blueprint_type=BlueprintType.RESEARCH_SYNTHESIS,
|
|
304
|
+
target_files=["RESEARCH_REPORT.md"],
|
|
305
|
+
entry_point="RESEARCH_REPORT.md",
|
|
306
|
+
execution_runner="head -n 50 RESEARCH_REPORT.md",
|
|
307
|
+
architecture_rules=[
|
|
308
|
+
"1. Executive Summary: Core thesis, high-impact findings, and definitive architectural verdict.",
|
|
309
|
+
"2. Comparative Analysis Matrix: Markdown table comparing latency, throughput, complexity, fault tolerance, and developer velocity.",
|
|
310
|
+
"3. Technical Deep-Dive: Mathematical foundations, algorithmic trade-offs, and reference code implementations.",
|
|
311
|
+
"4. Production Recommendations: Actionable adoption checklist, potential security/performance pitfalls, and migration path.",
|
|
312
|
+
],
|
|
313
|
+
prohibitions=[
|
|
314
|
+
"NEVER produce shallow, generic bullet points without deep technical rationale.",
|
|
315
|
+
"NEVER omit the structured comparative matrix table.",
|
|
316
|
+
],
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def get_game_blueprint(task: str) -> DomainBlueprint:
|
|
321
|
+
return DomainBlueprint(
|
|
322
|
+
name="Interactive 60FPS Game",
|
|
323
|
+
blueprint_type=BlueprintType.GAME,
|
|
324
|
+
target_files=["index.html", "game.js", "styles.css"],
|
|
325
|
+
entry_point="index.html",
|
|
326
|
+
execution_runner="python3 -m http.server 8000",
|
|
327
|
+
architecture_rules=[
|
|
328
|
+
"Implement a fixed-timestep 60 FPS game loop (`requestAnimationFrame(loop)` with delta `dt`) using HTML5 2D Canvas.",
|
|
329
|
+
"Include complete game state management (`TITLE`, `PLAYING`, `PAUSED`, `GAMEOVER`) with score and high-score persisted in `localStorage`.",
|
|
330
|
+
"Synthesize retro sound effects with the Web Audio API (`AudioContext` oscillator for jumps, points, and game-over) with ZERO external audio file dependencies.",
|
|
331
|
+
"Add dual input support: keyboard listeners (Arrow keys / WASD / Space) and responsive on-screen touch/mouse buttons for mobile.",
|
|
332
|
+
"Deliver 100% complete, working game physics (AABB / circle collision) with zero stubs.",
|
|
333
|
+
"Provide clean start screen, game over screen, and instant restart button (Space or Click).",
|
|
334
|
+
],
|
|
335
|
+
prohibitions=[
|
|
336
|
+
"NEVER deliver a game with missing collision or non-functional controls.",
|
|
337
|
+
"NEVER link external audio files (.mp3/.wav) that do not exist on disk -- use Web Audio API.",
|
|
338
|
+
],
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
def get_ai_ml_blueprint(task: str) -> DomainBlueprint:
|
|
343
|
+
return DomainBlueprint(
|
|
344
|
+
name="AI / ML Pipeline",
|
|
345
|
+
blueprint_type=BlueprintType.AI_ML,
|
|
346
|
+
target_files=["model.py", "train.py", "test_model.py"],
|
|
347
|
+
entry_point="test_model.py",
|
|
348
|
+
execution_runner="pytest test_model.py",
|
|
349
|
+
architecture_rules=[
|
|
350
|
+
"Provide automatic synthetic dataset generation (`numpy` / `pandas` / `sklearn.datasets`) if no external dataset is present.",
|
|
351
|
+
"Structure clean separation of concerns: `model.py` (architecture / estimator), `train.py` (training loop and metrics), and `test_model.py` (unit tests).",
|
|
352
|
+
"Track and log key evaluation metrics: Loss, Accuracy, F1-Score, or Mean Squared Error.",
|
|
353
|
+
"Ensure the test suite runs a fast 1-epoch / 10-sample verification pass in under 2.0 seconds.",
|
|
354
|
+
],
|
|
355
|
+
prohibitions=[
|
|
356
|
+
"NEVER hardcode dependency on unavailable massive remote datasets without a local synthetic fallback.",
|
|
357
|
+
"NEVER block the test suite with 100+ training epochs -- keep test execution sub-second.",
|
|
358
|
+
],
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
def get_agent_synthesizer_blueprint(task: str) -> DomainBlueprint:
|
|
363
|
+
return DomainBlueprint(
|
|
364
|
+
name="Autonomous Agent System",
|
|
365
|
+
blueprint_type=BlueprintType.AGENT_SYNTHESIZER,
|
|
366
|
+
target_files=["agent.py", "tools.py", "test_agent.py", "AGENTS.md"],
|
|
367
|
+
entry_point="test_agent.py",
|
|
368
|
+
execution_runner="pytest test_agent.py",
|
|
369
|
+
architecture_rules=[
|
|
370
|
+
"Implement a clean, deterministic turn-based execution while-loop with stop conditions and safety ceilings.",
|
|
371
|
+
"Define explicit tool schemas and safe execution dispatch functions with input validation.",
|
|
372
|
+
"Include persistent project memory (`AGENTS.md`) documenting agent behaviors, tool contracts, and rules.",
|
|
373
|
+
"Deliver comprehensive unit tests in `test_agent.py` verifying tool invocation, loop execution, and error handling.",
|
|
374
|
+
],
|
|
375
|
+
prohibitions=[
|
|
376
|
+
"NEVER leave infinite loops without turn limits or cancel tokens.",
|
|
377
|
+
"NEVER allow unhandled tool exceptions to crash the agent master loop.",
|
|
378
|
+
],
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
def get_developer_portfolio_blueprint(task: str) -> DomainBlueprint:
|
|
383
|
+
import re
|
|
384
|
+
# Extract developer name
|
|
385
|
+
name_match = re.search(r"(?i)\bname\s*[:=]\s*([a-zA-Z\s]+?)(?:,|$|\n|\s+(?:working|at|role|title))", task)
|
|
386
|
+
if not name_match:
|
|
387
|
+
name_match = re.search(r"(?i)\bfor\s+([a-zA-Z]+)(?:,|$|\n|\s+(?:working|at))", task)
|
|
388
|
+
dev_name = name_match.group(1).strip().title() if name_match else "Developer"
|
|
389
|
+
|
|
390
|
+
# Extract company / organization
|
|
391
|
+
comp_match = re.search(r"(?i)(?:working\s+at|company\s*[:=]\s*|at\s+)([a-zA-Z0-9]+)", task)
|
|
392
|
+
company = comp_match.group(1).strip() if comp_match else "Technology"
|
|
393
|
+
if company.lower() == "169pi":
|
|
394
|
+
company = "169Pi"
|
|
395
|
+
|
|
396
|
+
return DomainBlueprint(
|
|
397
|
+
name="Developer Portfolio Website",
|
|
398
|
+
blueprint_type=BlueprintType.WEB_APP,
|
|
399
|
+
target_files=["index.html", "styles.css", "app.js"],
|
|
400
|
+
entry_point="index.html",
|
|
401
|
+
execution_runner="python3 -m http.server 8000 (view at http://localhost:8000)",
|
|
402
|
+
architecture_rules=[
|
|
403
|
+
f"Entity Binding: The portfolio MUST prominently feature Developer Name: '{dev_name}' and Affiliation: '{company}' in navigation, hero banner, experience section, and footer.",
|
|
404
|
+
"Architecture: 100% Pure Vanilla Web Stack (Semantic HTML5 + Modern CSS3 + Vanilla JavaScript IIFE). Fast, zero external bundler dependencies, works natively on file:// and http://.",
|
|
405
|
+
f"Step 1 (`index.html`): Write complete semantic HTML5 structure pre-rendering: "
|
|
406
|
+
f"1) Sticky Navbar with brand '{dev_name}', navigation links (#about, #experience, #projects, #skills, #contact), and Theme Toggle button (#theme-toggle); <html lang='en'> MUST NOT have data-theme='dark' or class='dark'. Initial page load MUST display Light Mode first! "
|
|
407
|
+
f"2) Hero Section with badge 'Software Engineer @ {company}', headline 'Hi, I\\'m {dev_name}', elevator pitch, action buttons ('View Projects', 'Contact Me'), and social links (GitHub, LinkedIn); "
|
|
408
|
+
f"3) Experience Section with dedicated highlight for current tenure and impact at {company}; "
|
|
409
|
+
f"4) Interactive Projects Showcase with 4-6 detailed project cards (title, description, tech stack badges, demo and code buttons); "
|
|
410
|
+
f"5) Skills & Tech Stack categorized into Frontend, Backend, DevOps, and Tools with SVG badges; "
|
|
411
|
+
f"6) Contact Section with interactive form (#contact-form: name, email, message) and email copy button; "
|
|
412
|
+
f"7) Footer with copyright '© 2026 {dev_name}. Built with pride at {company}.' and back-to-top button.",
|
|
413
|
+
"Step 2 (`styles.css`): Modern, responsive CSS using custom properties in :root (--bg: #f8fafc, --surface: #ffffff, --text: #0f172a, --text-muted: #64748b, --border: #e2e8f0, --primary: #2563eb, --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05)) and dark mode strictly under [data-theme='dark'] with smooth 200ms transitions. Body MUST use background-color: var(--bg); color: var(--text); with card hover lift (translateY(-3px)), subtle borders, and clean grid layouts. NEVER write an unconditional @media (prefers-color-scheme: dark) block that turns the site dark without the toggle.",
|
|
414
|
+
"Step 3 (`app.js`): Vanilla JS IIFE implementing: 1) Dark/Light mode theme toggle: initialize with `const saved = localStorage.getItem('theme') || 'light'; document.documentElement.setAttribute('data-theme', saved);` and attach click listener to `#theme-toggle` to flip between 'light' and 'dark' and save to localStorage (DO NOT auto-switch to dark on load); 2) Smooth navigation scroll; 3) Interactive project filtering or modal details; 4) Functional contact form handling with validation and animated success feedback; 5) Mobile hamburger menu toggle.",
|
|
415
|
+
"Visual Assets: Use 100% clean inline SVGs for all icons (theme moon/sun, GitHub, LinkedIn, tech badges, checkmarks) so there are ZERO broken 404 images.",
|
|
416
|
+
"Write EXACTLY ONE complete file per turn in order (Turn 1: index.html, Turn 2: styles.css, Turn 3: app.js).",
|
|
417
|
+
"Verify all files exist and validate JavaScript with `node --check app.js` before completing.",
|
|
418
|
+
],
|
|
419
|
+
prohibitions=[
|
|
420
|
+
f"NEVER use generic placeholders like 'John Doe' or 'Company XYZ' when the prompt specifies '{dev_name}' and '{company}'.",
|
|
421
|
+
"NEVER load React, Babel Standalone, Vue, or JSX in `index.html`. Browser web applications MUST run natively in standard browsers.",
|
|
422
|
+
"NEVER write JSX syntax in JavaScript files. Use standard DOM manipulation or template literals.",
|
|
423
|
+
"NEVER leave broken image URLs or empty `<div id='app'>` without pre-rendered semantic HTML.",
|
|
424
|
+
"NEVER start background servers with `&` or sleep in terminal commands.",
|
|
425
|
+
],
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
# ── Blueprint Router ───────────────────────────────────────────────────
|
|
430
|
+
|
|
431
|
+
def resolve_domain_blueprint(task: str, repo: Optional[Dict] = None, intent: str = "create") -> Optional[DomainBlueprint]:
|
|
432
|
+
"""
|
|
433
|
+
Route task intent to the optimal Domain Blueprint.
|
|
434
|
+
Runs deterministically in < 1ms.
|
|
435
|
+
"""
|
|
436
|
+
task_lower = task.lower().strip()
|
|
437
|
+
|
|
438
|
+
# 0. Developer Portfolio Websites
|
|
439
|
+
if any(kw in task_lower for kw in ("portfolio", "personal site", "personal website", "developer site", "resume website")):
|
|
440
|
+
return get_developer_portfolio_blueprint(task)
|
|
441
|
+
|
|
442
|
+
# 1. Autonomous Agent Systems
|
|
443
|
+
if any(kw in task_lower for kw in ("create an agent", "build an agent", "code agent", "multi-agent", "autonomous agent", "agent system", "swarm")):
|
|
444
|
+
return get_agent_synthesizer_blueprint(task)
|
|
445
|
+
|
|
446
|
+
# 2. AI / Machine Learning
|
|
447
|
+
if any(kw in task_lower for kw in ("machine learning", "deep learning", "neural network", "train a model", "classifier", "pytorch", "tensorflow", "scikit-learn", "sklearn")):
|
|
448
|
+
return get_ai_ml_blueprint(task)
|
|
449
|
+
|
|
450
|
+
# 3. C / C++ Tasks
|
|
451
|
+
if any(kw in task_lower for kw in ("c++", "cpp", "g++", "gcc", "clang", "in c", "in c++")):
|
|
452
|
+
return get_native_cpp_blueprint(task)
|
|
453
|
+
|
|
454
|
+
# 3b. Rust Tasks
|
|
455
|
+
if any(kw in task_lower for kw in ("rust", "in rust", "cargo")):
|
|
456
|
+
return get_rust_blueprint(task)
|
|
457
|
+
|
|
458
|
+
# 3c. Go Tasks
|
|
459
|
+
if any(kw in task_lower for kw in ("golang", "in go", "in golang", "go language")):
|
|
460
|
+
if any(w in task_lower for w in ("website", "web app", "webapp", "web", "frontend", "html", "site", "page")):
|
|
461
|
+
return get_golang_web_blueprint(task)
|
|
462
|
+
return get_golang_blueprint(task)
|
|
463
|
+
|
|
464
|
+
# 3d. Java Tasks
|
|
465
|
+
if any(kw in task_lower for kw in ("java", "in java", "javac", "maven", "gradle")):
|
|
466
|
+
return get_java_blueprint(task)
|
|
467
|
+
|
|
468
|
+
# 3e. Autonomous Technical Research & Synthesis
|
|
469
|
+
if any(kw in task_lower for kw in ("research", "comparative study", "benchmark study", "deep dive into", "analysis report")):
|
|
470
|
+
return get_research_synthesis_blueprint(task)
|
|
471
|
+
|
|
472
|
+
# 4. Interactive Games
|
|
473
|
+
if any(kw in task_lower for kw in ("game", "snake", "pong", "tetris", "arcade", "flappy", "chess", "sudoku", "breakout", "minesweeper")):
|
|
474
|
+
return get_game_blueprint(task)
|
|
475
|
+
|
|
476
|
+
# 5. Web Applications / E-Commerce / Frontend
|
|
477
|
+
web_keywords = (
|
|
478
|
+
"website", "web app", "webapp", "e-commerce", "ecommerce", "store", "dashboard",
|
|
479
|
+
"frontend", "html", "landing page", "web page", "webpage", "web application",
|
|
480
|
+
"web portal", "portal", "todo app", "calculator app", "weather app", "recipe app",
|
|
481
|
+
"notes app", "timer app", "blog", "portfolio", "ui", "browser app", "single page app", "spa",
|
|
482
|
+
)
|
|
483
|
+
if any(kw in task_lower for kw in web_keywords):
|
|
484
|
+
if any(kw in task_lower for kw in ("react", "reactjs", "react.js")):
|
|
485
|
+
return get_react_blueprint(task)
|
|
486
|
+
if any(kw in task_lower for kw in ("vue", "vuejs", "vue.js")):
|
|
487
|
+
return get_vue_blueprint(task)
|
|
488
|
+
if any(kw in task_lower for kw in ("angular", "angularjs")):
|
|
489
|
+
return get_angular_blueprint(task)
|
|
490
|
+
if any(kw in task_lower for kw in ("golang", "in go", "using go", "go language")) and any(kw in task_lower for kw in ("website", "web", "server", "frontend", "html")):
|
|
491
|
+
return get_golang_web_blueprint(task)
|
|
492
|
+
return get_web_app_blueprint(task)
|
|
493
|
+
|
|
494
|
+
# 6. REST APIs / Microservices
|
|
495
|
+
if any(kw in task_lower for kw in ("api", "rest api", "fastapi", "flask", "endpoint", "microservice", "crud")):
|
|
496
|
+
return get_rest_api_blueprint(task)
|
|
497
|
+
|
|
498
|
+
# 7. CLI Scripts / Utilities
|
|
499
|
+
if any(kw in task_lower for kw in ("script", "cli", "command-line", "utility", "tool", "parse", "convert", "calculator")):
|
|
500
|
+
return get_cli_script_blueprint(task)
|
|
501
|
+
|
|
502
|
+
return None
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
# ── Interactive Web Framework Selection ───────────────────────────────
|
|
506
|
+
|
|
507
|
+
def is_ambiguous_web_task(task: str) -> bool:
|
|
508
|
+
"""Return True if user asks to create a website without specifying a tech stack."""
|
|
509
|
+
t = task.lower().strip()
|
|
510
|
+
|
|
511
|
+
web_nouns = ("website", "web app", "webapp", "web page", "webpage", "web application", "landing page", "store", "portal")
|
|
512
|
+
action_words = ("create", "build", "make", "develop", "generate", "code", "write", "setup", "start")
|
|
513
|
+
|
|
514
|
+
has_web_intent = (
|
|
515
|
+
any(f"{aw} {wn}" in t or f"{aw} a {wn}" in t or f"{aw} an {wn}" in t for aw in action_words for wn in web_nouns)
|
|
516
|
+
or any(t.startswith(f"create {w}") or t.startswith(f"build {w}") or t.startswith(f"make {w}") for w in web_nouns)
|
|
517
|
+
or t in ("create website", "build website", "make a website", "create web app", "build web app")
|
|
518
|
+
or (any(wn in t for wn in ("website", "web app", "webapp", "landing page")) and any(aw in t for aw in action_words))
|
|
519
|
+
)
|
|
520
|
+
if not has_web_intent:
|
|
521
|
+
return False
|
|
522
|
+
|
|
523
|
+
# Check if a framework / language is already explicitly requested
|
|
524
|
+
framework_signals = (
|
|
525
|
+
"vanilla", "html", "css", "pure html", "plain js", "vanilla js",
|
|
526
|
+
"react", "reactjs", "react.js", "next", "nextjs", "next.js",
|
|
527
|
+
"vue", "vuejs", "vue.js", "nuxt",
|
|
528
|
+
"angular", "angularjs",
|
|
529
|
+
"golang", "in go", "using go", "go language",
|
|
530
|
+
"python", "flask", "django", "fastapi",
|
|
531
|
+
"node", "express", "svelte", "ruby", "rails", "php", "rust", "c++", "cpp",
|
|
532
|
+
)
|
|
533
|
+
if any(sig in t for sig in framework_signals):
|
|
534
|
+
return False
|
|
535
|
+
|
|
536
|
+
return True
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
def prompt_website_framework_choice(task: str) -> str:
|
|
540
|
+
"""
|
|
541
|
+
Prompt user via interactive terminal to choose their preferred tech stack:
|
|
542
|
+
1. Vanilla (Pure HTML5/CSS3/Vanilla JS)
|
|
543
|
+
2. React.js
|
|
544
|
+
3. Vue.js
|
|
545
|
+
4. Angular
|
|
546
|
+
5. Golang
|
|
547
|
+
Falls back gracefully to 'Vanilla' in non-interactive/headless environments.
|
|
548
|
+
"""
|
|
549
|
+
import sys
|
|
550
|
+
if not sys.stdin or not hasattr(sys.stdin, "isatty") or not sys.stdin.isatty():
|
|
551
|
+
return f"{task} using Vanilla HTML5/CSS3/JavaScript"
|
|
552
|
+
|
|
553
|
+
try:
|
|
554
|
+
from rich.console import Console
|
|
555
|
+
from rich.panel import Panel
|
|
556
|
+
from rich.table import Table
|
|
557
|
+
console = Console()
|
|
558
|
+
console.print()
|
|
559
|
+
|
|
560
|
+
table = Table(show_header=False, box=None, padding=(0, 2))
|
|
561
|
+
table.add_column("Key", style="bold cyan")
|
|
562
|
+
table.add_column("Framework", style="bold white")
|
|
563
|
+
table.add_column("Description", style="dim")
|
|
564
|
+
table.add_row("1", "Vanilla", "Pure HTML5 + Modern CSS3 + Vanilla JS (Zero dependencies, instant browser load)")
|
|
565
|
+
table.add_row("2", "React.js", "Modern React component architecture with hooks & modular state")
|
|
566
|
+
table.add_row("3", "Vue.js", "Vue 3 Single Page Application with reactive Composition API")
|
|
567
|
+
table.add_row("4", "Angular", "Enterprise TypeScript framework with modular standalone components")
|
|
568
|
+
table.add_row("5", "Golang", "Go net/http server with HTML templates & REST API endpoints")
|
|
569
|
+
|
|
570
|
+
console.print(Panel(
|
|
571
|
+
table,
|
|
572
|
+
title="[bold yellow]🌐 Select Website Tech Stack[/bold yellow]",
|
|
573
|
+
subtitle="[dim]Choose 1-5 or framework name (default: 1 - Vanilla)[/dim]",
|
|
574
|
+
border_style="cyan",
|
|
575
|
+
))
|
|
576
|
+
choice = console.input("[bold green]Choose framework (1-5) ❯[/bold green] ").strip().lower()
|
|
577
|
+
except Exception:
|
|
578
|
+
print("\n🌐 Select Website Tech Stack:")
|
|
579
|
+
print(" 1. Vanilla (Pure HTML5 + Modern CSS3 + Vanilla JS)")
|
|
580
|
+
print(" 2. React.js")
|
|
581
|
+
print(" 3. Vue.js")
|
|
582
|
+
print(" 4. Angular")
|
|
583
|
+
print(" 5. Golang")
|
|
584
|
+
try:
|
|
585
|
+
choice = input("Choose framework (1-5) [1]: ").strip().lower()
|
|
586
|
+
except Exception:
|
|
587
|
+
choice = "1"
|
|
588
|
+
|
|
589
|
+
if choice in ("2", "react", "reactjs", "react.js"):
|
|
590
|
+
return f"{task} using React.js"
|
|
591
|
+
elif choice in ("3", "vue", "vuejs", "vue.js"):
|
|
592
|
+
return f"{task} using Vue.js"
|
|
593
|
+
elif choice in ("4", "angular", "angularjs"):
|
|
594
|
+
return f"{task} using Angular"
|
|
595
|
+
elif choice in ("5", "golang", "go"):
|
|
596
|
+
return f"{task} using Golang"
|
|
597
|
+
else:
|
|
598
|
+
return f"{task} using Vanilla HTML5/CSS3/JavaScript"
|