@prateek_ai/agents-maker 1.0.0 → 1.0.2
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.
- package/PROMPT_TEMPLATE.md +143 -0
- package/README.md +92 -25
- package/agents/brain.md +90 -0
- package/agents/orchestrator.md +24 -3
- package/agents/planpro.md +91 -0
- package/bin/cli.js +40 -4
- package/claude/agents/architect.md +182 -0
- package/claude/agents/brain.md +97 -0
- package/claude/agents/code.md +185 -0
- package/claude/agents/compress.md +233 -0
- package/claude/agents/execute.md +164 -0
- package/claude/agents/orchestrate.md +434 -0
- package/claude/agents/planpro.md +98 -0
- package/claude/agents/review.md +141 -0
- package/claude/agents/ui.md +154 -0
- package/claude/agents/ux.md +151 -0
- package/claude/commands/architect.md +15 -0
- package/claude/commands/brain.md +15 -0
- package/claude/commands/code.md +15 -0
- package/claude/commands/compress.md +15 -0
- package/claude/commands/execute.md +15 -0
- package/claude/commands/orchestrate.md +15 -0
- package/claude/commands/planpro.md +15 -0
- package/claude/commands/review.md +15 -0
- package/claude/commands/ui.md +15 -0
- package/claude/commands/ux.md +15 -0
- package/config/agents.yaml +56 -0
- package/context_loaders/project_summary.py +5 -0
- package/docs/architecture.md +318 -0
- package/docs/domains.md +154 -0
- package/docs/workflows.md +548 -0
- package/examples/generic_project_lifecycle.md +518 -0
- package/examples/proof/README.md +138 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/grade.md +14 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/naive_output.md +211 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/naive_prompt.txt +1 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/structured_output.md +210 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/structured_user.txt +35 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/grade.md +14 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/naive_output.md +274 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/naive_prompt.txt +1 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/structured_output.md +127 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/structured_user.txt +35 -0
- package/package.json +10 -2
- package/platforms/antigravity.md +195 -0
- package/platforms/claude.md +305 -0
- package/platforms/openai.md +333 -0
- package/skills/analyze_repo.md +86 -86
- package/token_optimization/compressor.py +4 -7
- package/tools/_core.py +102 -0
- package/tools/compare_prompts.py +196 -0
- package/tools/generate_claude_agents.py +162 -0
- package/tools/generate_claude_md.py +14 -80
- package/tools/generate_platform_configs.py +26 -36
- package/tools/generate_prompt.py +79 -79
- package/tools/grade_proof.py +118 -0
- package/tools/init_project.py +11 -58
- package/tools/routing.py +103 -0
- package/tools/test_kit.py +392 -363
- package/tools/validate_kit.py +15 -43
- package/context_loaders/__pycache__/__init__.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/file_chunker.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/project_summary.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/repo_tree.cpython-314.pyc +0 -0
- package/token_optimization/__pycache__/compressor.cpython-314.pyc +0 -0
- package/tools/__pycache__/domain_utils.cpython-314.pyc +0 -0
- package/tools/__pycache__/generate_claude_md.cpython-314.pyc +0 -0
- package/tools/__pycache__/validate_kit.cpython-314.pyc +0 -0
package/tools/validate_kit.py
CHANGED
|
@@ -25,7 +25,6 @@ Requires pyyaml (pip install pyyaml).
|
|
|
25
25
|
|
|
26
26
|
from __future__ import annotations
|
|
27
27
|
|
|
28
|
-
import hashlib
|
|
29
28
|
import re
|
|
30
29
|
import sys
|
|
31
30
|
from pathlib import Path
|
|
@@ -34,6 +33,15 @@ __version__ = "1.0.0"
|
|
|
34
33
|
|
|
35
34
|
ROOT = Path(__file__).parent.parent
|
|
36
35
|
|
|
36
|
+
# Allow sibling imports (domain_utils, _core) whether run as a script or module.
|
|
37
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
38
|
+
try:
|
|
39
|
+
from tools._core import source_hash
|
|
40
|
+
from tools.domain_utils import score_domain
|
|
41
|
+
except ImportError:
|
|
42
|
+
from _core import source_hash
|
|
43
|
+
from domain_utils import score_domain
|
|
44
|
+
|
|
37
45
|
|
|
38
46
|
# ---------------------------------------------------------------------------
|
|
39
47
|
# Helpers
|
|
@@ -204,7 +212,8 @@ def check_output_styles(policy_cfg: dict) -> None:
|
|
|
204
212
|
if isinstance(val, dict) and "output_style" in val:
|
|
205
213
|
refs.add(val["output_style"])
|
|
206
214
|
|
|
207
|
-
|
|
215
|
+
# generic_project_lifecycle is nested under workflows: in token_policies.yaml.
|
|
216
|
+
lifecycle = (policy_cfg.get("workflows") or {}).get("generic_project_lifecycle") or {}
|
|
208
217
|
for phase_key, phase_val in (lifecycle.get("phases") or {}).items():
|
|
209
218
|
if isinstance(phase_val, dict) and "output_style" in phase_val:
|
|
210
219
|
refs.add(phase_val["output_style"])
|
|
@@ -236,40 +245,15 @@ SCORING_TESTS = [
|
|
|
236
245
|
]
|
|
237
246
|
|
|
238
247
|
|
|
239
|
-
def _score(message: str, domains: dict, settings: dict) -> tuple[str, str]:
|
|
240
|
-
msg_lower = message.lower()
|
|
241
|
-
scores: dict[str, float] = {}
|
|
242
|
-
for d, cfg in domains.items():
|
|
243
|
-
if d == "general":
|
|
244
|
-
continue
|
|
245
|
-
strong = cfg.get("detection_signals", {}).get("strong", [])
|
|
246
|
-
weak = cfg.get("detection_signals", {}).get("weak", [])
|
|
247
|
-
s = sum(1.0 for sig in strong if sig in msg_lower)
|
|
248
|
-
w = sum(0.4 for sig in weak if sig in msg_lower)
|
|
249
|
-
scores[d] = (s + w) / 3
|
|
250
|
-
|
|
251
|
-
ranked = sorted(scores.items(), key=lambda x: -x[1])
|
|
252
|
-
top_d, top_s = ranked[0] if ranked else ("general", 0.0)
|
|
253
|
-
sec_d, sec_s = ranked[1] if len(ranked) > 1 else ("general", 0.0)
|
|
254
|
-
|
|
255
|
-
conf_t = settings.get("confidence_threshold", 0.40)
|
|
256
|
-
amb_t = settings.get("ambiguity_threshold", 0.10)
|
|
257
|
-
|
|
258
|
-
if top_s < conf_t:
|
|
259
|
-
return "general", "low"
|
|
260
|
-
elif (top_s - sec_s) < amb_t:
|
|
261
|
-
return top_d, "medium"
|
|
262
|
-
else:
|
|
263
|
-
return top_d, "high"
|
|
264
|
-
|
|
265
|
-
|
|
266
248
|
def check_domain_scoring(domain_cfg: dict) -> None:
|
|
249
|
+
# Uses the shared scorer (domain_utils.score_domain) — the same code the
|
|
250
|
+
# runtime tools use — so this check can never validate a stale copy.
|
|
267
251
|
print("\n--- Domain Detection Scoring ---")
|
|
268
252
|
domains = domain_cfg.get("domains") or {}
|
|
269
253
|
settings = domain_cfg.get("settings") or {}
|
|
270
254
|
passed = 0
|
|
271
255
|
for exp_domain, exp_conf, msg in SCORING_TESTS:
|
|
272
|
-
got_domain, got_conf =
|
|
256
|
+
got_domain, got_conf = score_domain(msg, domains, settings)
|
|
273
257
|
if got_domain == exp_domain and got_conf == exp_conf:
|
|
274
258
|
passed += 1
|
|
275
259
|
else:
|
|
@@ -417,18 +401,6 @@ def check_file_inventory() -> None:
|
|
|
417
401
|
# Check 12 — system_prompt.md freshness
|
|
418
402
|
# ---------------------------------------------------------------------------
|
|
419
403
|
|
|
420
|
-
def _compute_source_hash(root: Path) -> str:
|
|
421
|
-
h = hashlib.sha256()
|
|
422
|
-
agent_files = sorted((root / "agents").glob("*.md")) if (root / "agents").is_dir() else []
|
|
423
|
-
skill_files = sorted((root / "skills").glob("*.md")) if (root / "skills").is_dir() else []
|
|
424
|
-
for path in agent_files + skill_files:
|
|
425
|
-
try:
|
|
426
|
-
h.update(path.read_bytes().replace(b"\r\n", b"\n"))
|
|
427
|
-
except (OSError, PermissionError):
|
|
428
|
-
pass
|
|
429
|
-
return h.hexdigest()[:16]
|
|
430
|
-
|
|
431
|
-
|
|
432
404
|
def check_system_prompt_freshness() -> None:
|
|
433
405
|
print("\n--- system_prompt.md Freshness ---")
|
|
434
406
|
sp_path = ROOT / "system_prompt.md"
|
|
@@ -448,7 +420,7 @@ def check_system_prompt_freshness() -> None:
|
|
|
448
420
|
return
|
|
449
421
|
|
|
450
422
|
stored = m.group(1)
|
|
451
|
-
current =
|
|
423
|
+
current = source_hash(ROOT)
|
|
452
424
|
if stored != current:
|
|
453
425
|
fail(
|
|
454
426
|
f"system_prompt.md is stale (stored hash {stored} != current {current}). "
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|