mapify-cli 3.31.4__py3-none-any.whl → 3.32.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.
- mapify_cli/__init__.py +1 -1
- mapify_cli/templates/codex/hooks/context-meter.py +3 -3
- mapify_cli/templates/codex/hooks/detect-clarification-triggers.py +3 -3
- mapify_cli/templates/codex/hooks/map-memory-capture.py +3 -3
- mapify_cli/templates/codex/hooks/map-memory-endmark.py +3 -3
- mapify_cli/templates/codex/hooks/map-memory-recall.py +3 -3
- mapify_cli/templates/codex/hooks/map-memory-session.py +3 -3
- mapify_cli/templates/codex/hooks/map-stop.py +3 -3
- mapify_cli/templates/codex/hooks/map-token-meter.py +3 -3
- mapify_cli/templates/codex/hooks/post-compact-context.py +3 -3
- mapify_cli/templates/codex/hooks/pre-compact-save-transcript.py +3 -3
- mapify_cli/templates/codex/hooks/ralph-context-pruner.py +3 -3
- mapify_cli/templates/codex/hooks/ralph-iteration-logger.py +3 -3
- mapify_cli/templates/codex/hooks/safety-guardrails.py +3 -3
- mapify_cli/templates/codex/hooks/scrub-internal-ids.py +3 -3
- mapify_cli/templates/codex/hooks/workflow-context-injector.py +3 -3
- mapify_cli/templates/codex/hooks/workflow-gate.py +3 -3
- mapify_cli/templates/codex/skills/map-plan/SKILL.md +12 -0
- mapify_cli/templates/codex/skills/map-release/SKILL.md +23 -30
- mapify_cli/templates/codex/skills/map-release/release-reference.md +145 -44
- mapify_cli/templates/codex/skills/map-review/SKILL.md +543 -256
- mapify_cli/templates/codex/skills/map-review/adversarial-reference.md +87 -128
- mapify_cli/templates/codex/skills/map-review/review-reference.md +239 -337
- mapify_cli/templates/codex/skills/map-wayfind/SKILL.md +20 -8
- mapify_cli/templates/codex/skills/map-wayfind/wayfind-reference.md +131 -3
- mapify_cli/templates/hooks/context-meter.py +3 -3
- mapify_cli/templates/hooks/detect-clarification-triggers.py +3 -3
- mapify_cli/templates/hooks/map-memory-capture.py +3 -3
- mapify_cli/templates/hooks/map-memory-endmark.py +3 -3
- mapify_cli/templates/hooks/map-memory-finalize.py +3 -3
- mapify_cli/templates/hooks/map-memory-recall.py +3 -3
- mapify_cli/templates/hooks/map-statusline.py +3 -3
- mapify_cli/templates/hooks/map-token-meter.py +3 -3
- mapify_cli/templates/hooks/post-compact-context.py +3 -3
- mapify_cli/templates/hooks/pre-compact-save-transcript.py +3 -3
- mapify_cli/templates/hooks/ralph-context-pruner.py +3 -3
- mapify_cli/templates/hooks/ralph-iteration-logger.py +3 -3
- mapify_cli/templates/hooks/safety-guardrails.py +3 -3
- mapify_cli/templates/hooks/scrub-internal-ids.py +3 -3
- mapify_cli/templates/hooks/workflow-context-injector.py +3 -3
- mapify_cli/templates/hooks/workflow-gate.py +3 -3
- mapify_cli/templates/map/scripts/map_orchestrator.py +3 -3
- mapify_cli/templates/map/scripts/map_step_runner.py +288 -33
- mapify_cli/templates/map/scripts/validate_spec_citations.py +3 -3
- mapify_cli/templates/map/scripts/wayfind_runner.py +575 -4
- mapify_cli/templates/skills/map-plan/SKILL.md +2 -0
- mapify_cli/templates/skills/map-release/SKILL.md +22 -29
- mapify_cli/templates/skills/map-release/release-reference.md +138 -52
- mapify_cli/templates/skills/map-review/SKILL.md +62 -63
- mapify_cli/templates/skills/map-review/adversarial-reference.md +39 -41
- mapify_cli/templates/skills/map-review/review-reference.md +32 -22
- mapify_cli/templates/skills/map-wayfind/SKILL.md +19 -7
- mapify_cli/templates/skills/map-wayfind/wayfind-reference.md +131 -3
- mapify_cli/templates_src/_partials/python-version-guard.py.jinja +3 -3
- mapify_cli/templates_src/codex/skills/map-auto/auto-reference.md.jinja +1 -78
- mapify_cli/templates_src/codex/skills/map-plan/SKILL.md.jinja +12 -0
- mapify_cli/templates_src/codex/skills/map-release/SKILL.md.jinja +1 -177
- mapify_cli/templates_src/codex/skills/map-release/release-reference.md.jinja +1 -456
- mapify_cli/templates_src/codex/skills/map-review/SKILL.md.jinja +1 -412
- mapify_cli/templates_src/codex/skills/map-review/adversarial-reference.md.jinja +1 -224
- mapify_cli/templates_src/codex/skills/map-review/review-reference.md.jinja +1 -477
- mapify_cli/templates_src/codex/skills/map-wayfind/SKILL.md.jinja +1 -129
- mapify_cli/templates_src/codex/skills/map-wayfind/wayfind-reference.md.jinja +1 -134
- mapify_cli/templates_src/map/scripts/map_step_runner.py.jinja +285 -30
- mapify_cli/templates_src/map/scripts/wayfind_runner.py.jinja +575 -4
- mapify_cli/templates_src/skills/map-auto/auto-reference.md.jinja +9 -8
- mapify_cli/templates_src/skills/map-plan/SKILL.md.jinja +2 -0
- mapify_cli/templates_src/skills/map-release/SKILL.md.jinja +33 -33
- mapify_cli/templates_src/skills/map-release/release-reference.md.jinja +154 -56
- mapify_cli/templates_src/skills/map-review/SKILL.md.jinja +115 -65
- mapify_cli/templates_src/skills/map-review/adversarial-reference.md.jinja +62 -41
- mapify_cli/templates_src/skills/map-review/review-reference.md.jinja +39 -28
- mapify_cli/templates_src/skills/map-wayfind/SKILL.md.jinja +36 -21
- mapify_cli/templates_src/skills/map-wayfind/wayfind-reference.md.jinja +148 -14
- mapify_cli/tools/validate_dependencies.py +5 -5
- {mapify_cli-3.31.4.dist-info → mapify_cli-3.32.0.dist-info}/METADATA +3 -3
- {mapify_cli-3.31.4.dist-info → mapify_cli-3.32.0.dist-info}/RECORD +80 -80
- {mapify_cli-3.31.4.dist-info → mapify_cli-3.32.0.dist-info}/WHEEL +0 -0
- {mapify_cli-3.31.4.dist-info → mapify_cli-3.32.0.dist-info}/entry_points.txt +0 -0
- {mapify_cli-3.31.4.dist-info → mapify_cli-3.32.0.dist-info}/licenses/LICENSE +0 -0
mapify_cli/__init__.py
CHANGED
|
@@ -23,7 +23,7 @@ Or install globally:
|
|
|
23
23
|
mapify check
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
__version__ = "3.
|
|
26
|
+
__version__ = "3.32.0"
|
|
27
27
|
|
|
28
28
|
# MUST stay the first import: it turns "this interpreter is older than 3.11" into
|
|
29
29
|
# a message that says so, instead of the ImportError raised by `from datetime
|
|
@@ -36,13 +36,13 @@ import sys
|
|
|
36
36
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
37
37
|
# Name the real cause instead. Kept in sync with
|
|
38
38
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
39
|
-
#
|
|
40
|
-
#
|
|
39
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
40
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
41
41
|
#
|
|
42
42
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
43
43
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
44
44
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
45
|
-
if sys.version_info < (3, 11):
|
|
45
|
+
if tuple(sys.version_info) < (3, 11):
|
|
46
46
|
_MAP_PYTHON_PROBLEM = (
|
|
47
47
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
48
48
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -37,13 +37,13 @@ import sys
|
|
|
37
37
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
38
38
|
# Name the real cause instead. Kept in sync with
|
|
39
39
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
40
|
-
#
|
|
41
|
-
#
|
|
40
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
41
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
42
42
|
#
|
|
43
43
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
44
44
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
45
45
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
46
|
-
if sys.version_info < (3, 11):
|
|
46
|
+
if tuple(sys.version_info) < (3, 11):
|
|
47
47
|
_MAP_PYTHON_PROBLEM = (
|
|
48
48
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
49
49
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -10,13 +10,13 @@ import sys
|
|
|
10
10
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
11
11
|
# Name the real cause instead. Kept in sync with
|
|
12
12
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
14
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
15
15
|
#
|
|
16
16
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
17
17
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
18
18
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
19
|
-
if sys.version_info < (3, 11):
|
|
19
|
+
if tuple(sys.version_info) < (3, 11):
|
|
20
20
|
_MAP_PYTHON_PROBLEM = (
|
|
21
21
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
22
22
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -10,13 +10,13 @@ import sys
|
|
|
10
10
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
11
11
|
# Name the real cause instead. Kept in sync with
|
|
12
12
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
14
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
15
15
|
#
|
|
16
16
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
17
17
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
18
18
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
19
|
-
if sys.version_info < (3, 11):
|
|
19
|
+
if tuple(sys.version_info) < (3, 11):
|
|
20
20
|
_MAP_PYTHON_PROBLEM = (
|
|
21
21
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
22
22
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -10,13 +10,13 @@ import sys
|
|
|
10
10
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
11
11
|
# Name the real cause instead. Kept in sync with
|
|
12
12
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
14
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
15
15
|
#
|
|
16
16
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
17
17
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
18
18
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
19
|
-
if sys.version_info < (3, 11):
|
|
19
|
+
if tuple(sys.version_info) < (3, 11):
|
|
20
20
|
_MAP_PYTHON_PROBLEM = (
|
|
21
21
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
22
22
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -10,13 +10,13 @@ import sys
|
|
|
10
10
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
11
11
|
# Name the real cause instead. Kept in sync with
|
|
12
12
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
14
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
15
15
|
#
|
|
16
16
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
17
17
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
18
18
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
19
|
-
if sys.version_info < (3, 11):
|
|
19
|
+
if tuple(sys.version_info) < (3, 11):
|
|
20
20
|
_MAP_PYTHON_PROBLEM = (
|
|
21
21
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
22
22
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -10,13 +10,13 @@ import sys
|
|
|
10
10
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
11
11
|
# Name the real cause instead. Kept in sync with
|
|
12
12
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
14
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
15
15
|
#
|
|
16
16
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
17
17
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
18
18
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
19
|
-
if sys.version_info < (3, 11):
|
|
19
|
+
if tuple(sys.version_info) < (3, 11):
|
|
20
20
|
_MAP_PYTHON_PROBLEM = (
|
|
21
21
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
22
22
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -41,13 +41,13 @@ import sys
|
|
|
41
41
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
42
42
|
# Name the real cause instead. Kept in sync with
|
|
43
43
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
44
|
-
#
|
|
45
|
-
#
|
|
44
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
45
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
46
46
|
#
|
|
47
47
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
48
48
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
49
49
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
50
|
-
if sys.version_info < (3, 11):
|
|
50
|
+
if tuple(sys.version_info) < (3, 11):
|
|
51
51
|
_MAP_PYTHON_PROBLEM = (
|
|
52
52
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
53
53
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -20,13 +20,13 @@ import sys
|
|
|
20
20
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
21
21
|
# Name the real cause instead. Kept in sync with
|
|
22
22
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
23
|
-
#
|
|
24
|
-
#
|
|
23
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
24
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
25
25
|
#
|
|
26
26
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
27
27
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
28
28
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
29
|
-
if sys.version_info < (3, 11):
|
|
29
|
+
if tuple(sys.version_info) < (3, 11):
|
|
30
30
|
_MAP_PYTHON_PROBLEM = (
|
|
31
31
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
32
32
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -20,13 +20,13 @@ import sys
|
|
|
20
20
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
21
21
|
# Name the real cause instead. Kept in sync with
|
|
22
22
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
23
|
-
#
|
|
24
|
-
#
|
|
23
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
24
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
25
25
|
#
|
|
26
26
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
27
27
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
28
28
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
29
|
-
if sys.version_info < (3, 11):
|
|
29
|
+
if tuple(sys.version_info) < (3, 11):
|
|
30
30
|
_MAP_PYTHON_PROBLEM = (
|
|
31
31
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
32
32
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -25,13 +25,13 @@ import sys
|
|
|
25
25
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
26
26
|
# Name the real cause instead. Kept in sync with
|
|
27
27
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
28
|
-
#
|
|
29
|
-
#
|
|
28
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
29
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
30
30
|
#
|
|
31
31
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
32
32
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
33
33
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
34
|
-
if sys.version_info < (3, 11):
|
|
34
|
+
if tuple(sys.version_info) < (3, 11):
|
|
35
35
|
_MAP_PYTHON_PROBLEM = (
|
|
36
36
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
37
37
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -19,13 +19,13 @@ import sys
|
|
|
19
19
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
20
20
|
# Name the real cause instead. Kept in sync with
|
|
21
21
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
23
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
24
24
|
#
|
|
25
25
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
26
26
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
27
27
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
28
|
-
if sys.version_info < (3, 11):
|
|
28
|
+
if tuple(sys.version_info) < (3, 11):
|
|
29
29
|
_MAP_PYTHON_PROBLEM = (
|
|
30
30
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
31
31
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -24,8 +24,8 @@ import sys
|
|
|
24
24
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
25
25
|
# Name the real cause instead. Kept in sync with
|
|
26
26
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
27
|
-
#
|
|
28
|
-
#
|
|
27
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
28
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
29
29
|
#
|
|
30
30
|
# FAIL-CLOSED mode. This file is a blocking PreToolUse gate whose only job is to
|
|
31
31
|
# refuse unsafe tool calls, so an interpreter it cannot run on must not degrade
|
|
@@ -34,7 +34,7 @@ import sys
|
|
|
34
34
|
# how a PreToolUse hook blocks), so the call stops and the reason -- version,
|
|
35
35
|
# interpreter, fix -- reaches the operator. Fix python3 in another terminal;
|
|
36
36
|
# tool calls stay blocked until `python3 --version` reports 3.11+.
|
|
37
|
-
if sys.version_info < (3, 11):
|
|
37
|
+
if tuple(sys.version_info) < (3, 11):
|
|
38
38
|
_MAP_PYTHON_PROBLEM = (
|
|
39
39
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
40
40
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -43,13 +43,13 @@ import sys
|
|
|
43
43
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
44
44
|
# Name the real cause instead. Kept in sync with
|
|
45
45
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
46
|
-
#
|
|
47
|
-
#
|
|
46
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
47
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
48
48
|
#
|
|
49
49
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
50
50
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
51
51
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
52
|
-
if sys.version_info < (3, 11):
|
|
52
|
+
if tuple(sys.version_info) < (3, 11):
|
|
53
53
|
_MAP_PYTHON_PROBLEM = (
|
|
54
54
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
55
55
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -25,13 +25,13 @@ import sys
|
|
|
25
25
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
26
26
|
# Name the real cause instead. Kept in sync with
|
|
27
27
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
28
|
-
#
|
|
29
|
-
#
|
|
28
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
29
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
30
30
|
#
|
|
31
31
|
# FAIL-OPEN mode. Exit 1 is a non-blocking hook error for Claude Code (only
|
|
32
32
|
# exit 2, or a JSON deny, blocks a tool call), so the reason reaches the user
|
|
33
33
|
# and the session continues -- a broken interpreter is not a policy decision.
|
|
34
|
-
if sys.version_info < (3, 11):
|
|
34
|
+
if tuple(sys.version_info) < (3, 11):
|
|
35
35
|
_MAP_PYTHON_PROBLEM = (
|
|
36
36
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
37
37
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -45,8 +45,8 @@ import sys
|
|
|
45
45
|
# evaluated annotations) fails with a message that never mentions the version.
|
|
46
46
|
# Name the real cause instead. Kept in sync with
|
|
47
47
|
# mapify_cli/python_runtime.MINIMUM_PYTHON.
|
|
48
|
-
#
|
|
49
|
-
#
|
|
48
|
+
# Compare the runtime tuple: the executing interpreter is the user's `python3`,
|
|
49
|
+
# not necessarily the Python version targeted by the project's static checker.
|
|
50
50
|
#
|
|
51
51
|
# FAIL-CLOSED mode. This file is a blocking PreToolUse gate whose only job is to
|
|
52
52
|
# refuse unsafe tool calls, so an interpreter it cannot run on must not degrade
|
|
@@ -55,7 +55,7 @@ import sys
|
|
|
55
55
|
# how a PreToolUse hook blocks), so the call stops and the reason -- version,
|
|
56
56
|
# interpreter, fix -- reaches the operator. Fix python3 in another terminal;
|
|
57
57
|
# tool calls stay blocked until `python3 --version` reports 3.11+.
|
|
58
|
-
if sys.version_info < (3, 11):
|
|
58
|
+
if tuple(sys.version_info) < (3, 11):
|
|
59
59
|
_MAP_PYTHON_PROBLEM = (
|
|
60
60
|
f"MAP requires Python 3.11 or newer, but {sys.executable} is "
|
|
61
61
|
f"Python {sys.version_info[0]}.{sys.version_info[1]}.\n"
|
|
@@ -130,6 +130,18 @@ that the PRD became ready.
|
|
|
130
130
|
|
|
131
131
|
---
|
|
132
132
|
|
|
133
|
+
## Pre-flight: Wayfinding Handoff (optional)
|
|
134
|
+
|
|
135
|
+
A handoff seeds a fresh plan ONLY after Resume Detection returns `no_plan` (or after operator-confirmed archival resolves `goal_mismatch`). On `resume`, existing spec/task-plan wins and the handoff is NOT re-consumed; never overwrite an in-progress plan by re-seeding.
|
|
136
|
+
|
|
137
|
+
- For explicit `--wayfind <slug>`, select `.map/wayfind/<slug>/handoff.json` (repo-level).
|
|
138
|
+
- Otherwise run `python3 .map/scripts/wayfind_runner.py list_handoffs`; exactly one completed handoff may be offered, but consume only on an explicit user yes. Never guess a match; zero/multiple handoffs means skip.
|
|
139
|
+
- For BOTH explicit and user-accepted offered handoffs, run `python3 .map/scripts/wayfind_runner.py validate_wayfind_handoff <slug>` immediately before seeding. Non-success → STOP: stale, tampered, missing or actively corrected managed evidence is not settled input. Success with `evidence_status: legacy_unrecorded` → surface the provenance warning, never call it verified. Validation is read-only and proves integrity, not truth; do not repair or migrate the map on read.
|
|
140
|
+
|
|
141
|
+
When a handoff is used, pre-seed the spec: `decisions[]` → **Decisions Made** (settled; do not re-ask), `out_of_scope[]` → **Out of Scope**, `remaining_risks[]` → **Open Questions**. Unresolved research and corrections in risks are not decisions. Continue for anything the handoff did not settle; never modify the wayfinding map.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
133
145
|
## Pre-flight: Workflow-Fit Gate
|
|
134
146
|
|
|
135
147
|
Assess whether MAP planning is warranted. Evaluate these signals:
|
|
@@ -73,7 +73,7 @@ Execute all 12 gates. Read the full gate scripts in [release-reference.md § Pha
|
|
|
73
73
|
- **Gates 5–6:** Build + twine check
|
|
74
74
|
- **Gate 7:** Security audit (`pip-audit`)
|
|
75
75
|
- **Gates 8–10:** Git state — main branch, clean working directory, up-to-date with origin
|
|
76
|
-
- **Gate 11:**
|
|
76
|
+
- **Gate 11:** CI run for `git merge-base HEAD origin/main` must have `conclusion: "success"`; unpushed commits may touch only release metadata
|
|
77
77
|
- **Gate 12:** CHANGELOG.md completeness (Unreleased section exists and has content; commit/entry gap check)
|
|
78
78
|
|
|
79
79
|
**If any gate fails:** ABORT. Fix issues, re-run Phase 1.
|
|
@@ -81,27 +81,21 @@ Execute all 12 gates. Read the full gate scripts in [release-reference.md § Pha
|
|
|
81
81
|
## Phase 2: Version Determination
|
|
82
82
|
|
|
83
83
|
Read CHANGELOG.md `[Unreleased]` section to determine bump type (MAJOR/MINOR/PATCH/EXPLICIT).
|
|
84
|
-
Get current version from `pyproject.toml`.
|
|
84
|
+
Get current version from `pyproject.toml`.
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## Phase 3: Execute Version Bump Script
|
|
86
|
+
Ask the user directly for PATCH / MINOR / MAJOR / EXPLICIT, and wait for their answer.
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
For EXPLICIT, ask separately for the exact version. Carry only the user's approved
|
|
89
|
+
`BUMP_TYPE` and exact `NEW_VERSION` into Phase 3; each command runs in a fresh shell.
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
# Verify tag points to HEAD
|
|
94
|
-
TAG_COMMIT=$(git rev-list -n 1 "$LAST_TAG")
|
|
95
|
-
HEAD_COMMIT=$(git rev-parse HEAD)
|
|
96
|
-
[[ "$TAG_COMMIT" != "$HEAD_COMMIT" ]] && echo "❌ Tag mismatch" && exit 1
|
|
91
|
+
See [release-reference.md § Phase 2](release-reference.md#phase-2-version-determination) for the full question/option block.
|
|
97
92
|
|
|
98
|
-
|
|
99
|
-
INIT_VERSION=$(grep -m1 -E '^__version__ = ' src/mapify_cli/__init__.py | sed -E 's/__version__ = "(.*)"/\1/')
|
|
100
|
-
TAG_VERSION="${LAST_TAG#v}"
|
|
101
|
-
[[ "$INIT_VERSION" != "$TAG_VERSION" ]] && echo "❌ __version__ mismatch — fix manually, see reference" && exit 1
|
|
93
|
+
## Phase 3: Execute Version Bump Script
|
|
102
94
|
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
Show the exact approved version and bump type, then execute the Phase 3 reference
|
|
96
|
+
blocks with those values explicitly supplied in each invocation. Never rely on
|
|
97
|
+
variables left by a previous shell. Verify the version-derived `vX.Y.Z` tag points
|
|
98
|
+
to HEAD and both version fields match it using the Phase 3.3 reference block.
|
|
105
99
|
|
|
106
100
|
If `__version__` mismatches, follow the fix procedure in [release-reference.md § Phase 3 workaround](release-reference.md#phase-3-execute-version-bump-script).
|
|
107
101
|
|
|
@@ -109,25 +103,24 @@ If `__version__` mismatches, follow the fix procedure in [release-reference.md
|
|
|
109
103
|
|
|
110
104
|
**⚠️ CRITICAL PHASE:** Once the tag is pushed the release workflow triggers and publishes to PyPI.
|
|
111
105
|
|
|
112
|
-
Re-verify: on main branch,
|
|
106
|
+
Re-verify: on main branch, exact merge-base CI completed successfully with matching
|
|
107
|
+
`headSha`, only the three allowed metadata files changed, version-derived tag
|
|
108
|
+
points to HEAD and does not already exist on remote. Then request **explicit user
|
|
109
|
+
confirmation** (YES / NO / REVIEW options).
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
Ask the user directly and wait; only an unambiguous YES authorizes pushing.
|
|
112
|
+
|
|
113
|
+
Read [release-reference.md § Phase 4](release-reference.md#phase-4-push-commit-and-tag-irreversible)
|
|
114
|
+
for the confirmation and push blocks. Recompute the tag in the push invocation;
|
|
115
|
+
consent for an earlier version or commit does not authorize a changed release.
|
|
118
116
|
|
|
119
117
|
If user aborts: stop workflow, exit gracefully. Tag remains local only.
|
|
120
118
|
|
|
121
119
|
## Phase 5: CI/CD Monitoring
|
|
122
120
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
gh run list --workflow=release.yml --limit 1 --json databaseId,status,conclusion,createdAt
|
|
127
|
-
gh run watch "$RUN_ID"
|
|
128
|
-
FINAL_STATUS=$(gh run view "$RUN_ID" --json conclusion --jq '.conclusion')
|
|
129
|
-
[[ "$FINAL_STATUS" != "success" ]] && echo "❌ Release workflow failed — see reference for rollback" && exit 1
|
|
130
|
-
```
|
|
121
|
+
Use the Phase 5 reference block: recompute the version-derived tag and release
|
|
122
|
+
commit, select `release.yml` for that exact commit (not latest-main), derive
|
|
123
|
+
`RUN_ID` in the same shell, then watch and validate the final status and `headSha`.
|
|
131
124
|
|
|
132
125
|
The GitHub Release is created automatically by the workflow (no manual step).
|
|
133
126
|
|