devex-cli 0.24.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.
- agent_experience/__init__.py +24 -0
- agent_experience/__main__.py +4 -0
- agent_experience/backends/__init__.py +0 -0
- agent_experience/backends/acp/__init__.py +0 -0
- agent_experience/backends/acp/probe.py +9 -0
- agent_experience/backends/capabilities/acp.yaml +7 -0
- agent_experience/backends/capabilities/claude-code.yaml +4 -0
- agent_experience/backends/capabilities/codex.yaml +7 -0
- agent_experience/backends/capabilities/copilot.yaml +7 -0
- agent_experience/backends/claude_code/__init__.py +0 -0
- agent_experience/backends/claude_code/probe.py +97 -0
- agent_experience/backends/codex/__init__.py +0 -0
- agent_experience/backends/codex/probe.py +16 -0
- agent_experience/backends/copilot/__init__.py +0 -0
- agent_experience/backends/copilot/probe.py +9 -0
- agent_experience/cli.py +485 -0
- agent_experience/commands/__init__.py +0 -0
- agent_experience/commands/doctor/SKILL.md +41 -0
- agent_experience/commands/doctor/__init__.py +0 -0
- agent_experience/commands/doctor/assets/report.md.j2 +39 -0
- agent_experience/commands/doctor/references/design.md +36 -0
- agent_experience/commands/doctor/scripts/__init__.py +0 -0
- agent_experience/commands/doctor/scripts/doctor.py +394 -0
- agent_experience/commands/explain/SKILL.md +26 -0
- agent_experience/commands/explain/__init__.py +0 -0
- agent_experience/commands/explain/assets/topics/agex.md +37 -0
- agent_experience/commands/explain/references/.gitkeep +0 -0
- agent_experience/commands/explain/scripts/__init__.py +0 -0
- agent_experience/commands/explain/scripts/explain.py +64 -0
- agent_experience/commands/gamify/SKILL.md +31 -0
- agent_experience/commands/gamify/__init__.py +0 -0
- agent_experience/commands/gamify/assets/hooks/claude-code.json +28 -0
- agent_experience/commands/gamify/references/.gitkeep +0 -0
- agent_experience/commands/gamify/scripts/__init__.py +0 -0
- agent_experience/commands/gamify/scripts/install.py +203 -0
- agent_experience/commands/hook/SKILL.md +31 -0
- agent_experience/commands/hook/__init__.py +0 -0
- agent_experience/commands/hook/assets/table.md.j2 +17 -0
- agent_experience/commands/hook/references/.gitkeep +0 -0
- agent_experience/commands/hook/scripts/__init__.py +0 -0
- agent_experience/commands/hook/scripts/read.py +53 -0
- agent_experience/commands/hook/scripts/write.py +25 -0
- agent_experience/commands/learn/SKILL.md +21 -0
- agent_experience/commands/learn/__init__.py +0 -0
- agent_experience/commands/learn/assets/menu.md.j2 +7 -0
- agent_experience/commands/learn/assets/topics/cicd/SKILL.md +103 -0
- agent_experience/commands/learn/assets/topics/gamify/SKILL.md +35 -0
- agent_experience/commands/learn/assets/topics/gamify/assets/skill-template/claude-code/SKILL.md +22 -0
- agent_experience/commands/learn/assets/topics/introspect/SKILL.md +41 -0
- agent_experience/commands/learn/assets/topics/introspect/assets/skill-template/claude-code/SKILL.md +22 -0
- agent_experience/commands/learn/assets/topics/levelup/SKILL.md +31 -0
- agent_experience/commands/learn/assets/topics/levelup/assets/skill-template/claude-code/SKILL.md +22 -0
- agent_experience/commands/learn/assets/topics/visualize/SKILL.md +27 -0
- agent_experience/commands/learn/assets/topics/visualize/assets/skill-template/claude-code/SKILL.md +19 -0
- agent_experience/commands/learn/references/.gitkeep +0 -0
- agent_experience/commands/learn/scripts/__init__.py +0 -0
- agent_experience/commands/learn/scripts/learn.py +73 -0
- agent_experience/commands/overview/SKILL.md +31 -0
- agent_experience/commands/overview/__init__.py +0 -0
- agent_experience/commands/overview/assets/backends/acp.yaml +7 -0
- agent_experience/commands/overview/assets/backends/claude-code.yaml +7 -0
- agent_experience/commands/overview/assets/backends/codex.yaml +7 -0
- agent_experience/commands/overview/assets/backends/copilot.yaml +7 -0
- agent_experience/commands/overview/assets/sections.md.j2 +52 -0
- agent_experience/commands/overview/references/.gitkeep +0 -0
- agent_experience/commands/overview/scripts/__init__.py +0 -0
- agent_experience/commands/overview/scripts/overview.py +40 -0
- agent_experience/commands/pr/SKILL.md +90 -0
- agent_experience/commands/pr/__init__.py +0 -0
- agent_experience/commands/pr/assets/__init__.py +0 -0
- agent_experience/commands/pr/assets/backends/__init__.py +0 -0
- agent_experience/commands/pr/assets/backends/acp.yaml +21 -0
- agent_experience/commands/pr/assets/backends/claude-code.yaml +21 -0
- agent_experience/commands/pr/assets/backends/codex.yaml +21 -0
- agent_experience/commands/pr/assets/backends/copilot.yaml +21 -0
- agent_experience/commands/pr/assets/rules/__init__.py +0 -0
- agent_experience/commands/pr/assets/rules/lint_rules.py +79 -0
- agent_experience/commands/pr/assets/rules/next_step_rules.py +78 -0
- agent_experience/commands/pr/assets/templates/__init__.py +0 -0
- agent_experience/commands/pr/assets/templates/delta.md.j2 +32 -0
- agent_experience/commands/pr/assets/templates/footer.md.j2 +2 -0
- agent_experience/commands/pr/assets/templates/lint_result.md.j2 +19 -0
- agent_experience/commands/pr/assets/templates/pr_briefing.md.j2 +69 -0
- agent_experience/commands/pr/assets/templates/pr_open_result.md.j2 +17 -0
- agent_experience/commands/pr/assets/templates/pr_reply_result.md.j2 +15 -0
- agent_experience/commands/pr/assets/templates/pr_review_result.md.j2 +5 -0
- agent_experience/commands/pr/scripts/__init__.py +0 -0
- agent_experience/commands/pr/scripts/_footer.py +32 -0
- agent_experience/commands/pr/scripts/_journal.py +21 -0
- agent_experience/commands/pr/scripts/_qodo.py +147 -0
- agent_experience/commands/pr/scripts/_readiness.py +76 -0
- agent_experience/commands/pr/scripts/_sonar.py +29 -0
- agent_experience/commands/pr/scripts/await_.py +156 -0
- agent_experience/commands/pr/scripts/delta.py +84 -0
- agent_experience/commands/pr/scripts/lint.py +72 -0
- agent_experience/commands/pr/scripts/open_.py +104 -0
- agent_experience/commands/pr/scripts/read.py +151 -0
- agent_experience/commands/pr/scripts/reply.py +160 -0
- agent_experience/commands/pr/scripts/review.py +59 -0
- agent_experience/core/__init__.py +0 -0
- agent_experience/core/backend.py +80 -0
- agent_experience/core/capabilities.py +44 -0
- agent_experience/core/config.py +46 -0
- agent_experience/core/github.py +355 -0
- agent_experience/core/hook_io.py +95 -0
- agent_experience/core/journal.py +90 -0
- agent_experience/core/paths.py +26 -0
- agent_experience/core/prog.py +44 -0
- agent_experience/core/render.py +42 -0
- agent_experience/core/skill_loader.py +36 -0
- devex_cli-0.24.0.dist-info/METADATA +55 -0
- devex_cli-0.24.0.dist-info/RECORD +115 -0
- devex_cli-0.24.0.dist-info/WHEEL +4 -0
- devex_cli-0.24.0.dist-info/entry_points.txt +3 -0
- devex_cli-0.24.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def _resolve_version() -> str:
|
|
5
|
+
# `agex-cli` is the canonical PyPI distribution name; `agent-devex` and
|
|
6
|
+
# `devex-cli` are alias distributions that ship the identical wheel under
|
|
7
|
+
# different names. Whichever one is installed, surface its metadata
|
|
8
|
+
# version. As a final fallback for unbuilt source checkouts (no installed
|
|
9
|
+
# dist metadata), read the version directly from the repo's pyproject.toml
|
|
10
|
+
# so the version stays single-sourced from pyproject.toml in every
|
|
11
|
+
# reachable code path.
|
|
12
|
+
for dist in ("agex-cli", "agent-devex", "devex-cli"):
|
|
13
|
+
try:
|
|
14
|
+
return version(dist)
|
|
15
|
+
except PackageNotFoundError:
|
|
16
|
+
continue
|
|
17
|
+
import tomllib
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
|
|
21
|
+
return tomllib.loads(pyproject.read_text(encoding="utf-8"))["project"]["version"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__version__ = _resolve_version()
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from agent_experience.backends.claude_code.probe import ProbeResult
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def probe(project_dir: Path) -> ProbeResult:
|
|
7
|
+
"""Stub ACP probe — v0.1 returns empty. Full discovery tracked as open issue."""
|
|
8
|
+
del project_dir # accepted for signature parity with other probes; real discovery deferred
|
|
9
|
+
return ProbeResult()
|
|
File without changes
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from dataclasses import dataclass, field
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
import yaml
|
|
7
|
+
|
|
8
|
+
from agent_experience.core.skill_loader import load_skill
|
|
9
|
+
|
|
10
|
+
_CLAUDE_DIR = ".claude"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class ProbeResult:
|
|
15
|
+
skills: list[dict[str, Any]] = field(default_factory=list)
|
|
16
|
+
hooks: list[dict[str, Any]] = field(default_factory=list)
|
|
17
|
+
agents: list[dict[str, Any]] = field(default_factory=list)
|
|
18
|
+
mcp_servers: list[dict[str, Any]] = field(default_factory=list)
|
|
19
|
+
claude_md: Path | None = None
|
|
20
|
+
settings: dict[str, Any] | None = None
|
|
21
|
+
warnings: list[str] = field(default_factory=list)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _read_skill(path: Path) -> tuple[dict[str, Any] | None, str | None]:
|
|
25
|
+
try:
|
|
26
|
+
skill = load_skill(path)
|
|
27
|
+
except (ValueError, OSError, yaml.YAMLError) as e:
|
|
28
|
+
return None, str(e)
|
|
29
|
+
return (
|
|
30
|
+
{
|
|
31
|
+
"name": skill.name,
|
|
32
|
+
"description": skill.description,
|
|
33
|
+
"path": str(path),
|
|
34
|
+
},
|
|
35
|
+
None,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _probe_settings(claude_dir: Path, result: ProbeResult) -> None:
|
|
40
|
+
settings = claude_dir / "settings.json"
|
|
41
|
+
if not settings.exists():
|
|
42
|
+
return
|
|
43
|
+
try:
|
|
44
|
+
result.settings = json.loads(settings.read_text(encoding="utf-8"))
|
|
45
|
+
except (json.JSONDecodeError, OSError) as e:
|
|
46
|
+
result.warnings.append(f"could not parse {settings}: {e}")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _probe_skills(claude_dir: Path, result: ProbeResult) -> None:
|
|
50
|
+
skills_dir = claude_dir / "skills"
|
|
51
|
+
if not skills_dir.is_dir():
|
|
52
|
+
return
|
|
53
|
+
# Sort for deterministic snapshot ordering across platforms / filesystems.
|
|
54
|
+
for skill_md in sorted(skills_dir.glob("*/SKILL.md")):
|
|
55
|
+
parsed, err = _read_skill(skill_md)
|
|
56
|
+
if parsed is not None:
|
|
57
|
+
result.skills.append(parsed)
|
|
58
|
+
else:
|
|
59
|
+
result.warnings.append(f"could not parse {skill_md}: {err}")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _probe_hooks(claude_dir: Path, result: ProbeResult) -> None:
|
|
63
|
+
hooks_file = claude_dir / "hooks.json"
|
|
64
|
+
if not hooks_file.exists():
|
|
65
|
+
return
|
|
66
|
+
try:
|
|
67
|
+
data = json.loads(hooks_file.read_text(encoding="utf-8"))
|
|
68
|
+
except (json.JSONDecodeError, OSError) as e:
|
|
69
|
+
result.warnings.append(f"could not parse {hooks_file}: {e}")
|
|
70
|
+
return
|
|
71
|
+
if not isinstance(data, dict):
|
|
72
|
+
result.warnings.append(f"could not parse {hooks_file}: expected a JSON object")
|
|
73
|
+
return
|
|
74
|
+
for event, entries in data.items():
|
|
75
|
+
if not isinstance(entries, list):
|
|
76
|
+
result.warnings.append(
|
|
77
|
+
f"could not parse {hooks_file}: expected list for event '{event}'"
|
|
78
|
+
)
|
|
79
|
+
continue
|
|
80
|
+
result.hooks.append({"event": event, "entries": entries})
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def probe(project_dir: Path) -> ProbeResult:
|
|
84
|
+
result = ProbeResult()
|
|
85
|
+
if not project_dir.exists():
|
|
86
|
+
return result
|
|
87
|
+
|
|
88
|
+
claude_md = project_dir / "CLAUDE.md"
|
|
89
|
+
if claude_md.exists():
|
|
90
|
+
result.claude_md = claude_md
|
|
91
|
+
|
|
92
|
+
claude_dir = project_dir / _CLAUDE_DIR
|
|
93
|
+
_probe_settings(claude_dir, result)
|
|
94
|
+
_probe_skills(claude_dir, result)
|
|
95
|
+
_probe_hooks(claude_dir, result)
|
|
96
|
+
|
|
97
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from agent_experience.backends.claude_code.probe import ProbeResult
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def probe(project_dir: Path) -> ProbeResult:
|
|
7
|
+
"""Minimal Codex probe — reads AGENTS.md if present. Other discovery deferred."""
|
|
8
|
+
result = ProbeResult()
|
|
9
|
+
if not project_dir.exists():
|
|
10
|
+
return result
|
|
11
|
+
agents_md = project_dir / "AGENTS.md"
|
|
12
|
+
if agents_md.exists():
|
|
13
|
+
result.claude_md = (
|
|
14
|
+
agents_md # reusing field — rename to `project_memory` in a future cleanup
|
|
15
|
+
)
|
|
16
|
+
return result
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from agent_experience.backends.claude_code.probe import ProbeResult
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def probe(project_dir: Path) -> ProbeResult:
|
|
7
|
+
"""Stub Copilot probe — v0.1 returns empty. Full discovery tracked as open issue."""
|
|
8
|
+
del project_dir # accepted for signature parity with other probes; real discovery deferred
|
|
9
|
+
return ProbeResult()
|