Commit Graph

21 Commits

Author SHA1 Message Date
moilanik
19395ec096 docs(ai): enforce memory forcing functions and prohibit empty promises
- introduce active skill echoing to prevent context window forgetting during execution
- enforce strict state machine transitions back to planning mode after execution
- replace AI apologies and empty promises with mandatory post-mortem rule updates
- emphasize quality over speed as a core behavioral principle
2026-04-15 08:01:30 +03:00
moilanik
598db63a70 docs(ai): introduce state machine flow and Mermaid rendering rules
Implement a mandatory State Machine model (PLAN and IMPLEMENTATION states)
in root instructions to prevent the AI from generating code prematurely.
The rules require mechanical reloading of skill files during execution
to combat context-window memory loss.

Also update Mermaid diagram instructions to explicitly ban <br> tags for
newlines and prohibit raw angle brackets (<, >) in nodes, enforcing
real newlines and HTML entities (&lt;, &gt;) to fix rendering issues.
2026-04-13 10:38:16 +03:00
moilanik
9bfa4813a8 docs(mermaid): enforce actual line breaks for multiline text
The \n literal often fails to render correctly in Mermaid nodes. The
guidelines now require using actual newlines inside quoted text to
ensure multiline content displays reliably.
2026-04-10 08:50:04 +03:00
moilanik
f35612bc4a docs(git): prohibit file-by-file breakdowns in commit messages
Update commit message guidelines to strictly forbid listing filenames or
technical code edits in the body. The revised rules require describing the
high-level topics and accomplished goals to ensure messages remain abstract
and easily readable.
2026-04-09 09:14:07 +03:00
moilanik
9f33e691bd docs(ai): tarkennettu tekoälyn periaatteita laatuun, sparraukseen ja luku-tilaan
- Lisätty Sääntö 0: Oletuksena Read-Only (Proposal Mode), jotta AI ei muokkaa tiedostoja ilman suoraa lupaa.
- Painotettu laatua, kontrollia ja oppimista nopeuden sijaan hätäilyn estämiseksi.
- Tiukennettu suoritussääntöjä: vaaditaan suostumus kaikkiin muutoksiin, ei vain "tuhoisiin".
- Lisätty Systems Thinking -sääntö putkinäön estämiseksi (huomioi infatason ongelmat kuten levytila, proxyt).
- Lisätty Constructive Pushback -sääntö: AI sparraa ja perustelee, eikä "jankuta" tai myötäile sokeasti.
- Siirretty aktiivisen verkkodebuggauksen (curl, port-forward) ohjeet helm-skilliin.
2026-04-02 11:28:25 +03:00
moilanik
5955a27f08 docs(core-principles): add read-before-edit and explain-as-you-go rules 2026-03-18 08:27:36 +02:00
moilanik
b51a05e203 docs(git): sharpen text-change example, add prose-vs-bullets rule 2026-03-17 12:25:38 +02:00
moilanik
a581c4ea98 docs(git): add rule against quoting text/description change content 2026-03-17 12:18:09 +02:00
moilanik
2886f0b4c7 docs(git): add body length example with / pair 2026-03-17 09:15:17 +02:00
moilanik
e07cf0164f docs(git): require fenced code block output for commit messages
- enforce one code block with only message content for copy/paste
- disallow prose or labels outside the code block
- add explicit correct and wrong output examples
2026-03-12 14:51:04 +02:00
moilanik
1debffb22c docs(git): tighten commit message rules for all projects
- replace IaC-specific wording with general, cross-project guidance
- forbid runtime/incident/manual-ops narrative in commit message body
- clarify commit messages describe repo changes, not behavior outcomes
2026-03-12 12:47:33 +02:00
moilanik
5c6b3b9636 docs: add commit message quality rules to git instructions
- read diff before writing, only include what's in the diff
- no CHANGES: headers, no speculative outcome sections
- bullet points state what changed, not why or how
2026-03-12 11:41:50 +02:00
moilanik
7ba8056ce9 docs(helm): add guidance for multiple files in ConfigMap data
New subsection "Multiple Files in ConfigMap data":
- start with inline range for few files (readable in template)
- shift to files/ + .AsConfig + tpl when >3 files (readability suffers)
- explains threshold for when to switch patterns
- shows both inline and file-based examples
- enables template variables in file-based approach
2026-03-10 10:58:04 +02:00
moilanik
fc91c3988e fix(helm): move name validation from audit to testing phase
Audit checklist should only check hardcoded namespaces and required+default conflicts.
Resource names are not violations — they depend on subchart implementation and must be
tested via helm template, not audited via grep.

Testing Templates section rewritten:
- require testing with at least 2 different release names and namespaces
- verify resource names, labels, selectors linkage works correctly in both
- verify manifest links (Service → Deployment) use correct names/namespaces
- this is how you validate chart portability, not via code inspection

IaC principle clarified:
- chart must be deployable to any cluster/namespace without editing
- deployment discipline prevents two instances in same cluster/namespace
- not a chart constraint, a deployment constraint
2026-03-10 09:57:27 +02:00
moilanik
0af84c24c7 feat(helm): expand guidelines for namespace agnosticism and values hygiene
Audit checklist:
- add explicit grep-based checks for hardcoded namespaces, names, required+default conflicts, unused values keys
- scope name checks to templates/ only — hardcoded names in values.yaml are legitimate
- fix required error message example to include what to set and where

New sections:
- values.yaml Is Not Rendered — fixed names in values.yaml for subchart coordination are correct
- Never Hardcode Namespace / Release Name — hard rule with IaC principle rationale
- Glue Configuration pattern — documented exception for subchart coordination (e.g. Tempo + MinIO)

values.yaml hygiene rewrite:
- two purposes: static baseline + umbrella glue (wiring subcharts into one unit)
- goal is a short, minimal file identical across all installations
- installation-specific values belong exclusively in values.<instance>.yaml
- forbidden: empty placeholders, defaults for rarely-changed values, required-value entries

required vs defaults rewrite:
- sensible default → hardcode in template, not in values.yaml
- must-vary value → required with descriptive message, no entry in values.yaml
- | default forbidden
- required error messages must say exactly what to set and where

KISS addition:
- hardcoded values are the starting point, not a compromise
- parameterize only when developer asks, and into values.<instance>.yaml
2026-03-10 09:29:21 +02:00
moilanik
cb402009fe feat(helm): forbid hardcoded namespaces and release names
Add hard rule: charts must be fully agnostic about installation target.
- Never hardcode namespace in any template — use .Release.Namespace or omit
- Never hardcode release name — use .Release.Name / fullname helper
- Enforce IaC principle: deployer decides where, chart describes what
2026-03-10 08:43:43 +02:00
moilanik
407c0a560c refactor(apply.sh): extract functions + expand clean-code skill
apply.sh:
- refactor entire script into main() + 14 named functions
- fix BSD sed portability: \s → [[:space:]]
- fix set -e traps: replace [[ ]] && cmd with if blocks
- write_version_file in both scan and update mode
- print_summary only in scan mode
- keep 3 justified comments, remove all section headers

clean-code.instructions.md:
- add Newspaper Readability section
- add Single Level of Abstraction (SLAB) section
- add Declarative and Imperative Layers section
- rewrite Comments section (Allowed / Forbidden / The test)
- add guard clause guidance to Functions section
- add "always use braces" rule to Formatting
- add "avoid optical illusions" rule to Formatting
- replace Bash/Python examples with TypeScript
2026-03-09 09:35:27 +02:00
moilanik
102f593909 feat: configurable docs folders + mandatory instructions rules
config.yaml: new repo-root config file with docs_folders list
(docs, documentation, doc). apply.sh reads this list and picks the
first existing folder per project instead of hardcoding docs/.

Instructions:
- core-principles: add No Vibe Coding and No Touching .ai/ sections
- ai-root-instructions: add mandatory instructions block — rules stay
  active for the whole session, not just at start; AI must stop and
  announce if instructions were not loaded
- project-context, docs: updated to list all docs folder alternatives
  and reference config.yaml as the source of truth

FR-5.0 added to apply-requirements.md. README step 4 updated.
2026-03-06 09:42:48 +02:00
moilanik
a85c7dc0fb feat: add clean-code, clean-architecture and helm skills; fix .gitignore
New skill files:
- clean-code.instructions.md — naming, functions, classes, error handling,
  formatting, DRY/KISS/SOLID, Helm YAML conventions
- clean-architecture.instructions.md — dependency rule, layers, boundaries,
  SOLID foundation, Helm as outermost layer
- helm.instructions.md — resource ownership, values hygiene, required vs
  defaults, umbrella chart pattern, two-file values layering, KISS principle,
  hook ordering, config files pattern, dependency caching, template testing

Register all three in ai-root-instructions.md skills list and routing table.

Remove .ai from .gitignore — .ai/ is the product in this repo and must be
tracked; the apply.sh skip-by-marker mechanism prevents changes to other repos.
2026-03-04 09:54:07 +02:00
moilanik
99d13e6e4a feat: complete apply.sh v1 — summary, guard, dev root install, updated docs
- apply.sh: direct-run guard (only curl | bash allowed)
- apply.sh: DEV_ROOT passed as explicit arg from bootstrap
- apply.sh: .ai/ copied to dev root as real folder; projects symlink there
- apply.sh: counters + detailed summary (version prev→new, templated, refreshed, no-docs)
- apply.sh: find errors silenced, no crash on empty dev root
- .ai-superpower: added warning comment about deletion side effects
- .gitignore: .ai-instructions.conf → .ai-superpower.version
- scripts/: removed (hello.sh, scan-projects-with-git.sh, verify-docs-folder.sh, add-ai-context-to-docs-folder.sh)
- templates: monorepo sections split into AI instructions + developer instructions
- README.md: rewritten to match current architecture and behaviour
- docs/apply-requirements.md: FR-2.4, FR-3, FR-5, FR-6, FR-7, FR-8 updated
- docs/apply-usecases.md: full detailed Mermaid flowchart replacing placeholder
2026-03-03 11:19:35 +02:00
moilanik
a6eb4da214 nit: ai-superpower initial commit
- .ai/ instruction set (root, behavior, skills, constraints)
- apply.sh workflow documentation (apply.md)
- architecture documentation (docs/architecture.md)
- .github/copilot-instructions.md for VS Code auto-load
- .gitignore (tmp/, .ai-instructions.conf)"
2026-03-02 14:06:36 +02:00