agentforge-framework 0.2.0__py3-none-any.whl
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.
- agentforge_framework/.claude-plugin/plugin.json +4 -0
- agentforge_framework/__init__.py +3 -0
- agentforge_framework/agents/__init__.py +92 -0
- agentforge_framework/agents/architect.py +146 -0
- agentforge_framework/agents/implementer.py +162 -0
- agentforge_framework/agents/orchestrator.py +588 -0
- agentforge_framework/agents/reviewer.py +335 -0
- agentforge_framework/agents/security.py +138 -0
- agentforge_framework/agents/tester.py +125 -0
- agentforge_framework/cli.py +461 -0
- agentforge_framework/context/__init__.py +1 -0
- agentforge_framework/context/extractors/__init__.py +76 -0
- agentforge_framework/context/extractors/base.py +47 -0
- agentforge_framework/context/extractors/python.py +65 -0
- agentforge_framework/context/extractors/sql.py +121 -0
- agentforge_framework/context/extractors/yaml.py +59 -0
- agentforge_framework/context/prompt.py +104 -0
- agentforge_framework/context/resolver.py +185 -0
- agentforge_framework/core/__init__.py +1 -0
- agentforge_framework/core/commands.py +170 -0
- agentforge_framework/core/config.py +90 -0
- agentforge_framework/core/contracts.py +875 -0
- agentforge_framework/core/gates.py +333 -0
- agentforge_framework/core/issues.py +697 -0
- agentforge_framework/core/plan_format.py +272 -0
- agentforge_framework/core/process.py +141 -0
- agentforge_framework/core/project.py +262 -0
- agentforge_framework/core/registry.py +455 -0
- agentforge_framework/core/repo.py +185 -0
- agentforge_framework/core/router.py +1 -0
- agentforge_framework/core/runtime.py +639 -0
- agentforge_framework/core/skills.py +255 -0
- agentforge_framework/core/workflow.py +215 -0
- agentforge_framework/plugins/__init__.py +35 -0
- agentforge_framework/plugins/databricks/__init__.py +86 -0
- agentforge_framework/plugins/pyspark/__init__.py +57 -0
- agentforge_framework/plugins/python/__init__.py +45 -0
- agentforge_framework/plugins/sql/__init__.py +377 -0
- agentforge_framework/providers/__init__.py +48 -0
- agentforge_framework/providers/base.py +248 -0
- agentforge_framework/providers/claude.py +159 -0
- agentforge_framework/providers/codex.py +139 -0
- agentforge_framework/skills/MANIFEST.yaml +157 -0
- agentforge_framework/skills/NOTICE +49 -0
- agentforge_framework/skills/domain-modeling/ADR-FORMAT.md +47 -0
- agentforge_framework/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- agentforge_framework/skills/domain-modeling/SKILL.md +74 -0
- agentforge_framework/skills/domain-modeling/agents/openai.yaml +3 -0
- agentforge_framework/skills/grill-with-docs/SKILL.md +76 -0
- agentforge_framework/skills/grilling/SKILL.md +28 -0
- agentforge_framework/skills/grilling/agents/openai.yaml +3 -0
- agentforge_framework/skills/to-spec/SKILL.md +75 -0
- agentforge_framework/skills/to-spec/agents/openai.yaml +5 -0
- agentforge_framework/skills/to-tickets/SKILL.md +105 -0
- agentforge_framework/skills/to-tickets/agents/openai.yaml +5 -0
- agentforge_framework/skills/unslop/SKILL.md +131 -0
- agentforge_framework/skills/unslop/evals/fixtures/silhouette/human_reference.json +66 -0
- agentforge_framework/skills/unslop/scripts/_lang.py +106 -0
- agentforge_framework/skills/unslop/scripts/banned_phrase_scan.py +784 -0
- agentforge_framework/skills/unslop/scripts/calibrate_pairs.py +580 -0
- agentforge_framework/skills/unslop/scripts/calibrate_score.py +273 -0
- agentforge_framework/skills/unslop/scripts/check_packs.py +80 -0
- agentforge_framework/skills/unslop/scripts/check_suggestions.py +225 -0
- agentforge_framework/skills/unslop/scripts/contribute.py +373 -0
- agentforge_framework/skills/unslop/scripts/diff_check.py +139 -0
- agentforge_framework/skills/unslop/scripts/extract_constraints.py +201 -0
- agentforge_framework/skills/unslop/scripts/harvest_classify.py +223 -0
- agentforge_framework/skills/unslop/scripts/harvest_samples.py +534 -0
- agentforge_framework/skills/unslop/scripts/readability_metrics.py +295 -0
- agentforge_framework/skills/unslop/scripts/refresh_status.py +154 -0
- agentforge_framework/skills/unslop/scripts/silhouette_scan.py +390 -0
- agentforge_framework/skills/unslop/scripts/structure_scan.py +322 -0
- agentforge_framework/skills/unslop/scripts/suggest.py +211 -0
- agentforge_framework/skills/unslop/scripts/validate_preservation.py +409 -0
- agentforge_framework/skills/unslop/scripts/voice_card.py +496 -0
- agentforge_framework/skills/unslop/scripts/voice_profile.py +194 -0
- agentforge_framework/skills/unslop/scripts/voice_score.py +271 -0
- agentforge_framework/skills/unslop/scripts/wiki_sync.py +479 -0
- agentforge_framework/skills/write-plainly/SKILL.md +94 -0
- agentforge_framework/workflows/bugfix.yaml +8 -0
- agentforge_framework/workflows/feature.yaml +16 -0
- agentforge_framework/workflows/review.yaml +10 -0
- agentforge_framework-0.2.0.dist-info/METADATA +321 -0
- agentforge_framework-0.2.0.dist-info/RECORD +89 -0
- agentforge_framework-0.2.0.dist-info/WHEEL +5 -0
- agentforge_framework-0.2.0.dist-info/entry_points.txt +3 -0
- agentforge_framework-0.2.0.dist-info/licenses/LICENSE +202 -0
- agentforge_framework-0.2.0.dist-info/licenses/src/agentforge_framework/skills/NOTICE +49 -0
- agentforge_framework-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Read project configuration without creating or changing it."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shlex
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from enum import StrEnum
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
import yaml
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CapabilityTier(StrEnum):
|
|
14
|
+
"""How a Provider receives a Role's declared Vendored Skills."""
|
|
15
|
+
|
|
16
|
+
NATIVE = "native"
|
|
17
|
+
FRAGMENT = "fragment"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DEFAULT_CAPABILITIES = {
|
|
21
|
+
"claude": CapabilityTier.NATIVE,
|
|
22
|
+
"codex": CapabilityTier.FRAGMENT,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#: What a `tests` Gate runs when the project declares nothing. `pytest` rather
|
|
26
|
+
#: than `python -m pytest`, so that an environment without it is a binary the
|
|
27
|
+
#: Command Runner cannot find — which is the difference between a suite that
|
|
28
|
+
#: could not be run and one that ran and failed, and the Gate reports them
|
|
29
|
+
#: differently.
|
|
30
|
+
DEFAULT_TEST_SUITE = ("pytest",)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
class Config:
|
|
35
|
+
"""The read-only project configuration the Workflow runtime reads."""
|
|
36
|
+
|
|
37
|
+
provider_capabilities: dict[str, CapabilityTier] = field(
|
|
38
|
+
default_factory=lambda: dict(DEFAULT_CAPABILITIES)
|
|
39
|
+
)
|
|
40
|
+
#: The argument vector the test-suite Gate runs. An argument vector, not a
|
|
41
|
+
#: Command in the glossary's sense: nothing infers anything from it.
|
|
42
|
+
test_suite: tuple[str, ...] = DEFAULT_TEST_SUITE
|
|
43
|
+
|
|
44
|
+
def capability_for(self, provider: str) -> CapabilityTier:
|
|
45
|
+
return self.provider_capabilities.get(provider, CapabilityTier.FRAGMENT)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def load_config(root: Path | str) -> Config:
|
|
49
|
+
"""Read ``.agentforge/config.yaml``, or return documented defaults."""
|
|
50
|
+
path = Path(root) / ".agentforge" / "config.yaml"
|
|
51
|
+
if not path.is_file():
|
|
52
|
+
return Config()
|
|
53
|
+
|
|
54
|
+
data = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
|
|
55
|
+
capabilities = dict(DEFAULT_CAPABILITIES)
|
|
56
|
+
for name, provider in (data.get("providers") or {}).items():
|
|
57
|
+
capabilities[str(name)] = CapabilityTier(provider["capability_tier"])
|
|
58
|
+
return Config(provider_capabilities=capabilities, test_suite=_test_suite(data))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _test_suite(data: dict) -> tuple[str, ...]:
|
|
62
|
+
"""`gates.tests.suite`: what the test-suite Gate runs in this repository.
|
|
63
|
+
|
|
64
|
+
A string is split the way a shell would; a list is taken as written, which
|
|
65
|
+
is how a path with a space in it gets named. Nothing here consults the tree
|
|
66
|
+
— a project that runs `npm test` says so, rather than being guessed at.
|
|
67
|
+
|
|
68
|
+
ADR-0007 defers a general execution allowlist to M5. This is the bounded
|
|
69
|
+
case that ADR names as the appropriate thing to persist: one suite, declared
|
|
70
|
+
by the project, run by AgentForge itself rather than by a Role.
|
|
71
|
+
"""
|
|
72
|
+
value = ((data.get("gates") or {}).get("tests") or {}).get("suite")
|
|
73
|
+
if value is None:
|
|
74
|
+
return DEFAULT_TEST_SUITE
|
|
75
|
+
|
|
76
|
+
if isinstance(value, str):
|
|
77
|
+
parts = tuple(shlex.split(value))
|
|
78
|
+
elif isinstance(value, list):
|
|
79
|
+
parts = tuple(str(part) for part in value)
|
|
80
|
+
else:
|
|
81
|
+
raise TypeError(
|
|
82
|
+
f"`gates.tests.suite` must be a string or a list, not {type(value).__name__}"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
if not parts:
|
|
86
|
+
raise ValueError("`gates.tests.suite` is empty; name the command that runs the suite")
|
|
87
|
+
return parts
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
__all__ = ["DEFAULT_TEST_SUITE", "CapabilityTier", "Config", "load_config"]
|