pactkit 1.0.0__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.
Files changed (65) hide show
  1. pactkit-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
  2. pactkit-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +18 -0
  3. pactkit-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
  4. pactkit-1.0.0/.github/workflows/ci.yml +35 -0
  5. pactkit-1.0.0/.gitignore +37 -0
  6. pactkit-1.0.0/CONTRIBUTING.md +44 -0
  7. pactkit-1.0.0/LICENSE +21 -0
  8. pactkit-1.0.0/PKG-INFO +173 -0
  9. pactkit-1.0.0/README.md +148 -0
  10. pactkit-1.0.0/pyproject.toml +72 -0
  11. pactkit-1.0.0/src/pactkit/__init__.py +3 -0
  12. pactkit-1.0.0/src/pactkit/cli.py +78 -0
  13. pactkit-1.0.0/src/pactkit/common_user.py +219 -0
  14. pactkit-1.0.0/src/pactkit/generators/__init__.py +0 -0
  15. pactkit-1.0.0/src/pactkit/generators/deployer.py +157 -0
  16. pactkit-1.0.0/src/pactkit/prompts/__init__.py +45 -0
  17. pactkit-1.0.0/src/pactkit/prompts/agents.py +306 -0
  18. pactkit-1.0.0/src/pactkit/prompts/commands.py +452 -0
  19. pactkit-1.0.0/src/pactkit/prompts/references.py +419 -0
  20. pactkit-1.0.0/src/pactkit/prompts/rules.py +226 -0
  21. pactkit-1.0.0/src/pactkit/prompts/skills.py +208 -0
  22. pactkit-1.0.0/src/pactkit/prompts/workflows.py +779 -0
  23. pactkit-1.0.0/src/pactkit/scripts.py +122 -0
  24. pactkit-1.0.0/src/pactkit/skills/__init__.py +29 -0
  25. pactkit-1.0.0/src/pactkit/skills/board.py +263 -0
  26. pactkit-1.0.0/src/pactkit/skills/scaffold.py +308 -0
  27. pactkit-1.0.0/src/pactkit/skills/visualize.py +312 -0
  28. pactkit-1.0.0/src/pactkit/utils.py +9 -0
  29. pactkit-1.0.0/tests/unit/test_agent_features.py +136 -0
  30. pactkit-1.0.0/tests/unit/test_agent_frontmatter.py +95 -0
  31. pactkit-1.0.0/tests/unit/test_agents_enrichment.py +181 -0
  32. pactkit-1.0.0/tests/unit/test_board_sections.py +296 -0
  33. pactkit-1.0.0/tests/unit/test_check_command.py +124 -0
  34. pactkit-1.0.0/tests/unit/test_command_frontmatter.py +122 -0
  35. pactkit-1.0.0/tests/unit/test_command_visualize_modes.py +86 -0
  36. pactkit-1.0.0/tests/unit/test_common_user.py +111 -0
  37. pactkit-1.0.0/tests/unit/test_create_skill.py +141 -0
  38. pactkit-1.0.0/tests/unit/test_deployer_cleanup.py +147 -0
  39. pactkit-1.0.0/tests/unit/test_design_command.py +275 -0
  40. pactkit-1.0.0/tests/unit/test_done_gates.py +145 -0
  41. pactkit-1.0.0/tests/unit/test_draw_prompt.py +165 -0
  42. pactkit-1.0.0/tests/unit/test_draw_references.py +94 -0
  43. pactkit-1.0.0/tests/unit/test_home_path_fix.py +130 -0
  44. pactkit-1.0.0/tests/unit/test_hotfix_command.py +152 -0
  45. pactkit-1.0.0/tests/unit/test_lang_profiles.py +228 -0
  46. pactkit-1.0.0/tests/unit/test_list_stories.py +188 -0
  47. pactkit-1.0.0/tests/unit/test_mcp_integration.py +347 -0
  48. pactkit-1.0.0/tests/unit/test_model_config.py +65 -0
  49. pactkit-1.0.0/tests/unit/test_modular_constitution.py +170 -0
  50. pactkit-1.0.0/tests/unit/test_multi_prefix.py +163 -0
  51. pactkit-1.0.0/tests/unit/test_prompts_package.py +246 -0
  52. pactkit-1.0.0/tests/unit/test_release.py +159 -0
  53. pactkit-1.0.0/tests/unit/test_release_field.py +137 -0
  54. pactkit-1.0.0/tests/unit/test_review_command.py +238 -0
  55. pactkit-1.0.0/tests/unit/test_rules_enrichment.py +209 -0
  56. pactkit-1.0.0/tests/unit/test_script_extraction.py +95 -0
  57. pactkit-1.0.0/tests/unit/test_skill_structure.py +209 -0
  58. pactkit-1.0.0/tests/unit/test_skills_enrichment.py +137 -0
  59. pactkit-1.0.0/tests/unit/test_smart_regression.py +242 -0
  60. pactkit-1.0.0/tests/unit/test_sprint_command.py +193 -0
  61. pactkit-1.0.0/tests/unit/test_stack_references.py +275 -0
  62. pactkit-1.0.0/tests/unit/test_statusline.py +216 -0
  63. pactkit-1.0.0/tests/unit/test_tools.py +151 -0
  64. pactkit-1.0.0/tests/unit/test_update_task.py +122 -0
  65. pactkit-1.0.0/tests/unit/test_visualize_modes.py +219 -0
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug in PactKit
4
+ title: "[BUG] "
5
+ labels: bug
6
+ ---
7
+
8
+ ## Description
9
+
10
+ A clear description of the bug.
11
+
12
+ ## Steps to Reproduce
13
+
14
+ 1. Run `pactkit init`
15
+ 2. Execute `/project-plan "..."`
16
+ 3. ...
17
+
18
+ ## Expected Behavior
19
+
20
+ What you expected to happen.
21
+
22
+ ## Actual Behavior
23
+
24
+ What actually happened.
25
+
26
+ ## Environment
27
+
28
+ - PactKit version: `pactkit version`
29
+ - Python version:
30
+ - OS:
31
+ - AI assistant: (Claude Code / other)
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature for PactKit
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ What problem does this feature solve?
11
+
12
+ ## Proposed Solution
13
+
14
+ How should it work?
15
+
16
+ ## Alternatives Considered
17
+
18
+ Any other approaches you've considered.
@@ -0,0 +1,17 @@
1
+ ## Summary
2
+
3
+ <!-- Brief description of what this PR does -->
4
+
5
+ ## Changes
6
+
7
+ <!-- Bullet list of changes -->
8
+
9
+ ## Test Plan
10
+
11
+ - [ ] All existing tests pass
12
+ - [ ] New tests added for new functionality
13
+ - [ ] Manual verification completed
14
+
15
+ ## Related Issues
16
+
17
+ <!-- Link to related issues: Fixes #123, Closes #456 -->
@@ -0,0 +1,35 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e .
28
+ pip install pytest ruff==0.15.1
29
+ pactkit init
30
+
31
+ - name: Lint with ruff
32
+ run: ruff check src/ tests/
33
+
34
+ - name: Run tests
35
+ run: pytest tests/ -v
@@ -0,0 +1,37 @@
1
+ # Python
2
+ *.pyc
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+ .pytest_cache/
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+ .eggs/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ env/
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
26
+ *.tmp
27
+ *.log
28
+
29
+ # PactKit - generated artifacts (auto-regenerated by user projects)
30
+ docs/architecture/graphs/
31
+ docs/architecture/snapshots/
32
+
33
+ # Claude Code local config
34
+ .claude/
35
+
36
+ # Backup
37
+ *.bak
@@ -0,0 +1,44 @@
1
+ # Contributing to PactKit
2
+
3
+ Thank you for your interest in contributing to PactKit!
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository
8
+ 2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/pactkit.git`
9
+ 3. Create a branch: `git checkout -b feature/your-feature`
10
+ 4. Install in development mode: `pip install -e ".[dev]"`
11
+ 5. Run tests: `pytest`
12
+
13
+ ## Development Workflow
14
+
15
+ PactKit follows its own PDCA workflow:
16
+
17
+ 1. **Plan** — Open an issue describing what you want to change and why
18
+ 2. **Act** — Write tests first (TDD), then implement
19
+ 3. **Check** — Ensure all tests pass: `pytest`
20
+ 4. **Done** — Submit a PR with conventional commit messages
21
+
22
+ ## Commit Messages
23
+
24
+ We use [Conventional Commits](https://www.conventionalcommits.org/):
25
+
26
+ ```
27
+ feat(scope): add new feature
28
+ fix(scope): fix a bug
29
+ docs(scope): update documentation
30
+ test(scope): add or update tests
31
+ chore(scope): build/tooling changes
32
+ refactor(scope): code refactoring
33
+ ```
34
+
35
+ ## Pull Requests
36
+
37
+ - Keep PRs focused on a single change
38
+ - Include tests for new functionality
39
+ - Update documentation if behavior changes
40
+ - All CI checks must pass before merge
41
+
42
+ ## Code of Conduct
43
+
44
+ Be respectful, constructive, and collaborative. We welcome contributors of all experience levels.
pactkit-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 PactKit Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pactkit-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: pactkit
3
+ Version: 1.0.0
4
+ Summary: Spec-driven agentic DevOps toolkit for AI coding assistants
5
+ Project-URL: Homepage, https://pactkit.dev
6
+ Project-URL: Repository, https://github.com/pactkit/pactkit
7
+ Project-URL: Documentation, https://pactkit.dev/docs
8
+ Project-URL: Issues, https://github.com/pactkit/pactkit/issues
9
+ Author: Slim
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: agent,ai,claude-code,devops,pdca,scaffold,spec-driven,tdd
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+
26
+ # PactKit
27
+
28
+ **Spec-driven agentic DevOps toolkit for AI coding assistants.**
29
+
30
+ > *"Code by Contract"* — Agree on specs before writing code. Let agents execute.
31
+
32
+ PactKit is an enterprise-grade **agentic DevOps scaffold** that compiles development workflows, role definitions, and behavioral rules into executable "constitutions" and "playbooks" for AI coding assistants.
33
+
34
+ ## Why PactKit?
35
+
36
+ AI coding assistants are powerful but unpredictable without structure. PactKit adds a **spec-driven governance layer**:
37
+
38
+ - **Spec is the Law** — Specifications are the single source of truth (Spec > Tests > Code)
39
+ - **Multi-Agent Ensemble** — 9 specialized agents collaborate, each with defined roles
40
+ - **Full PDCA Lifecycle** — Plan → Act → Check → Done, with quality gates at every stage
41
+ - **Safe by Design** — TDD-first development, safe regression testing, pre-existing test protection
42
+
43
+ ## Quick Start
44
+
45
+ ```bash
46
+ # Install
47
+ pip install pactkit
48
+
49
+ # Deploy Expert mode (full 13 commands + 9 agents + 3 skills)
50
+ pactkit init
51
+
52
+ # Or deploy lightweight Common mode (4 basic PDCA commands)
53
+ pactkit init --mode common
54
+ ```
55
+
56
+ Then in any project with Claude Code:
57
+
58
+ ```bash
59
+ # Plan — Analyze requirements, create Spec
60
+ /project-plan "Add user authentication"
61
+
62
+ # Act — Implement with strict TDD
63
+ /project-act STORY-001
64
+
65
+ # Check — Security scan + quality audit (P0-P3 severity)
66
+ /project-check
67
+
68
+ # Done — Safe regression gate + conventional commit
69
+ /project-done
70
+ ```
71
+
72
+ Or run the full cycle in one command:
73
+
74
+ ```bash
75
+ /project-sprint "Add user authentication"
76
+ ```
77
+
78
+ ## PDCA+ Workflow
79
+
80
+ | Phase | Command | Agent | What Happens |
81
+ |-------|---------|-------|-------------|
82
+ | **Plan** | `/project-plan` | System Architect | Codebase scan → Spec generation → Board entry |
83
+ | **Act** | `/project-act` | Senior Developer | Visual scan → TDD loop → Regression check |
84
+ | **Check** | `/project-check` | QA + Security | 6-phase deep audit (Security/Quality/Spec alignment) |
85
+ | **Done** | `/project-done` | Repo Maintainer | Safe regression gate → Archive → Conventional commit |
86
+ | **Trace** | `/project-trace` | Code Explorer | Call graph tracing → Sequence diagram |
87
+ | **Draw** | `/project-draw` | Visual Architect | Generate Draw.io XML architecture diagrams |
88
+ | **Doctor** | `/project-doctor` | System Medic | Configuration drift detection → Health report |
89
+ | **Review** | `/project-review` | QA Engineer | PR review with SOLID/Security/Quality checklists |
90
+ | **Sprint** | `/project-sprint` | Team Lead | One-command automated PDCA orchestration |
91
+ | **Hotfix** | `/project-hotfix` | Senior Developer | Fast-track fix bypassing PDCA (with traceability) |
92
+ | **Release** | `/project-release` | Repo Maintainer | Version bump → Archive → Git tag → Changelog |
93
+ | **Design** | `/project-design` | Product Designer | PRD generation → Story decomposition → Board setup |
94
+
95
+ ## Agent Ensemble
96
+
97
+ PactKit deploys 9 specialized agents, each with constrained tools and focused responsibilities:
98
+
99
+ | Agent | Role | Core Capability |
100
+ |-------|------|----------------|
101
+ | System Architect | Architecture design | Maintain Intent Graph, write Specs |
102
+ | Senior Developer | Full-stack development | TDD loop, call chain analysis, hotfix |
103
+ | QA Engineer | Quality gates | Deep check (P0-P3), PR review |
104
+ | Security Auditor | Security audit | OWASP scanning, threat modeling |
105
+ | Repo Maintainer | Repository ops | Cleanup, archiving, Git conventions, releases |
106
+ | System Medic | System diagnostics | Configuration drift repair |
107
+ | Visual Architect | Architecture visualization | Draw.io XML generation |
108
+ | Code Explorer | Code tracing | Call graph + sequence diagram |
109
+ | Product Designer | Product design | PRD, story decomposition, board init |
110
+
111
+ ## Skills
112
+
113
+ Three atomic skills are deployed as standalone scripts:
114
+
115
+ - **pactkit-visualize** — Code dependency graph (Mermaid): file-level, class-level, call-level
116
+ - **pactkit-board** — Sprint board operations: add story, update task, archive
117
+ - **pactkit-scaffold** — File scaffolding: create spec, test files, git branches, skills
118
+
119
+ ## Safe Regression
120
+
121
+ PactKit's safe regression system prevents agents from blindly modifying pre-existing tests:
122
+
123
+ - **TDD Loop** — Only iterates on tests created in the current story
124
+ - **Regression Check** — Read-only gate; pre-existing test failure = STOP and report
125
+ - **Done Gate** — Full regression by default; incremental only when ALL safety conditions are met
126
+
127
+ ## Hierarchy of Truth
128
+
129
+ ```
130
+ Tier 1: Specs (docs/specs/*.md) — The Law
131
+ Tier 2: Tests — The Verification
132
+ Tier 3: Implementation — The Mutable Reality
133
+ ```
134
+
135
+ When conflicts arise: Spec wins. Always.
136
+
137
+ ## Configuration
138
+
139
+ PactKit deploys to `~/.claude/`:
140
+
141
+ ```
142
+ ~/.claude/
143
+ ├── CLAUDE.md ← Modular constitution (entry point)
144
+ ├── rules/ ← 6 rule modules
145
+ ├── commands/ ← 13 command playbooks
146
+ ├── agents/ ← 9 agent definitions
147
+ └── skills/ ← 3 skill packages
148
+ ├── pactkit-visualize/
149
+ ├── pactkit-board/
150
+ └── pactkit-scaffold/
151
+ ```
152
+
153
+ ## MCP Integration
154
+
155
+ PactKit conditionally integrates with MCP servers when available:
156
+
157
+ | MCP Server | Purpose | PDCA Phase |
158
+ |------------|---------|------------|
159
+ | Context7 | Library documentation lookup | Act |
160
+ | shadcn | UI component search/install | Design |
161
+ | Playwright | Browser automation testing | Check |
162
+ | Chrome DevTools | Performance/console/network | Check |
163
+ | Memory | Cross-session knowledge graph | Plan/Act/Done |
164
+
165
+ All MCP instructions are conditional — gracefully skipped when unavailable.
166
+
167
+ ## Contributing
168
+
169
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
170
+
171
+ ## License
172
+
173
+ [MIT](LICENSE)
@@ -0,0 +1,148 @@
1
+ # PactKit
2
+
3
+ **Spec-driven agentic DevOps toolkit for AI coding assistants.**
4
+
5
+ > *"Code by Contract"* — Agree on specs before writing code. Let agents execute.
6
+
7
+ PactKit is an enterprise-grade **agentic DevOps scaffold** that compiles development workflows, role definitions, and behavioral rules into executable "constitutions" and "playbooks" for AI coding assistants.
8
+
9
+ ## Why PactKit?
10
+
11
+ AI coding assistants are powerful but unpredictable without structure. PactKit adds a **spec-driven governance layer**:
12
+
13
+ - **Spec is the Law** — Specifications are the single source of truth (Spec > Tests > Code)
14
+ - **Multi-Agent Ensemble** — 9 specialized agents collaborate, each with defined roles
15
+ - **Full PDCA Lifecycle** — Plan → Act → Check → Done, with quality gates at every stage
16
+ - **Safe by Design** — TDD-first development, safe regression testing, pre-existing test protection
17
+
18
+ ## Quick Start
19
+
20
+ ```bash
21
+ # Install
22
+ pip install pactkit
23
+
24
+ # Deploy Expert mode (full 13 commands + 9 agents + 3 skills)
25
+ pactkit init
26
+
27
+ # Or deploy lightweight Common mode (4 basic PDCA commands)
28
+ pactkit init --mode common
29
+ ```
30
+
31
+ Then in any project with Claude Code:
32
+
33
+ ```bash
34
+ # Plan — Analyze requirements, create Spec
35
+ /project-plan "Add user authentication"
36
+
37
+ # Act — Implement with strict TDD
38
+ /project-act STORY-001
39
+
40
+ # Check — Security scan + quality audit (P0-P3 severity)
41
+ /project-check
42
+
43
+ # Done — Safe regression gate + conventional commit
44
+ /project-done
45
+ ```
46
+
47
+ Or run the full cycle in one command:
48
+
49
+ ```bash
50
+ /project-sprint "Add user authentication"
51
+ ```
52
+
53
+ ## PDCA+ Workflow
54
+
55
+ | Phase | Command | Agent | What Happens |
56
+ |-------|---------|-------|-------------|
57
+ | **Plan** | `/project-plan` | System Architect | Codebase scan → Spec generation → Board entry |
58
+ | **Act** | `/project-act` | Senior Developer | Visual scan → TDD loop → Regression check |
59
+ | **Check** | `/project-check` | QA + Security | 6-phase deep audit (Security/Quality/Spec alignment) |
60
+ | **Done** | `/project-done` | Repo Maintainer | Safe regression gate → Archive → Conventional commit |
61
+ | **Trace** | `/project-trace` | Code Explorer | Call graph tracing → Sequence diagram |
62
+ | **Draw** | `/project-draw` | Visual Architect | Generate Draw.io XML architecture diagrams |
63
+ | **Doctor** | `/project-doctor` | System Medic | Configuration drift detection → Health report |
64
+ | **Review** | `/project-review` | QA Engineer | PR review with SOLID/Security/Quality checklists |
65
+ | **Sprint** | `/project-sprint` | Team Lead | One-command automated PDCA orchestration |
66
+ | **Hotfix** | `/project-hotfix` | Senior Developer | Fast-track fix bypassing PDCA (with traceability) |
67
+ | **Release** | `/project-release` | Repo Maintainer | Version bump → Archive → Git tag → Changelog |
68
+ | **Design** | `/project-design` | Product Designer | PRD generation → Story decomposition → Board setup |
69
+
70
+ ## Agent Ensemble
71
+
72
+ PactKit deploys 9 specialized agents, each with constrained tools and focused responsibilities:
73
+
74
+ | Agent | Role | Core Capability |
75
+ |-------|------|----------------|
76
+ | System Architect | Architecture design | Maintain Intent Graph, write Specs |
77
+ | Senior Developer | Full-stack development | TDD loop, call chain analysis, hotfix |
78
+ | QA Engineer | Quality gates | Deep check (P0-P3), PR review |
79
+ | Security Auditor | Security audit | OWASP scanning, threat modeling |
80
+ | Repo Maintainer | Repository ops | Cleanup, archiving, Git conventions, releases |
81
+ | System Medic | System diagnostics | Configuration drift repair |
82
+ | Visual Architect | Architecture visualization | Draw.io XML generation |
83
+ | Code Explorer | Code tracing | Call graph + sequence diagram |
84
+ | Product Designer | Product design | PRD, story decomposition, board init |
85
+
86
+ ## Skills
87
+
88
+ Three atomic skills are deployed as standalone scripts:
89
+
90
+ - **pactkit-visualize** — Code dependency graph (Mermaid): file-level, class-level, call-level
91
+ - **pactkit-board** — Sprint board operations: add story, update task, archive
92
+ - **pactkit-scaffold** — File scaffolding: create spec, test files, git branches, skills
93
+
94
+ ## Safe Regression
95
+
96
+ PactKit's safe regression system prevents agents from blindly modifying pre-existing tests:
97
+
98
+ - **TDD Loop** — Only iterates on tests created in the current story
99
+ - **Regression Check** — Read-only gate; pre-existing test failure = STOP and report
100
+ - **Done Gate** — Full regression by default; incremental only when ALL safety conditions are met
101
+
102
+ ## Hierarchy of Truth
103
+
104
+ ```
105
+ Tier 1: Specs (docs/specs/*.md) — The Law
106
+ Tier 2: Tests — The Verification
107
+ Tier 3: Implementation — The Mutable Reality
108
+ ```
109
+
110
+ When conflicts arise: Spec wins. Always.
111
+
112
+ ## Configuration
113
+
114
+ PactKit deploys to `~/.claude/`:
115
+
116
+ ```
117
+ ~/.claude/
118
+ ├── CLAUDE.md ← Modular constitution (entry point)
119
+ ├── rules/ ← 6 rule modules
120
+ ├── commands/ ← 13 command playbooks
121
+ ├── agents/ ← 9 agent definitions
122
+ └── skills/ ← 3 skill packages
123
+ ├── pactkit-visualize/
124
+ ├── pactkit-board/
125
+ └── pactkit-scaffold/
126
+ ```
127
+
128
+ ## MCP Integration
129
+
130
+ PactKit conditionally integrates with MCP servers when available:
131
+
132
+ | MCP Server | Purpose | PDCA Phase |
133
+ |------------|---------|------------|
134
+ | Context7 | Library documentation lookup | Act |
135
+ | shadcn | UI component search/install | Design |
136
+ | Playwright | Browser automation testing | Check |
137
+ | Chrome DevTools | Performance/console/network | Check |
138
+ | Memory | Cross-session knowledge graph | Plan/Act/Done |
139
+
140
+ All MCP instructions are conditional — gracefully skipped when unavailable.
141
+
142
+ ## Contributing
143
+
144
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
145
+
146
+ ## License
147
+
148
+ [MIT](LICENSE)
@@ -0,0 +1,72 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "pactkit"
7
+ version = "1.0.0"
8
+ description = "Spec-driven agentic DevOps toolkit for AI coding assistants"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Slim" },
14
+ ]
15
+ keywords = [
16
+ "ai",
17
+ "agent",
18
+ "spec-driven",
19
+ "devops",
20
+ "scaffold",
21
+ "claude-code",
22
+ "tdd",
23
+ "pdca",
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 4 - Beta",
27
+ "Intended Audience :: Developers",
28
+ "License :: OSI Approved :: MIT License",
29
+ "Programming Language :: Python :: 3",
30
+ "Programming Language :: Python :: 3.10",
31
+ "Programming Language :: Python :: 3.11",
32
+ "Programming Language :: Python :: 3.12",
33
+ "Programming Language :: Python :: 3.13",
34
+ "Topic :: Software Development :: Build Tools",
35
+ "Topic :: Software Development :: Quality Assurance",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://pactkit.dev"
40
+ Repository = "https://github.com/pactkit/pactkit"
41
+ Documentation = "https://pactkit.dev/docs"
42
+ Issues = "https://github.com/pactkit/pactkit/issues"
43
+
44
+ [project.scripts]
45
+ pactkit = "pactkit.cli:main"
46
+
47
+ [tool.hatch.build.targets.wheel]
48
+ packages = ["src/pactkit"]
49
+
50
+ [tool.pytest.ini_options]
51
+ testpaths = ["tests"]
52
+ pythonpath = ["src"]
53
+
54
+ [tool.ruff]
55
+ target-version = "py310"
56
+ line-length = 120
57
+
58
+ [tool.ruff.lint]
59
+ select = ["E", "F", "I", "W"]
60
+
61
+ [tool.ruff.lint.per-file-ignores]
62
+ "src/pactkit/prompts/__init__.py" = ["F401"]
63
+ "src/pactkit/prompts/agents.py" = ["E501"]
64
+ "src/pactkit/prompts/commands.py" = ["E501"]
65
+ "src/pactkit/prompts/references.py" = ["E501"]
66
+ "src/pactkit/prompts/rules.py" = ["E501"]
67
+ "src/pactkit/prompts/skills.py" = ["E501"]
68
+ "src/pactkit/prompts/workflows.py" = ["E501"]
69
+ "src/pactkit/generators/deployer.py" = ["E402"]
70
+ "src/pactkit/skills/*.py" = ["E501", "E701", "E702", "E722", "E731"]
71
+ "src/pactkit/scripts.py" = ["E501"]
72
+ "tests/**/*.py" = ["E402", "E501", "E741", "F841"]
@@ -0,0 +1,3 @@
1
+ """PactKit - Spec-driven agentic DevOps toolkit."""
2
+
3
+ __version__ = "1.0.0"
@@ -0,0 +1,78 @@
1
+ """PactKit CLI — Spec-driven agentic DevOps toolkit.
2
+
3
+ Usage:
4
+ pactkit init # Deploy Expert mode (default)
5
+ pactkit init --mode common # Deploy lightweight Common mode
6
+ pactkit init -t /tmp/preview # Preview to custom directory
7
+ pactkit update # Re-deploy (same as init, idempotent)
8
+ pactkit version # Show version
9
+ """
10
+ import argparse
11
+ import sys
12
+
13
+ from pactkit import __version__
14
+
15
+
16
+ def main():
17
+ parser = argparse.ArgumentParser(
18
+ prog="pactkit",
19
+ description="PactKit — Spec-driven agentic DevOps toolkit",
20
+ )
21
+ subparsers = parser.add_subparsers(dest="command")
22
+
23
+ # pactkit init
24
+ init_parser = subparsers.add_parser("init", help="Deploy PactKit configuration")
25
+ init_parser.add_argument(
26
+ "--mode",
27
+ choices=["expert", "common"],
28
+ default="expert",
29
+ help="Deployment mode: expert (full, default) or common (lightweight)",
30
+ )
31
+ init_parser.add_argument(
32
+ "-t", "--target",
33
+ type=str,
34
+ default=None,
35
+ help="Custom target directory (default: ~/.claude)",
36
+ )
37
+
38
+ # pactkit update (alias for init)
39
+ update_parser = subparsers.add_parser("update", help="Re-deploy PactKit configuration")
40
+ update_parser.add_argument(
41
+ "--mode",
42
+ choices=["expert", "common"],
43
+ default="expert",
44
+ help="Deployment mode: expert (full, default) or common (lightweight)",
45
+ )
46
+ update_parser.add_argument(
47
+ "-t", "--target",
48
+ type=str,
49
+ default=None,
50
+ help="Custom target directory (default: ~/.claude)",
51
+ )
52
+
53
+ # pactkit version
54
+ subparsers.add_parser("version", help="Show PactKit version")
55
+
56
+ args = parser.parse_args()
57
+
58
+ if args.command in ("init", "update"):
59
+ if args.mode == "expert":
60
+ from pactkit.generators.deployer import deploy
61
+ deploy()
62
+ else:
63
+ from pactkit.common_user import main as common_main
64
+ # Simulate CLI args for common_user
65
+ sys.argv = ["pactkit"]
66
+ if args.target:
67
+ sys.argv.extend(["-t", args.target])
68
+ common_main()
69
+
70
+ elif args.command == "version":
71
+ print(f"PactKit v{__version__}")
72
+
73
+ else:
74
+ parser.print_help()
75
+
76
+
77
+ if __name__ == "__main__":
78
+ main()