@uocnv1998/agent-kit 1.0.1 → 1.0.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.
package/bin/index.js CHANGED
@@ -128,7 +128,7 @@ try {
128
128
  console.log(`\n\n${colors.pipe} Initializing OpenSpec for the project...`);
129
129
  // Only run init if openspec directory doesn't exist to avoid errors
130
130
  if (!fs.existsSync(path.join(currentDir, 'openspec'))) {
131
- execSync('openspec init', { stdio: 'inherit', cwd: currentDir });
131
+ execSync('openspec init --tools antigravity --force', { stdio: 'inherit', cwd: currentDir });
132
132
  }
133
133
 
134
134
  // Automatically configure OpenSpec to generate artifacts in Vietnamese
@@ -143,7 +143,7 @@ try {
143
143
  }
144
144
  }
145
145
 
146
- execSync('openspec update', { stdio: 'inherit', cwd: currentDir });
146
+ execSync('openspec update --force', { stdio: 'inherit', cwd: currentDir });
147
147
  console.log(`${colors.pipe} OpenSpec structure created/updated`);
148
148
  } catch (specError) {
149
149
  console.error(`\n${colors.cross} OpenSpec setup failed. You may need 'sudo' permissions on Mac/Linux.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uocnv1998/agent-kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to scaffold Agent Skills, Rules, and Workflows",
5
5
  "main": "bin/index.js",
6
6
  "bin": {
@@ -78,9 +78,10 @@ When applying the agent, inform the user:
78
78
  ### 🌐 Core Development Principles (MANDATORY)
79
79
 
80
80
  - **SOLID Principles**: Controllers must stay thin and call services, services contain business logic and depend only on repository interfaces, and all database access must be handled exclusively inside repository implementations via dependency injection.
81
- - **TDD (Test-Driven Development)**: Always write tests BEFORE writing the implementation. Run tests frequently and ensure the test coverage rate is greater than 80%.
82
- - **Clean Code**: Run `vendor/bin/pint --dirty --format agent` before finalizing changes.
81
+ - **TDD (Test-Driven Development)**: Always write tests BEFORE writing the implementation. You must write both unit tests and feature tests. Run tests frequently and ensure the overall project test coverage rate is 80% or higher.
82
+ - **Clean Code**: Run the appropriate code formatter based on the project's language and framework before finalizing changes. The specific formatting command may be defined in `AGENTS.md`.
83
83
  - **Security**: Use environment variables only in configuration files - never use `env()` directly outside of config files.
84
+ - **OpenSpec & TDD Integration**: Whenever executing OpenSpec workflows (e.g., `/opsx:propose`, `/opsx:apply`), you MUST enforce TDD. During `/opsx:propose`, the `tasks.md` MUST explicitly break down features into `[ ] Write failing test (RED)`, `[ ] Implement (GREEN)`, and `[ ] Refactor`. During `/opsx:apply`, you are FORBIDDEN from writing implementation code before passing tests are demonstrated.
84
85
 
85
86
  ### 🌐 Documents (Workspace files)
86
87
 
@@ -19,12 +19,16 @@ When receiving a task (via Jira Ticket or direct prompt), you must act as if the
19
19
  1. `proposal.md` - Why we're doing this, what's changing.
20
20
  2. `specs/` - Requirements and scenarios.
21
21
  3. `design.md` - Technical approach.
22
- 4. `tasks.md` - Implementation checklist.
22
+ 4. `tasks.md` - Implementation checklist. **CRITICAL TDD REQUIREMENT: Each logical feature MUST be broken down into strict TDD steps in the checklist: `[ ] Write failing test (RED)`, `[ ] Implement minimum code to pass (GREEN)`, and `[ ] Refactor`.**
23
23
  - After generating these files, STOP and ask the user to review them via `/opsx:apply`.
24
24
 
25
- ### Phase 2: Implementation (Tiến hành Code)
25
+ ### Phase 2: Implementation (Tiến hành Code - TDD MANDATORY)
26
26
  - **Command**: `/opsx:apply`
27
27
  - When you receive this command, you will start implementing the code strictly following the checklist in `tasks.md`.
28
+ - 🔴 **TDD REQUIREMENT (MANDATORY)**: You MUST follow the **TDD Workflow (RED-GREEN-REFACTOR)** for EVERY implementation task. You are FORBIDDEN from writing implementation code before tests.
29
+ 1. **RED**: Write the failing test FIRST based on the spec/task.
30
+ 2. **GREEN**: Write the minimal code to make the test pass.
31
+ 3. **REFACTOR**: Improve the code while keeping tests green.
28
32
  - As you complete portions of the work, mark off items in the `tasks.md` internal memory.
29
33
  - **MANDATORY**: Upon completing the backend implementation, you MUST document the new or updated APIs:
30
34
  1. Create or update an API Specification page on **Confluence** (using `atlassian-mcp-server_createConfluencePage` or `updateConfluencePage`).
@@ -83,6 +83,7 @@ When applying the agent, inform the user:
83
83
  - **Clean Code & Formatting**: Run `npm run lint` and `npm run format` (or equivalent) before finalizing changes. Ensure consistent naming (PascalCase for Components, camelCase for variables/functions).
84
84
  - **Accessibility (a11y)**: Semantic HTML is mandatory. Every interactive element must be keyboard-accessible and have appropriate ARIA attributes.
85
85
  - **Performance**: Minimize client-side JavaScript. Use Next.js Server Components by default. Optimize images and avoid unnecessary re-renders.
86
+ - **OpenSpec & TDD Integration**: Whenever executing OpenSpec workflows (e.g., `/opsx:propose`, `/opsx:apply`), you MUST enforce TDD. During `/opsx:propose`, the `tasks.md` MUST explicitly break down features into `[ ] Write failing test (RED)`, `[ ] Implement (GREEN)`, and `[ ] Refactor`. During `/opsx:apply`, you are FORBIDDEN from writing implementation code before passing tests are demonstrated.
86
87
 
87
88
  ### 🌐 Documents (Workspace files)
88
89