@homericintelligence/athena-opencode 0.5.1 → 0.5.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/package.json +1 -1
- package/skills/_cli.py +7 -4
- package/skills/_plugin.json +1 -0
- package/skills/_support/docs/dependency-resolution.md +49 -38
- package/skills/_support/docs/policies/development.md +16 -2
- package/skills/_support/docs/principles/README.md +191 -168
- package/skills/_support/docs/principles/details/p065-verify-before-claiming-completion.md +7 -5
- package/skills/_support/docs/review/README.md +5 -1
- package/skills/_support/docs/review/behavior-first-testing.md +5 -0
- package/skills/_support/docs/review/common.md +44 -9
- package/skills/_support/docs/review/issue-planning.md +36 -9
- package/skills/advise/SKILL.md +82 -74
- package/skills/advise/scripts/list_retrievable_skills.py +17 -5
- package/skills/advise/scripts/resolve_knowledge_checkout.py +533 -0
- package/skills/brainstorm/SKILL.md +3 -0
- package/skills/change-review/scripts/resolve_scope.py +25 -11
- package/skills/finalize-plan/SKILL.md +10 -3
- package/skills/git-worktrees/SKILL.md +1 -1
- package/skills/git-worktrees/scripts/prepare_worktree.py +18 -5
- package/skills/learn/SKILL.md +136 -59
- package/skills/pr-review/SKILL.md +33 -15
- package/skills/pr-review/references/criteria.md +3 -0
- package/skills/pr-review/references/delivery.md +136 -18
- package/skills/pr-review/references/evidence.md +92 -12
- package/skills/pr-review/scripts/collect_evidence.py +101 -22
- package/skills/pr-review/scripts/deliver_go.py +701 -0
- package/skills/pr-review/scripts/diff_context.py +28 -11
- package/skills/pr-review/scripts/materialize_snapshot.py +29 -10
- package/skills/pr-review/scripts/resolve_pr.py +24 -10
- package/skills/realign/SKILL.md +516 -0
- package/skills/realign/references/aislop-integration.md +215 -0
- package/skills/realign/references/architecture-and-structure.md +271 -0
- package/skills/realign/references/control-flow-and-errors.md +344 -0
- package/skills/realign/references/tests-dependencies-and-security.md +261 -0
- package/skills/realign/scripts/resolve_assessment.py +1525 -0
- package/skills/simplify/SKILL.md +174 -0
- package/skills/systematic-debugging/SKILL.md +2 -0
- package/skills/systematic-debugging/scripts/repository_evidence.py +17 -4
- package/skills/tidy/SKILL.md +13 -1
- package/skills/tidy/scripts/run_tidy.py +51 -3
|
@@ -3,24 +3,41 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
+
import importlib.util
|
|
6
7
|
import json
|
|
7
8
|
import sys
|
|
8
9
|
from collections.abc import Sequence
|
|
9
10
|
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
if __package__ in {None, ""}:
|
|
12
|
-
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
|
|
11
|
+
from typing import TYPE_CHECKING
|
|
13
12
|
|
|
14
13
|
from pr_identity import require_commit_oid
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
if TYPE_CHECKING or __package__ not in {None, ""}:
|
|
16
|
+
from skills._cli import (
|
|
17
|
+
argument_parser,
|
|
18
|
+
git_read_arguments,
|
|
19
|
+
git_read_environment,
|
|
20
|
+
require_complete_git_history,
|
|
21
|
+
require_unambiguous_git_merge_base,
|
|
22
|
+
run_command,
|
|
23
|
+
)
|
|
24
|
+
else:
|
|
25
|
+
_cli_path = Path(__file__).resolve().parents[2] / "_cli.py"
|
|
26
|
+
_cli_spec = importlib.util.spec_from_file_location(
|
|
27
|
+
"athena_installed_cli", _cli_path
|
|
28
|
+
)
|
|
29
|
+
if _cli_spec is None or _cli_spec.loader is None:
|
|
30
|
+
raise RuntimeError(
|
|
31
|
+
f"The installed Athena CLI helper is unavailable: '{_cli_path}'."
|
|
32
|
+
)
|
|
33
|
+
_cli = importlib.util.module_from_spec(_cli_spec)
|
|
34
|
+
_cli_spec.loader.exec_module(_cli)
|
|
35
|
+
argument_parser = _cli.argument_parser
|
|
36
|
+
git_read_arguments = _cli.git_read_arguments
|
|
37
|
+
git_read_environment = _cli.git_read_environment
|
|
38
|
+
require_complete_git_history = _cli.require_complete_git_history
|
|
39
|
+
require_unambiguous_git_merge_base = _cli.require_unambiguous_git_merge_base
|
|
40
|
+
run_command = _cli.run_command
|
|
24
41
|
|
|
25
42
|
|
|
26
43
|
def git(*arguments: str) -> str:
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
+
import importlib.util
|
|
7
|
+
import inspect
|
|
6
8
|
import json
|
|
7
9
|
import shutil
|
|
8
10
|
import stat
|
|
@@ -12,18 +14,32 @@ import tempfile
|
|
|
12
14
|
from collections.abc import Sequence
|
|
13
15
|
from dataclasses import dataclass
|
|
14
16
|
from pathlib import Path
|
|
15
|
-
|
|
16
|
-
if __package__ in {None, ""}:
|
|
17
|
-
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
|
|
17
|
+
from typing import TYPE_CHECKING
|
|
18
18
|
|
|
19
19
|
from pr_identity import COMMIT_OID, require_commit_oid, require_github_repository
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
if TYPE_CHECKING or __package__ not in {None, ""}:
|
|
22
|
+
from skills._cli import (
|
|
23
|
+
argument_parser,
|
|
24
|
+
git_read_arguments,
|
|
25
|
+
git_read_environment,
|
|
26
|
+
run_command,
|
|
27
|
+
)
|
|
28
|
+
else:
|
|
29
|
+
_cli_path = Path(__file__).resolve().parents[2] / "_cli.py"
|
|
30
|
+
_cli_spec = importlib.util.spec_from_file_location(
|
|
31
|
+
"athena_installed_cli", _cli_path
|
|
32
|
+
)
|
|
33
|
+
if _cli_spec is None or _cli_spec.loader is None:
|
|
34
|
+
raise RuntimeError(
|
|
35
|
+
f"The installed Athena CLI helper is unavailable: '{_cli_path}'."
|
|
36
|
+
)
|
|
37
|
+
_cli = importlib.util.module_from_spec(_cli_spec)
|
|
38
|
+
_cli_spec.loader.exec_module(_cli)
|
|
39
|
+
argument_parser = _cli.argument_parser
|
|
40
|
+
git_read_arguments = _cli.git_read_arguments
|
|
41
|
+
git_read_environment = _cli.git_read_environment
|
|
42
|
+
run_command = _cli.run_command
|
|
27
43
|
|
|
28
44
|
SNAPSHOT_COMMAND_TIMEOUT_SECONDS = 30.0
|
|
29
45
|
BOUNDED_MATERIALIZE_TIMEOUT_SECONDS = 600.0
|
|
@@ -685,7 +701,10 @@ def remove_snapshot(root: Path) -> None:
|
|
|
685
701
|
raise TypeError(REMOVE_ERROR)
|
|
686
702
|
function(path)
|
|
687
703
|
|
|
688
|
-
shutil.rmtree
|
|
704
|
+
if "onexc" in inspect.signature(shutil.rmtree).parameters:
|
|
705
|
+
shutil.rmtree(resolved, onexc=make_removable)
|
|
706
|
+
return
|
|
707
|
+
shutil.rmtree(resolved, onerror=make_removable)
|
|
689
708
|
|
|
690
709
|
|
|
691
710
|
def main(argv: Sequence[str] | None = None) -> int:
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
+
import importlib.util
|
|
6
7
|
import json
|
|
7
8
|
import sys
|
|
8
9
|
from collections.abc import Sequence
|
|
9
10
|
from dataclasses import dataclass
|
|
10
11
|
from pathlib import Path
|
|
11
|
-
from typing import Any
|
|
12
|
-
|
|
13
|
-
if __package__ in {None, ""}:
|
|
14
|
-
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
|
|
12
|
+
from typing import TYPE_CHECKING, Any
|
|
15
13
|
|
|
16
14
|
from pr_identity import (
|
|
17
15
|
canonical_pull_request_url,
|
|
@@ -23,12 +21,28 @@ from pr_identity import (
|
|
|
23
21
|
validate_pr_identifier,
|
|
24
22
|
)
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
if TYPE_CHECKING or __package__ not in {None, ""}:
|
|
25
|
+
from skills._cli import (
|
|
26
|
+
argument_parser,
|
|
27
|
+
git_read_arguments,
|
|
28
|
+
git_read_environment,
|
|
29
|
+
run_command,
|
|
30
|
+
)
|
|
31
|
+
else:
|
|
32
|
+
_cli_path = Path(__file__).resolve().parents[2] / "_cli.py"
|
|
33
|
+
_cli_spec = importlib.util.spec_from_file_location(
|
|
34
|
+
"athena_installed_cli", _cli_path
|
|
35
|
+
)
|
|
36
|
+
if _cli_spec is None or _cli_spec.loader is None:
|
|
37
|
+
raise RuntimeError(
|
|
38
|
+
f"The installed Athena CLI helper is unavailable: '{_cli_path}'."
|
|
39
|
+
)
|
|
40
|
+
_cli = importlib.util.module_from_spec(_cli_spec)
|
|
41
|
+
_cli_spec.loader.exec_module(_cli)
|
|
42
|
+
argument_parser = _cli.argument_parser
|
|
43
|
+
git_read_arguments = _cli.git_read_arguments
|
|
44
|
+
git_read_environment = _cli.git_read_environment
|
|
45
|
+
run_command = _cli.run_command
|
|
32
46
|
|
|
33
47
|
FIELDS = "number,url,state,headRefName,baseRefName,headRefOid,baseRefOid"
|
|
34
48
|
|