knowzcode 0.1.0
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/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +8 -0
- package/LICENSE +121 -0
- package/README.md +223 -0
- package/agents/analyst.md +121 -0
- package/agents/architect.md +121 -0
- package/agents/builder.md +155 -0
- package/agents/closer.md +148 -0
- package/agents/knowledge-migrator.md +349 -0
- package/agents/microfix-specialist.md +140 -0
- package/agents/reviewer.md +220 -0
- package/agents/update-coordinator.md +405 -0
- package/bin/knowzcode.mjs +869 -0
- package/commands/audit.md +108 -0
- package/commands/connect-mcp.md +507 -0
- package/commands/fix.md +107 -0
- package/commands/init.md +320 -0
- package/commands/learn.md +308 -0
- package/commands/plan.md +125 -0
- package/commands/register.md +724 -0
- package/commands/status.md +291 -0
- package/commands/telemetry-setup.md +368 -0
- package/commands/telemetry.md +188 -0
- package/commands/work.md +390 -0
- package/knowzcode/automation_manifest.md +59 -0
- package/knowzcode/claude_code_execution.md +133 -0
- package/knowzcode/enterprise/compliance_manifest.md +132 -0
- package/knowzcode/enterprise/compliance_status.md +30 -0
- package/knowzcode/enterprise/guidelines/code-quality.md +67 -0
- package/knowzcode/enterprise/guidelines/custom/.gitkeep +0 -0
- package/knowzcode/enterprise/guidelines/security.md +355 -0
- package/knowzcode/enterprise/reports/.gitkeep +0 -0
- package/knowzcode/enterprise/templates/guideline-template.md +55 -0
- package/knowzcode/gitignore.template +13 -0
- package/knowzcode/knowzcode_architecture.md +51 -0
- package/knowzcode/knowzcode_log.md +142 -0
- package/knowzcode/knowzcode_loop.md +515 -0
- package/knowzcode/knowzcode_project.md +233 -0
- package/knowzcode/knowzcode_tracker.md +40 -0
- package/knowzcode/knowzcode_vaults.md +104 -0
- package/knowzcode/mcp_config.md +166 -0
- package/knowzcode/planning/Readme.md +6 -0
- package/knowzcode/platform_adapters.md +388 -0
- package/knowzcode/prompts/Execute_Micro_Fix.md +57 -0
- package/knowzcode/prompts/Investigate_Codebase.md +227 -0
- package/knowzcode/prompts/Migrate_Knowledge.md +301 -0
- package/knowzcode/prompts/Refactor_Node.md +72 -0
- package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -0
- package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -0
- package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -0
- package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -0
- package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -0
- package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -0
- package/knowzcode/specs/Readme.md +10 -0
- package/knowzcode/telemetry_config.md +89 -0
- package/knowzcode/user_preferences.md +120 -0
- package/package.json +53 -0
- package/skills/alias-resolver.json +15 -0
- package/skills/architecture-diff.json +12 -0
- package/skills/check-installation-status.json +14 -0
- package/skills/continue.md +105 -0
- package/skills/environment-guard.json +12 -0
- package/skills/generate-workgroup-id.json +25 -0
- package/skills/install-knowzcode.json +21 -0
- package/skills/load-core-context.json +18 -0
- package/skills/log-entry-builder.json +15 -0
- package/skills/spec-quality-check.json +14 -0
- package/skills/spec-template.json +15 -0
- package/skills/spec-validator.json +25 -0
- package/skills/start-work.md +224 -0
- package/skills/tracker-scan.json +12 -0
- package/skills/tracker-update.json +28 -0
- package/skills/validate-installation.json +14 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# ◆ KnowzCode Project Overview: [Agent: Infer a Project Name from UserProjectIdea]
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
**Purpose of this Document:** This `knowzcode_project.md` is a core artifact of the KnowzCode system. It provides a comprehensive high-level summary of the project, including its goals, scope, technology stack, architecture, coding standards, and quality priorities. The KnowzCode AI Agent will reference this document extensively for context and guidance throughout the development lifecycle, as detailed in `knowzcode_loop.md`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### 1. Project Goal & Core Problem
|
|
10
|
+
|
|
11
|
+
* **Goal:** [Agent: Based on `UserProjectIdea`, concisely define the main objective of this project in 1-2 sentences.]
|
|
12
|
+
* **Core Problem Solved:** [Agent: Based on `UserProjectIdea`, describe the specific user problem or need this project addresses in 1-2 sentences.]
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### 2. Scope & Key Features (MVP Focus)
|
|
17
|
+
|
|
18
|
+
* **Minimum Viable Product (MVP) Description:** [Agent: Briefly describe what constitutes the first usable version of the application, based on `UserProjectIdea`.]
|
|
19
|
+
* **Key Features (In Scope for MVP):**
|
|
20
|
+
* `[Feature 1 Name]`: [Agent: Brief description of Feature 1. Infer from `UserProjectIdea`. Example: "User authentication (signup, login, logout)"]
|
|
21
|
+
* `[Feature 2 Name]`: [Agent: Brief description of Feature 2.]
|
|
22
|
+
* `[Feature 3 Name]`: [Agent: Brief description of Feature 3.]
|
|
23
|
+
* *(Agent: Add more features as appropriate based on `UserProjectIdea`. Aim for 3-5 core MVP features.)*
|
|
24
|
+
* **Key Features (Explicitly OUT of Scope for MVP):**
|
|
25
|
+
* `[Deferred Feature 1 Name]`: [Agent: Example: "Admin dashboard"]
|
|
26
|
+
* `[Deferred Feature 2 Name]`: [Agent: Example: "Third-party API integrations beyond core needs"]
|
|
27
|
+
* *(Agent: List 1-3 significant features that will not be part of the initial MVP to maintain focus.)*
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### 3. Target Audience
|
|
32
|
+
|
|
33
|
+
* **Primary User Group(s):** [Agent: Based on `UserProjectIdea`, describe the primary intended users. E.g., "Small business owners needing simple invoicing," "Students learning web development," "Gamers looking for a community platform."]
|
|
34
|
+
* **Key User Needs Addressed:** [Agent: Briefly list the key needs of the target audience that this project aims to satisfy.]
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 4. Technology Stack (Specific Versions Critical for Agent)
|
|
39
|
+
|
|
40
|
+
| Category | Technology | Specific Version (or latest stable) | Notes for AI Agent / Rationale |
|
|
41
|
+
|:---------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------|:----------------------------------------------------------------------------|
|
|
42
|
+
| Language(s) | [Agent: e.g., JavaScript (Node.js), Python. Recommend based on UserTechnicalPreferences or common platform usage. Specify version.] | [Agent: e.g., nodejs-20, python-3.11] | (Agent: Key for environment setup and tooling) |
|
|
43
|
+
| Backend Framework | [Agent: e.g., Express.js, Flask, FastAPI, None. Recommend if applicable.] | [Agent: e.g., Express 4.18.x, Flask 2.3.x] | (Agent: Key for understanding server structure) |
|
|
44
|
+
| Frontend Framework | [Agent: e.g., React, Vue, Svelte, Static HTML/CSS/JS. Recommend if separate frontend envisioned.] | [Agent: e.g., React 18.2.x, Vue 3.3.x] | (Agent: Key for UI component structure) |
|
|
45
|
+
| UI Library/Kit | [Agent: e.g., Tailwind CSS, Bootstrap, Material UI, None. Recommend if applicable.] | [Agent: e.g., Tailwind CSS 3.3.x] | |
|
|
46
|
+
| Database | [Agent: e.g., PostgreSQL, SQLite, MongoDB Atlas. Recommend platform-compatible options.] | [Agent: e.g., PostgreSQL 15.x] | (Agent: Connection details via environment variables) |
|
|
47
|
+
| ORM/ODM (If any) | [Agent: e.g., Prisma, SQLAlchemy, Drizzle ORM, Mongoose. Recommend if applicable.] | [Agent: e.g., Prisma 5.x.x] | (Agent: Important for DB interaction patterns and migrations) |
|
|
48
|
+
| Testing (Unit) | [Agent: e.g., Jest, PyTest, Vitest. Recommend.] | [Agent: e.g., Jest 29.x] | (Agent: Use this for running unit tests) |
|
|
49
|
+
| Testing (E2E/Integ.) | [Agent: e.g., Playwright, Cypress, Postman/Newman, None. Recommend if applicable for MVP.] | [Agent: e.g., Playwright 1.4x.x] | (Agent: Use this for running integration/E2E tests) |
|
|
50
|
+
| Version Control | Git | N/A | Repo hosted on [Agent: e.g., GitHub, GitLab, or local] |
|
|
51
|
+
| Deployment Target | [Agent: e.g., Vercel, Netlify, AWS, Local Docker] | N/A | Primary deployment target. |
|
|
52
|
+
| Key Libraries | [Agent: e.g., axios for HTTP, bcryptjs for hashing. List 1-2 essential libraries and versions.] | [Agent: Specify versions, e.g., axios@1.6.0] | (Agent: Key dependencies to install.) |
|
|
53
|
+
| Other (Specify) | | | |
|
|
54
|
+
|
|
55
|
+
* **Tech Stack Rationale:** [Agent: Briefly explain why the chosen stack (especially language/framework) is suitable for this project. E.g., "Node.js with Express.js offers rapid development for web APIs and has a vast ecosystem of packages."]
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### 5. High-Level Architecture
|
|
60
|
+
|
|
61
|
+
* **Architectural Style:** [Agent: Describe the chosen style, e.g., "Monolithic Web Application," "Serverless API with Frontend Client," "Three-Tier Architecture." Suggest a simple, robust architecture.]
|
|
62
|
+
* **Key Components & Interactions (Brief Textual Description):** [Agent: Describe the main pieces and how they generally communicate. This complements `knowzcode_architecture.md`. E.g., "The React frontend client makes API calls to the Express.js backend. The backend handles business logic and interacts with the PostgreSQL database via Prisma ORM."]
|
|
63
|
+
* **Diagram (Mermaid - Agent to Generate):**
|
|
64
|
+
```mermaid
|
|
65
|
+
graph TD
|
|
66
|
+
A[User via Browser/Client] --> B(Frontend SPA - [Agent: e.g., React]);
|
|
67
|
+
B --> C{Backend API - [Agent: e.g., Express.js]};
|
|
68
|
+
C --> D[(Database - [Agent: e.g., PostgreSQL])];
|
|
69
|
+
C --> E{{External Service API (Optional - [Agent: e.g., Stripe])}};
|
|
70
|
+
|
|
71
|
+
%% Agent: Define main components and primary interaction flows based on UserProjectIdea and chosen style. Keep it simple (2-5 components).
|
|
72
|
+
%% Example Subgraph for services
|
|
73
|
+
subgraph Backend Logic
|
|
74
|
+
direction LR
|
|
75
|
+
C --- S1[Auth Service (Handles Login/Signup)];
|
|
76
|
+
C --- S2[Core Feature Service (Manages [Primary Feature])];
|
|
77
|
+
end
|
|
78
|
+
```
|
|
79
|
+
*(Agent: Generate a SIMPLE Mermaid diagram showing 2-5 main components and their primary interactions. The main detailed flowchart is in `knowzcode_architecture.md`.)*
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### 6. Core Components/Modules (Logical Breakdown)
|
|
84
|
+
|
|
85
|
+
* `[Component/Module 1 Name - Agent: e.g., User Authentication Module]`: [Agent: Brief responsibility. E.g., "Handles user registration, login, session management, password hashing."]
|
|
86
|
+
* `[Component/Module 2 Name - Agent: e.g., Main Feature X Logic]`: [Agent: Brief responsibility. E.g., "Manages core logic for Feature X, including data processing and interactions with Y."]
|
|
87
|
+
* `[Component/Module 3 Name - Agent: e.g., Primary UI View Components]`: [Agent: Brief responsibility. E.g., "Set of React components for rendering the main dashboard, forms, and user interactions."]
|
|
88
|
+
* *(Agent: List 2-4 primary logical components based on the architecture and `UserProjectIdea`.)*
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### 7. Key UI/UX Considerations
|
|
93
|
+
|
|
94
|
+
* **Overall Feel:** [Agent: Describe the desired user experience. E.g., "Simple and intuitive," "Modern and professional," "Fast and responsive." Infer from `UserProjectIdea` or suggest a sensible default.]
|
|
95
|
+
* **Key Principles:**
|
|
96
|
+
* `[Principle 1]`: [Agent: e.g., "Clarity: Ensure clear navigation and unambiguous calls to action."]
|
|
97
|
+
* `[Principle 2]`: [Agent: e.g., "Efficiency: Minimize clicks and streamline common workflows."]
|
|
98
|
+
* `[Principle 3]`: [Agent: e.g., "Responsiveness: Basic usability on common screen sizes (desktop primary, mobile secondary consideration for MVP)."]
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### 8. Coding Standards & Conventions
|
|
103
|
+
|
|
104
|
+
* **Primary Style Guide:** [Agent: e.g., "Airbnb JavaScript Style Guide (with Prettier for formatting)," "PEP 8 for Python (with Black for formatting)"]
|
|
105
|
+
* **Formatter:** [Agent: e.g., "Prettier (config in `.prettierrc` - use default if not specified)," "Black (Python)"] (Agent: You will apply this during ARC-Based Verification)
|
|
106
|
+
* **Linter:** [Agent: e.g., "ESLint (config in `.eslintrc.js` - use default if not specified)," "Flake8 (Python)"] (Agent: You will apply this during ARC-Based Verification)
|
|
107
|
+
* **File Naming Conventions:** [Agent: e.g., `kebab-case.js` for files, `PascalCase.jsx` for React components, `snake_case.py` for Python files]
|
|
108
|
+
* **Commit Message Convention:** [Agent: e.g., "Conventional Commits (e.g., `feat: add login button`, `fix: correct validation logic`)"]
|
|
109
|
+
* **Code Commenting Style:** [Agent: e.g., "JSDoc for public functions/methods," "Python docstrings (Google style)," "Use comments sparingly only for complex, non-obvious logic."]
|
|
110
|
+
* **Other Key Standards:**
|
|
111
|
+
* [Agent: e.g., "Avoid magic numbers/strings; use named constants."]
|
|
112
|
+
* [Agent: e.g., "All API endpoints must have basic input validation on the server-side."]
|
|
113
|
+
* [Agent: e.g., "Relative imports for intra-project modules."]
|
|
114
|
+
|
|
115
|
+
### 8.1 Component Classification Criteria
|
|
116
|
+
|
|
117
|
+
* **Standard**: Simple components with clear inputs/outputs, minimal business logic
|
|
118
|
+
* **Complex**: Components with significant business logic, multiple dependencies, or state management
|
|
119
|
+
* **Critical**: Components handling security, payments, user data, or system stability
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### 9. Key Quality Criteria Focus (Priorities from `knowzcode/knowzcode_log.md`)
|
|
124
|
+
* This project will prioritize the following **Top 3-5 quality criteria** from the "Reference Quality Criteria" section of `knowzcode/knowzcode_log.md`. Agent, you should pay special attention to these during ARC-Based Verification.
|
|
125
|
+
1. [Agent: Suggest Priority 1 Quality Criterion - e.g., Reliability (Robust error handling)]
|
|
126
|
+
2. [Agent: Suggest Priority 2 Quality Criterion - e.g., Maintainability (Clear, modular code)]
|
|
127
|
+
3. [Agent: Suggest Priority 3 Quality Criterion - e.g., Security (Secure auth practices, input validation)]
|
|
128
|
+
4. [Agent: Suggest Optional Priority 4, if applicable]
|
|
129
|
+
5. [Agent: Suggest Optional Priority 5, if applicable]
|
|
130
|
+
* **Rationale for Priorities:** [Agent: Briefly explain why these priorities are important for this specific project based on `UserProjectIdea`.]
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 10. Testing Strategy
|
|
135
|
+
|
|
136
|
+
* **Required Test Types for MVP:**
|
|
137
|
+
* `Unit Tests`: [Agent: e.g., "Required for all core business logic functions/modules and critical utility functions."]
|
|
138
|
+
* `Integration Tests`: [Agent: e.g., "Required for API endpoint interactions and key service-to-service integrations."]
|
|
139
|
+
* `E2E Tests (Optional for MVP)`: [Agent: e.g., "Minimal set for 1-2 primary user flows (e.g., signup-login-perform core action)."]
|
|
140
|
+
* **Testing Framework(s) & Version(s):** [Agent: Refer to Technology Stack, e.g., "Jest 29.x for unit/integration (JavaScript)", "PyTest 7.x for Python".]
|
|
141
|
+
* **Test File Location & Naming:** [Agent: e.g., "Test files located adjacent to source files (`module.test.js`) or in a dedicated `__tests__`/`tests/` directory. Test names should be descriptive: `it('should return sum of two numbers')`."]
|
|
142
|
+
* **Minimum Code Coverage Target (Conceptual Goal):** [Agent: e.g., "Aim for >70% for unit-tested core logic." State as an aim, not a strict CI blocker for MVP unless specified by user.]
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### 11. Initial Setup Steps (Conceptual for a new developer/environment)
|
|
147
|
+
|
|
148
|
+
1. **Clone Repository:** `git clone [repository_url]`
|
|
149
|
+
2. **Install Language/Tools:** (Agent: Check versions against Tech Stack; use `knowzcode/EnvironmentContext.md` for specific commands).
|
|
150
|
+
3. **Install Dependencies:** (Agent: Use the dependency manager defined in `knowzcode/EnvironmentContext.md`, e.g., `npm install`).
|
|
151
|
+
4. **Environment Variables & Secrets:**
|
|
152
|
+
* [Agent: List any anticipated required environment variables based on common app needs or `UserProjectIdea`, e.g., `DATABASE_URL`, `SESSION_SECRET`, `ANY_EXTERNAL_API_KEY`].
|
|
153
|
+
* (Agent: Secrets must be stored securely, e.g., in a `.env` file loaded at runtime, and never committed to version control).
|
|
154
|
+
5. **Database Setup (If applicable):**
|
|
155
|
+
* [Agent: e.g., "Run database migrations using the command specified in `knowzcode/EnvironmentContext.md`, such as `npx prisma migrate dev`."]
|
|
156
|
+
6. **Run Development Server:**
|
|
157
|
+
* [Agent: Specify the typical run command for the chosen stack, e.g., `npm run dev`, `python main.py`.]
|
|
158
|
+
* (Agent: The server must bind to the host and port specified in `knowzcode/EnvironmentContext.md`).
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### 12. Key Architectural Decisions & Rationale
|
|
163
|
+
|
|
164
|
+
* **Decision 1: [Agent: e.g., Choice of Primary Language/Framework - e.g., Node.js with Express.js]**
|
|
165
|
+
* **Rationale:** [Agent: e.g., "Chosen for its non-blocking I/O suitable for web applications and its large ecosystem of packages." If user specified, use their rationale or infer and confirm.]
|
|
166
|
+
* **Decision 2: [Agent: e.g., Database Choice - e.g., PostgreSQL]**
|
|
167
|
+
* **Rationale:** [Agent: e.g., "Selected for its robustness, SQL capabilities, and wide support from ORMs and cloud providers."]
|
|
168
|
+
* **(Optional) Decision 3: [Agent: e.g., Architectural Style - e.g., Monolithic App for MVP]**
|
|
169
|
+
* **Rationale:** [Agent: e.g., "A monolithic approach was chosen for the MVP to simplify initial development and deployment, reducing complexity. Microservices can be considered for future scaling if needed."]
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### 13. Repository Link
|
|
174
|
+
|
|
175
|
+
* `[Agent: Link to Git Repository. User/Orchestrator will confirm/update.]` (Can be placeholder initially: "[To be confirmed/updated]")
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### 14. Dependencies & Third-Party Services (Key Ones for MVP)
|
|
180
|
+
|
|
181
|
+
* **[Service 1 Name - Agent: e.g., PostgreSQL Database]:**
|
|
182
|
+
* Purpose: Primary data storage.
|
|
183
|
+
* Integration: Via `DATABASE_URL` environment variable.
|
|
184
|
+
* **(Optional) [External API Name - Agent: e.g., Stripe API]:**
|
|
185
|
+
* Purpose: [Agent: e.g., "To handle payments."]
|
|
186
|
+
* Integration: [Agent: e.g., "Via HTTP POST requests to their API endpoint. Requires API key."]
|
|
187
|
+
* Required Credentials: `[Agent: e.g., STRIPE_API_KEY]` (To be stored as an environment variable).
|
|
188
|
+
* *(Agent: List only essential external services for the MVP based on `UserProjectIdea`.)*
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### 15. Security Considerations (Initial High-Level)
|
|
193
|
+
|
|
194
|
+
* **Authentication:** [Agent: e.g., "Session-based authentication using secure, HTTP-only cookies and a `SESSION_SECRET` stored as an environment variable / JWT-based authentication for APIs." Passwords **MUST** be hashed (e.g., using bcrypt or argon2).]
|
|
195
|
+
* **Authorization:** [Agent: e.g., "Basic role-based access control if multiple user types exist. Check authorization on the server-side for all sensitive operations."]
|
|
196
|
+
* **Input Validation:** [Agent: e.g., "All user inputs (forms, API request bodies/params) MUST be validated on the server-side to prevent common injection attacks (XSS, SQLi - though ORM mitigates SQLi largely)."]
|
|
197
|
+
* **Data Protection:**
|
|
198
|
+
* "Sensitive data (e.g., PII, passwords) handled with care. Avoid logging sensitive data."
|
|
199
|
+
* "Use HTTPS in production environments."
|
|
200
|
+
* **Dependency Management:** [Agent: e.g., "Dependencies will be kept updated. Use `npm audit` / `pip-audit` or similar tools periodically."]
|
|
201
|
+
* **Secrets Management:** "All API keys, database credentials, and other secrets **MUST** be stored as environment variables and not hardcoded."
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### 16. Performance Requirements (Initial Qualitative Goals)
|
|
206
|
+
|
|
207
|
+
* **Response Time:** [Agent: e.g., "Web pages and API responses should generally feel responsive, aiming for <500ms for common operations under typical load." Suggest sensible defaults.]
|
|
208
|
+
* **Load Capacity (Conceptual for MVP):** [Agent: e.g., "Application should handle a small number of concurrent users smoothly (e.g., 10-50)."]
|
|
209
|
+
* **Scalability Approach (Future Consideration):** [Agent: e.g., "For MVP, vertical scaling is the primary approach. Horizontal scaling or more complex strategies are future considerations."]
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### 17. Monitoring & Observability (Basic for MVP)
|
|
214
|
+
|
|
215
|
+
* **Logging Strategy (Application-level):**
|
|
216
|
+
* [Agent: e.g., "Structured JSON logging to console for key application events, errors, and requests (e.g., using a library like Pino for Node.js or standard Python logging module)."]
|
|
217
|
+
* "Include timestamps, log levels (INFO, WARN, ERROR), and relevant context (e.g., request ID)."
|
|
218
|
+
* **Monitoring Tools:** [Agent: e.g., "For MVP, rely on standard console/file logs. No complex external tools unless user specifies."]
|
|
219
|
+
* **Key Metrics to Observe (Qualitative):** Error rates in logs, general application responsiveness.
|
|
220
|
+
* **Alerting Criteria (Manual for MVP):** [Agent: e.g., "Monitor logs for frequent errors or performance degradation manually."]
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### 18. Links to Other KnowzCode Artifacts
|
|
225
|
+
* **Agent Main Loop & Protocol:** `knowzcode/knowzcode_loop.md`
|
|
226
|
+
* **Operational Record & Quality Criteria:** `knowzcode/knowzcode_log.md`
|
|
227
|
+
* **Architectural Flowchart (This Project):** `knowzcode/knowzcode_architecture.md`
|
|
228
|
+
* **Status Map (This Project):** `knowzcode/knowzcode_tracker.md`
|
|
229
|
+
* **Component Specifications Directory:** `knowzcode/specs/`
|
|
230
|
+
* **Environment Protocol:** `knowzcode/environment_context.md` (or equivalent)
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
*(Agent: This document, once populated by you based on user input and sensible defaults, will become the single source of truth for high-level project information and guidelines. It will be kept up-to-date if major project parameters change.)*
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ◆ KnowzCode - Status Map
|
|
2
|
+
|
|
3
|
+
**Purpose:** This document tracks the development status of all implementable components (NodeIDs) defined in `knowzcode_architecture.md`. It guides task selection, groups related work via `WorkGroupID`, and provides a quick overview of project progress. It is updated by the KnowzCode AI Agent as per `knowzcode_loop.md`.
|
|
4
|
+
|
|
5
|
+
**Note:** All paths are relative to the project root where the knowzcode files reside. The specs/ directory is within your project directory alongside other knowzcode files.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
**Progress: 0%**
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
| Status | WorkGroupID | Node ID | Label | Dependencies | Logical Grouping | Spec Link | Classification | Notes / Issues |
|
|
12
|
+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|
|
13
|
+
| ⚪️ `[TODO]` | | `[ExampleNodeID]` | `[Example Node Label]` | `[DepNodeID1]` | `[Example Group]` | `[Spec](knowzcode/specs/ExampleNodeID.md)` | `[Standard]` | |
|
|
14
|
+
| | | | | | | | | |
|
|
15
|
+
| | | | | | | | | |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
### ◆ KnowzCode Status Legend:
|
|
19
|
+
|
|
20
|
+
* ⚪️ **`[TODO]`**: Task is defined and ready to be picked up if dependencies are met. This status also applies to `REFACTOR_` tasks created from technical debt.
|
|
21
|
+
* 📝 **`[NEEDS_SPEC]`**: Node has been identified in the architecture but requires a detailed specification to be drafted.
|
|
22
|
+
* ◆ **`[WIP]`**: ◆ **KnowzCode Working** - Work In Progress. The KnowzCode AI Agent is currently working on this node as part of the specified `WorkGroupID`.
|
|
23
|
+
* 🟢 **`[VERIFIED]`**: The primary completion state. The node has been implemented, all ARC Verification Criteria are met, the spec is finalized to "as-built", and all outcomes are logged.
|
|
24
|
+
* ❗ **`[ISSUE]`**: A significant issue or blocker has been identified, preventing progress. Details should be in `knowzcode_log.md` or linked in the "Notes / Issues" column.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
### Notes on Columns:
|
|
28
|
+
|
|
29
|
+
* **Status**: The current state of the NodeID (see Legend above).
|
|
30
|
+
* **WorkGroupID**: A unique ID assigned to a "Change Set" of nodes being worked on together. This is blank unless the `Status` is `[WIP]`.
|
|
31
|
+
* **Node ID**: The unique identifier for the component, matching the ID used in `knowzcode/knowzcode_architecture.md`.
|
|
32
|
+
* **Label**: A concise, human-readable name for the NodeID.
|
|
33
|
+
* **Dependencies**: A comma-separated list of `NodeID`s that must be `[VERIFIED]` before work on this node can begin. Only reference NodeIDs that exist in the architecture diagram. If a dependency's spec doesn't exist, that dependency must be `[NEEDS_SPEC]` status.
|
|
34
|
+
* **Logical Grouping**: An optional tag to categorize nodes by feature, module, or layer (e.g., "Authentication", "UserAPI").
|
|
35
|
+
* **Spec Link**: A relative Markdown link to the corresponding specification file in the `knowzcode/specs/` directory.
|
|
36
|
+
* **Classification**: Optional tag (e.g., `Critical`, `Complex`, `Standard`) to influence planning and review intensity.
|
|
37
|
+
* **Notes / Issues**: Brief comments, or a reference to a more detailed issue in `knowzcode/knowzcode_log.md`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
*(This table will be populated based on `knowzcode_architecture.md`. The AI Agent will then update the `Status` and `WorkGroupID` columns as it processes each Change Set according to `knowzcode_loop.md`.)*
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# KnowzCode Vault Configuration
|
|
2
|
+
|
|
3
|
+
Multi-vault routing configuration for intelligent vault selection based on query intent.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Connected Vaults
|
|
8
|
+
|
|
9
|
+
> **No vaults configured yet.**
|
|
10
|
+
>
|
|
11
|
+
> Run `/kc:register` to set up your account and auto-configure your first vault,
|
|
12
|
+
> or `/kc:connect-mcp --configure-vaults` to add vaults interactively.
|
|
13
|
+
|
|
14
|
+
<!--
|
|
15
|
+
When vaults are configured, they appear here in this format:
|
|
16
|
+
|
|
17
|
+
### vault-abc123-def456
|
|
18
|
+
- **Name**: Project Codebase
|
|
19
|
+
- **ID**: vault-abc123-def456
|
|
20
|
+
- **Type**: code
|
|
21
|
+
- **Description**: Questions about the actual source code, current file structure, implementations, and how things work today. Use for "where is X defined?", "how does Y work?", "find implementations of Z".
|
|
22
|
+
|
|
23
|
+
### vault-xyz789-ghi012
|
|
24
|
+
- **Name**: Engineering Knowledge
|
|
25
|
+
- **ID**: vault-xyz789-ghi012
|
|
26
|
+
- **Type**: research
|
|
27
|
+
- **Description**: Organizational decisions, architectural patterns, team conventions, and learnings. Use for "why did we choose X?", "what's our convention for Y?", "best practices for Z".
|
|
28
|
+
-->
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Vault Routing Rules
|
|
33
|
+
|
|
34
|
+
Routing rules determine which vault to query based on the type of question or operation.
|
|
35
|
+
|
|
36
|
+
### Default Rules (when vaults are configured)
|
|
37
|
+
|
|
38
|
+
| Query Type | Description | Target Vault Type |
|
|
39
|
+
|------------|-------------|-------------------|
|
|
40
|
+
| **Code questions** | Implementations, files, structure, "where is X?" | `code` |
|
|
41
|
+
| **Convention questions** | Patterns, decisions, best practices, "why did we?" | `research` |
|
|
42
|
+
| **Learning capture** | Saving new insights, patterns, decisions | `research` (prompt if multiple) |
|
|
43
|
+
| **Standards queries** | Team standards, compliance rules, requirements | `enterprise` |
|
|
44
|
+
| **Audit trail push** | Completion records, audit results | `enterprise` |
|
|
45
|
+
|
|
46
|
+
### How Routing Works
|
|
47
|
+
|
|
48
|
+
1. **For queries**: Agent reads vault descriptions and matches query intent
|
|
49
|
+
2. **For writes**: If one research vault exists, use it; if multiple, prompt user
|
|
50
|
+
3. **Fallback**: If no match found, query the default research vault
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Vault Types
|
|
55
|
+
|
|
56
|
+
| Type | Purpose | Example Queries |
|
|
57
|
+
|------|---------|-----------------|
|
|
58
|
+
| **code** | Indexed source code (AST-chunked) | "Find auth middleware", "Where is PaymentService?" |
|
|
59
|
+
| **research** | Architecture, conventions, learnings | "Error handling conventions", "Why Redis over Memcached?" |
|
|
60
|
+
| **enterprise** | Team standards, audit trails, compliance | "Team standards for React", "Audit trail for kc-feat-auth" |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Manual Configuration
|
|
65
|
+
|
|
66
|
+
You can manually add vaults by editing this file. Use this format:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
### {vault-id}
|
|
70
|
+
- **Name**: {Display Name}
|
|
71
|
+
- **ID**: {vault-id}
|
|
72
|
+
- **Type**: code | research
|
|
73
|
+
- **Description**: {Detailed description of what this vault contains. Be specific about what types of questions should be routed here. Include example queries.}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Tips for good descriptions:**
|
|
77
|
+
- Be specific about content type (source code vs documentation)
|
|
78
|
+
- Include example queries that should route to this vault
|
|
79
|
+
- Mention key topics or domains covered
|
|
80
|
+
- Describe the time period or version if relevant
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Configuration Commands
|
|
85
|
+
|
|
86
|
+
- `/kc:register` - Create account and auto-configure first vault
|
|
87
|
+
- `/kc:connect-mcp --configure-vaults` - Interactive vault setup
|
|
88
|
+
- `/kc:status` - Check vault connection status
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Integration with Agents
|
|
93
|
+
|
|
94
|
+
When configured, agents automatically route queries to the appropriate vault:
|
|
95
|
+
|
|
96
|
+
| Agent | Uses Vault Routing For |
|
|
97
|
+
|-------|------------------------|
|
|
98
|
+
| `analyst` | Finding affected code + past decisions |
|
|
99
|
+
| `architect` | Implementation examples + conventions |
|
|
100
|
+
| `builder` | Similar patterns + best practices |
|
|
101
|
+
| `reviewer` | Standards + precedent checks |
|
|
102
|
+
| `closer` | Duplicate checking + learning capture |
|
|
103
|
+
|
|
104
|
+
**Fallback behavior**: If vault routing cannot determine the best vault, agents use the first matching vault of the required type or prompt the user.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# KnowzCode MCP Configuration
|
|
2
|
+
|
|
3
|
+
## Connection Status
|
|
4
|
+
- **Connected**: No
|
|
5
|
+
- **Endpoint**: (not configured)
|
|
6
|
+
- **Last Verified**: (never)
|
|
7
|
+
|
|
8
|
+
> **Not configured?** Run `/kc:register` to create an account and set up MCP automatically,
|
|
9
|
+
> or `/kc:connect-mcp <api-key>` if you already have a key.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Vaults
|
|
14
|
+
|
|
15
|
+
### Research Vault (Primary)
|
|
16
|
+
- **Vault ID**: (not configured)
|
|
17
|
+
- **Vault Name**: (not configured)
|
|
18
|
+
- **Purpose**: Learnings, conventions, decisions, patterns
|
|
19
|
+
- **Auto-configured**: No
|
|
20
|
+
|
|
21
|
+
**Query Patterns (when configured):**
|
|
22
|
+
- "Our error handling conventions"
|
|
23
|
+
- "What patterns for API versioning?"
|
|
24
|
+
- "Security best practices we use"
|
|
25
|
+
- "Why did we choose Redis cache?"
|
|
26
|
+
|
|
27
|
+
### Code Vault (Optional)
|
|
28
|
+
- **Vault ID**: (not configured)
|
|
29
|
+
- **Vault Name**: (not configured)
|
|
30
|
+
- **Purpose**: Indexed source code for semantic search (AST-chunked)
|
|
31
|
+
|
|
32
|
+
**Note**: Code search works well with local grep/glob for most projects.
|
|
33
|
+
Configure a code vault for large codebases (50k+ LOC) where semantic search
|
|
34
|
+
provides significant benefit.
|
|
35
|
+
|
|
36
|
+
**Query Patterns (when configured):**
|
|
37
|
+
- "Find all auth middleware"
|
|
38
|
+
- "Where is PaymentService?"
|
|
39
|
+
- "Show database migrations"
|
|
40
|
+
- "JWT validation code"
|
|
41
|
+
|
|
42
|
+
### Enterprise Vault (Optional)
|
|
43
|
+
- **Vault ID**: (not configured)
|
|
44
|
+
- **Vault Name**: (not configured)
|
|
45
|
+
- **Purpose**: Team-wide standards, audit trails, compliance records
|
|
46
|
+
- **Auto-configured**: No
|
|
47
|
+
|
|
48
|
+
**Note**: Enterprise vault is for organizations that want centralized standards
|
|
49
|
+
and audit trails across projects. Configure via `knowzcode/enterprise/compliance_manifest.md`
|
|
50
|
+
with `mcp_compliance_enabled: true`.
|
|
51
|
+
|
|
52
|
+
**Query Patterns (when configured):**
|
|
53
|
+
- "Team standards for React projects"
|
|
54
|
+
- "Security requirements for API endpoints"
|
|
55
|
+
- "Audit trail for WorkGroup kc-feat-auth"
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Single Vault Model (Recommended for New Users)
|
|
60
|
+
|
|
61
|
+
KnowzCode recommends starting with a **single "KnowzCode" vault** for simplicity:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
┌─────────────────────────────────────────────────────────┐
|
|
65
|
+
│ KnowzCode Vault │
|
|
66
|
+
│ │
|
|
67
|
+
│ Purpose: Learnings, conventions, decisions, patterns │
|
|
68
|
+
│ Used by: /kc:learn, closer, agents │
|
|
69
|
+
│ Code search: Uses local grep/glob (no code vault) │
|
|
70
|
+
│ │
|
|
71
|
+
└─────────────────────────────────────────────────────────┘
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Why single vault?**
|
|
75
|
+
- Simpler onboarding (no "what's code vault vs research vault?")
|
|
76
|
+
- Code search works fine with grep/glob for most projects
|
|
77
|
+
- MCP vault is optimized for organizational knowledge, not code indexing
|
|
78
|
+
- Advanced users can add code vault later via `/kc:connect-mcp --configure-vaults`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Usage in Agents
|
|
83
|
+
|
|
84
|
+
| Agent | Research Vault | Code Vault | Purpose |
|
|
85
|
+
|-------|----------------|------------|---------|
|
|
86
|
+
| analyst | Query | Query (if configured) | Find past decisions + affected code |
|
|
87
|
+
| architect | Query | Query (if configured) | Conventions + implementation examples |
|
|
88
|
+
| builder | Query | Query (if configured) | Best practices + similar patterns |
|
|
89
|
+
| reviewer | Query | Query (if configured) | Standards + precedent check |
|
|
90
|
+
| closer | **Write** | - | Capture learnings |
|
|
91
|
+
|
|
92
|
+
**Fallback behavior**: When Code Vault is not configured, agents use local grep/glob
|
|
93
|
+
for code search. This works well for most projects.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## MCP Tools Reference
|
|
98
|
+
|
|
99
|
+
### Query Tools (Read)
|
|
100
|
+
|
|
101
|
+
**search_knowledge(query, vaultId, limit)**
|
|
102
|
+
- Vector similarity search across indexed content
|
|
103
|
+
- Use for: finding code patterns or documentation
|
|
104
|
+
- Example: `search_knowledge("authentication logic", research_vault_id, 10)`
|
|
105
|
+
|
|
106
|
+
**ask_question(question, vaultId, researchMode)**
|
|
107
|
+
- AI-powered question answering with document synthesis
|
|
108
|
+
- `researchMode: false` - Quick answer (faster)
|
|
109
|
+
- `researchMode: true` - Comprehensive answer (8000+ tokens, multi-document)
|
|
110
|
+
- Example: `ask_question("What are our error handling conventions?", research_vault_id, true)`
|
|
111
|
+
|
|
112
|
+
**find_entities(entityType, query, limit)**
|
|
113
|
+
- Find people, locations, or events extracted from knowledge base
|
|
114
|
+
- `entityType`: "person", "location", or "event"
|
|
115
|
+
- Example: `find_entities("person", "John", 25)`
|
|
116
|
+
|
|
117
|
+
**get_knowledge_item(id, includeRelated)**
|
|
118
|
+
- Retrieve a specific knowledge item by ID
|
|
119
|
+
- `includeRelated: true` to include related items
|
|
120
|
+
|
|
121
|
+
**list_vaults(includeStats)**
|
|
122
|
+
- List all accessible vaults with optional statistics
|
|
123
|
+
|
|
124
|
+
### Write Tools (Learning Capture)
|
|
125
|
+
|
|
126
|
+
**create_knowledge(content, title, knowledgeType, vaultId, tags, source)**
|
|
127
|
+
- Create new knowledge item in vault
|
|
128
|
+
- `knowledgeType`: "Document", "Note", or "Transcript"
|
|
129
|
+
- Example:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"content": "[CONTEXT]...\n[INSIGHT]...\n[EXAMPLE]...",
|
|
133
|
+
"title": "Pattern: JWT Refresh Flow",
|
|
134
|
+
"knowledgeType": "Note",
|
|
135
|
+
"vaultId": "{research_vault_id}",
|
|
136
|
+
"tags": ["security", "jwt", "patterns"],
|
|
137
|
+
"source": "KnowzCode WorkGroup WG-feat-auth-20260128"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Auto-Learning Configuration
|
|
144
|
+
|
|
145
|
+
- **Enabled**: Yes
|
|
146
|
+
- **Prompt on Detection**: Yes
|
|
147
|
+
- **Learning Categories**: Pattern, Decision, Workaround, Performance, Security, Convention
|
|
148
|
+
|
|
149
|
+
### Detection Signals
|
|
150
|
+
|
|
151
|
+
Learnings are auto-detected when WorkGroup contains:
|
|
152
|
+
- **Pattern signals**: "created utility for", "new helper", "reusable"
|
|
153
|
+
- **Decision signals**: "chose X over Y", "decided to", "opted for"
|
|
154
|
+
- **Workaround signals**: "workaround", "limitation", "temporary"
|
|
155
|
+
- **Performance signals**: "optimized", "reduced from X to Y"
|
|
156
|
+
- **Security signals**: "security", "vulnerability", "sanitize"
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Configuration Commands
|
|
161
|
+
|
|
162
|
+
- `/kc:register` - Create account and auto-configure MCP + vault
|
|
163
|
+
- `/kc:connect-mcp` - Configure MCP server (use existing API key)
|
|
164
|
+
- `/kc:connect-mcp --configure-vaults` - Reconfigure vault IDs
|
|
165
|
+
- `/kc:status` - Check connection status and vault info
|
|
166
|
+
- `/kc:learn "insight"` - Manually create learning in research vault
|