codexspec 0.7.21__tar.gz → 0.7.22__tar.gz
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.
- {codexspec-0.7.21 → codexspec-0.7.22}/PKG-INFO +1 -1
- {codexspec-0.7.21 → codexspec-0.7.22}/pyproject.toml +1 -1
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/__init__.py +66 -39
- {codexspec-0.7.21 → codexspec-0.7.22}/.gitignore +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/LICENSE +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/README.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/codexspec-icon.svg +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/codexspec-logo-dark.svg +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/codexspec-logo-light.svg +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/check-i18n-completeness.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/check-i18n-structure.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/check-prerequisites.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/common.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/create-new-feature.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/bash/review-context.sh +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/powershell/check-prerequisites.ps1 +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/powershell/common.ps1 +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/powershell/create-new-feature.ps1 +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/scripts/powershell/review-context.ps1 +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/automation.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/blueprint.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/commands/__init__.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/commands/installer.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/commit_guidance.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/commit_runtime.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/__init__.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/app.js +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/ar.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/de.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/en.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/es.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/fr.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/hi.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/it.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/ja.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/ko.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/pt.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/ru.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/zh-CN.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/i18n/zh-TW.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/index.html +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/assets/styles.css +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/domain.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/lease.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/models.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/records.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/server.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/session.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/terminal.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/distill_review/transaction.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/i18n.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/idea.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/integrations/__init__.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/integrations/base.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/integrations/claude.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/integrations/codex.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/merge_commits.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/profile.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/staged_commits.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/translator.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/src/codexspec/worktrees.py +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/analyze.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/auto-dev.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/blueprint.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/checklist.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/clarify.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/commit-staged.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/config.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/constitution.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/debug.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/design-to-plan.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/distill.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/evolve.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/generate-spec.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/implement-tasks.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/onboard.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/plan-to-tasks.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/pr.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/quick.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/release-notes.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/reverse-spec.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/review-code.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/review-design.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/review-plan.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/review-spec.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/review-tasks.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/spec-to-design.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/specify.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/commands/tasks-to-issues.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/checklist-template.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/constitution-template.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/design-template.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/plan-template-detailed.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/plan-template-simple.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/requirements-template.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/spec-template-detailed.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/spec-template-simple.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/tasks-template-detailed.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/docs/tasks-template-simple.md +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/de.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/en.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/es.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/fr.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/ja.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/ko.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/pt-BR.json +0 -0
- {codexspec-0.7.21 → codexspec-0.7.22}/templates/translations/zh-CN.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codexspec
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.22
|
|
4
4
|
Summary: CodexSpec - A Requirements-First SDD toolkit for Claude Code
|
|
5
5
|
Project-URL: Homepage, https://github.com/Zts0hg/codexspec
|
|
6
6
|
Project-URL: Repository, https://github.com/Zts0hg/codexspec
|
|
@@ -30,7 +30,6 @@ from .automation import (
|
|
|
30
30
|
AutomationError,
|
|
31
31
|
BlueprintStore,
|
|
32
32
|
OwnershipError,
|
|
33
|
-
WorkspaceContext,
|
|
34
33
|
ensure_dedicated_workspace,
|
|
35
34
|
locate_dedicated_workspace,
|
|
36
35
|
locate_repository,
|
|
@@ -78,7 +77,7 @@ from .worktrees import (
|
|
|
78
77
|
)
|
|
79
78
|
|
|
80
79
|
# Version info
|
|
81
|
-
__version__ = "0.7.
|
|
80
|
+
__version__ = "0.7.22"
|
|
82
81
|
__author__ = "CodexSpec Team"
|
|
83
82
|
|
|
84
83
|
# Constitution file path constants
|
|
@@ -476,22 +475,64 @@ def blueprint_helper(
|
|
|
476
475
|
_automation_failure(exc)
|
|
477
476
|
|
|
478
477
|
|
|
478
|
+
def _validate_auto_dev_request(action: str, body: dict[str, Any]) -> None:
|
|
479
|
+
"""Reject malformed requests before ownership or workspace mutations."""
|
|
480
|
+
if action == "acquire":
|
|
481
|
+
if body:
|
|
482
|
+
raise AutomationError("unexpected_fields")
|
|
483
|
+
return
|
|
484
|
+
token_only = {"renew", "assert-owner", "release", "sync-default", "abort-sync"}
|
|
485
|
+
if action not in token_only | {
|
|
486
|
+
"prepare-sync-verification",
|
|
487
|
+
"continue-sync",
|
|
488
|
+
"prepare-feature",
|
|
489
|
+
"commit-feature",
|
|
490
|
+
"discard-feature",
|
|
491
|
+
}:
|
|
492
|
+
raise AutomationError("unsupported_auto_dev_helper_action", action)
|
|
493
|
+
if not isinstance(body.get("token"), str):
|
|
494
|
+
raise AutomationError("missing_token")
|
|
495
|
+
if action in token_only:
|
|
496
|
+
if set(body) != {"token"}:
|
|
497
|
+
raise AutomationError("unexpected_fields")
|
|
498
|
+
elif action == "prepare-sync-verification":
|
|
499
|
+
if (
|
|
500
|
+
set(body) != {"token", "resolved_paths"}
|
|
501
|
+
or not isinstance(body["resolved_paths"], list)
|
|
502
|
+
or not body["resolved_paths"]
|
|
503
|
+
or not all(isinstance(path, str) for path in body["resolved_paths"])
|
|
504
|
+
):
|
|
505
|
+
raise AutomationError("invalid_prepare_sync_request")
|
|
506
|
+
elif action == "continue-sync":
|
|
507
|
+
if set(body) not in (
|
|
508
|
+
{"token", "checks_passed"},
|
|
509
|
+
{"token", "checks_passed", "analysis", "message"},
|
|
510
|
+
) or not isinstance(body.get("checks_passed"), bool):
|
|
511
|
+
raise AutomationError("invalid_continue_sync_request")
|
|
512
|
+
elif action == "prepare-feature":
|
|
513
|
+
if (
|
|
514
|
+
set(body) != {"token", "feature_id", "paths"}
|
|
515
|
+
or not isinstance(body["feature_id"], str)
|
|
516
|
+
or not isinstance(body["paths"], list)
|
|
517
|
+
or not all(isinstance(path, str) for path in body["paths"])
|
|
518
|
+
):
|
|
519
|
+
raise AutomationError("invalid_prepare_feature_request")
|
|
520
|
+
elif action == "commit-feature":
|
|
521
|
+
_analysis_request(body, token=True)
|
|
522
|
+
elif action == "discard-feature":
|
|
523
|
+
if set(body) != {"token", "preparation_id"} or not isinstance(body["preparation_id"], str):
|
|
524
|
+
raise AutomationError("invalid_preparation")
|
|
525
|
+
|
|
526
|
+
|
|
479
527
|
@app.command("_auto-dev-helper", hidden=True)
|
|
480
528
|
def auto_dev_helper(action: str = typer.Argument(..., help="Internal helper action")) -> None:
|
|
481
529
|
"""Internal machine interface for auto-dev ownership and Git writes."""
|
|
482
530
|
try:
|
|
483
531
|
body = _stdin_json()
|
|
532
|
+
_validate_auto_dev_request(action, body)
|
|
484
533
|
context = locate_repository(Path.cwd())
|
|
485
534
|
ownership = AutoDevOwnership(context)
|
|
486
|
-
workspace: WorkspaceContext | None = None
|
|
487
|
-
service: AutoDevGit | None = None
|
|
488
|
-
if action != "acquire":
|
|
489
|
-
# Every non-acquire action legitimately waits behind the active run.
|
|
490
|
-
workspace = ensure_dedicated_workspace(context)
|
|
491
|
-
service = AutoDevGit(workspace, ownership)
|
|
492
535
|
if action == "acquire":
|
|
493
|
-
if body:
|
|
494
|
-
raise AutomationError("unexpected_fields")
|
|
495
536
|
token = ownership.acquire()
|
|
496
537
|
try:
|
|
497
538
|
workspace = ensure_dedicated_workspace(context)
|
|
@@ -514,56 +555,42 @@ def auto_dev_helper(action: str = typer.Argument(..., help="Internal helper acti
|
|
|
514
555
|
}
|
|
515
556
|
)
|
|
516
557
|
return
|
|
517
|
-
if set(body) < {"token"} or not isinstance(body.get("token"), str):
|
|
518
|
-
raise AutomationError("missing_token")
|
|
519
558
|
token = body["token"]
|
|
520
|
-
|
|
521
|
-
raise AutomationError("unexpected_fields")
|
|
559
|
+
# Ownership operations must remain usable even if the worktree is missing.
|
|
522
560
|
if action == "renew":
|
|
523
561
|
ownership.renew(token)
|
|
524
|
-
|
|
525
|
-
|
|
562
|
+
_machine_json({"state": "renewed"})
|
|
563
|
+
return
|
|
564
|
+
if action == "assert-owner":
|
|
526
565
|
ownership.assert_owner(token)
|
|
527
|
-
|
|
528
|
-
|
|
566
|
+
_machine_json({"state": "owner"})
|
|
567
|
+
return
|
|
568
|
+
if action == "release":
|
|
529
569
|
ownership.release(token)
|
|
530
|
-
|
|
531
|
-
|
|
570
|
+
_machine_json({"state": "released"})
|
|
571
|
+
return
|
|
572
|
+
|
|
573
|
+
# Only acquire may initialize a workspace; follow-up actions must not repair
|
|
574
|
+
# missing state or fetch/merge history before their operation is validated.
|
|
575
|
+
workspace = locate_dedicated_workspace(context)
|
|
576
|
+
service = AutoDevGit(workspace, ownership)
|
|
577
|
+
if action == "sync-default":
|
|
532
578
|
result = service.sync_default(token)
|
|
533
579
|
elif action == "prepare-sync-verification":
|
|
534
|
-
if set(body) != {"token", "resolved_paths"} or not isinstance(body["resolved_paths"], list):
|
|
535
|
-
raise AutomationError("invalid_prepare_sync_request")
|
|
536
|
-
if not body["resolved_paths"] or not all(isinstance(path, str) for path in body["resolved_paths"]):
|
|
537
|
-
raise AutomationError("invalid_prepare_sync_request")
|
|
538
580
|
result = service.prepare_sync_verification(token, body["resolved_paths"])
|
|
539
581
|
elif action == "abort-sync":
|
|
540
582
|
result = service.abort_sync(token)
|
|
541
583
|
elif action == "continue-sync":
|
|
542
|
-
if set(body) not in (
|
|
543
|
-
{"token", "checks_passed"},
|
|
544
|
-
{"token", "checks_passed", "analysis", "message"},
|
|
545
|
-
) or not isinstance(body.get("checks_passed"), bool):
|
|
546
|
-
raise AutomationError("invalid_continue_sync_request")
|
|
547
584
|
result = service.continue_sync(
|
|
548
585
|
token, checks_passed=body["checks_passed"], analysis=body.get("analysis"), message=body.get("message")
|
|
549
586
|
)
|
|
550
587
|
elif action == "prepare-feature":
|
|
551
|
-
if (
|
|
552
|
-
set(body) != {"token", "feature_id", "paths"}
|
|
553
|
-
or not isinstance(body["feature_id"], str)
|
|
554
|
-
or not isinstance(body["paths"], list)
|
|
555
|
-
or not all(isinstance(path, str) for path in body["paths"])
|
|
556
|
-
):
|
|
557
|
-
raise AutomationError("invalid_prepare_feature_request")
|
|
558
588
|
result = service.prepare_feature(token, body["feature_id"], body["paths"])
|
|
559
589
|
elif action == "commit-feature":
|
|
560
|
-
_analysis_request(body, token=True)
|
|
561
590
|
result = service.commit_feature(token, body["preparation_id"], body["analyzed_tree"], body["message"])
|
|
562
591
|
elif action == "discard-feature":
|
|
563
592
|
from .staged_commits import PreparedCommits
|
|
564
593
|
|
|
565
|
-
if set(body) != {"token", "preparation_id"} or not isinstance(body["preparation_id"], str):
|
|
566
|
-
raise AutomationError("invalid_preparation")
|
|
567
594
|
ownership.assert_owner(token)
|
|
568
595
|
PreparedCommits(workspace).discard(body["preparation_id"], kind="feature", token=token)
|
|
569
596
|
result = {"state": "discarded"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|