@ikon85/agent-workflow-kit 0.36.5 → 0.38.0
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/.agents/skills/orchestrate-wave/SKILL.md +20 -12
- package/.agents/skills/setup-workflow/SKILL.md +24 -3
- package/.agents/skills/setup-workflow/orchestrate-wave-seed.md +3 -2
- package/.agents/skills/setup-workflow/worktree-lifecycle.md +29 -1
- package/.agents/skills/wrapup/SKILL.md +42 -9
- package/.claude/hooks/migration-snapshot-reminder.py +1 -1
- package/.claude/skills/orchestrate-wave/SKILL.md +11 -11
- package/.claude/skills/setup-workflow/SKILL.md +24 -3
- package/.claude/skills/setup-workflow/orchestrate-wave-seed.md +3 -2
- package/.claude/skills/setup-workflow/worktree-lifecycle.md +29 -1
- package/.claude/skills/skill-manifest.json +1 -1
- package/.claude/skills/wrapup/SKILL.md +33 -10
- package/README.md +88 -1
- package/agent-workflow-kit.package.json +36 -28
- package/docs/adr/0007-session-teardown-requires-provenance-bound-ownership.md +88 -0
- package/docs/agents/workflow-capabilities.json +11 -0
- package/package.json +1 -1
- package/scripts/anchor_table.py +14 -8
- package/scripts/project-skill-extension.mjs +21 -2
- package/scripts/readiness.mjs +32 -4
- package/scripts/release-state.mjs +19 -9
- package/scripts/release-state.test.mjs +71 -8
- package/scripts/test_anchor_table.py +69 -0
- package/scripts/test_board_sync_create_idempotency.py +15 -2
- package/scripts/test_board_sync_wave_title.py +14 -2
- package/scripts/test_census_backstop.py +33 -0
- package/scripts/test_orchestrate_wave_contract.py +44 -0
- package/scripts/test_retro_wrapup_contract.py +19 -2
- package/scripts/test_worktree_wrapup_contract.py +1004 -3
- package/scripts/test_wrapup_land.py +428 -0
- package/scripts/workflow-advisories/core.py +44 -2
- package/scripts/worktree-lifecycle/README.md +126 -4
- package/scripts/worktree-lifecycle/capabilities.json +9 -1
- package/scripts/worktree-lifecycle/cleanup.py +143 -5
- package/scripts/worktree-lifecycle/core.py +1383 -20
- package/scripts/worktree-lifecycle/profile.py +40 -3
- package/scripts/worktree-lifecycle/session.py +1857 -0
- package/scripts/worktree-lifecycle/setup.py +15 -0
- package/scripts/wrapup-land.py +650 -27
- package/src/cli.mjs +60 -27
- package/src/lib/bundle.mjs +1 -0
- package/src/lib/manifest.mjs +173 -3
- package/src/lib/projectSkillExtension.mjs +78 -1
- package/src/lib/updateCandidate.mjs +3 -1
- package/src/lib/updateDecisions.mjs +2 -2
- package/src/lib/verifyUpdateCandidateProtocol.mjs +15 -0
|
@@ -25,6 +25,9 @@ class WorktreeProfile:
|
|
|
25
25
|
branch_regex: str
|
|
26
26
|
setup_entry: str
|
|
27
27
|
risky_command_patterns: tuple[str, ...]
|
|
28
|
+
scratch_patterns: tuple[str, ...]
|
|
29
|
+
landing_generated_artifact_policy_configured: bool
|
|
30
|
+
landing_generated_artifact_patterns: tuple[str, ...]
|
|
28
31
|
|
|
29
32
|
def branch_name(self, issue: str, slug: str, branch_type: str) -> str:
|
|
30
33
|
return _render(self.branch_template, issue, slug, branch_type)
|
|
@@ -46,14 +49,29 @@ def _render(template: str, issue: str, slug: str, branch_type: str) -> str:
|
|
|
46
49
|
raise LifecycleError(f"invalid worktree template: {error}") from error
|
|
47
50
|
|
|
48
51
|
|
|
49
|
-
def
|
|
52
|
+
def _load_profile_document(document: Any) -> WorktreeProfile:
|
|
50
53
|
try:
|
|
51
|
-
document = json.loads(path.read_text(encoding="utf-8"))
|
|
52
54
|
raw = document["worktreeLifecycle"]
|
|
53
|
-
except (
|
|
55
|
+
except (KeyError, TypeError) as error:
|
|
54
56
|
raise LifecycleError(f"cannot load worktree lifecycle profile: {error}") from error
|
|
55
57
|
if raw.get("enabled") is not True:
|
|
56
58
|
raise LifecycleError("worktree lifecycle is not enabled")
|
|
59
|
+
wrapup = document.get("wrapup")
|
|
60
|
+
if wrapup is None:
|
|
61
|
+
wrapup = {}
|
|
62
|
+
if not isinstance(wrapup, dict):
|
|
63
|
+
raise LifecycleError("invalid wrapup profile")
|
|
64
|
+
generated_policy_configured = "landingGeneratedArtifactPatterns" in wrapup
|
|
65
|
+
generated_patterns = (
|
|
66
|
+
wrapup["landingGeneratedArtifactPatterns"]
|
|
67
|
+
if generated_policy_configured
|
|
68
|
+
else ()
|
|
69
|
+
)
|
|
70
|
+
if (
|
|
71
|
+
not isinstance(generated_patterns, (list, tuple))
|
|
72
|
+
or not all(isinstance(pattern, str) and pattern for pattern in generated_patterns)
|
|
73
|
+
):
|
|
74
|
+
raise LifecycleError("invalid wrapup landingGeneratedArtifactPatterns")
|
|
57
75
|
main = tuple(raw.get("mainBranches") or ("main", "master"))
|
|
58
76
|
return WorktreeProfile(
|
|
59
77
|
root=raw.get("worktreeRoot", ".worktrees"),
|
|
@@ -74,9 +92,28 @@ def load_profile(path: Path) -> WorktreeProfile:
|
|
|
74
92
|
r"\b(?:npm|pnpm|yarn)\s+(?:run\s+)?(?:test|typecheck|build)\b",
|
|
75
93
|
r"\bgit\s+(?:commit|push)\b",
|
|
76
94
|
)),
|
|
95
|
+
scratch_patterns=tuple(raw.get("scratchPatterns") or ()),
|
|
96
|
+
landing_generated_artifact_policy_configured=generated_policy_configured,
|
|
97
|
+
landing_generated_artifact_patterns=tuple(generated_patterns),
|
|
77
98
|
)
|
|
78
99
|
|
|
79
100
|
|
|
101
|
+
def load_profile(path: Path) -> WorktreeProfile:
|
|
102
|
+
try:
|
|
103
|
+
document = json.loads(path.read_text(encoding="utf-8"))
|
|
104
|
+
except (OSError, json.JSONDecodeError, TypeError) as error:
|
|
105
|
+
raise LifecycleError(f"cannot load worktree lifecycle profile: {error}") from error
|
|
106
|
+
return _load_profile_document(document)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def load_profile_text(text: str) -> WorktreeProfile:
|
|
110
|
+
try:
|
|
111
|
+
document = json.loads(text)
|
|
112
|
+
except (json.JSONDecodeError, TypeError) as error:
|
|
113
|
+
raise LifecycleError(f"cannot load worktree lifecycle profile: {error}") from error
|
|
114
|
+
return _load_profile_document(document)
|
|
115
|
+
|
|
116
|
+
|
|
80
117
|
def run(
|
|
81
118
|
command: list[str],
|
|
82
119
|
*,
|