quoin 0.1.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 (94) hide show
  1. quoin-0.1.0/.gitignore +51 -0
  2. quoin-0.1.0/LICENSE +21 -0
  3. quoin-0.1.0/PKG-INFO +167 -0
  4. quoin-0.1.0/README.md +150 -0
  5. quoin-0.1.0/pyproject.toml +70 -0
  6. quoin-0.1.0/quoin/.gitignore +14 -0
  7. quoin-0.1.0/quoin/CLAUDE.md +490 -0
  8. quoin-0.1.0/quoin/QUICKSTART.md +87 -0
  9. quoin-0.1.0/quoin/SETUP.md +179 -0
  10. quoin-0.1.0/quoin/Workflow-User-Guide.html +529 -0
  11. quoin-0.1.0/quoin/docs/hooks-guide.md +46 -0
  12. quoin-0.1.0/quoin/docs/images/quoin-architecture.png +0 -0
  13. quoin-0.1.0/quoin/docs/images/quoin-hero.png +0 -0
  14. quoin-0.1.0/quoin/docs/release.md +67 -0
  15. quoin-0.1.0/quoin/docs/revise-crossover-decision-2026-04-30.md +33 -0
  16. quoin-0.1.0/quoin/docs/rollback-s2.md +214 -0
  17. quoin-0.1.0/quoin/docs/sentinel-lifecycle-s2.md +167 -0
  18. quoin-0.1.0/quoin/docs/spawn-bootstrap-audit-2026-04-28.md +174 -0
  19. quoin-0.1.0/quoin/docs/v-trip-rate-baseline-2026-04-30.md +80 -0
  20. quoin-0.1.0/quoin/hooks/.keep +0 -0
  21. quoin-0.1.0/quoin/hooks/_lib.sh +105 -0
  22. quoin-0.1.0/quoin/hooks/precompact.sh +255 -0
  23. quoin-0.1.0/quoin/hooks/sessionend.sh +134 -0
  24. quoin-0.1.0/quoin/hooks/sessionstart.sh +117 -0
  25. quoin-0.1.0/quoin/hooks/userpromptsubmit.sh +140 -0
  26. quoin-0.1.0/quoin/install.sh +96 -0
  27. quoin-0.1.0/quoin/memory/cache-guide.md +64 -0
  28. quoin-0.1.0/quoin/memory/format-kit-pitfalls.md +30 -0
  29. quoin-0.1.0/quoin/memory/format-kit.md +233 -0
  30. quoin-0.1.0/quoin/memory/format-kit.sections.json +217 -0
  31. quoin-0.1.0/quoin/memory/glossary.md +49 -0
  32. quoin-0.1.0/quoin/memory/lessons-learned.md +22 -0
  33. quoin-0.1.0/quoin/memory/sleep-signals.yaml +25 -0
  34. quoin-0.1.0/quoin/memory/summary-prompt.md +9 -0
  35. quoin-0.1.0/quoin/memory/terse-rubric.md +22 -0
  36. quoin-0.1.0/quoin/memory/workflow-rules.md +96 -0
  37. quoin-0.1.0/quoin/memory/workflow-suggestions.md +15 -0
  38. quoin-0.1.0/quoin/scripts/analyze_cost_ledger.py +485 -0
  39. quoin-0.1.0/quoin/scripts/build_preambles.py +295 -0
  40. quoin-0.1.0/quoin/scripts/classify_critic_issues.py +480 -0
  41. quoin-0.1.0/quoin/scripts/cost_from_jsonl.py +275 -0
  42. quoin-0.1.0/quoin/scripts/measure_revise_crossover_cost.py +395 -0
  43. quoin-0.1.0/quoin/scripts/measure_v_trip_rate.py +240 -0
  44. quoin-0.1.0/quoin/scripts/path_resolve.py +171 -0
  45. quoin-0.1.0/quoin/scripts/pidfile_helpers.sh +87 -0
  46. quoin-0.1.0/quoin/scripts/session_age_guard.py +175 -0
  47. quoin-0.1.0/quoin/scripts/sleep_score.py +731 -0
  48. quoin-0.1.0/quoin/scripts/tests/fixtures/analyze_cost_ledger/sample-ledger.md +14 -0
  49. quoin-0.1.0/quoin/scripts/tests/fixtures/analyze_cost_ledger/sample-session.jsonl +2 -0
  50. quoin-0.1.0/quoin/scripts/tests/test_analyze_cost_ledger.py +405 -0
  51. quoin-0.1.0/quoin/scripts/tests/test_build_preambles.py +237 -0
  52. quoin-0.1.0/quoin/scripts/tests/test_cost_parity_with_ccusage.py +214 -0
  53. quoin-0.1.0/quoin/scripts/tests/test_implement_large_result_gate.py +130 -0
  54. quoin-0.1.0/quoin/scripts/tests/test_ledger_no_placeholder.py +166 -0
  55. quoin-0.1.0/quoin/scripts/tests/test_verify_spawn_prompt_prefix.py +172 -0
  56. quoin-0.1.0/quoin/scripts/validate_artifact.py +492 -0
  57. quoin-0.1.0/quoin/scripts/verify_spawn_prompt_prefix.py +334 -0
  58. quoin-0.1.0/quoin/skills/architect/SKILL.md +482 -0
  59. quoin-0.1.0/quoin/skills/architect/preamble.md +84 -0
  60. quoin-0.1.0/quoin/skills/capture_insight/SKILL.md +115 -0
  61. quoin-0.1.0/quoin/skills/checkpoint/SKILL.md +327 -0
  62. quoin-0.1.0/quoin/skills/cost_snapshot/SKILL.md +177 -0
  63. quoin-0.1.0/quoin/skills/critic/SKILL.md +262 -0
  64. quoin-0.1.0/quoin/skills/critic/preamble.md +84 -0
  65. quoin-0.1.0/quoin/skills/discover/SKILL.md +428 -0
  66. quoin-0.1.0/quoin/skills/end_of_day/SKILL.md +377 -0
  67. quoin-0.1.0/quoin/skills/end_of_task/SKILL.md +344 -0
  68. quoin-0.1.0/quoin/skills/expand/SKILL.md +186 -0
  69. quoin-0.1.0/quoin/skills/gate/SKILL.md +297 -0
  70. quoin-0.1.0/quoin/skills/gate/preamble.md +10 -0
  71. quoin-0.1.0/quoin/skills/implement/SKILL.md +379 -0
  72. quoin-0.1.0/quoin/skills/init_workflow/SKILL.md +369 -0
  73. quoin-0.1.0/quoin/skills/next_steps/SKILL.md +132 -0
  74. quoin-0.1.0/quoin/skills/plan/SKILL.md +216 -0
  75. quoin-0.1.0/quoin/skills/plan/preamble.md +84 -0
  76. quoin-0.1.0/quoin/skills/review/SKILL.md +316 -0
  77. quoin-0.1.0/quoin/skills/review/preamble.md +84 -0
  78. quoin-0.1.0/quoin/skills/revise/SKILL.md +244 -0
  79. quoin-0.1.0/quoin/skills/revise/preamble.md +84 -0
  80. quoin-0.1.0/quoin/skills/revise-fast/SKILL.md +251 -0
  81. quoin-0.1.0/quoin/skills/revise-fast/preamble.md +84 -0
  82. quoin-0.1.0/quoin/skills/rollback/SKILL.md +209 -0
  83. quoin-0.1.0/quoin/skills/run/SKILL.md +351 -0
  84. quoin-0.1.0/quoin/skills/sleep/SKILL.md +304 -0
  85. quoin-0.1.0/quoin/skills/start_of_day/SKILL.md +226 -0
  86. quoin-0.1.0/quoin/skills/thorough_plan/SKILL.md +299 -0
  87. quoin-0.1.0/quoin/skills/triage/SKILL.md +295 -0
  88. quoin-0.1.0/quoin/skills/triage/TEST-CASES.md +41 -0
  89. quoin-0.1.0/quoin/skills/weekly_review/SKILL.md +205 -0
  90. quoin-0.1.0/src/quoin/__about__.py +1 -0
  91. quoin-0.1.0/src/quoin/__init__.py +3 -0
  92. quoin-0.1.0/src/quoin/__main__.py +3 -0
  93. quoin-0.1.0/src/quoin/cli.py +290 -0
  94. quoin-0.1.0/src/quoin/installer.py +385 -0
quoin-0.1.0/.gitignore ADDED
@@ -0,0 +1,51 @@
1
+ # macOS
2
+ .DS_Store
3
+ ._*
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.pyc
8
+ *.pyo
9
+ *.pyd
10
+
11
+ # Build artifacts
12
+ **/*.egg-info/
13
+ build/
14
+ dist/
15
+ .pytest_cache/
16
+ .tox/
17
+ .coverage
18
+ htmlcov/
19
+
20
+ # Workflow artifacts (session-specific, not shared) — anchored to project root
21
+ /.workflow_artifacts/
22
+
23
+ # Legacy artifact locations (pre-.workflow_artifacts layout) — anchored to project root
24
+ # so they don't catch in-tree directories like quoin/memory/ or quoin/finalized/.
25
+ /memory/
26
+ /finalized/
27
+ /artifact-consolidation/
28
+
29
+ # Editor / IDE
30
+ .vscode/
31
+ .idea/
32
+ *.swp
33
+ *.swo
34
+ *~
35
+
36
+ # Environment
37
+ .env
38
+ .env.local
39
+ .claude/
40
+ /
41
+ # /expand --save output files (scratch; use sparingly)
42
+ *.expanded-*.md
43
+ .venv/
44
+
45
+ # Workflow cost ledgers — internal session tracking, never in repo
46
+ **/cost-ledger.md
47
+
48
+ # Process/scratch files at project root
49
+ /next-steps*.md
50
+ /pipeline-spending-analysis*.md
51
+ /openquoin/
quoin-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 IvGor
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.
quoin-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.1
2
+ Name: quoin
3
+ Version: 0.1.0
4
+ Summary: Workflow state for stateless coding agents — structured persistence for Claude Code sessions
5
+ Project-URL: Homepage, https://github.com/FourthWiz/quoin
6
+ Project-URL: Source, https://github.com/FourthWiz/quoin
7
+ Project-URL: Issues, https://github.com/FourthWiz/quoin/issues
8
+ Author: IvGor
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Requires-Python: >=3.10
12
+ Provides-Extra: dev
13
+ Requires-Dist: build; extra == 'dev'
14
+ Requires-Dist: pytest>=7.0; extra == 'dev'
15
+ Requires-Dist: pyyaml>=6.0; extra == 'dev'
16
+ Description-Content-Type: text/markdown
17
+
18
+ <p align="center">
19
+ <img src="quoin/docs/images/quoin-hero.png" alt="Quoin" width="420">
20
+ </p>
21
+
22
+ # Quoin
23
+
24
+ **Workflow state for stateless coding agents.**
25
+
26
+ A workflow memory toolkit for Claude Code that structures your coding agent workflow using lightweight persistence files — so every session starts informed and every decision is tracked.
27
+
28
+ ## What is Quoin?
29
+
30
+ Quoin gives Claude Code a disciplined engineering partner: planning, architecture review, quality gates, cost discipline, and institutional memory — across sessions, tasks, and team members.
31
+
32
+ Without Quoin, each Claude session starts cold. With Quoin, sessions share accumulated knowledge through structured artifacts: plans, critic reviews, session state, lessons learned, and a cost ledger.
33
+
34
+ ## Why Quoin?
35
+
36
+ - **Cost discipline** — §0 model dispatch preamble routes each skill to the right tier (Haiku/Sonnet/Opus). `/cost_snapshot` shows live spend. `ccusage` fallback tracks every session.
37
+ - **Planning rigor** — `/thorough_plan` runs a plan→critic→revise convergence loop before a single line of code is written.
38
+ - **Audit trail** — every phase produces a structured artifact: `architecture.md`, `current-plan.md`, `critic-response-N.md`, `review-N.md`, `cost-ledger.md`.
39
+ - **Six stages of foundation** — stages 1–6 of the Quoin foundation hardened the system: §0 dispatch preamble (1), ccusage fallback (2), stage-subfolder path resolution (3), architect Phase 4 critic loop (4), native Haiku summarizer (5), and this rebrand + QUICKSTART relocation (6).
40
+
41
+ ## Install
42
+
43
+ **Via pip (recommended):**
44
+
45
+ ```bash
46
+ pip install quoin
47
+ quoin install
48
+ ```
49
+
50
+ **From source:**
51
+
52
+ ```bash
53
+ git clone https://github.com/FourthWiz/quoin
54
+ cd quoin
55
+ bash quoin/install.sh
56
+ ```
57
+
58
+ > **Note:** GitHub auto-redirects from the old `FourthWiz/claude_dev_workflow` URL — existing clones continue to work.
59
+
60
+ For full setup instructions see [`quoin/SETUP.md`](quoin/SETUP.md). For the command reference see [`quoin/QUICKSTART.md`](quoin/QUICKSTART.md).
61
+
62
+ ## 30-Second Start
63
+
64
+ ```
65
+ /init_workflow ← one-time project bootstrap
66
+ /architect ← design the solution
67
+ /thorough_plan ← converge on a plan with critic review
68
+ /implement ← write the code (explicit — you decide when)
69
+ /review ← verify implementation against the plan
70
+ /end_of_task ← push the branch (explicit — you decide when to ship)
71
+ ```
72
+
73
+ ## Skills
74
+
75
+ ### Planning & Architecture
76
+
77
+ | Command | Model | What it does |
78
+ |---------|-------|-------------|
79
+ | `/architect` | Opus | Deep architectural analysis; internal Phase 4 critic loop |
80
+ | `/plan` | Opus | Detailed implementation plan (single-pass) |
81
+ | `/thorough_plan` | Opus | Triages task size; runs plan→critic→revise convergence loop |
82
+ | `/critic` | Opus | Reviews a plan for gaps, risks, integration issues |
83
+ | `/revise` | Opus | Revises plan from critic feedback (strict/Large mode) |
84
+ | `/revise-fast` | Sonnet | Revises plan from critic feedback (Medium mode, cost-efficient) |
85
+
86
+ ### Implementation & Review
87
+
88
+ | Command | Model | What it does |
89
+ |---------|-------|-------------|
90
+ | `/implement` | Sonnet | Writes code from the plan (explicit command only) |
91
+ | `/review` | Opus | Verifies implementation against the plan; production-ready check |
92
+ | `/gate` | Sonnet | Automated quality checkpoint between phases; requires your approval |
93
+ | `/rollback` | Sonnet | Safely undoes an implementation phase or specific tasks |
94
+
95
+ ### Session Lifecycle
96
+
97
+ | Command | Model | What it does |
98
+ |---------|-------|-------------|
99
+ | `/init_workflow` | Opus | One-time project bootstrap — creates `.workflow_artifacts/`, runs `/discover` |
100
+ | `/discover` | Opus | Scans all repos; maps architecture, dependencies, git log |
101
+ | `/start_of_day` | Haiku | Morning briefing — restores context from daily cache |
102
+ | `/end_of_day` | Haiku | Saves session state; promotes insights to daily cache |
103
+ | `/end_of_task` | Sonnet | Pushes branch, captures lessons, marks task complete (explicit only) |
104
+
105
+ ### Utilities
106
+
107
+ | Command | Model | What it does |
108
+ |---------|-------|-------------|
109
+ | `/run` | Opus | End-to-end pipeline orchestrator; pauses at each gate |
110
+ | `/cost_snapshot` | Haiku | Live cost: today, lifetime, per-task breakdown |
111
+ | `/triage` | Haiku | Routes your request to the right skill |
112
+ | `/weekly_review` | Haiku | Aggregates the week's progress into a structured review |
113
+ | `/capture_insight` | Haiku | Logs a pattern or gotcha to the daily scratchpad |
114
+ | `/expand <path>` | Sonnet | Re-renders a terse workflow artifact in readable English |
115
+
116
+ ## Architecture
117
+
118
+ ![Quoin architecture](quoin/docs/images/quoin-architecture.png)
119
+
120
+ Each Claude session is stateless by nature. Quoin bridges sessions using structured file artifacts under `.workflow_artifacts/`. Skills read these files at startup (session bootstrap) and write them on completion — so the next session, whether in 5 minutes or 5 days, picks up exactly where you left off.
121
+
122
+ For full rules, model assignments, artifact formats, and cost-tracking conventions, see [`quoin/CLAUDE.md`](quoin/CLAUDE.md).
123
+
124
+ ## Cost & Model Discipline
125
+
126
+ Every Quoin skill declares a model tier (`haiku`, `sonnet`, `opus`). When invoked from a session running on a more expensive model, the skill self-dispatches via the `Agent` tool to its declared tier (§0 model dispatch preamble).
127
+
128
+ - Fails gracefully: if dispatch is unavailable, the skill proceeds at the current tier with a one-line warning — never aborts your invocation.
129
+ - Tracked: every session appends a row to `cost-ledger.md`. `/cost_snapshot` reads it live. `ccusage` is the fallback if the ledger is unavailable.
130
+ - Three artifact tiers: Tier 1 (always English — CLAUDE.md, reviews, architectures), Tier 2 (English + side-file), Tier 3 (terse; use `/expand` to read).
131
+
132
+ ## Typical Flows
133
+
134
+ **Large feature (full pipeline):**
135
+ ```
136
+ /discover → /architect → /thorough_plan large: ... → /implement → /review → /end_of_task
137
+ ```
138
+
139
+ **Medium task (default):**
140
+ ```
141
+ /thorough_plan add caching layer → /implement → /review → /end_of_task
142
+ ```
143
+
144
+ **Small bug fix:**
145
+ ```
146
+ /thorough_plan small: fix null pointer in auth handler → /implement → /review → /end_of_task
147
+ ```
148
+
149
+ **Start / end of day:**
150
+ ```
151
+ /start_of_day ← morning: restores context, checks git state
152
+ /end_of_day ← evening: saves state, consolidates insights
153
+ ```
154
+
155
+ ## Documentation
156
+
157
+ - [`quoin/QUICKSTART.md`](quoin/QUICKSTART.md) — command reference table (21 skills)
158
+ - `<your-quoin-clone>/Workflow-User-Guide.html` — interactive walkthrough with scenarios (open in browser)
159
+ - [`quoin/CLAUDE.md`](quoin/CLAUDE.md) — full workflow rules, model assignments, artifact formats
160
+
161
+ ## Contributing
162
+
163
+ Bug reports and PRs welcome. The workflow is its own guinea pig — all Quoin development uses Quoin.
164
+
165
+ ## License
166
+
167
+ MIT
quoin-0.1.0/README.md ADDED
@@ -0,0 +1,150 @@
1
+ <p align="center">
2
+ <img src="quoin/docs/images/quoin-hero.png" alt="Quoin" width="420">
3
+ </p>
4
+
5
+ # Quoin
6
+
7
+ **Workflow state for stateless coding agents.**
8
+
9
+ A workflow memory toolkit for Claude Code that structures your coding agent workflow using lightweight persistence files — so every session starts informed and every decision is tracked.
10
+
11
+ ## What is Quoin?
12
+
13
+ Quoin gives Claude Code a disciplined engineering partner: planning, architecture review, quality gates, cost discipline, and institutional memory — across sessions, tasks, and team members.
14
+
15
+ Without Quoin, each Claude session starts cold. With Quoin, sessions share accumulated knowledge through structured artifacts: plans, critic reviews, session state, lessons learned, and a cost ledger.
16
+
17
+ ## Why Quoin?
18
+
19
+ - **Cost discipline** — §0 model dispatch preamble routes each skill to the right tier (Haiku/Sonnet/Opus). `/cost_snapshot` shows live spend. `ccusage` fallback tracks every session.
20
+ - **Planning rigor** — `/thorough_plan` runs a plan→critic→revise convergence loop before a single line of code is written.
21
+ - **Audit trail** — every phase produces a structured artifact: `architecture.md`, `current-plan.md`, `critic-response-N.md`, `review-N.md`, `cost-ledger.md`.
22
+ - **Six stages of foundation** — stages 1–6 of the Quoin foundation hardened the system: §0 dispatch preamble (1), ccusage fallback (2), stage-subfolder path resolution (3), architect Phase 4 critic loop (4), native Haiku summarizer (5), and this rebrand + QUICKSTART relocation (6).
23
+
24
+ ## Install
25
+
26
+ **Via pip (recommended):**
27
+
28
+ ```bash
29
+ pip install quoin
30
+ quoin install
31
+ ```
32
+
33
+ **From source:**
34
+
35
+ ```bash
36
+ git clone https://github.com/FourthWiz/quoin
37
+ cd quoin
38
+ bash quoin/install.sh
39
+ ```
40
+
41
+ > **Note:** GitHub auto-redirects from the old `FourthWiz/claude_dev_workflow` URL — existing clones continue to work.
42
+
43
+ For full setup instructions see [`quoin/SETUP.md`](quoin/SETUP.md). For the command reference see [`quoin/QUICKSTART.md`](quoin/QUICKSTART.md).
44
+
45
+ ## 30-Second Start
46
+
47
+ ```
48
+ /init_workflow ← one-time project bootstrap
49
+ /architect ← design the solution
50
+ /thorough_plan ← converge on a plan with critic review
51
+ /implement ← write the code (explicit — you decide when)
52
+ /review ← verify implementation against the plan
53
+ /end_of_task ← push the branch (explicit — you decide when to ship)
54
+ ```
55
+
56
+ ## Skills
57
+
58
+ ### Planning & Architecture
59
+
60
+ | Command | Model | What it does |
61
+ |---------|-------|-------------|
62
+ | `/architect` | Opus | Deep architectural analysis; internal Phase 4 critic loop |
63
+ | `/plan` | Opus | Detailed implementation plan (single-pass) |
64
+ | `/thorough_plan` | Opus | Triages task size; runs plan→critic→revise convergence loop |
65
+ | `/critic` | Opus | Reviews a plan for gaps, risks, integration issues |
66
+ | `/revise` | Opus | Revises plan from critic feedback (strict/Large mode) |
67
+ | `/revise-fast` | Sonnet | Revises plan from critic feedback (Medium mode, cost-efficient) |
68
+
69
+ ### Implementation & Review
70
+
71
+ | Command | Model | What it does |
72
+ |---------|-------|-------------|
73
+ | `/implement` | Sonnet | Writes code from the plan (explicit command only) |
74
+ | `/review` | Opus | Verifies implementation against the plan; production-ready check |
75
+ | `/gate` | Sonnet | Automated quality checkpoint between phases; requires your approval |
76
+ | `/rollback` | Sonnet | Safely undoes an implementation phase or specific tasks |
77
+
78
+ ### Session Lifecycle
79
+
80
+ | Command | Model | What it does |
81
+ |---------|-------|-------------|
82
+ | `/init_workflow` | Opus | One-time project bootstrap — creates `.workflow_artifacts/`, runs `/discover` |
83
+ | `/discover` | Opus | Scans all repos; maps architecture, dependencies, git log |
84
+ | `/start_of_day` | Haiku | Morning briefing — restores context from daily cache |
85
+ | `/end_of_day` | Haiku | Saves session state; promotes insights to daily cache |
86
+ | `/end_of_task` | Sonnet | Pushes branch, captures lessons, marks task complete (explicit only) |
87
+
88
+ ### Utilities
89
+
90
+ | Command | Model | What it does |
91
+ |---------|-------|-------------|
92
+ | `/run` | Opus | End-to-end pipeline orchestrator; pauses at each gate |
93
+ | `/cost_snapshot` | Haiku | Live cost: today, lifetime, per-task breakdown |
94
+ | `/triage` | Haiku | Routes your request to the right skill |
95
+ | `/weekly_review` | Haiku | Aggregates the week's progress into a structured review |
96
+ | `/capture_insight` | Haiku | Logs a pattern or gotcha to the daily scratchpad |
97
+ | `/expand <path>` | Sonnet | Re-renders a terse workflow artifact in readable English |
98
+
99
+ ## Architecture
100
+
101
+ ![Quoin architecture](quoin/docs/images/quoin-architecture.png)
102
+
103
+ Each Claude session is stateless by nature. Quoin bridges sessions using structured file artifacts under `.workflow_artifacts/`. Skills read these files at startup (session bootstrap) and write them on completion — so the next session, whether in 5 minutes or 5 days, picks up exactly where you left off.
104
+
105
+ For full rules, model assignments, artifact formats, and cost-tracking conventions, see [`quoin/CLAUDE.md`](quoin/CLAUDE.md).
106
+
107
+ ## Cost & Model Discipline
108
+
109
+ Every Quoin skill declares a model tier (`haiku`, `sonnet`, `opus`). When invoked from a session running on a more expensive model, the skill self-dispatches via the `Agent` tool to its declared tier (§0 model dispatch preamble).
110
+
111
+ - Fails gracefully: if dispatch is unavailable, the skill proceeds at the current tier with a one-line warning — never aborts your invocation.
112
+ - Tracked: every session appends a row to `cost-ledger.md`. `/cost_snapshot` reads it live. `ccusage` is the fallback if the ledger is unavailable.
113
+ - Three artifact tiers: Tier 1 (always English — CLAUDE.md, reviews, architectures), Tier 2 (English + side-file), Tier 3 (terse; use `/expand` to read).
114
+
115
+ ## Typical Flows
116
+
117
+ **Large feature (full pipeline):**
118
+ ```
119
+ /discover → /architect → /thorough_plan large: ... → /implement → /review → /end_of_task
120
+ ```
121
+
122
+ **Medium task (default):**
123
+ ```
124
+ /thorough_plan add caching layer → /implement → /review → /end_of_task
125
+ ```
126
+
127
+ **Small bug fix:**
128
+ ```
129
+ /thorough_plan small: fix null pointer in auth handler → /implement → /review → /end_of_task
130
+ ```
131
+
132
+ **Start / end of day:**
133
+ ```
134
+ /start_of_day ← morning: restores context, checks git state
135
+ /end_of_day ← evening: saves state, consolidates insights
136
+ ```
137
+
138
+ ## Documentation
139
+
140
+ - [`quoin/QUICKSTART.md`](quoin/QUICKSTART.md) — command reference table (21 skills)
141
+ - `<your-quoin-clone>/Workflow-User-Guide.html` — interactive walkthrough with scenarios (open in browser)
142
+ - [`quoin/CLAUDE.md`](quoin/CLAUDE.md) — full workflow rules, model assignments, artifact formats
143
+
144
+ ## Contributing
145
+
146
+ Bug reports and PRs welcome. The workflow is its own guinea pig — all Quoin development uses Quoin.
147
+
148
+ ## License
149
+
150
+ MIT
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.18,<1.19"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "quoin"
7
+ dynamic = ["version"]
8
+ description = "Workflow state for stateless coding agents — structured persistence for Claude Code sessions"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "IvGor" },
14
+ ]
15
+
16
+ [project.urls]
17
+ Homepage = "https://github.com/FourthWiz/quoin"
18
+ Source = "https://github.com/FourthWiz/quoin"
19
+ Issues = "https://github.com/FourthWiz/quoin/issues"
20
+
21
+ [project.scripts]
22
+ quoin = "quoin.cli:main"
23
+
24
+ [project.optional-dependencies]
25
+ dev = [
26
+ "pytest>=7.0",
27
+ "build",
28
+ "pyyaml>=6.0",
29
+ ]
30
+
31
+ [tool.hatch.version]
32
+ path = "src/quoin/__about__.py"
33
+
34
+ [tool.hatch.build.targets.wheel]
35
+ packages = ["src/quoin"]
36
+
37
+ [tool.hatch.build.targets.wheel.force-include]
38
+ "quoin/skills" = "src/quoin/data/skills"
39
+ "quoin/scripts" = "src/quoin/data/scripts"
40
+ "quoin/hooks" = "src/quoin/data/hooks"
41
+ "quoin/QUICKSTART.md" = "src/quoin/data/QUICKSTART.md"
42
+ "quoin/CLAUDE.md" = "src/quoin/data/CLAUDE.md"
43
+ "quoin/memory/terse-rubric.md" = "src/quoin/data/memory/terse-rubric.md"
44
+ "quoin/memory/format-kit.md" = "src/quoin/data/memory/format-kit.md"
45
+ "quoin/memory/glossary.md" = "src/quoin/data/memory/glossary.md"
46
+ "quoin/memory/format-kit.sections.json" = "src/quoin/data/memory/format-kit.sections.json"
47
+ "quoin/memory/summary-prompt.md" = "src/quoin/data/memory/summary-prompt.md"
48
+ "quoin/memory/format-kit-pitfalls.md" = "src/quoin/data/memory/format-kit-pitfalls.md"
49
+ "quoin/memory/sleep-signals.yaml" = "src/quoin/data/memory/sleep-signals.yaml"
50
+ "quoin/memory/cache-guide.md" = "src/quoin/data/memory/cache-guide.md"
51
+
52
+ [tool.hatch.build.targets.sdist]
53
+ include = [
54
+ "quoin/",
55
+ "pyproject.toml",
56
+ "LICENSE",
57
+ "README.md",
58
+ "quoin/install.sh",
59
+ ]
60
+ exclude = [
61
+ "quoin/dev/",
62
+ ]
63
+
64
+ [tool.pytest.ini_options]
65
+ testpaths = ["quoin/dev/tests"]
66
+ python_files = "test_*.py"
67
+ python_functions = "test_*"
68
+ python_classes = "Test*"
69
+ addopts = "-q"
70
+ pythonpath = ["src"]
@@ -0,0 +1,14 @@
1
+ # Runtime / personal artifacts — never commit to the distributable quoin package
2
+ .workflow_artifacts/
3
+ .claude/
4
+ settings.local.json
5
+
6
+ # Python test / build artifacts
7
+ .pytest_cache/
8
+ __pycache__/
9
+ *.pyc
10
+ *.pyo
11
+ *.pyd
12
+ dist/
13
+ build/
14
+ *.egg-info/