trackops 2.0.4 → 2.0.5
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.
- package/LICENSE +21 -21
- package/README.md +695 -640
- package/bin/trackops.js +116 -116
- package/lib/config.js +326 -326
- package/lib/control.js +208 -208
- package/lib/env.js +244 -244
- package/lib/init.js +325 -325
- package/lib/locale.js +41 -41
- package/lib/opera-bootstrap.js +942 -936
- package/lib/opera.js +495 -486
- package/lib/preferences.js +74 -74
- package/lib/registry.js +214 -214
- package/lib/release.js +56 -56
- package/lib/runtime-state.js +144 -144
- package/lib/skills.js +74 -57
- package/lib/workspace.js +260 -260
- package/locales/en.json +192 -170
- package/locales/es.json +192 -170
- package/package.json +61 -58
- package/scripts/postinstall-locale.js +21 -21
- package/scripts/skills-marketplace-smoke.js +124 -124
- package/scripts/smoke-tests.js +558 -554
- package/scripts/sync-skill-version.js +21 -21
- package/scripts/validate-skill.js +103 -103
- package/skills/trackops/SKILL.md +126 -122
- package/skills/trackops/agents/openai.yaml +7 -7
- package/skills/trackops/locales/en/SKILL.md +126 -122
- package/skills/trackops/locales/en/references/activation.md +94 -90
- package/skills/trackops/locales/en/references/troubleshooting.md +73 -67
- package/skills/trackops/locales/en/references/workflow.md +55 -32
- package/skills/trackops/references/activation.md +94 -90
- package/skills/trackops/references/troubleshooting.md +73 -67
- package/skills/trackops/references/workflow.md +55 -32
- package/skills/trackops/skill.json +29 -29
- package/templates/hooks/post-checkout +2 -2
- package/templates/hooks/post-commit +2 -2
- package/templates/hooks/post-merge +2 -2
- package/templates/opera/agent.md +28 -27
- package/templates/opera/architecture/dependency-graph.md +24 -24
- package/templates/opera/architecture/runtime-automation.md +24 -24
- package/templates/opera/architecture/runtime-operations.md +34 -34
- package/templates/opera/en/agent.md +22 -21
- package/templates/opera/en/architecture/dependency-graph.md +24 -24
- package/templates/opera/en/architecture/runtime-automation.md +24 -24
- package/templates/opera/en/architecture/runtime-operations.md +34 -34
- package/templates/opera/en/reviews/delivery-audit.md +18 -18
- package/templates/opera/en/reviews/integration-audit.md +18 -18
- package/templates/opera/en/router.md +24 -19
- package/templates/opera/references/autonomy-and-recovery.md +117 -117
- package/templates/opera/references/opera-cycle.md +193 -193
- package/templates/opera/registry.md +28 -28
- package/templates/opera/reviews/delivery-audit.md +18 -18
- package/templates/opera/reviews/integration-audit.md +18 -18
- package/templates/opera/router.md +54 -49
- package/templates/skills/changelog-updater/SKILL.md +69 -69
- package/templates/skills/commiter/SKILL.md +99 -99
- package/templates/skills/opera-contract-auditor/SKILL.md +38 -38
- package/templates/skills/opera-contract-auditor/locales/en/SKILL.md +38 -38
- package/templates/skills/opera-policy-guard/SKILL.md +26 -26
- package/templates/skills/opera-policy-guard/locales/en/SKILL.md +26 -26
- package/templates/skills/opera-skill/SKILL.md +279 -0
- package/templates/skills/opera-skill/locales/en/SKILL.md +279 -0
- package/templates/skills/opera-skill/locales/en/references/phase-dod.md +138 -0
- package/templates/skills/opera-skill/references/phase-dod.md +138 -0
- package/templates/skills/project-starter-skill/SKILL.md +150 -131
- package/templates/skills/project-starter-skill/locales/en/SKILL.md +143 -105
- package/templates/skills/project-starter-skill/references/opera-cycle.md +195 -193
- package/ui/css/base.css +284 -284
- package/ui/css/charts.css +425 -425
- package/ui/css/components.css +1107 -1107
- package/ui/css/onboarding.css +133 -133
- package/ui/css/terminal.css +125 -125
- package/ui/css/timeline.css +58 -58
- package/ui/css/tokens.css +284 -284
- package/ui/favicon.svg +5 -5
- package/ui/index.html +99 -99
- package/ui/js/charts.js +526 -526
- package/ui/js/console-logger.js +172 -172
- package/ui/js/filters.js +247 -247
- package/ui/js/icons.js +129 -129
- package/ui/js/keyboard.js +229 -229
- package/ui/js/router.js +142 -142
- package/ui/js/theme.js +100 -100
- package/ui/js/time-tracker.js +248 -248
- package/ui/js/views/dashboard.js +870 -870
- package/ui/js/views/flash.js +47 -47
- package/ui/js/views/projects.js +745 -745
- package/ui/js/views/scrum.js +476 -476
- package/ui/js/views/settings.js +331 -331
- package/ui/js/views/timeline.js +265 -265
|
@@ -1,105 +1,143 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "project-starter-skill"
|
|
3
|
-
description: "Skill for discovery and early project structuring with TrackOps and OPERA. Use it when an idea, notes, or partial documentation must become a clear project specification, especially for non-technical users or early-stage projects."
|
|
4
|
-
metadata:
|
|
5
|
-
version: "
|
|
6
|
-
type: "global"
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Project Starter Skill
|
|
10
|
-
|
|
11
|
-
Your job is to turn an idea or partial documentation into a structured, explainable project.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
55
|
-
- `
|
|
56
|
-
- `
|
|
57
|
-
- `
|
|
58
|
-
- `
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
`ops/bootstrap/spec-dossier.md`
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
1
|
+
---
|
|
2
|
+
name: "project-starter-skill"
|
|
3
|
+
description: "Skill for discovery and early project structuring with TrackOps and OPERA. Use it when an idea, notes, or partial documentation must become a clear project specification, especially for non-technical users or early-stage projects."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "5.0"
|
|
6
|
+
type: "global"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Project Starter Skill
|
|
10
|
+
|
|
11
|
+
Your job is to turn an idea or partial documentation into a structured, explainable project.
|
|
12
|
+
|
|
13
|
+
> **IMPORTANT**: The framework is called **OPERA** (Orchestrate, Prove, Establish, Refine, Automate). NEVER use "ETAPA", "E.T.A.P.A.", or any other alternative name. The correct and only name is **OPERA**.
|
|
14
|
+
|
|
15
|
+
## Core rule
|
|
16
|
+
|
|
17
|
+
Start from the person, not from the architecture.
|
|
18
|
+
|
|
19
|
+
- identify the user's technical level
|
|
20
|
+
- adapt language and depth to that level
|
|
21
|
+
- if documentation exists, read it and consolidate it
|
|
22
|
+
- if documentation does not exist, build the first useful specification from the idea
|
|
23
|
+
|
|
24
|
+
## Do not assume — ask
|
|
25
|
+
|
|
26
|
+
Before making decisions about infrastructure, repositories, licenses, or stack, **ask the user**. Do not take anything for granted.
|
|
27
|
+
|
|
28
|
+
### Repository and version control questions
|
|
29
|
+
|
|
30
|
+
These questions are mandatory during discovery:
|
|
31
|
+
|
|
32
|
+
1. **Remote repository**: Do you want a remote repository? (yes/no)
|
|
33
|
+
2. **Platform**: If yes, which? (GitHub / GitLab / Bitbucket / other — specify)
|
|
34
|
+
3. **Existing repository**: Does the repository already exist, or should it be created?
|
|
35
|
+
4. **Visibility**: Public or private?
|
|
36
|
+
5. **License**: What software license? (MIT / Apache 2.0 / GPL / proprietary / other — or "I don't know, recommend one")
|
|
37
|
+
6. **Organization**: Under which user or organization?
|
|
38
|
+
|
|
39
|
+
### Environment and deployment questions
|
|
40
|
+
|
|
41
|
+
Complementary to the repository:
|
|
42
|
+
|
|
43
|
+
7. **Runtime environment**: Where will it run? (local / server / cloud / edge / not sure yet)
|
|
44
|
+
8. **CI/CD**: Do you need continuous integration or automatic deployment? (yes/no/not sure)
|
|
45
|
+
9. **Domain/URL**: Do you have a domain or target URL?
|
|
46
|
+
|
|
47
|
+
If the user doesn't know or has no preference, you may recommend, but **mark the recommendation as such** and ask for confirmation before proceeding. Never create repositories, licenses, or structure without explicit approval.
|
|
48
|
+
|
|
49
|
+
## When TrackOps is already installed
|
|
50
|
+
|
|
51
|
+
If the repository already contains TrackOps or OPERA:
|
|
52
|
+
|
|
53
|
+
- do not run `trackops init`
|
|
54
|
+
- do not recreate `app/`, `ops/`, or the workspace
|
|
55
|
+
- use `ops/contract/operating-contract.json` as the machine source of truth when it already exists
|
|
56
|
+
- use `ops/genesis.md` as the compiled human view
|
|
57
|
+
- use `ops/project_control.json` for backlog and operational state
|
|
58
|
+
- work from `ops/bootstrap/agent-handoff.md`
|
|
59
|
+
- write:
|
|
60
|
+
- `ops/bootstrap/intake.json`
|
|
61
|
+
- `ops/bootstrap/spec-dossier.md`
|
|
62
|
+
- `ops/bootstrap/open-questions.md` when important gaps remain
|
|
63
|
+
|
|
64
|
+
## What the skill must produce
|
|
65
|
+
|
|
66
|
+
`ops/bootstrap/intake.json` must include at least:
|
|
67
|
+
|
|
68
|
+
- `technicalLevel`
|
|
69
|
+
- `projectState`
|
|
70
|
+
- `documentationState`
|
|
71
|
+
- `decisionOwnership`
|
|
72
|
+
- `problemStatement`
|
|
73
|
+
- `targetUser`
|
|
74
|
+
- `singularDesiredOutcome`
|
|
75
|
+
- `userLanguage`
|
|
76
|
+
- `needsPlainLanguage`
|
|
77
|
+
- `recommendedStack`
|
|
78
|
+
- `externalServices`
|
|
79
|
+
- `sourceOfTruth`
|
|
80
|
+
- `payload`
|
|
81
|
+
- `behaviorRules`
|
|
82
|
+
- `architecturalInvariants`
|
|
83
|
+
- `inputSchema`
|
|
84
|
+
- `outputSchema`
|
|
85
|
+
- `pipeline`
|
|
86
|
+
- `templates`
|
|
87
|
+
- `versionControl` — object with repository decisions:
|
|
88
|
+
- `remote` (boolean)
|
|
89
|
+
- `platform` (github/gitlab/bitbucket/other/none)
|
|
90
|
+
- `repoExists` (boolean)
|
|
91
|
+
- `visibility` (public/private)
|
|
92
|
+
- `license` (MIT/Apache-2.0/GPL-3.0/proprietary/other)
|
|
93
|
+
- `org` (user or organization)
|
|
94
|
+
- `deployment` — object with environment decisions:
|
|
95
|
+
- `target` (local/server/cloud/edge/undecided)
|
|
96
|
+
- `cicd` (boolean or null if undecided)
|
|
97
|
+
- `domain` (string or null)
|
|
98
|
+
|
|
99
|
+
`ops/bootstrap/spec-dossier.md` must explain:
|
|
100
|
+
|
|
101
|
+
- `## Problem statement`
|
|
102
|
+
- `## Target user`
|
|
103
|
+
- `## Singular desired outcome`
|
|
104
|
+
- `## Delivery target`
|
|
105
|
+
- `## Source of truth`
|
|
106
|
+
- the main functional flow
|
|
107
|
+
- recommended or inherited stack
|
|
108
|
+
- external integrations
|
|
109
|
+
- relevant constraints
|
|
110
|
+
|
|
111
|
+
`ops/bootstrap/open-questions.md` must list:
|
|
112
|
+
|
|
113
|
+
- questions still open
|
|
114
|
+
- contradictions between the idea, the repository, and the documents
|
|
115
|
+
- decisions that TrackOps or OPERA must not invent
|
|
116
|
+
|
|
117
|
+
## Minimum quality bar before handing off
|
|
118
|
+
|
|
119
|
+
Do not treat discovery as complete if any of these are missing:
|
|
120
|
+
|
|
121
|
+
- problem statement
|
|
122
|
+
- target user
|
|
123
|
+
- singular desired outcome
|
|
124
|
+
- delivery target
|
|
125
|
+
- source of truth
|
|
126
|
+
- input and output schema, even if still provisional
|
|
127
|
+
- repository and version control preferences
|
|
128
|
+
|
|
129
|
+
If something is still uncertain, write it to `open-questions.md` instead of inventing it.
|
|
130
|
+
|
|
131
|
+
## If TrackOps is not installed yet
|
|
132
|
+
|
|
133
|
+
Do not invent your own structure.
|
|
134
|
+
|
|
135
|
+
Explain the correct flow:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npx skills add Baxahaun/trackops
|
|
139
|
+
trackops init
|
|
140
|
+
trackops opera install
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
If the user only has an idea, make it explicit that TrackOps can route bootstrap into an agent-led discovery conversation.
|
|
@@ -1,193 +1,195 @@
|
|
|
1
|
-
# El Ciclo O.P.E.R.A. — Referencia Completa
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- [ ]
|
|
51
|
-
- [ ]
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
assert
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- [ ]
|
|
94
|
-
- [ ]
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Capa
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
# META:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- [ ]
|
|
149
|
-
- [ ]
|
|
150
|
-
- [ ]
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
- [ ]
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- [ ]
|
|
192
|
-
- [ ]
|
|
193
|
-
- [ ]
|
|
1
|
+
# El Ciclo O.P.E.R.A. — Referencia Completa
|
|
2
|
+
|
|
3
|
+
> **IMPORTANTE**: El framework se llama **OPERA** (Orquestar, Probar, Estructurar, Refinar, Automatizar). NO uses "ETAPA", "E.T.A.P.A." ni ningún otro nombre alternativo. El nombre correcto y único es **OPERA**.
|
|
4
|
+
|
|
5
|
+
Este documento detalla cada fase del ciclo con sus reglas, procedimientos y Definitions of Done.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1️⃣ O — Orquestar (Visión y Lógica)
|
|
10
|
+
|
|
11
|
+
### Descubrimiento
|
|
12
|
+
|
|
13
|
+
Haz al usuario las 5 preguntas clave:
|
|
14
|
+
|
|
15
|
+
1. **Directriz Principal**: ¿Cuál es el resultado singular deseado?
|
|
16
|
+
2. **Integraciones**: ¿Qué servicios externos necesitamos? ¿Están listas las claves?
|
|
17
|
+
3. **Fuente de la Verdad**: ¿Dónde viven los datos primarios?
|
|
18
|
+
4. **Carga Útil (Payload)**: ¿Cómo y dónde debe entregarse el resultado final?
|
|
19
|
+
5. **Reglas de Comportamiento**: Restricciones o tono específico.
|
|
20
|
+
|
|
21
|
+
### Regla "Datos-Primero"
|
|
22
|
+
|
|
23
|
+
Antes de pasar a la siguiente fase, DEBES definir el **Esquema de Datos JSON** (Input/Output) en `genesis.md`.
|
|
24
|
+
|
|
25
|
+
Ejemplo de schema en genesis.md:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"input": {
|
|
30
|
+
"source": "API externa",
|
|
31
|
+
"schema": {
|
|
32
|
+
"id": "string (UUID)",
|
|
33
|
+
"timestamp": "ISO 8601",
|
|
34
|
+
"data": "object"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"output": {
|
|
38
|
+
"destination": "webhook POST",
|
|
39
|
+
"schema": {
|
|
40
|
+
"processed_id": "string (UUID)",
|
|
41
|
+
"result": "object",
|
|
42
|
+
"status": "enum: success|error"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Definition of Done — Fase O
|
|
49
|
+
|
|
50
|
+
- [ ] Las 5 preguntas de descubrimiento están respondidas.
|
|
51
|
+
- [ ] Esquema JSON de Input/Output definido en `genesis.md`.
|
|
52
|
+
- [ ] Reglas de comportamiento documentadas en `genesis.md`.
|
|
53
|
+
- [ ] `task_plan.md` tiene plano aprobado por el usuario.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 2️⃣ P — Probar (Conectividad)
|
|
58
|
+
|
|
59
|
+
Verifica las tuberías antes de pasar el agua. El objetivo es confirmar que todos los servicios externos responden y devuelven datos con la forma esperada.
|
|
60
|
+
|
|
61
|
+
### Procedimiento
|
|
62
|
+
|
|
63
|
+
1. **Verificación de credenciales**: Lee `.env` y confirma que todas las claves necesarias existen y no están vacías.
|
|
64
|
+
2. **Handshake**: Construye scripts mínimos en `tools/` (ej: `test_api.py`) para verificar cada servicio.
|
|
65
|
+
3. **Validación de Shape**: No basta con un HTTP 200. Verifica que la respuesta coincide con el schema definido en `genesis.md`. Compara campos, tipos de datos y estructura.
|
|
66
|
+
4. **Bloqueo**: Si algún test falla, NO procedas a la fase de Estructurar. Documenta el fallo en `findings.md`.
|
|
67
|
+
|
|
68
|
+
### Ejemplo de test mínimo
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
# tools/test_api.py
|
|
72
|
+
import os
|
|
73
|
+
import requests
|
|
74
|
+
|
|
75
|
+
API_KEY = os.getenv("API_KEY")
|
|
76
|
+
BASE_URL = os.getenv("API_BASE_URL")
|
|
77
|
+
|
|
78
|
+
def test_connection():
|
|
79
|
+
"""Verifica conexión y shape de respuesta."""
|
|
80
|
+
response = requests.get(f"{BASE_URL}/health", headers={"Authorization": f"Bearer {API_KEY}"})
|
|
81
|
+
assert response.status_code == 200, f"Expected 200, got {response.status_code}"
|
|
82
|
+
data = response.json()
|
|
83
|
+
assert "id" in data, "Missing 'id' field in response"
|
|
84
|
+
assert "status" in data, "Missing 'status' field in response"
|
|
85
|
+
print("✅ API connection and shape validated")
|
|
86
|
+
|
|
87
|
+
if __name__ == "__main__":
|
|
88
|
+
test_connection()
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Definition of Done — Fase P
|
|
92
|
+
|
|
93
|
+
- [ ] Todas las credenciales `.env` verificadas (existen y no están vacías).
|
|
94
|
+
- [ ] Scripts `test_*.py` ejecutados y pasando.
|
|
95
|
+
- [ ] Respuestas de APIs validadas contra el schema de `genesis.md`.
|
|
96
|
+
- [ ] Resultados documentados en `findings.md`.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 3️⃣ E — Estructurar (La Construcción de 3 Capas)
|
|
101
|
+
|
|
102
|
+
### Capa 1: Arquitectura (`architecture/`)
|
|
103
|
+
|
|
104
|
+
SOPs (Standard Operating Procedures) técnicos en Markdown. Cada SOP define:
|
|
105
|
+
|
|
106
|
+
- Propósito del script.
|
|
107
|
+
- Entradas esperadas (con referencia al schema en `genesis.md`).
|
|
108
|
+
- Salidas producidas.
|
|
109
|
+
- Casos extremos y cómo manejarlos.
|
|
110
|
+
- Dependencias con otras herramientas.
|
|
111
|
+
|
|
112
|
+
**Regla**: Si la lógica cambia, actualiza el SOP **antes** que el código.
|
|
113
|
+
|
|
114
|
+
### Capa 2: Navegación (El Agente)
|
|
115
|
+
|
|
116
|
+
Capa de razonamiento. Enruta datos entre SOPs y herramientas. No ejecuta lógica de negocio directamente; delega a los scripts.
|
|
117
|
+
|
|
118
|
+
### Capa 3: Herramientas (`tools/`)
|
|
119
|
+
|
|
120
|
+
- Scripts atómicos y deterministas.
|
|
121
|
+
- Las variables de entorno van en `.env`.
|
|
122
|
+
- Usa `.tmp/` para todas las operaciones intermedias.
|
|
123
|
+
- Cada script hace UNA cosa bien.
|
|
124
|
+
|
|
125
|
+
### Regla de Idempotencia
|
|
126
|
+
|
|
127
|
+
Toda herramienta DEBE ser idempotente. Herramientas con side-effects irreversibles se marcan:
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
# META: side-effect: true
|
|
131
|
+
# META: idempotent: false
|
|
132
|
+
# META: requires-confirmation: true
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Grafo de Dependencias
|
|
136
|
+
|
|
137
|
+
Si una herramienta produce output que consume otra, documéntalo en `genesis.md` bajo `## Pipeline`:
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
## Pipeline
|
|
141
|
+
### tool_fetch.py → tool_transform.py
|
|
142
|
+
- Output: `.tmp/raw_data.json`
|
|
143
|
+
- Formato: JSON array según schema X
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Definition of Done — Fase E
|
|
147
|
+
|
|
148
|
+
- [ ] SOPs escritos en `architecture/` para cada herramienta.
|
|
149
|
+
- [ ] Scripts implementados en `tools/`.
|
|
150
|
+
- [ ] Grafo de dependencias documentado en `genesis.md`.
|
|
151
|
+
- [ ] Tests de integración entre herramientas pasando.
|
|
152
|
+
- [ ] Herramientas con side-effects marcadas con META tags.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 4️⃣ R — Refinar (Refinamiento)
|
|
157
|
+
|
|
158
|
+
### Templates de Output
|
|
159
|
+
|
|
160
|
+
Toda salida del sistema se valida contra una plantilla definida en `templates/`. Las plantillas se referencian desde `genesis.md` bajo `## Templates`.
|
|
161
|
+
|
|
162
|
+
El refinamiento no es subjetivo; es verificable contra una plantilla. Si el output no coincide con el template, no pasa.
|
|
163
|
+
|
|
164
|
+
### Refinamiento de Carga Útil
|
|
165
|
+
|
|
166
|
+
Formatea todas las salidas (Markdown, HTML, JSON limpio) para entrega profesional según lo definido en `genesis.md`.
|
|
167
|
+
|
|
168
|
+
### UX/UI
|
|
169
|
+
|
|
170
|
+
Si el proyecto tiene interfaz, aplica diseños limpios e intuitivos según las especificaciones.
|
|
171
|
+
|
|
172
|
+
### Definition of Done — Fase R
|
|
173
|
+
|
|
174
|
+
- [ ] Todas las salidas validadas contra sus templates en `templates/`.
|
|
175
|
+
- [ ] Formatos de entrega (Markdown, HTML, JSON) verificados.
|
|
176
|
+
- [ ] Si hay interfaz: revisión visual completada.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 5️⃣ A — Automatizar (Despliegue)
|
|
181
|
+
|
|
182
|
+
### Procedimiento
|
|
183
|
+
|
|
184
|
+
1. **Limpieza**: Elimina residuos de `.tmp/`.
|
|
185
|
+
2. **Transferencia**: Mueve la lógica finalizada a producción/nube.
|
|
186
|
+
3. **Configuración**: Establece los disparadores (Cron, Webhooks).
|
|
187
|
+
4. **Smoke Test**: Verificación mínima en el entorno de producción.
|
|
188
|
+
|
|
189
|
+
### Definition of Done — Fase A
|
|
190
|
+
|
|
191
|
+
- [ ] `.tmp/` limpio (sin archivos residuales).
|
|
192
|
+
- [ ] Código desplegado en destino final.
|
|
193
|
+
- [ ] Triggers configurados y verificados.
|
|
194
|
+
- [ ] Smoke test en producción pasando.
|
|
195
|
+
- [ ] `progress.md` actualizado con estado final.
|