rekipedia 0.9.3__tar.gz
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.
- rekipedia-0.9.3/.editorconfig +99 -0
- rekipedia-0.9.3/.env.sample +13 -0
- rekipedia-0.9.3/.github/_rules.instructions.md +84 -0
- rekipedia-0.9.3/.github/clean-code-review.instructions.md +17 -0
- rekipedia-0.9.3/.github/husky-enforcement.instructions.md +26 -0
- rekipedia-0.9.3/.github/lint-report.instructions.md +66 -0
- rekipedia-0.9.3/.github/scripts/update-homebrew-tap.py +123 -0
- rekipedia-0.9.3/.github/workflows/go-ci.yml +46 -0
- rekipedia-0.9.3/.github/workflows/go-release.yml +42 -0
- rekipedia-0.9.3/.github/workflows/python-release.yml +32 -0
- rekipedia-0.9.3/.gitignore +27 -0
- rekipedia-0.9.3/.pre-commit-config.yaml +125 -0
- rekipedia-0.9.3/Dockerfile.sandbox +25 -0
- rekipedia-0.9.3/Makefile +120 -0
- rekipedia-0.9.3/PKG-INFO +351 -0
- rekipedia-0.9.3/README.md +303 -0
- rekipedia-0.9.3/RELEASE-NOTES.md +348 -0
- rekipedia-0.9.3/bin/rekipedia.js +46 -0
- rekipedia-0.9.3/coverage.json +1 -0
- rekipedia-0.9.3/docs/PLAN.md +227 -0
- rekipedia-0.9.3/docs/customizing.md +134 -0
- rekipedia-0.9.3/docs/plans/2026-04-29-phase5-serve.md +726 -0
- rekipedia-0.9.3/docs/plans/golang-rewrite.md +968 -0
- rekipedia-0.9.3/go/.goreleaser.yaml +92 -0
- rekipedia-0.9.3/go/Dockerfile +3 -0
- rekipedia-0.9.3/go/Makefile +67 -0
- rekipedia-0.9.3/go/README.md +87 -0
- rekipedia-0.9.3/go/RELEASE-NOTES.md +33 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/ask.go +174 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/embed.go +63 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/export.go +105 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/init.go +45 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/root.go +70 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/scan.go +136 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/serve.go +84 -0
- rekipedia-0.9.3/go/cmd/rekipedia/cmd/update.go +53 -0
- rekipedia-0.9.3/go/cmd/rekipedia/main.go +8 -0
- rekipedia-0.9.3/go/go.mod +40 -0
- rekipedia-0.9.3/go/go.sum +188 -0
- rekipedia-0.9.3/go/install.sh +57 -0
- rekipedia-0.9.3/go/internal/config/loader.go +91 -0
- rekipedia-0.9.3/go/internal/config/loader_test.go +87 -0
- rekipedia-0.9.3/go/internal/exporter/exporter_test.go +159 -0
- rekipedia-0.9.3/go/internal/exporter/json_exporter.go +148 -0
- rekipedia-0.9.3/go/internal/exporter/markdown_exporter.go +82 -0
- rekipedia-0.9.3/go/internal/extractor/config.go +243 -0
- rekipedia-0.9.3/go/internal/extractor/extractor.go +68 -0
- rekipedia-0.9.3/go/internal/extractor/extractor_test.go +516 -0
- rekipedia-0.9.3/go/internal/extractor/golang.go +165 -0
- rekipedia-0.9.3/go/internal/extractor/python.go +201 -0
- rekipedia-0.9.3/go/internal/extractor/typescript.go +149 -0
- rekipedia-0.9.3/go/internal/llm/client.go +298 -0
- rekipedia-0.9.3/go/internal/llm/client_test.go +295 -0
- rekipedia-0.9.3/go/internal/models/contracts.go +144 -0
- rekipedia-0.9.3/go/internal/models/contracts_test.go +50 -0
- rekipedia-0.9.3/go/internal/orchestrator/helpers.go +91 -0
- rekipedia-0.9.3/go/internal/orchestrator/orchestrator_test.go +217 -0
- rekipedia-0.9.3/go/internal/orchestrator/run_ask.go +253 -0
- rekipedia-0.9.3/go/internal/orchestrator/run_digest.go +356 -0
- rekipedia-0.9.3/go/internal/orchestrator/run_update.go +179 -0
- rekipedia-0.9.3/go/internal/orchestrator/sharding.go +106 -0
- rekipedia-0.9.3/go/internal/orchestrator/snapshotter.go +172 -0
- rekipedia-0.9.3/go/internal/rag/chunker.go +96 -0
- rekipedia-0.9.3/go/internal/rag/embedder.go +109 -0
- rekipedia-0.9.3/go/internal/rag/rag_test.go +200 -0
- rekipedia-0.9.3/go/internal/rag/scan_meta.go +81 -0
- rekipedia-0.9.3/go/internal/rag/vector_store.go +118 -0
- rekipedia-0.9.3/go/internal/server/server.go +587 -0
- rekipedia-0.9.3/go/internal/server/server_test.go +131 -0
- rekipedia-0.9.3/go/internal/server/templates/ask.html +194 -0
- rekipedia-0.9.3/go/internal/server/templates/base.html +105 -0
- rekipedia-0.9.3/go/internal/server/templates/index.html +81 -0
- rekipedia-0.9.3/go/internal/server/templates/wiki.html +15 -0
- rekipedia-0.9.3/go/internal/storage/aliases.go +122 -0
- rekipedia-0.9.3/go/internal/storage/store.go +313 -0
- rekipedia-0.9.3/go/internal/storage/store_test.go +212 -0
- rekipedia-0.9.3/go/internal/synthesis/diagram_builder.go +209 -0
- rekipedia-0.9.3/go/internal/synthesis/page_builder.go +229 -0
- rekipedia-0.9.3/go/internal/synthesis/planner.go +313 -0
- rekipedia-0.9.3/go/internal/synthesis/synthesis_test.go +450 -0
- rekipedia-0.9.3/go/pkg/fsutil/walk.go +189 -0
- rekipedia-0.9.3/go/pkg/fsutil/walk_test.go +132 -0
- rekipedia-0.9.3/package.json +30 -0
- rekipedia-0.9.3/pyproject.toml +103 -0
- rekipedia-0.9.3/rekipedia-agent-skill.md +156 -0
- rekipedia-0.9.3/schemas/analysis_result.schema.json +93 -0
- rekipedia-0.9.3/scripts/lint-and-report.sh +302 -0
- rekipedia-0.9.3/skills/shared/husky-rules.md +136 -0
- rekipedia-0.9.3/skills/shared/lint-report-prompt.md +129 -0
- rekipedia-0.9.3/skills/shared/rules.md +162 -0
- rekipedia-0.9.3/src/rekipedia/__init__.py +2 -0
- rekipedia-0.9.3/src/rekipedia/__main__.py +3 -0
- rekipedia-0.9.3/src/rekipedia/cli/__init__.py +27 -0
- rekipedia-0.9.3/src/rekipedia/cli/ask.py +163 -0
- rekipedia-0.9.3/src/rekipedia/cli/embed.py +178 -0
- rekipedia-0.9.3/src/rekipedia/cli/export.py +200 -0
- rekipedia-0.9.3/src/rekipedia/cli/init.py +83 -0
- rekipedia-0.9.3/src/rekipedia/cli/scan.py +126 -0
- rekipedia-0.9.3/src/rekipedia/cli/serve.py +72 -0
- rekipedia-0.9.3/src/rekipedia/cli/update.py +102 -0
- rekipedia-0.9.3/src/rekipedia/exporters/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/exporters/json_export.py +98 -0
- rekipedia-0.9.3/src/rekipedia/exporters/markdown_export.py +41 -0
- rekipedia-0.9.3/src/rekipedia/extractors/__init__.py +8 -0
- rekipedia-0.9.3/src/rekipedia/extractors/base.py +22 -0
- rekipedia-0.9.3/src/rekipedia/extractors/config_extractor.py +147 -0
- rekipedia-0.9.3/src/rekipedia/extractors/python_extractor.py +141 -0
- rekipedia-0.9.3/src/rekipedia/extractors/typescript_extractor.py +113 -0
- rekipedia-0.9.3/src/rekipedia/llm/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/llm/client.py +116 -0
- rekipedia-0.9.3/src/rekipedia/models/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/models/contracts.py +90 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/run_ask.py +208 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/run_digest.py +339 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/run_update.py +187 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/sharding.py +77 -0
- rekipedia-0.9.3/src/rekipedia/orchestrator/snapshotter.py +108 -0
- rekipedia-0.9.3/src/rekipedia/prompts/ask_system.md +17 -0
- rekipedia-0.9.3/src/rekipedia/prompts/digest_system.md +70 -0
- rekipedia-0.9.3/src/rekipedia/rag/__init__.py +0 -0
- rekipedia-0.9.3/src/rekipedia/rag/embedder.py +399 -0
- rekipedia-0.9.3/src/rekipedia/rag/scan_meta.py +61 -0
- rekipedia-0.9.3/src/rekipedia/sandbox/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/sandbox/runner.py +143 -0
- rekipedia-0.9.3/src/rekipedia/sandbox/tasks/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/sandbox/tasks/analyze_shard.py +75 -0
- rekipedia-0.9.3/src/rekipedia/server/__init__.py +0 -0
- rekipedia-0.9.3/src/rekipedia/server/app.py +236 -0
- rekipedia-0.9.3/src/rekipedia/server/templates/ask.html +392 -0
- rekipedia-0.9.3/src/rekipedia/server/templates/base.html +153 -0
- rekipedia-0.9.3/src/rekipedia/server/templates/index.html +137 -0
- rekipedia-0.9.3/src/rekipedia/server/templates/wiki.html +4 -0
- rekipedia-0.9.3/src/rekipedia/storage/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/storage/migrations/001_initial.sql +156 -0
- rekipedia-0.9.3/src/rekipedia/storage/migrations/002_qa_history.sql +8 -0
- rekipedia-0.9.3/src/rekipedia/storage/sqlite_store.py +481 -0
- rekipedia-0.9.3/src/rekipedia/synthesis/__init__.py +1 -0
- rekipedia-0.9.3/src/rekipedia/synthesis/diagram_builder.py +161 -0
- rekipedia-0.9.3/src/rekipedia/synthesis/page_builder.py +404 -0
- rekipedia-0.9.3/src/rekipedia/synthesis/planner.py +427 -0
- rekipedia-0.9.3/tests/__init__.py +0 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/.close-wiki/config.yml +14 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/.github/workflows/ci.yml +14 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/.gitignore +1 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/core.py +9 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/main.py +10 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/pyproject.toml +4 -0
- rekipedia-0.9.3/tests/fixtures/mini-py-repo/utils.py +9 -0
- rekipedia-0.9.3/tests/fixtures/mini-ts-repo/package.json +10 -0
- rekipedia-0.9.3/tests/fixtures/mini-ts-repo/src/greet.ts +3 -0
- rekipedia-0.9.3/tests/fixtures/mini-ts-repo/src/index.ts +3 -0
- rekipedia-0.9.3/tests/fixtures/mini-ts-repo/tsconfig.json +9 -0
- rekipedia-0.9.3/tests/test_ask.py +147 -0
- rekipedia-0.9.3/tests/test_coverage_boost.py +270 -0
- rekipedia-0.9.3/tests/test_importance_export.py +185 -0
- rekipedia-0.9.3/tests/test_init.py +46 -0
- rekipedia-0.9.3/tests/test_page_builder.py +123 -0
- rekipedia-0.9.3/tests/test_python_extractor.py +68 -0
- rekipedia-0.9.3/tests/test_qa_history.py +37 -0
- rekipedia-0.9.3/tests/test_rag.py +157 -0
- rekipedia-0.9.3/tests/test_scan.py +104 -0
- rekipedia-0.9.3/tests/test_server.py +86 -0
- rekipedia-0.9.3/tests/test_sharding.py +63 -0
- rekipedia-0.9.3/tests/test_snapshotter.py +66 -0
- rekipedia-0.9.3/tests/test_sqlite_store.py +43 -0
- rekipedia-0.9.3/tests/test_typescript_extractor.py +75 -0
- rekipedia-0.9.3/tests/test_update.py +145 -0
- rekipedia-0.9.3/tests/test_v073_features.py +140 -0
- rekipedia-0.9.3/uv.lock +2569 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
# C# / .NET EditorConfig + Roslyn analyser settings
|
|
3
|
+
# Drop in project root as .editorconfig
|
|
4
|
+
# Works with: dotnet format, Visual Studio, Rider, VS Code (C# Dev Kit)
|
|
5
|
+
# Run: dotnet format --verify-no-changes
|
|
6
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
root = true
|
|
9
|
+
|
|
10
|
+
[*]
|
|
11
|
+
indent_style = space
|
|
12
|
+
indent_size = 4
|
|
13
|
+
end_of_line = lf
|
|
14
|
+
charset = utf-8
|
|
15
|
+
trim_trailing_whitespace = true
|
|
16
|
+
insert_final_newline = true
|
|
17
|
+
|
|
18
|
+
[*.{cs,csx}]
|
|
19
|
+
# ── Naming (Clean Code: meaningful names, DDD: ubiquitous language) ──────────
|
|
20
|
+
|
|
21
|
+
# Interfaces must start with I
|
|
22
|
+
dotnet_naming_rule.interface_should_start_with_i.severity = warning
|
|
23
|
+
dotnet_naming_rule.interface_should_start_with_i.symbols = interface
|
|
24
|
+
dotnet_naming_rule.interface_should_start_with_i.style = begins_with_i
|
|
25
|
+
|
|
26
|
+
dotnet_naming_symbols.interface.applicable_kinds = interface
|
|
27
|
+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal
|
|
28
|
+
|
|
29
|
+
dotnet_naming_style.begins_with_i.required_prefix = I
|
|
30
|
+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
|
31
|
+
|
|
32
|
+
# Types: PascalCase
|
|
33
|
+
dotnet_naming_rule.types_pascal_case.severity = warning
|
|
34
|
+
dotnet_naming_rule.types_pascal_case.symbols = types
|
|
35
|
+
dotnet_naming_rule.types_pascal_case.style = pascal_case_style
|
|
36
|
+
|
|
37
|
+
dotnet_naming_symbols.types.applicable_kinds = class, struct, enum, record
|
|
38
|
+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
|
39
|
+
|
|
40
|
+
# Private fields: _camelCase
|
|
41
|
+
dotnet_naming_rule.private_fields_camel.severity = warning
|
|
42
|
+
dotnet_naming_rule.private_fields_camel.symbols = private_fields
|
|
43
|
+
dotnet_naming_rule.private_fields_camel.style = underscore_camel
|
|
44
|
+
|
|
45
|
+
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
|
46
|
+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, private_protected
|
|
47
|
+
dotnet_naming_style.underscore_camel.required_prefix = _
|
|
48
|
+
dotnet_naming_style.underscore_camel.capitalization = camel_case
|
|
49
|
+
|
|
50
|
+
# ── Code quality (Clean Code + DDD) ─────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
# Prefer var only when type is apparent
|
|
53
|
+
csharp_style_var_for_built_in_types = false:suggestion
|
|
54
|
+
csharp_style_var_when_type_is_apparent = true:suggestion
|
|
55
|
+
csharp_style_var_elsewhere = false:suggestion
|
|
56
|
+
|
|
57
|
+
# Expression-bodied members — keep short
|
|
58
|
+
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
|
|
59
|
+
csharp_style_expression_bodied_properties = true:suggestion
|
|
60
|
+
|
|
61
|
+
# Pattern matching (reduces nesting)
|
|
62
|
+
csharp_style_prefer_switch_expression = true:suggestion
|
|
63
|
+
csharp_prefer_pattern_matching = true:suggestion
|
|
64
|
+
csharp_style_prefer_not_pattern = true:suggestion
|
|
65
|
+
|
|
66
|
+
# Null checks (prefer is null over == null)
|
|
67
|
+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
|
68
|
+
|
|
69
|
+
# DDD value objects — prefer records for immutability
|
|
70
|
+
csharp_style_prefer_primary_constructors = true:suggestion
|
|
71
|
+
|
|
72
|
+
# Throw expressions (cleaner guard clauses)
|
|
73
|
+
csharp_style_throw_expression = true:suggestion
|
|
74
|
+
|
|
75
|
+
# ── Roslyn analyser severity overrides ──────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
# CA1822 — mark members static if they don't access instance state
|
|
78
|
+
dotnet_diagnostic.CA1822.severity = suggestion
|
|
79
|
+
|
|
80
|
+
# CA1062 — validate public API arguments (boundaries / ACL)
|
|
81
|
+
dotnet_diagnostic.CA1062.severity = warning
|
|
82
|
+
|
|
83
|
+
# CA2000 — dispose objects before losing scope
|
|
84
|
+
dotnet_diagnostic.CA2000.severity = warning
|
|
85
|
+
|
|
86
|
+
# MA0051 — method too long (> 60 lines)
|
|
87
|
+
dotnet_diagnostic.MA0051.severity = warning
|
|
88
|
+
|
|
89
|
+
# MA0016 — prefer return collection abstraction (DDD repository interfaces)
|
|
90
|
+
dotnet_diagnostic.MA0016.severity = suggestion
|
|
91
|
+
|
|
92
|
+
# S1135 — complete TODO comments
|
|
93
|
+
dotnet_diagnostic.S1135.severity = suggestion
|
|
94
|
+
|
|
95
|
+
[*.{json,yml,yaml,xml}]
|
|
96
|
+
indent_size = 2
|
|
97
|
+
|
|
98
|
+
[Makefile]
|
|
99
|
+
indent_style = tab
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# close-wiki environment variables
|
|
2
|
+
# Copy this file to .env and fill in the values you need.
|
|
3
|
+
# All variables are optional — they override the settings in .close-wiki/config.yml.
|
|
4
|
+
|
|
5
|
+
# LLM model (any litellm model string)
|
|
6
|
+
# Examples: gpt-5.5 | claude-opus-4-7 | gemini/gemini-2.5-pro | ollama/llama4
|
|
7
|
+
CLOSE_WIKI_MODEL=ollama/llama4
|
|
8
|
+
|
|
9
|
+
# API key for the chosen provider (leave blank for local models like Ollama)
|
|
10
|
+
CLOSE_WIKI_API_KEY=
|
|
11
|
+
|
|
12
|
+
# Custom base URL for self-hosted or proxied endpoints
|
|
13
|
+
CLOSE_WIKI_BASE_URL=
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*.{ts,js,tsx,jsx,py,go,java,cs,rb,rs,swift,kt}"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Clean Code + DDD Review Rules
|
|
6
|
+
|
|
7
|
+
Scope: readability and maintainability only. High-confidence findings only. Max 3 per file by impact.
|
|
8
|
+
No finding → reply: "No significant Clean Code issues found."
|
|
9
|
+
|
|
10
|
+
## Clean Code
|
|
11
|
+
|
|
12
|
+
| Rule | Severity | Flag when |
|
|
13
|
+
| ----------------------- | -------- | -------------------------------------------------------------------------- |
|
|
14
|
+
| `meaningful-names` | medium | Vague names: `data`, `tmp`, `res`, `doStuff`, `flag` |
|
|
15
|
+
| `single-responsibility` | high | Function/class mixes validation, persistence, business logic, side effects |
|
|
16
|
+
| `minimize-duplication` | high | Business logic repeated across 2+ functions or files |
|
|
17
|
+
| `avoid-deep-nesting` | medium | Nested `if/else` hides happy path; guard clauses would flatten it |
|
|
18
|
+
| `small-interfaces` | medium | 5+ mixed-purpose parameters |
|
|
19
|
+
| `named-constants` | low | Unnamed business literals in logic |
|
|
20
|
+
| `comment-why-not-what` | low | Comment restates code instead of explaining intent |
|
|
21
|
+
| `clear-error-handling` | medium | Silent failures, bare catch, generic exception, missing context |
|
|
22
|
+
|
|
23
|
+
## DDD (apply when domain modelling exists)
|
|
24
|
+
|
|
25
|
+
| Rule | Severity | Flag when |
|
|
26
|
+
| -------------------------------- | -------- | ------------------------------------------------------- |
|
|
27
|
+
| `ubiquitous-language` | medium | Generic name where a domain term exists |
|
|
28
|
+
| `bounded-context-violation` | high | Module imports another context's internals without ACL |
|
|
29
|
+
| `aggregate-integrity-bypass` | high | External code mutates aggregate bypassing the root |
|
|
30
|
+
| `value-object-mutability` | medium | Value-semantics object is mutable or identity-compared |
|
|
31
|
+
| `domain-logic-in-adapters` | high | Business rules in controllers, handlers, or DB adapters |
|
|
32
|
+
| `missing-acl` | medium | External model types referenced directly in domain code |
|
|
33
|
+
| `missing-repository-abstraction` | medium | Domain code calls ORM/SQL/HTTP directly |
|
|
34
|
+
| `missing-domain-event` | low | State transition side effects via direct calls |
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
## Clean Code Review
|
|
40
|
+
Files reviewed: N | Findings: N (High: N, Medium: N, Low: N)
|
|
41
|
+
|
|
42
|
+
### Finding N
|
|
43
|
+
- Severity: high | medium | low
|
|
44
|
+
- Rule: <rule-id>
|
|
45
|
+
- Location: <file>:<line>
|
|
46
|
+
- Problem: <what>
|
|
47
|
+
- Why it matters: <impact>
|
|
48
|
+
- Suggested fix: <action>
|
|
49
|
+
- Refactor example: (optional)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Guardrails
|
|
53
|
+
|
|
54
|
+
- Skip formatting enforced by linters
|
|
55
|
+
- Every finding must cite a specific file and line
|
|
56
|
+
- No refactor demand when framework/business constraints apply
|
|
57
|
+
- No speculative findings — skip if unsure
|
|
58
|
+
- high/medium = mandatory · low = suggestion
|
|
59
|
+
|
|
60
|
+
## Simplicity First
|
|
61
|
+
|
|
62
|
+
- Minimum code that solves the problem. Nothing speculative.
|
|
63
|
+
- No features beyond what was asked.
|
|
64
|
+
- No abstractions for single-use code.
|
|
65
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
66
|
+
- No error handling for impossible scenarios.
|
|
67
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
68
|
+
- The test: would a senior engineer say this is overcomplicated? If yes, simplify.
|
|
69
|
+
|
|
70
|
+
## Surgical Changes
|
|
71
|
+
|
|
72
|
+
- Touch only what you must. Don't improve adjacent code, comments, or formatting.
|
|
73
|
+
- Don't refactor things that aren't broken.
|
|
74
|
+
- Match existing style, even if you'd do it differently.
|
|
75
|
+
- If you notice unrelated dead code, mention it — don't delete it.
|
|
76
|
+
- Remove imports, variables, or functions that **your** changes made unused, not pre-existing ones.
|
|
77
|
+
- The test: every changed line should trace directly to the user's request.
|
|
78
|
+
|
|
79
|
+
## Think Before Coding
|
|
80
|
+
|
|
81
|
+
- State assumptions explicitly. If uncertain, ask.
|
|
82
|
+
- If multiple interpretations exist, present them — don't pick silently.
|
|
83
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
84
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*.{ts,js,tsx,jsx,py,go,java,cs,rb,rs,swift,kt}"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are a Clean Code + DDD review assistant embedded in the editor.
|
|
6
|
+
Apply the rules defined in `_rules.instructions.md` in this same folder.
|
|
7
|
+
|
|
8
|
+
When asked to review code, automatically trigger a full Clean Code + DDD review.
|
|
9
|
+
|
|
10
|
+
Language-specific reminders:
|
|
11
|
+
- **TypeScript/JS**: no `any` hiding intent; branded types for value objects; domain ≠ UI layer
|
|
12
|
+
- **Python**: explicit exceptions; small modules; dataclasses/pydantic for value objects
|
|
13
|
+
- **Go**: explicit error returns; small functions; struct aggregates with exported methods only
|
|
14
|
+
- **Java/Kotlin**: no bloated services; package-per-bounded-context layout
|
|
15
|
+
- **C#**: thin controllers; record types for value objects; no static utility bags
|
|
16
|
+
- **Ruby**: small methods; avoid obscuring meta-programming
|
|
17
|
+
- **Rust**: explicit error types; no `.unwrap()` chains where errors propagate
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "package.json,commitlint.config.cjs,.husky/**,linting/shared/.pre-commit-config.yaml"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are a commit hygiene enforcement assistant.
|
|
6
|
+
Apply all rules defined in `skills/shared/husky-rules.md`.
|
|
7
|
+
|
|
8
|
+
**On every interaction involving git commits, commit messages, or these files, check:**
|
|
9
|
+
|
|
10
|
+
1. Is husky installed? (`node_modules/.bin/husky` must exist)
|
|
11
|
+
- If not → `npm install`
|
|
12
|
+
2. Are hooks registered? (`.git/hooks/commit-msg` and `.git/hooks/pre-commit` must exist)
|
|
13
|
+
- If not → `npm run prepare`
|
|
14
|
+
3. Are hook files executable?
|
|
15
|
+
- If not → `chmod +x .husky/commit-msg .husky/pre-commit`
|
|
16
|
+
|
|
17
|
+
**Commit message format — always enforce:**
|
|
18
|
+
```
|
|
19
|
+
<type>(<scope>): <subject in lowercase, max 72 chars>
|
|
20
|
+
```
|
|
21
|
+
Types: `feat` `fix` `docs` `style` `refactor` `perf` `test` `chore` `revert` `release`
|
|
22
|
+
Scopes: `shared` `copilot` `claude` `cursor` `opencode` `windsurf` `generic` `linting` `python` `typescript` `go` `java` `csharp` `hooks` `deps` `ci` `release`
|
|
23
|
+
|
|
24
|
+
**Never suggest `git commit --no-verify`** — fix the root cause instead.
|
|
25
|
+
|
|
26
|
+
**When a new file type is added**, remind the developer to add a lint-staged entry to `package.json`.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are a Lint Report Analyst embedded in the editor.
|
|
6
|
+
Apply the full prompt defined in `skills/shared/lint-report-prompt.md`.
|
|
7
|
+
|
|
8
|
+
**Trigger phrase:** When the user pastes linting output or asks you to "analyze lint output", "explain linting errors", or "generate a lint report", activate this skill automatically.
|
|
9
|
+
|
|
10
|
+
**What to do:**
|
|
11
|
+
1. Detect the linter and language from the pasted output (Ruff, ESLint, golangci-lint, Checkstyle, PMD, dotnet format).
|
|
12
|
+
2. Parse every finding and translate rule codes into plain-English explanations.
|
|
13
|
+
3. Group findings by severity: Errors → Warnings → Style/Info.
|
|
14
|
+
4. Map violations to the project's Clean Code rule IDs from `_rules.instructions.md` where a clear match exists.
|
|
15
|
+
5. Deduplicate — if the same rule fires 10+ times, list the 3 worst offenders and note the total.
|
|
16
|
+
6. Return the report in exactly this structure:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
## Lint Analysis Report
|
|
20
|
+
|
|
21
|
+
**Language:** <detected> | **Tool:** <linter> | **Files scanned:** N | **Total issues:** N (Errors: N, Warnings: N, Style: N)
|
|
22
|
+
|
|
23
|
+
### Executive Summary
|
|
24
|
+
[2–4 plain-English sentences — no rule code jargon]
|
|
25
|
+
|
|
26
|
+
### Findings by Priority
|
|
27
|
+
|
|
28
|
+
#### Must Fix — Errors (N)
|
|
29
|
+
| File | Line | Code | What It Means | Clean Code Rule |
|
|
30
|
+
|---|---|---|---|---|
|
|
31
|
+
|
|
32
|
+
#### Should Address — Warnings (N)
|
|
33
|
+
| File | Line | Code | What It Means | Clean Code Rule |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
|
|
36
|
+
#### Consider — Style / Info (N)
|
|
37
|
+
| File | Line | Code | What It Means | Clean Code Rule |
|
|
38
|
+
|---|---|---|---|---|
|
|
39
|
+
|
|
40
|
+
### Top Recurring Violations
|
|
41
|
+
| Code | Occurrences | What It Means | Priority |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
|
|
44
|
+
### Prioritised Action Plan
|
|
45
|
+
1. [Must Fix] <concrete action>
|
|
46
|
+
2. [Should Fix] <next most impactful>
|
|
47
|
+
3. ...
|
|
48
|
+
|
|
49
|
+
### Clean Code Rule Mapping
|
|
50
|
+
| Lint Code | Clean Code Rule | Why It Matters |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Omit any section with zero findings.
|
|
55
|
+
If there are no findings: `No linting issues found. Code passes all configured checks.`
|
|
56
|
+
|
|
57
|
+
**Saving the report:**
|
|
58
|
+
If the user's message names a file path (e.g. `reports/2026-04-15/report.md`), write the complete report to that file using the editor's file-creation capability.
|
|
59
|
+
If no path is given, default to `reports/<YYYY-MM-DD>/report.md` (today's date).
|
|
60
|
+
Always create parent directories if they do not exist.
|
|
61
|
+
|
|
62
|
+
**Guardrails:**
|
|
63
|
+
- Do not echo the raw linter message — explain the *impact* in plain English.
|
|
64
|
+
- Do not invent findings not present in the input.
|
|
65
|
+
- Do not suggest disabling rules — suggest fixing the root cause.
|
|
66
|
+
- Severity must match the linter's own severity — do not up-rate or down-rate.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
update-homebrew-tap.py
|
|
4
|
+
Post-release script: compute sha256 for all platforms and push Formula + Cask to homebrew-tap.
|
|
5
|
+
Usage: python3 update-homebrew-tap.py <version> <pat>
|
|
6
|
+
e.g. python3 update-homebrew-tap.py 0.9.1 ghp_xxx
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
import json
|
|
11
|
+
import base64
|
|
12
|
+
import hashlib
|
|
13
|
+
import urllib.request
|
|
14
|
+
|
|
15
|
+
VERSION = sys.argv[1].lstrip("v")
|
|
16
|
+
PAT = sys.argv[2]
|
|
17
|
+
TAG = f"v{VERSION}"
|
|
18
|
+
BASE_URL = f"https://github.com/unrealandychan/rekipedia-releases/releases/download/{TAG}"
|
|
19
|
+
TAP_REPO = "unrealandychan/homebrew-tap"
|
|
20
|
+
|
|
21
|
+
PLATFORMS = {
|
|
22
|
+
"darwin_amd64": f"{BASE_URL}/rekipedia_darwin_amd64.tar.gz",
|
|
23
|
+
"darwin_arm64": f"{BASE_URL}/rekipedia_darwin_arm64.tar.gz",
|
|
24
|
+
"linux_amd64": f"{BASE_URL}/rekipedia_linux_amd64.tar.gz",
|
|
25
|
+
"linux_arm64": f"{BASE_URL}/rekipedia_linux_arm64.tar.gz",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def sha256_url(url):
|
|
30
|
+
print(f" Downloading {url} ...")
|
|
31
|
+
req = urllib.request.Request(url, headers={"User-Agent": "update-tap/1.0"})
|
|
32
|
+
with urllib.request.urlopen(req) as resp:
|
|
33
|
+
data = resp.read()
|
|
34
|
+
return hashlib.sha256(data).hexdigest()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def gh_get_sha(path):
|
|
38
|
+
url = f"https://api.github.com/repos/{TAP_REPO}/contents/{path}"
|
|
39
|
+
req = urllib.request.Request(url, headers={
|
|
40
|
+
"Authorization": f"token {PAT}",
|
|
41
|
+
"Accept": "application/vnd.github.v3+json",
|
|
42
|
+
})
|
|
43
|
+
try:
|
|
44
|
+
with urllib.request.urlopen(req) as resp:
|
|
45
|
+
return json.loads(resp.read())["sha"]
|
|
46
|
+
except Exception:
|
|
47
|
+
return None # file doesn't exist yet
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def gh_put(path, content, sha, message):
|
|
51
|
+
url = f"https://api.github.com/repos/{TAP_REPO}/contents/{path}"
|
|
52
|
+
payload = {
|
|
53
|
+
"message": message,
|
|
54
|
+
"content": base64.b64encode(content.encode()).decode(),
|
|
55
|
+
"committer": {"name": "HermesBot", "email": "bot@rekipedia.dev"},
|
|
56
|
+
}
|
|
57
|
+
if sha:
|
|
58
|
+
payload["sha"] = sha
|
|
59
|
+
data = json.dumps(payload).encode()
|
|
60
|
+
req = urllib.request.Request(url, data=data, method="PUT", headers={
|
|
61
|
+
"Authorization": f"token {PAT}",
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
})
|
|
64
|
+
with urllib.request.urlopen(req) as resp:
|
|
65
|
+
result = json.loads(resp.read())
|
|
66
|
+
return result["commit"]["sha"]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# ── 1. Compute sha256 ──────────────────────────────────────────────────────────
|
|
70
|
+
print(f"Computing sha256 for {TAG}...")
|
|
71
|
+
shas = {p: sha256_url(u) for p, u in PLATFORMS.items()}
|
|
72
|
+
for p, s in shas.items():
|
|
73
|
+
print(f" {p}: {s}")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# ── 2. Formula (Formula/rekipedia.rb) ────────────────────────────────────────
|
|
77
|
+
formula = f"""# typed: false
|
|
78
|
+
# frozen_string_literal: true
|
|
79
|
+
|
|
80
|
+
class Rekipedia < Formula
|
|
81
|
+
desc "Agentic repo-to-wiki — scan any codebase into a structured knowledge base"
|
|
82
|
+
homepage "https://github.com/unrealandychan/rekipedia"
|
|
83
|
+
version "{VERSION}"
|
|
84
|
+
license "MIT"
|
|
85
|
+
|
|
86
|
+
on_macos do
|
|
87
|
+
if Hardware::CPU.intel?
|
|
88
|
+
url "{PLATFORMS['darwin_amd64']}"
|
|
89
|
+
sha256 "{shas['darwin_amd64']}"
|
|
90
|
+
end
|
|
91
|
+
if Hardware::CPU.arm?
|
|
92
|
+
url "{PLATFORMS['darwin_arm64']}"
|
|
93
|
+
sha256 "{shas['darwin_arm64']}"
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
on_linux do
|
|
98
|
+
if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
|
|
99
|
+
url "{PLATFORMS['linux_amd64']}"
|
|
100
|
+
sha256 "{shas['linux_amd64']}"
|
|
101
|
+
end
|
|
102
|
+
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
|
|
103
|
+
url "{PLATFORMS['linux_arm64']}"
|
|
104
|
+
sha256 "{shas['linux_arm64']}"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def install
|
|
109
|
+
bin.install "rekipedia"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
test do
|
|
113
|
+
system "#{{bin}}/rekipedia", "--version"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
print("\nPushing Formula/rekipedia.rb ...")
|
|
119
|
+
sha = gh_get_sha("Formula/rekipedia.rb")
|
|
120
|
+
commit = gh_put("Formula/rekipedia.rb", formula, sha, f"chore: bump rekipedia to {TAG}")
|
|
121
|
+
print(f" ✓ commit {commit[:7]}")
|
|
122
|
+
|
|
123
|
+
print(f"\n✅ Homebrew tap updated to {TAG}")
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Go CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [feat/golang-rewrite, main]
|
|
6
|
+
paths: ['go/**']
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
paths: ['go/**']
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: Test & Build
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
defaults:
|
|
16
|
+
run:
|
|
17
|
+
working-directory: go
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-go@v5
|
|
23
|
+
with:
|
|
24
|
+
go-version: '1.25'
|
|
25
|
+
cache-dependency-path: go/go.sum
|
|
26
|
+
|
|
27
|
+
- name: Install CGO deps
|
|
28
|
+
run: sudo apt-get install -y gcc gcc-aarch64-linux-gnu
|
|
29
|
+
|
|
30
|
+
- name: go mod tidy check
|
|
31
|
+
run: |
|
|
32
|
+
go mod tidy
|
|
33
|
+
git diff --exit-code go.sum || (echo "go.sum not up to date — run 'go mod tidy'" && exit 1)
|
|
34
|
+
|
|
35
|
+
- name: go vet
|
|
36
|
+
run: go vet ./...
|
|
37
|
+
|
|
38
|
+
- name: go test
|
|
39
|
+
run: go test ./... -v -count=1 -timeout 120s
|
|
40
|
+
|
|
41
|
+
- name: Build binary (smoke test)
|
|
42
|
+
run: |
|
|
43
|
+
CGO_ENABLED=1 go build -ldflags "-s -w" -o /tmp/rekipedia ./cmd/rekipedia
|
|
44
|
+
/tmp/rekipedia --version
|
|
45
|
+
/tmp/rekipedia --help
|
|
46
|
+
/tmp/rekipedia scan --help
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Go Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: goreleaser
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
packages: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-go@v5
|
|
22
|
+
with:
|
|
23
|
+
go-version: '1.25'
|
|
24
|
+
cache-dependency-path: go/go.sum
|
|
25
|
+
|
|
26
|
+
- name: Run goreleaser
|
|
27
|
+
uses: goreleaser/goreleaser-action@v6
|
|
28
|
+
with:
|
|
29
|
+
version: ~> v2
|
|
30
|
+
args: release --clean
|
|
31
|
+
workdir: go
|
|
32
|
+
env:
|
|
33
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
|
34
|
+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
|
35
|
+
|
|
36
|
+
- name: Update Homebrew tap (Formula fallback)
|
|
37
|
+
if: always()
|
|
38
|
+
run: |
|
|
39
|
+
TAG=${GITHUB_REF#refs/tags/}
|
|
40
|
+
VERSION=${TAG#v}
|
|
41
|
+
echo "Updating homebrew tap for $TAG ..."
|
|
42
|
+
python3 .github/scripts/update-homebrew-tap.py "$VERSION" "${{ secrets.HOMEBREW_TAP_TOKEN }}"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Python Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
name: Build & publish to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write # required for trusted publishing (OIDC)
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.12'
|
|
22
|
+
|
|
23
|
+
- name: Install build tools
|
|
24
|
+
run: pip install hatch
|
|
25
|
+
|
|
26
|
+
- name: Build distribution
|
|
27
|
+
run: hatch build
|
|
28
|
+
|
|
29
|
+
- name: Publish to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
# Uses PyPI Trusted Publishing (OIDC) — no API token needed.
|
|
32
|
+
# Configure at: https://pypi.org/manage/project/rekipedia/settings/publishing/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.venv/
|
|
6
|
+
venv/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.coverage
|
|
10
|
+
htmlcov/
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
|
|
13
|
+
# uv
|
|
14
|
+
.uv/
|
|
15
|
+
|
|
16
|
+
# Environment
|
|
17
|
+
.env
|
|
18
|
+
|
|
19
|
+
# npm
|
|
20
|
+
node_modules/
|
|
21
|
+
*.tgz
|
|
22
|
+
|
|
23
|
+
# macOS
|
|
24
|
+
.DS_Store
|
|
25
|
+
|
|
26
|
+
# close-wiki store (for if this repo is scanned)
|
|
27
|
+
.close-wiki/store.db
|