amend constitution for glm-4.6

This commit is contained in:
Alex Selimov 2025-10-03 23:15:34 -04:00
parent 9152f868ce
commit 74812459af
Signed by: aselimov
GPG key ID: 3DDB9C3E023F1F31
4 changed files with 59 additions and 36 deletions

View file

@ -1,42 +1,54 @@
<!-- <!--
Sync Impact Report: Sync Impact Report:
- Version change: none → 1.0.0 - Version change: 1.0.0 (new constitution)
- Added sections: - Modified principles: None (new document)
- Core Principles - Added sections: All sections are new
- Governance - Removed sections: None
- Removed sections:
- [SECTION_2_NAME]
- [SECTION_3_NAME]
- Modified principles: none
- Templates requiring updates: - Templates requiring updates:
- ✅ .specify/memory/constitution.md ✅ plan-template.md (updated with specific constitution checks and version reference)
- ⚠ pending: .specify/templates/plan-template.md ✅ spec-template.md (compatible with current principles)
- ⚠ pending: .specify/templates/spec-template.md ✅ tasks-template.md (compatible with TDD approach)
- ⚠ pending: .specify/templates/tasks-template.md ✅ agent-file-template.md (compatible with current structure)
- ⚠ pending: .gemini/commands/analyze.toml - Follow-up TODOs: None
- ⚠ pending: .gemini/commands/clarify.toml
- ⚠ pending: .gemini/commands/constitution.toml
- ⚠ pending: .gemini/commands/implement.toml
- ⚠ pending: .gemini/commands/plan.toml
- ⚠ pending: .gemini/commands/specify.toml
- ⚠ pending: .gemini/commands/tasks.toml
- Follow-up TODOs: none
--> -->
# notex.nvim Constitution # notex.nvim Constitution
## Core Principles ## Core Principles
### I. Clean Code ### I. Clean Code
Code should be written in a way that is easy to read, understand, and maintain. Follow established style guides and best practices. Every component MUST be written with clean, maintainable code. Functions should be short and have single responsibilities. Code structure must be self-documenting and follow established Lua conventions for Neovim plugins. Dependencies MUST be minimal and well-justified.
### II. Functional Style ### II. Functional Style
Favor a functional programming style with immutable data structures and pure functions where possible and appropriate for the language. Core data processing logic MUST favor functional programming patterns. Pure functions SHOULD be used for schema inference, document parsing, and query execution. State management MUST be explicit and isolated to specific modules. Functional approaches SHOULD be preferred over object-oriented patterns for data transformation operations.
### III. Descriptive Coding ### III. Descriptive Coding
Write self-documenting code with descriptive function and variable names. Avoid comments that explain *what* the code is doing; the code should speak for itself. Comments should only be used to explain *why* a certain implementation was chosen when it's not obvious. All functions, modules, and variables MUST have descriptive names that clearly communicate their purpose. File and directory structure MUST be intuitive and self-explanatory. Code MUST be written primarily for human readability, with execution as a secondary concern.
### IV. Test-First Development (NON-NEGOTIABLE)
TDD is mandatory: Tests MUST be written before implementation. Red-Green-Refactor cycle MUST be strictly enforced. All tests MUST fail initially, then implementation MUST be added to make them pass. Integration tests MUST validate complete user workflows.
### V. Performance by Design
Query execution MUST be non-blocking and feel instantaneous. Database operations MUST be optimized for typical workloads of several thousand documents. Memory usage MUST be controlled and predictable. Performance decisions MUST be justified with measurements.
## Development Workflow
### Code Review Requirements
All changes MUST pass automated tests before integration. Code reviews MUST verify compliance with constitutional principles. Performance impacts MUST be assessed for database and query operations.
### Quality Standards
All public functions MUST have comprehensive documentation. Error handling MUST be explicit and user-friendly. Logging MUST be structured but minimal to avoid noise.
## Technology Constraints
### Language and Platform
Implementation MUST be in Lua compatible with Neovim. Plugin MUST integrate seamlessly with Neovim's native APIs. Cross-platform compatibility MUST be maintained.
### Dependencies
External dependencies MUST be minimal and essential. SQLite usage MUST be justified and optimized. All dependencies MUST be compatible with Neovim's runtime environment.
## Governance ## Governance
All pull requests and reviews must verify compliance with this constitution. Any deviation from these principles must be explicitly justified and approved. This constitution supersedes all other development practices. Amendments require documentation, approval, and migration planning. All development activities MUST verify constitutional compliance. Complex deviations MUST be explicitly justified in implementation plans.
**Version**: 1.0.0 | **Ratified**: 2025-10-01 | **Last Amended**: 2025-10-01 **Version**: 1.0.0 | **Ratified**: 2025-10-03 | **Last Amended**: 2025-10-03

View file

@ -30,12 +30,12 @@
# #
# 5. Multi-Agent Support # 5. Multi-Agent Support
# - Handles agent-specific file paths and naming conventions # - Handles agent-specific file paths and naming conventions
# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf # - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, or Amazon Q Developer CLI
# - Can update single agents or all existing agent files # - Can update single agents or all existing agent files
# - Creates default Claude file if no agent files exist # - Creates default Claude file if no agent files exist
# #
# Usage: ./update-agent-context.sh [agent_type] # Usage: ./update-agent-context.sh [agent_type]
# Agent types: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf # Agent types: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|q
# Leave empty to update all existing agent files # Leave empty to update all existing agent files
set -e set -e
@ -69,6 +69,7 @@ WINDSURF_FILE="$REPO_ROOT/.windsurf/rules/specify-rules.md"
KILOCODE_FILE="$REPO_ROOT/.kilocode/rules/specify-rules.md" KILOCODE_FILE="$REPO_ROOT/.kilocode/rules/specify-rules.md"
AUGGIE_FILE="$REPO_ROOT/.augment/rules/specify-rules.md" AUGGIE_FILE="$REPO_ROOT/.augment/rules/specify-rules.md"
ROO_FILE="$REPO_ROOT/.roo/rules/specify-rules.md" ROO_FILE="$REPO_ROOT/.roo/rules/specify-rules.md"
Q_FILE="$REPO_ROOT/AGENTS.md"
# Template file # Template file
TEMPLATE_FILE="$REPO_ROOT/.specify/templates/agent-file-template.md" TEMPLATE_FILE="$REPO_ROOT/.specify/templates/agent-file-template.md"
@ -580,9 +581,12 @@ update_specific_agent() {
roo) roo)
update_agent_file "$ROO_FILE" "Roo Code" update_agent_file "$ROO_FILE" "Roo Code"
;; ;;
q)
update_agent_file "$Q_FILE" "Amazon Q Developer CLI"
;;
*) *)
log_error "Unknown agent type '$agent_type'" log_error "Unknown agent type '$agent_type'"
log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo" log_error "Expected: claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo|q"
exit 1 exit 1
;; ;;
esac esac
@ -641,6 +645,11 @@ update_all_existing_agents() {
update_agent_file "$ROO_FILE" "Roo Code" update_agent_file "$ROO_FILE" "Roo Code"
found_agent=true found_agent=true
fi fi
if [[ -f "$Q_FILE" ]]; then
update_agent_file "$Q_FILE" "Amazon Q Developer CLI"
found_agent=true
fi
# If no agent files exist, create a default Claude file # If no agent files exist, create a default Claude file
if [[ "$found_agent" == false ]]; then if [[ "$found_agent" == false ]]; then
@ -665,7 +674,7 @@ print_summary() {
fi fi
echo echo
log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|roo]" log_info "Usage: $0 [claude|gemini|copilot|cursor|qwen|opencode|codex|windsurf|kilocode|auggie|q]"
} }
#============================================================================== #==============================================================================

View file

@ -18,7 +18,7 @@
→ Update Progress Tracking: Initial Constitution Check → Update Progress Tracking: Initial Constitution Check
5. Execute Phase 0 → research.md 5. Execute Phase 0 → research.md
→ If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns" → If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns"
6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code or `AGENTS.md` for opencode). 6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code, or `AGENTS.md` for all other agents).
7. Re-evaluate Constitution Check section 7. Re-evaluate Constitution Check section
→ If new violations: Refactor design, return to Phase 1 → If new violations: Refactor design, return to Phase 1
→ Update Progress Tracking: Post-Design Constitution Check → Update Progress Tracking: Post-Design Constitution Check
@ -48,8 +48,10 @@
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.* *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
* **I. Clean Code**: Is the proposed code structure and design clean and maintainable? * **I. Clean Code**: Is the proposed code structure and design clean and maintainable?
* **II. Functional Style**: Does the design favor a functional approach where appropriate? * **II. Functional Style**: Does the design favor functional approaches for data transformation?
* **III. Descriptive Coding**: Is the naming of components and files descriptive and self-documenting? * **III. Descriptive Coding**: Is the naming of components and files descriptive and self-documenting?
* **IV. Test-First Development**: Are comprehensive tests planned before implementation?
* **V. Performance by Design**: Are performance considerations adequately addressed?
## Project Structure ## Project Structure
@ -154,7 +156,7 @@ directories captured above]
- Quickstart test = story validation steps - Quickstart test = story validation steps
5. **Update agent file incrementally** (O(1) operation): 5. **Update agent file incrementally** (O(1) operation):
- Run `.specify/scripts/bash/update-agent-context.sh gemini` - Run `.specify/scripts/bash/update-agent-context.sh claude`
**IMPORTANT**: Execute it exactly as specified above. Do not add or remove any arguments. **IMPORTANT**: Execute it exactly as specified above. Do not add or remove any arguments.
- If exists: Add only NEW tech from current plan - If exists: Add only NEW tech from current plan
- Preserve manual additions between markers - Preserve manual additions between markers

View file

@ -11,13 +11,13 @@
- Paths shown below assume the project structure defined in `plan.md`. - Paths shown below assume the project structure defined in `plan.md`.
## Phase 3.1: Setup ## Phase 3.1: Setup
- [ ] T001 Create the project structure in `lua/` and `tests/` as defined in `plan.md`. - [x] T001 Create the project structure in `lua/` and `tests/` as defined in `plan.md`.
- [ ] T002 Initialize a Lua project and set up dependencies (lsqlite3, busted). - [x] T002 Initialize a Lua project and set up dependencies (lsqlite3, busted).
- [ ] T003 [P] Configure linting and formatting tools for Lua (e.g., luacheck, stylua). - [x] T003 [P] Configure linting and formatting tools for Lua (e.g., luacheck, stylua).
## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3 ## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
**CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation** **CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
- [ ] T004 [P] Write a test for schema inference in `tests/spec/schema_spec.lua`. - [x] T004 [P] Write a test for schema inference in `tests/spec/schema_spec.lua`.
- [ ] T005 [P] Write a test for document parsing in `tests/spec/document_spec.lua`. - [ ] T005 [P] Write a test for document parsing in `tests/spec/document_spec.lua`.
- [ ] T006 [P] Write a test for query parsing in `tests/spec/query_spec.lua`. - [ ] T006 [P] Write a test for query parsing in `tests/spec/query_spec.lua`.
- [ ] T007 [P] Write an integration test for creating a document and viewing it in a query in `tests/integration/main_spec.lua`. - [ ] T007 [P] Write an integration test for creating a document and viewing it in a query in `tests/integration/main_spec.lua`.