@ancleto/spec 0.2.0 → 0.2.1

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.
@@ -1,57 +1,43 @@
1
1
  # Product Context - [Product Name]
2
2
 
3
- > **This file is EXTENSIBLE and will never be replaced by @ancleto/ai-tooling-framework**
3
+ > **This file is EXTENSIBLE and will never be replaced by @ancleto/spec**
4
4
  >
5
- > Fill in the sections according to your product/project. This file is read by AI agents (Claude, Cursor, etc.) to understand the specific context of your product.
6
-
7
- > **How to complete this file:** replace `[Product Name]` in the title and fill each section with your product's real values, deleting the example/placeholder text as you go. At a minimum, complete **Project Type**, **Tech Stack**, **Azure DevOps**, **AI Memory**, **Project Structure**, and **Project Commands** — agents rely on these to operate in your repo. The remaining sections are optional but recommended.
5
+ > Fill in the sections according to your product/project. AI agents read this file to understand product-specific context.
8
6
 
9
7
  ## Project Type
10
8
 
11
- _Describe the project type: Web App, API, Library, Monorepo, etc._
12
-
13
- **Example:**
14
-
15
- - Web application with SSR
16
- - REST API with Node.js
17
- - Shared TypeScript library
18
- - Nx/Lerna monorepo
9
+ - _Describe: Web App, REST API, Library, Monorepo, etc._
19
10
 
20
11
  ---
21
12
 
22
13
  ## Tech Stack
23
14
 
24
- _List the project's main technologies._
15
+ - **Runtime**: Node.js >=24.x
16
+ - **Language**: TypeScript
17
+ - **Framework**: _(e.g., Next.js / Express / React / NestJS)_
18
+ - **Testing**: _(e.g., Node Test Runner / Vitest / Jest)_
19
+ - **Infra / CI/CD**: _(e.g., GitHub Actions / AWS / Docker)_
25
20
 
26
- **Base stack:**
21
+ ---
27
22
 
28
- - **Runtime**: Node.js 20.x
29
- - **Language**: TypeScript
30
- - **Build**: Nx / Webpack / Vite (depending on the project)
31
- - **Testing**: Jest + Testing Library
32
- - **CI/CD**: Azure DevOps
23
+ ## AI Memory (.ancleto/memory.db)
33
24
 
34
- **Additional per project:**
25
+ - **Repository App ID**: ancleto.[Product Name]
26
+ - **Scope**: `project:[Product Name]`
35
27
 
36
- - Framework: React / Vue / Angular / Express
37
- - State: Redux / Context / Zustand
38
- - Styling: TailwindCSS / Sass / CSS-in-JS
39
- - Infra: AWS CDK / Serverless / Containers
28
+ > Memory for this repository is persisted locally in `.ancleto/memory.db` (SQLite + FTS5).
29
+ > Agents store architectural decisions and rules here automatically. It never leaves the repo.
40
30
 
41
31
  ---
42
32
 
43
- ## Azure DevOps
33
+ ## Azure DevOps (Optional)
44
34
 
45
- _How this project retrieves work items and other Azure DevOps resources. AI agents read this to resolve cards._
46
-
47
- **Fill in for your project:**
35
+ _Fill in ONLY if this project uses Azure DevOps for Work Items._
48
36
 
49
37
  - **Organization URL**: https://dev.azure.com/your-org
50
38
  - **Team Project**: YourProject
51
39
 
52
- Keep the `Organization URL` value as a plain URL, on a line containing the words `Organization URL` — the fetch command below reads it from here with a `grep`.
53
-
54
- **Work items (card fetch):** via the `az` CLI (`azure-devops` extension), in a single call:
40
+ **Work item fetch command (single-line CLI execution):**
55
41
 
56
42
  ```bash
57
43
  ORG=$(grep -Eim1 '\*\*(Organization URL|Organization)\*\*:' PRODUCT.md | grep -oE 'https?://[^ `"]+') && \
@@ -60,46 +46,22 @@ az boards work-item show --id <id> --org "$ORG" --expand none --fields System.Id
60
46
  | fold -s -w 200
61
47
  ```
62
48
 
63
- - **Required inputs**: `id` (card number) + `org`. Do NOT pass `--project` it fails with `unrecognized arguments: --project`; the id is org-global and the project comes back as `System.TeamProject`.
64
- - **The organization is read from this file by the shell**, from the `Organization URL` line above — one substitution inside the same call, instead of an agent reading this whole file into its context.
65
- - **Always project with `--expand none --fields`**: the CLI defaults to `--expand all` and returns the entire work item. `--fields` without `--expand none` fails with `The expand parameter can not be used with the fields parameter`.
66
- - **`sed` + `fold` are not cosmetic**: `System.Description` arrives as a single HTML line that can exceed 70.000 characters, and the agent runtime truncates long lines at 2.000 — without them the agent silently receives a fraction of the description.
67
- - **Response fields used** (`.fields`): `System.Id`, `System.Title`, `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, `System.WorkItemType`, `System.TeamProject`, `System.State`.
68
- - **Setup/auth**: requires `az extension add --name azure-devops`; `az login` (AAD) is enough — a PAT (`AZURE_DEVOPS_EXT_PAT`) only as a fallback.
69
-
70
- ## AI Memory
71
-
72
- - **Repository App ID**: ancleto.YourProject
73
-
74
- `Repository App ID` identifies this repository in the shared mem0 store. Agents use it to isolate memories from other repositories. It must be unique to this repository, not shared across the Azure DevOps team project.
75
-
76
- `Team Project` from the Azure DevOps section is stored as `project_id` in mem0. Complete both `Repository App ID` and `Team Project` before using AI memory.
49
+ - **Required inputs**: `id` + `org` (leído del campo `Organization URL` por `grep`). No pasar
50
+ `--project` (falla).
51
+ - `--expand none --fields` es obligatorio (el default `--expand all` trae el work item completo).
52
+ - `sed` + `fold` no son cosméticos: `System.Description` llega en una sola línea HTML de hasta
53
+ 70k chars y el runtime trunca a 2k sin ellos.
54
+ - Setup: `az extension add --name azure-devops`; alcanza con `az login`.
77
55
 
78
56
  ---
79
57
 
80
58
  ## Project Structure
81
59
 
82
- _Describe the project's main folder structure._
83
-
84
- **Example for a monorepo:**
85
-
86
- ```
87
- libs/ # Shared libraries
88
- apps/ # Applications
89
- tools/ # Build tools
90
- openspec/ # OpenSpec configuration
91
- config.yaml # Project context
92
- changes/ # Active changes
93
- ```
94
-
95
- **Example for a standalone app:**
96
-
97
- ```
60
+ ```text
98
61
  src/
99
- components/ # Reusable components
100
- features/ # Business features
101
- services/ # Services and APIs
102
- utils/ # Utilities
62
+ components/
63
+ features/
64
+ services/
103
65
  openspec/
104
66
  config.yaml
105
67
  changes/
@@ -109,72 +71,21 @@ openspec/
109
71
 
110
72
  ## Critical Files & Guardrails
111
73
 
112
- _Project-specific critical files or folders that require special care._
113
-
114
74
  **Take special care when modifying:**
115
75
 
116
- **Example:**
117
-
118
- - Code in `src/core/` (affects the whole app)
119
- - Routing configuration
120
- - Shared assets
121
- - Infrastructure (CDK, Terraform, etc.)
76
+ - Core business logic in `src/core/`
77
+ - Infrastructure definitions & Environment variables
122
78
 
123
79
  **Avoid:**
124
80
 
125
- - Architecture changes without documenting them in OpenSpec
126
- - Introducing new dependencies without reviewing existing ones
127
- - Modifying established conventions without team consensus
81
+ - Uncommunicated breaking changes in public APIs
82
+ - Adding external dependencies without checking existing ones
128
83
 
129
84
  ---
130
85
 
131
86
  ## Project Commands
132
87
 
133
- _The project's most important npm/yarn/pnpm commands._
134
-
135
- **Example:**
136
-
137
88
  - `npm run dev` → Development server
138
89
  - `npm test` → Run tests
139
90
  - `npm run build` → Production build
140
91
  - `npm run lint` → Linter
141
- - `npm run deploy` → Deploy (per environment)
142
-
143
- ---
144
-
145
- ## Team Guidelines
146
-
147
- _Team-specific conventions, patterns, and guides._
148
-
149
- **You can add:**
150
-
151
- - Specific naming conventions
152
- - Preferred design patterns
153
- - Architecture guides
154
- - Links to internal documentation
155
- - Reference contacts
156
-
157
- ---
158
-
159
- ## Custom Commit Rules
160
-
161
- _Project-specific commit rules (in addition to the Conventional Commits convention defined in `CONTRIBUTING.md` and `AGENTS.md`)._
162
-
163
- **Example:**
164
-
165
- - Use a specific scope for modules: `feat(auth):`, `fix(payments):`
166
- - Include the ticket number in the commit: `feat(auth): add OAuth #JIRA-123`
167
- - Team-specific breaking-change format
168
-
169
- ---
170
-
171
- ## Custom Agent Configuration
172
-
173
- _Agent configuration specific to this project._
174
-
175
- **Example:**
176
-
177
- - Code style preferences
178
- - Patterns to follow/avoid
179
- - Custom workflows
180
- - Specific testing rules
@@ -1,25 +0,0 @@
1
- # Contributing
2
-
3
- Guía de contribución para este repositorio personal.
4
-
5
- ## Flujo
6
-
7
- 1. Crear rama de features: `feat/`, `fix/`, `chore/`
8
- 2. Commits en formato Conventional Commits:
9
- - `feat(scope): descripcion en presente`
10
- - `fix(scope): descripcion en presente`
11
- - `chore(scope): descripcion en presente`
12
- - `docs(scope): ...`
13
- - `refactor(scope): ...`
14
- - `test(scope): ...`
15
- 4. Abrir PR/merge request contra `main` con título semántico y plan de pruebas cuando aplique.
16
- 5. No forzar push ni saltar hooks de validación.
17
-
18
- ## Validaciones
19
-
20
- Correr antes de cerrar un cambio (según el proyecto):
21
-
22
- - `npm run typecheck` / `tsc --noEmit`
23
- - `npm run lint`
24
- - `npm test`
25
- - `npm run build`