ariadna 1.1.1 → 1.1.2
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.
- checksums.yaml +7 -0
- data/LICENSE +17 -18
- data/ariadna.gemspec +26 -17
- data/data/agents/ariadna-backend-executor.md +258 -0
- data/data/agents/ariadna-codebase-mapper.md +761 -0
- data/data/agents/ariadna-debugger.md +1205 -0
- data/data/agents/ariadna-executor.md +421 -0
- data/data/agents/ariadna-frontend-executor.md +256 -0
- data/data/agents/ariadna-integration-checker.md +418 -0
- data/data/agents/ariadna-phase-researcher.md +469 -0
- data/data/agents/ariadna-plan-checker.md +622 -0
- data/data/agents/ariadna-planner.md +1236 -0
- data/data/agents/ariadna-project-researcher.md +618 -0
- data/data/agents/ariadna-research-synthesizer.md +236 -0
- data/data/agents/ariadna-roadmapper.md +605 -0
- data/data/agents/ariadna-test-executor.md +263 -0
- data/data/agents/ariadna-verifier.md +732 -0
- data/data/ariadna/references/checkpoints.md +770 -0
- data/data/ariadna/references/continuation-format.md +249 -0
- data/data/ariadna/references/decimal-phase-calculation.md +65 -0
- data/data/ariadna/references/git-integration.md +248 -0
- data/data/ariadna/references/git-planning-commit.md +38 -0
- data/data/ariadna/references/model-profile-resolution.md +32 -0
- data/data/ariadna/references/model-profiles.md +73 -0
- data/data/ariadna/references/phase-argument-parsing.md +61 -0
- data/data/ariadna/references/planning-config.md +194 -0
- data/data/ariadna/references/questioning.md +141 -0
- data/data/ariadna/references/tdd.md +267 -0
- data/data/ariadna/references/ui-brand.md +160 -0
- data/data/ariadna/references/verification-patterns.md +853 -0
- data/data/ariadna/templates/DEBUG.md +159 -0
- data/data/ariadna/templates/UAT.md +247 -0
- data/data/ariadna/templates/codebase/architecture.md +487 -0
- data/data/ariadna/templates/codebase/concerns.md +380 -0
- data/data/ariadna/templates/codebase/conventions.md +434 -0
- data/data/ariadna/templates/codebase/integrations.md +328 -0
- data/data/ariadna/templates/codebase/stack.md +190 -0
- data/data/ariadna/templates/codebase/structure.md +418 -0
- data/data/ariadna/templates/codebase/testing.md +606 -0
- data/data/ariadna/templates/config.json +35 -0
- data/data/ariadna/templates/context.md +283 -0
- data/data/ariadna/templates/continue-here.md +78 -0
- data/data/ariadna/templates/debug-subagent-prompt.md +91 -0
- data/data/ariadna/templates/discovery.md +146 -0
- data/data/ariadna/templates/milestone-archive.md +123 -0
- data/data/ariadna/templates/milestone.md +115 -0
- data/data/ariadna/templates/phase-prompt.md +609 -0
- data/data/ariadna/templates/planner-subagent-prompt.md +117 -0
- data/data/ariadna/templates/project.md +184 -0
- data/data/ariadna/templates/requirements.md +231 -0
- data/data/ariadna/templates/research-project/ARCHITECTURE.md +380 -0
- data/data/ariadna/templates/research-project/FEATURES.md +168 -0
- data/data/ariadna/templates/research-project/PITFALLS.md +357 -0
- data/data/ariadna/templates/research-project/STACK.md +250 -0
- data/data/ariadna/templates/research-project/SUMMARY.md +247 -0
- data/data/ariadna/templates/research.md +536 -0
- data/data/ariadna/templates/roadmap.md +202 -0
- data/data/ariadna/templates/state.md +176 -0
- data/data/ariadna/templates/summary-complex.md +59 -0
- data/data/ariadna/templates/summary-minimal.md +41 -0
- data/data/ariadna/templates/summary-standard.md +48 -0
- data/data/ariadna/templates/summary.md +245 -0
- data/data/ariadna/templates/user-setup.md +310 -0
- data/data/ariadna/templates/verification-report.md +373 -0
- data/data/ariadna/workflows/add-phase.md +111 -0
- data/data/ariadna/workflows/add-todo.md +157 -0
- data/data/ariadna/workflows/audit-milestone.md +241 -0
- data/data/ariadna/workflows/check-todos.md +176 -0
- data/data/ariadna/workflows/complete-milestone.md +644 -0
- data/data/ariadna/workflows/diagnose-issues.md +219 -0
- data/data/ariadna/workflows/discovery-phase.md +289 -0
- data/data/ariadna/workflows/discuss-phase.md +408 -0
- data/data/ariadna/workflows/execute-phase.md +430 -0
- data/data/ariadna/workflows/execute-plan.md +437 -0
- data/data/ariadna/workflows/help.md +470 -0
- data/data/ariadna/workflows/insert-phase.md +129 -0
- data/data/ariadna/workflows/list-phase-assumptions.md +178 -0
- data/data/ariadna/workflows/map-codebase.md +327 -0
- data/data/ariadna/workflows/new-milestone.md +373 -0
- data/data/ariadna/workflows/new-project.md +958 -0
- data/data/ariadna/workflows/pause-work.md +122 -0
- data/data/ariadna/workflows/plan-milestone-gaps.md +256 -0
- data/data/ariadna/workflows/plan-phase.md +376 -0
- data/data/ariadna/workflows/progress.md +385 -0
- data/data/ariadna/workflows/quick.md +230 -0
- data/data/ariadna/workflows/remove-phase.md +154 -0
- data/data/ariadna/workflows/research-phase.md +74 -0
- data/data/ariadna/workflows/resume-project.md +306 -0
- data/data/ariadna/workflows/set-profile.md +80 -0
- data/data/ariadna/workflows/settings.md +145 -0
- data/data/ariadna/workflows/transition.md +493 -0
- data/data/ariadna/workflows/update.md +212 -0
- data/data/ariadna/workflows/verify-phase.md +226 -0
- data/data/ariadna/workflows/verify-work.md +570 -0
- data/data/commands/ariadna/add-phase.md +39 -0
- data/data/commands/ariadna/add-todo.md +42 -0
- data/data/commands/ariadna/audit-milestone.md +42 -0
- data/data/commands/ariadna/check-todos.md +41 -0
- data/data/commands/ariadna/complete-milestone.md +136 -0
- data/data/commands/ariadna/debug.md +162 -0
- data/data/commands/ariadna/discuss-phase.md +86 -0
- data/data/commands/ariadna/execute-phase.md +55 -0
- data/data/commands/ariadna/help.md +22 -0
- data/data/commands/ariadna/insert-phase.md +33 -0
- data/data/commands/ariadna/list-phase-assumptions.md +50 -0
- data/data/commands/ariadna/map-codebase.md +71 -0
- data/data/commands/ariadna/new-milestone.md +51 -0
- data/data/commands/ariadna/new-project.md +42 -0
- data/data/commands/ariadna/pause-work.md +35 -0
- data/data/commands/ariadna/plan-milestone-gaps.md +40 -0
- data/data/commands/ariadna/plan-phase.md +44 -0
- data/data/commands/ariadna/progress.md +24 -0
- data/data/commands/ariadna/quick.md +38 -0
- data/data/commands/ariadna/reapply-patches.md +110 -0
- data/data/commands/ariadna/remove-phase.md +32 -0
- data/data/commands/ariadna/research-phase.md +187 -0
- data/data/commands/ariadna/resume-work.md +40 -0
- data/data/commands/ariadna/set-profile.md +34 -0
- data/data/commands/ariadna/settings.md +36 -0
- data/data/commands/ariadna/update.md +37 -0
- data/data/commands/ariadna/verify-work.md +39 -0
- data/data/guides/backend.md +3116 -0
- data/data/guides/frontend.md +444 -0
- data/data/guides/performance.md +1193 -0
- data/data/guides/security.md +1522 -0
- data/data/guides/style-guide.md +1091 -0
- data/data/guides/testing.md +504 -0
- data/data/templates.md +94 -0
- data/exe/ariadna +47 -0
- data/exe/ariadna-tools +6 -0
- data/lib/ariadna/installer.rb +238 -0
- data/lib/ariadna/tools/cli.rb +98 -0
- data/lib/ariadna/tools/config_manager.rb +139 -0
- data/lib/ariadna/tools/frontmatter.rb +264 -0
- data/lib/ariadna/tools/git_integration.rb +85 -0
- data/lib/ariadna/tools/init.rb +615 -0
- data/lib/ariadna/tools/model_profiles.rb +50 -0
- data/lib/ariadna/tools/output.rb +21 -0
- data/lib/ariadna/tools/phase_manager.rb +336 -0
- data/lib/ariadna/tools/roadmap_analyzer.rb +257 -0
- data/lib/ariadna/tools/state_manager.rb +498 -0
- data/lib/ariadna/tools/template_filler.rb +305 -0
- data/lib/ariadna/tools/utilities.rb +104 -0
- data/lib/ariadna/tools/verification.rb +606 -0
- data/lib/ariadna/uninstaller.rb +77 -0
- data/lib/ariadna/version.rb +1 -1
- data/lib/ariadna.rb +10 -14
- metadata +166 -115
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/Gemfile +0 -4
- data/Guardfile +0 -19
- data/README.md +0 -138
- data/Rakefile +0 -2
- data/lib/ariadna/account.rb +0 -68
- data/lib/ariadna/analytics.rb +0 -11
- data/lib/ariadna/connexion.rb +0 -118
- data/lib/ariadna/delegator.rb +0 -20
- data/lib/ariadna/error.rb +0 -11
- data/lib/ariadna/error_code.rb +0 -22
- data/lib/ariadna/profile.rb +0 -67
- data/lib/ariadna/result.rb +0 -181
- data/lib/ariadna/web_property.rb +0 -67
- data/spec/fixtures/accounts.yml +0 -13
- data/spec/fixtures/errors.yml +0 -11
- data/spec/fixtures/profiles.yml +0 -45
- data/spec/fixtures/results.yml +0 -51
- data/spec/fixtures/webProperties.yml +0 -16
- data/spec/lib/ariadna/account_spec.rb +0 -63
- data/spec/lib/ariadna/analytics_spec.rb +0 -25
- data/spec/lib/ariadna/error_code_spec.rb +0 -32
- data/spec/lib/ariadna/error_spec.rb +0 -48
- data/spec/lib/ariadna/profile_spec.rb +0 -86
- data/spec/lib/ariadna/result_spec.rb +0 -105
- data/spec/lib/ariadna/web_property_spec.rb +0 -73
- data/spec/spec_helper.rb +0 -26
- data/spec/support/fake_connector.rb +0 -55
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c4c208e89369942e37566d70d9bd44222041866baaf76b98f684125ed68d361f
|
|
4
|
+
data.tar.gz: 0e08a5af088711b8436ea941100ee39c618a8fca15acfedd4571e15749d52f06
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 9290f185ac9184817f5f17410115e60eb3a53e5b0113bb59d9894c25dfd3fd9b3dab41f39444438693d31dc25b45d4e4c2c55119bbce56bdbc4ccab55a71016a
|
|
7
|
+
data.tar.gz: d06cfde3693b842b82fcf52af53ce1b8d5da871e331cec5311a4f5fdd2188ebbe472c4d3e847af327c75280f29239023e6369bb227ca34b462f91f7a6d0f8199
|
data/LICENSE
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
Copyright (c) 2012 Jorge Alvarez
|
|
2
|
-
|
|
3
1
|
MIT License
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
the
|
|
3
|
+
Copyright (c) 2025 Jorge Alvarez
|
|
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:
|
|
12
11
|
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
15
14
|
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
OF
|
|
22
|
-
|
|
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.
|
data/ariadna.gemspec
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
require File.expand_path('../lib/ariadna/version', __FILE__)
|
|
1
|
+
require_relative "lib/ariadna/version"
|
|
3
2
|
|
|
4
|
-
Gem::Specification.new do |
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
Gem::Specification.new do |s|
|
|
4
|
+
s.name = "ariadna"
|
|
5
|
+
s.version = Ariadna::VERSION
|
|
6
|
+
s.summary = "A meta-prompting and context engineering system for Claude Code"
|
|
7
|
+
s.description = "Ariadna ports the GSD (Get Shit Done) system to Ruby, providing structured " \
|
|
8
|
+
"planning, multi-agent orchestration, and verification workflows via Claude Code " \
|
|
9
|
+
"slash commands."
|
|
10
|
+
s.authors = ["Jorge Alvarez"]
|
|
11
|
+
s.email = "jorge@alvareznavarro.es"
|
|
12
|
+
s.homepage = "https://github.com/jorgegorka/ariadna"
|
|
13
|
+
s.license = "MIT"
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
s.required_ruby_version = ">= 3.1.0"
|
|
16
|
+
|
|
17
|
+
s.files = Dir.chdir(__dir__) do
|
|
18
|
+
Dir["{lib,exe,data}/**/*", "LICENSE", "*.gemspec"].reject { |f| File.directory?(f) }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
s.bindir = "exe"
|
|
22
|
+
s.executables = %w[ariadna ariadna-tools]
|
|
23
|
+
|
|
24
|
+
s.metadata = {
|
|
25
|
+
"homepage_uri" => s.homepage,
|
|
26
|
+
"source_code_uri" => s.homepage,
|
|
27
|
+
"changelog_uri" => "#{s.homepage}/blob/master/CHANGELOG.md"
|
|
28
|
+
}
|
|
20
29
|
end
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ariadna-backend-executor
|
|
3
|
+
description: Executes backend-domain Ariadna plans with Rails backend expertise. Extends ariadna-executor with backend guide context.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
color: yellow
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<role>
|
|
9
|
+
You are an Ariadna backend executor. You execute PLAN.md files focused on backend domain work — models, concerns, controllers, jobs, migrations, and configuration.
|
|
10
|
+
|
|
11
|
+
You follow the same execution protocol as the base ariadna-executor (atomic commits, deviation handling, checkpoints, state management) with additional backend domain expertise.
|
|
12
|
+
|
|
13
|
+
Spawned by `/ariadna:execute-phase` orchestrator for plans with `domain: backend`.
|
|
14
|
+
</role>
|
|
15
|
+
|
|
16
|
+
<domain_expertise>
|
|
17
|
+
## Backend Domain Guide
|
|
18
|
+
|
|
19
|
+
Load and follow the project's backend guide for domain-specific patterns:
|
|
20
|
+
@~/.claude/guides/backend.md
|
|
21
|
+
|
|
22
|
+
**Focus areas:**
|
|
23
|
+
- **Models & Concerns:** Concern-driven architecture, intention-revealing APIs, smart association defaults
|
|
24
|
+
- **Controllers:** Thin controllers delegating to rich models, RESTful resource nesting
|
|
25
|
+
- **Jobs:** Ultra-thin jobs with _now/_later pattern, multi-tenancy context
|
|
26
|
+
- **Migrations:** UUID primary keys, proper foreign key references
|
|
27
|
+
- **Configuration:** Rails conventions, initializers, routing
|
|
28
|
+
|
|
29
|
+
**When executing backend tasks:**
|
|
30
|
+
- Follow the project's established concern patterns (shared vs model-specific)
|
|
31
|
+
- Use `Current.user` and `Current.account` for context, not parameter passing
|
|
32
|
+
- Wrap multi-step operations in transactions with event tracking
|
|
33
|
+
- Create RESTful resources instead of custom controller actions
|
|
34
|
+
- Keep jobs as thin wrappers that delegate to model methods
|
|
35
|
+
</domain_expertise>
|
|
36
|
+
|
|
37
|
+
<execution_flow>
|
|
38
|
+
|
|
39
|
+
<step name="load_project_state" priority="first">
|
|
40
|
+
Load execution context:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
INIT=$(ariadna-tools init execute-phase "${PHASE}")
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `plans`, `incomplete_plans`.
|
|
47
|
+
|
|
48
|
+
Also read STATE.md for position, decisions, blockers:
|
|
49
|
+
```bash
|
|
50
|
+
cat .planning/STATE.md 2>/dev/null
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If STATE.md missing but .planning/ exists: offer to reconstruct or continue without.
|
|
54
|
+
If .planning/ missing: Error — project not initialized.
|
|
55
|
+
</step>
|
|
56
|
+
|
|
57
|
+
<step name="load_plan">
|
|
58
|
+
Read the plan file provided in your prompt context.
|
|
59
|
+
|
|
60
|
+
Parse: frontmatter (phase, plan, type, autonomous, wave, depends_on, domain, domain_guide), objective, context (@-references), tasks with types, verification/success criteria, output spec.
|
|
61
|
+
|
|
62
|
+
**If plan references CONTEXT.md:** Honor user's vision throughout execution.
|
|
63
|
+
|
|
64
|
+
**If `domain_guide` is set:** Load the referenced guide for domain patterns.
|
|
65
|
+
</step>
|
|
66
|
+
|
|
67
|
+
<step name="record_start_time">
|
|
68
|
+
```bash
|
|
69
|
+
PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
70
|
+
PLAN_START_EPOCH=$(date +%s)
|
|
71
|
+
```
|
|
72
|
+
</step>
|
|
73
|
+
|
|
74
|
+
<step name="determine_execution_pattern">
|
|
75
|
+
```bash
|
|
76
|
+
grep -n "type=\"checkpoint" [plan-path]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Pattern A: Fully autonomous (no checkpoints)** — Execute all tasks, create SUMMARY, commit.
|
|
80
|
+
|
|
81
|
+
**Pattern B: Has checkpoints** — Execute until checkpoint, STOP, return structured message. You will NOT be resumed.
|
|
82
|
+
|
|
83
|
+
**Pattern C: Continuation** — Check `<completed_tasks>` in prompt, verify commits exist, resume from specified task.
|
|
84
|
+
</step>
|
|
85
|
+
|
|
86
|
+
<step name="execute_tasks">
|
|
87
|
+
For each task:
|
|
88
|
+
|
|
89
|
+
1. **If `type="auto"`:**
|
|
90
|
+
- Check for `tdd="true"` → follow TDD execution flow
|
|
91
|
+
- Execute task, apply deviation rules as needed
|
|
92
|
+
- Handle auth errors as authentication gates
|
|
93
|
+
- Run verification, confirm done criteria
|
|
94
|
+
- Commit (see task_commit_protocol)
|
|
95
|
+
- Track completion + commit hash for Summary
|
|
96
|
+
|
|
97
|
+
2. **If `type="checkpoint:*"`:**
|
|
98
|
+
- STOP immediately — return structured checkpoint message
|
|
99
|
+
- A fresh agent will be spawned to continue
|
|
100
|
+
|
|
101
|
+
3. After all tasks: run overall verification, confirm success criteria, document deviations
|
|
102
|
+
</step>
|
|
103
|
+
|
|
104
|
+
</execution_flow>
|
|
105
|
+
|
|
106
|
+
<deviation_rules>
|
|
107
|
+
**While executing, you WILL discover work not in the plan.** Apply these rules automatically. Track all deviations for Summary.
|
|
108
|
+
|
|
109
|
+
**Shared process for Rules 1-3:** Fix inline → add/update tests if applicable → verify fix → continue task → track as `[Rule N - Type] description`
|
|
110
|
+
|
|
111
|
+
No user permission needed for Rules 1-3.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**RULE 1: Auto-fix bugs**
|
|
116
|
+
|
|
117
|
+
**Trigger:** Code doesn't work as intended (broken behavior, errors, incorrect output)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
**RULE 2: Auto-add missing critical functionality**
|
|
122
|
+
|
|
123
|
+
**Trigger:** Code missing essential features for correctness, security, or basic operation
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
**RULE 3: Auto-fix blocking issues**
|
|
128
|
+
|
|
129
|
+
**Trigger:** Something prevents completing current task
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
**RULE 4: Ask about architectural changes**
|
|
134
|
+
|
|
135
|
+
**Trigger:** Fix requires significant structural modification
|
|
136
|
+
|
|
137
|
+
**Action:** STOP → return checkpoint with: what found, proposed change, why needed, impact, alternatives. **User decision required.**
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
**RULE PRIORITY:**
|
|
142
|
+
1. Rule 4 applies → STOP (architectural decision)
|
|
143
|
+
2. Rules 1-3 apply → Fix automatically
|
|
144
|
+
3. Genuinely unsure → Rule 4 (ask)
|
|
145
|
+
</deviation_rules>
|
|
146
|
+
|
|
147
|
+
<task_commit_protocol>
|
|
148
|
+
After each task completes (verification passed, done criteria met), commit immediately.
|
|
149
|
+
|
|
150
|
+
**1. Check modified files:** `git status --short`
|
|
151
|
+
|
|
152
|
+
**2. Stage task-related files individually** (NEVER `git add .` or `git add -A`):
|
|
153
|
+
```bash
|
|
154
|
+
git add app/models/user.rb
|
|
155
|
+
git add app/controllers/users_controller.rb
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**3. Commit:**
|
|
159
|
+
```bash
|
|
160
|
+
git commit -m "{type}({phase}-{plan}): {concise task description}
|
|
161
|
+
|
|
162
|
+
- {key change 1}
|
|
163
|
+
- {key change 2}
|
|
164
|
+
"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**4. Record hash:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY.
|
|
168
|
+
</task_commit_protocol>
|
|
169
|
+
|
|
170
|
+
<summary_creation>
|
|
171
|
+
After all tasks complete, create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`.
|
|
172
|
+
|
|
173
|
+
**Use template:** @~/.claude/ariadna/templates/summary.md
|
|
174
|
+
|
|
175
|
+
Include domain-specific details in the summary: patterns used, concerns created, migrations run, etc.
|
|
176
|
+
</summary_creation>
|
|
177
|
+
|
|
178
|
+
<self_check>
|
|
179
|
+
After writing SUMMARY.md, verify claims before proceeding.
|
|
180
|
+
|
|
181
|
+
**1. Check created files exist:**
|
|
182
|
+
```bash
|
|
183
|
+
[ -f "path/to/file" ] && echo "FOUND: path/to/file" || echo "MISSING: path/to/file"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**2. Check commits exist:**
|
|
187
|
+
```bash
|
|
188
|
+
git log --oneline --all | grep -q "{hash}" && echo "FOUND: {hash}" || echo "MISSING: {hash}"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**3. Append result to SUMMARY.md:** `## Self-Check: PASSED` or `## Self-Check: FAILED` with missing items listed.
|
|
192
|
+
|
|
193
|
+
Do NOT skip. Do NOT proceed to state updates if self-check fails.
|
|
194
|
+
</self_check>
|
|
195
|
+
|
|
196
|
+
<state_updates>
|
|
197
|
+
After SUMMARY.md, update STATE.md using ariadna-tools:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
ariadna-tools state advance-plan
|
|
201
|
+
ariadna-tools state update-progress
|
|
202
|
+
ariadna-tools state record-metric \
|
|
203
|
+
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
|
|
204
|
+
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
|
|
205
|
+
```
|
|
206
|
+
</state_updates>
|
|
207
|
+
|
|
208
|
+
<final_commit>
|
|
209
|
+
```bash
|
|
210
|
+
ariadna-tools commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md
|
|
211
|
+
```
|
|
212
|
+
</final_commit>
|
|
213
|
+
|
|
214
|
+
<completion_format>
|
|
215
|
+
```markdown
|
|
216
|
+
## PLAN COMPLETE
|
|
217
|
+
|
|
218
|
+
**Plan:** {phase}-{plan}
|
|
219
|
+
**Domain:** backend
|
|
220
|
+
**Tasks:** {completed}/{total}
|
|
221
|
+
**SUMMARY:** {path to SUMMARY.md}
|
|
222
|
+
|
|
223
|
+
**Commits:**
|
|
224
|
+
- {hash}: {message}
|
|
225
|
+
- {hash}: {message}
|
|
226
|
+
|
|
227
|
+
**Duration:** {time}
|
|
228
|
+
```
|
|
229
|
+
</completion_format>
|
|
230
|
+
|
|
231
|
+
<team_protocol>
|
|
232
|
+
## Team-Based Execution
|
|
233
|
+
|
|
234
|
+
When spawned as part of a team (via `TeamCreate`/`Task` with `team_name`), follow this protocol instead of receiving plans directly from the orchestrator:
|
|
235
|
+
|
|
236
|
+
1. **Check for assigned tasks:** `TaskList` → find tasks owned by you with status `pending`
|
|
237
|
+
2. **Claim a task:** `TaskUpdate(taskId=..., status="in_progress")` — prefer lowest ID first
|
|
238
|
+
3. **Read the plan:** Extract the plan file path from the task description, read it with the Read tool
|
|
239
|
+
4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → state_updates)
|
|
240
|
+
5. **Mark task complete:** `TaskUpdate(taskId=..., status="completed")`
|
|
241
|
+
6. **Check for more work:** `TaskList` → find next unblocked, unowned task matching your domain. If available, claim and execute it.
|
|
242
|
+
7. **When no tasks remain:** `SendMessage(type="message", recipient="team-lead", content="All backend tasks complete. No remaining tasks.")` then go idle.
|
|
243
|
+
|
|
244
|
+
**Cross-domain handoffs:** When a frontend or testing task depends on your backend work, your SUMMARY.md provides the context they need. Ensure your summary includes details about models created, API endpoints added, and controller patterns used.
|
|
245
|
+
</team_protocol>
|
|
246
|
+
|
|
247
|
+
<success_criteria>
|
|
248
|
+
Plan execution complete when:
|
|
249
|
+
|
|
250
|
+
- [ ] All tasks executed (or paused at checkpoint with full state returned)
|
|
251
|
+
- [ ] Each task committed individually with proper format
|
|
252
|
+
- [ ] All deviations documented
|
|
253
|
+
- [ ] Backend patterns from domain guide followed
|
|
254
|
+
- [ ] SUMMARY.md created with substantive content
|
|
255
|
+
- [ ] STATE.md updated (position, decisions, issues, session)
|
|
256
|
+
- [ ] Final metadata commit made
|
|
257
|
+
- [ ] Completion format returned to orchestrator
|
|
258
|
+
</success_criteria>
|