Commit Graph

293 Commits

Author SHA1 Message Date
Dominik Seemann ec669c1d10
Merge pull request #31 from salestech-group/fix/24-externalize-remaining-backend-log-strings
fix(i18n): externalize remaining chinese backend log strings
2026-05-08 11:08:56 +02:00
Dominik Seemann 729a51ea82
Merge pull request #29 from salestech-group/fix/18-graphiti-loud-embedding-failures
fix(graphiti): surface embedding failures and document ollama embedder
2026-05-08 11:08:22 +02:00
Dominik Seemann d3b0b65bda
Merge pull request #28 from salestech-group/docs/i18n-12-readme-tagline-and-assets
docs(i18n): translate readme tagline and rename chinese assets
2026-05-08 11:07:19 +02:00
Dominik Seemann d53f3110dd
Merge pull request #27 from salestech-group/chore/i18n-10-e2e-english-verification
chore(i18n): add e2e english verification spec, audit, and report
2026-05-08 11:06:46 +02:00
Dominik Seemann 777302bc61
Merge pull request #22 from salestech-group/docs/i18n-9-translate-frontend-comments
docs(i18n): translate chinese comments in frontend src to english
2026-05-08 11:03:59 +02:00
Dominik Seemann e60a5a93d3 fix(i18n): externalize remaining chinese backend log strings
Replace the last hard-coded Chinese log/print strings in the Flask
graph API, OASIS profile generator, and retry utility with calls to
the existing t() helper, completing the backend i18n coverage started
by ticket #6 so EN-locale operators see English logs end to end.

Adds nine entries to locales/{en,zh}.json: log.graph_api.m027-m029,
log.profile_generator.m024-m025, and a new log.retry.m001-m004
sub-namespace for the retry utility.

Closes #24
2026-05-07 22:40:18 +00:00
Dominik Seemann b8de81a539 fix(graphiti): surface embedding failures and document ollama embedder
Replace the silent placeholder-UUID fallback in
_GraphNamespace.add_batch with logger.exception(...) + raise so
embedder misconfiguration (404 unknown model, connection refused, etc.)
fails the surrounding graph-build Task with a visible error instead of
producing a Task that looks completed while the graph stays empty.

Document the existing-but-undocumented Ollama embedder configuration
in .env.example, CLAUDE.md, README.md, and docker-compose.yml.
mxbai-embed-large is the recommended local model because its 1024-dim
output matches Graphiti's default EMBEDDING_DIM. Adds a curl smoke
test to verify embedder reachability before the first graph build.

No new env var or provider literal: Ollama is reached through the
existing openai-provider branch by setting EMBEDDING_BASE_URL,
EMBEDDING_API_KEY, and EMBEDDING_MODEL.

Closes #18
2026-05-07 20:39:42 +00:00
Dominik Seemann 8442a58f9d docs(i18n): translate readme tagline and rename chinese assets
Replace the chinese tagline on README.md and README-EN.md with the
existing english subtitle (collapsing the duplicate stack), and switch
the package.json and backend/pyproject.toml description fields to
english so the project's metadata surface no longer surprises
non-chinese readers.

Rename nine chinese-named static image files under static/image/ to
ASCII slugs (six screenshots, two video covers, the QQ-group image)
via git mv so rename history is preserved, and update every <img src>
in README.md, README-EN.md, and README-ZH.md to the new paths. The
chinese body text of README-ZH.md is preserved by design.

A ripgrep scan for chinese characters in README.md and README-EN.md
(excluding the language-switcher line) now returns zero matches,
satisfying the ticket's acceptance criteria.

Closes #12
2026-05-07 19:39:30 +00:00
Dominik Seemann 348140859d chore(i18n): add e2e english verification spec, audit, and report
Spec under .kiro/specs/i18n-e2e-english-verification/ defines a read-only
verification pipeline that classifies every CJK match in backend/app,
frontend/src, and locales/en.json into deliberate / gap / non-applicable /
review-needed, plus a four-class follow-up grouping (frontend ui strings,
backend log strings, backend prompt-label strings, permanent ci guard).

The captured baseline run at audit/9dcaecd2.../ shows 2916 matches: 237
gaps actionable in follow-up issues #23 #24 #25 #26 (filed by this run),
2299 deliberate (covered by issue #7), and 380 review-needed soft signals.
The verification report comment is posted on issue #10. Locale catalogues
are at full key parity (953/953) and locales/en.json is CJK-clean.

The spec is verification-only: production source under backend/app,
frontend/src, and locales is intentionally untouched. Live UI and
docker-compose walkthrough items in the issue checklist are reported as
manual-pending, with reproduction steps and a re-runnable audit script.

Closes #10
2026-05-07 18:44:13 +00:00
Dominik Seemann 9dcaecd2d2 docs(i18n): translate chinese comments in frontend src to english
Translate chinese developer comments in frontend/src/ to english so
non-chinese-reading maintainers can understand intent without translation
tooling. Pure documentation cleanup with no runtime behavior changes.

Twenty files updated across views, components, api services, App.vue, and
pendingUpload.js. Region-eligibility matrix from .kiro/specs/i18n-
frontend-comments/design.md drives every edit:

- Translate `//`, `/* */`, JSDoc, and Vue `<!-- -->` template comments.
- Drop comments that merely restate the code per dev-guidelines.md.
- Translate console.error/warn/log argument strings (developer-facing).
- Append (#9) to the single chinese-content TODO in views/Process.vue.

Five files retain documented chinese string literals per requirements 1.5
and 4.4: hardcoded UI text and error fallbacks (Process.vue, Step3Simulation.vue),
backend-format regex patterns and i18n-keyed UI labels (Step4Report.vue),
backend stage-key matchers (Step2EnvSetup.vue), and LLM prompt templates
sent to a chinese-tuned model (Step5Interaction.vue). Translating any of
these would either be out of scope (UI strings belong in /locales/*.json)
or would change runtime behavior.

Verification: `rg '[\x{4e00}-\x{9fff}]' frontend/src/` returns 5 documented
files; `npm run build` exits 0 with the same Vite output as before.

Closes #9
2026-05-07 17:42:05 +00:00
Dominik Seemann 063b7fb17d
Merge pull request #21 from salestech-group/fix/i18n-8-backfill-zh-json
fix(i18n): backfill english-only entries in zh.json
2026-05-07 17:41:55 +02:00
Dominik Seemann 0a65edfa46 fix(i18n): backfill english-only entries in zh.json
translate nine user-facing english values (step3/step4/step5 waiting
states, step5 interactive tools and report-agent chat panel, graph
panel labels) plus the user-visible step 2 log line `log.prepareTaskId`
to natural chinese, so chinese-locale users no longer see english text
mixed into the chinese ui.

`home.heroDescBrand` is intentionally left as the literal `MiroFish`
because it is a brand name. `log.prepareTaskId` was translated rather
than kept english because it is rendered into the in-ui log panel via
`Step2EnvSetup.vue:801` and every surrounding `log.*` value in zh.json
is already translated; the leading two-space indent, the `└─`
continuation glyph, and the `{taskId}` placeholder are preserved.

en.json and zh.json key sets remain identical
(`paths(scalars)` diff is empty); no frontend code is changed.

Closes #8
2026-05-07 15:32:30 +00:00
Dominik Seemann b15dc2ea2c
Merge pull request #19 from salestech-group/feat/i18n-6-externalize-backend-logs
feat(i18n): externalize chinese log and api response strings
2026-05-07 17:09:38 +02:00
Dominik Seemann 4f6d5d19a8
Merge pull request #17 from salestech-group/feat/i18n-5-translate-report-agent-prompts
feat(i18n): translate report_agent react prompts to english
2026-05-07 17:08:22 +02:00
Dominik Seemann 0f3ba443dd
Merge pull request #16 from salestech-group/feat/i18n-4-translate-sim-config-prompts
feat(i18n): translate simulation_config_generator prompts to english
2026-05-07 17:07:52 +02:00
Dominik Seemann 1632aaf5fa
Merge pull request #14 from salestech-group/feat/2-translate-ontology-generator-prompts
feat(i18n): translate ontology_generator prompts to english
2026-05-07 17:06:59 +02:00
Dominik Seemann 74997fd088 feat(i18n): externalize chinese log and api response strings
Extract every Chinese string inside backend logger.{info,warning,error,
debug,exception} calls and inside user-facing jsonify({"error|message":
...}) responses across the listed in-scope modules into
locales/{en,zh}.json under nested namespaces (log.<module>.*,
api.{error,message}.<scope>.*). Locale dictionaries stay structurally
identical; the existing flat frontend-facing keys at log.* / api.* are
left untouched. The locale helper (backend/app/utils/locale.py) now
emits a single deduplicated mirofish.locale warning per (locale, key)
pair when a translation is missing instead of silently returning the
raw key, so unknown keys are visible without crashing requests or
background tasks. A repo-root scripts/check_i18n_logs.py verifier
performs an AST-aware source scan for residual Chinese inside the
in-scope logger/jsonify calls and a recursive parity diff between
en.json and zh.json — both modes pass.

Why: backend logs and API errors previously emitted Chinese-only
strings, leaving English-speaking operators with unreadable log
aggregator output and API consumers with locale-mismatched error
messages. The t() helper and per-thread set_locale propagation already
existed; this change makes every backend caller route through them.

Closes #6
2026-05-07 13:52:22 +00:00
Dominik Seemann 22a3ca7af5 feat(i18n): translate report_agent react prompts to english
translate every llm-facing string-literal in
backend/app/services/report_agent.py — the four tool-description
constants, the plan/section/chat system+user prompts, the react loop
templates, the inline messages re-injected during the section and chat
loops, the _execute_tool error returns, and the plan_outline default and
fallback outline content. preserve every {interpolation} token, the
literal final answer: trigger and <tool_call> xml tag, the four primary
tool names, and all three get_language_instruction() postfix call sites.
also switch the unused-tools join separator from "、" to ", " so it
renders naturally inside the now-english react templates.

removes the chinese language bias that the english postfix alone could
not overcome — under accept-language: en the report agent now produces
english-flavoured analytical reports and chat replies; under
accept-language: zh the postfix continues to steer the model into
chinese with no semantic delta. logger calls (#6) and docstrings or
comments (#7) are deliberately untouched.

Closes #5
2026-05-07 12:49:23 +00:00
Dominik Seemann 6c2a412196 feat(i18n): translate simulation_config_generator prompts to english
translate the three llm prompt blocks plus the two prompt-feeding helpers
(_build_context, _summarize_entities) in
backend/app/services/simulation_config_generator.py from chinese to english.
the chinese base prompts were biasing the model toward chinese structure
and lexical choice for content, narrative_direction, hot_topics, and
reasoning fields even when accept-language was en, because
get_language_instruction() only steers the response language as a
postfix.

translation is in-place and preserves every functional contract: the
json output schema for all three prompts, every variable interpolation,
the per-entity-type heuristic ranges in the agent-config prompt, the
trailing english IMPORTANT directives that lock poster_type to
PascalCase and stance to {supportive,opposing,neutral,observer}, and
all three get_language_instruction() postfix call sites. the two
default-path reasoning literals are translated to locale-agnostic
english so generation_reasoning no longer mixes chinese and english on
the failure path.

logger calls, docstrings, and inline comments are intentionally left
chinese (out of scope; covered by issues #6 and #7). public api,
dataclasses, class constants, and the SimulationParameters payload
shape are unchanged.

Closes #4
2026-05-07 11:43:47 +00:00
Dominik Seemann 080683295d feat(i18n): translate ontology_generator prompts to english
translate the system prompt constant and the user-message template in
backend/app/services/ontology_generator.py from chinese to english.
the chinese base prompt was biasing the model toward chinese structure
and word choice even when accept-language was en, leaving ontology
descriptions and analysis_summary fields chinese-flavoured.

translation is in-place and preserves every functional contract: the
json output schema, the entity-type and relationship-type taxonomies
verbatim, the reserved-attribute-name list, the count and length
constraints, and all f-string interpolations. the
get_language_instruction() postfix call site and the trailing english
identifier-format directive are unchanged, so zh and other locales
continue to receive locale-appropriate descriptions.

logger calls, docstrings, and inline comments are intentionally left
in chinese — they are owned by issues #6 and #7.

a small static guard script (backend/scripts/test_ontology_prompts_no_cjk.py)
ast-parses the module and asserts zero cjk in the system prompt and in
every string literal of _build_user_message except the docstring, so
the regression cannot reappear silently.

Closes #2
2026-05-07 09:40:27 +00:00
Dominik Seemann 3b17c0b9ba
Merge pull request #13 from salestech-group/feat/1-finalize-graphiti-neo4j-migration
feat(graphiti): finalize neo4j migration with provider switch
2026-05-07 10:51:05 +02:00
Dominik Seemann 2badf568e7 feat(graphiti): finalize neo4j migration with provider switch
Adds a Neo4j service to docker-compose so `docker compose up -d` works
on a clean checkout, and unhardcodes Graphiti's LLM/embedder so the
documented default provider (Qwen via Dashscope) actually works.

- docker-compose: neo4j:5-community service with cypher-shell
  healthcheck, named volumes, and `depends_on: service_healthy` on the
  app container; in-Docker NEO4J_URI override leaves the host-mode
  default untouched.
- Config: new GRAPHITI_LLM_PROVIDER (openai|gemini, default openai) plus
  optional EMBEDDING_API_KEY / EMBEDDING_BASE_URL that fall back to the
  chat LLM credentials.
- graphiti_adapter: provider switch inside the singleton factory with
  lazy per-provider imports; Gemini path is preserved exactly. The
  no-op `_GeminiReranker` becomes a provider-agnostic
  `_PassthroughReranker`, still injected explicitly so Graphiti does
  not fall back to its OpenAI-only default reranker.
- Drop the ignored `reranker=` kwarg from `_GraphNamespace.search` and
  the misleading callers in `zep_tools.py` and
  `oasis_profile_generator.py`.
- Refresh `.env.example` to mirror the README env section.

Spec, requirements, and design under
`.kiro/specs/graphiti-neo4j-finalize/`.

Closes #1
2026-05-07 08:43:36 +00:00
Dominik Seemann bb81a48727 Create done.md 2026-05-07 10:14:46 +02:00
Dominik Seemann d4f1a9aee0 chore(claude): bootstrap kiro steering files (Step 5)
Add .kiro/steering/ as persistent project memory for CC-SDD / Kiro
workflows. Three core files (product, tech, structure) capture
purpose, stack, and organization patterns; three custom files
(database, api-standards, error-handling) pin the load-bearing
project-specific conventions:

- group_id isolation and the Graphiti adapter / event-loop singleton
- {success, data|error} envelope and the Task polling contract
- reasoning-model output stripping and the retry_with_backoff helper

Files focus on patterns and decisions, not catalogs, per the
steering-principles "golden rule".
2026-05-07 09:39:38 +02:00
Dominik Seemann 8144290fc6 feat(claude): add CC-SDD planning workflow and /plan command (Step 4)
Adopt CC-SDD (Kiro) as the project's spec-driven planning tool, with
plans persisted in .kiro/specs/ and a checkpoint after every task
(strictest cadence — no code without an approved plan).

CC-SDD install (via npx cc-sdd@latest --claude --lang en):
- .kiro/settings/rules/: EARS format, gap-analysis, design and
  requirements review gates, design discovery, tasks generation,
  steering principles, parallel-task analysis.
- .kiro/settings/templates/: specs (init, requirements, design, tasks,
  research) and steering (product/tech/structure plus optional
  api-standards/auth/db/deployment/error-handling/security/testing).
- .claude/commands/kiro/: 11 Kiro slash commands — spec-init,
  spec-requirements, spec-design, spec-tasks, spec-impl, spec-status,
  steering, steering-custom, validate-gap, validate-design,
  validate-impl.

Local additions:
- .claude/commands/plan.md: /plan [task] wrapper that picks up the task
  from $ARGUMENTS or a single .ticket/<n>.md snapshot, walks the Kiro
  flow (steering -> spec-init -> spec-requirements -> validate-gap ->
  spec-design -> validate-design -> spec-tasks) and stops for human
  approval after each artefact. Refuses "just code it" requests.
- .claude/hooks/session_start.sh: extend to print active tickets
  (.ticket/*.md) and open specs (.kiro/specs/*/) with phase from
  spec.json, alongside the existing branch/state line.

Documentation: .claude/onboarding/step4_workflow/01_tool_decision.md
2026-05-06 18:01:41 +02:00
Dominik Seemann 52f78d9fe3 feat(claude): add /ticket and /ticket-list commands for GitHub Issues (Step 3)
Adapt the Notion onboarding prompt — originally Jira/MCP-oriented — to
this project's actual issue tracker (GitHub at
salestech-group/MiroFish) using the gh CLI.

Slash commands (.claude/commands/):
- /ticket <number>: fetch a GitHub issue via gh, self-assign, try to
  add an in-progress label (skips silently if the label doesn't exist),
  and snapshot the issue (frontmatter + body) to .ticket/<n>.md so
  later planning steps can read the description without refetching.
- /ticket-list: interactive overview of issues; asks for filters
  (open/closed, status, assignee, milestone, labels) and runs a single
  gh issue list with the answers, rendering a compact markdown table.

Workspace:
- .ticket/repo.md declares the target repo (GitHub equivalent of the
  Jira "board.md" referenced in the prompt).
- .gitignore: ignore .ticket/* except repo.md and .gitkeep so cached
  ticket markdowns stay local.

Settings:
- Allow-list gh issue view/list/edit/comment, gh repo view,
  gh pr view/list, gh auth status to avoid permission prompts.

Documentation: .claude/onboarding/step3_planning/01_ticket_sync.md
2026-05-06 17:55:42 +02:00
Dominik Seemann 76f719e760 chore(claude): expand permissions and add session/env-guard hooks (Step 2)
Permissions:
- Allow npm run/test/install, uv run/sync, docker (compose), and the
  common read-only/staging git commands so routine work doesn't trigger
  permission prompts.
- Deny Read/Write/Edit on uploads/ and .codegraph/ (auto-generated and
  user-data paths) in addition to the existing .env*/secrets/ blocks.

Hooks:
- SessionStart: print branch, ahead/behind vs upstream, and working-tree
  state at session start so context is visible immediately.
- PreToolUse (Read|Write|Edit|Bash|NotebookEdit): defence-in-depth
  guard that intercepts attempts to access .env / secrets/ paths (and
  bash commands targeting them) with a friendly, logged refusal on top
  of the permissions.deny rules.

PostToolUse formatter is intentionally skipped — the project has no
configured formatter (per the Step 1 conventions decision).
The Stop hook (quality gate) will be configured in Step 6.

Documentation: .claude/onboarding/step2_setup/01_settings_analysis.md
2026-05-06 17:44:16 +02:00
Dominik Seemann 9a77b5921d docs: update CLAUDE.md and resolve README merge conflicts (Step 1)
Bring repo docs in line with the Graphiti+Neo4j migration and prepare
the codebase for Spec-Driven Development.

CLAUDE.md:
- Promote Neo4j + Graphiti to primary memory/graph layer; mark Zep
  Cloud as deprecated / compat-only.
- Document the full env-var surface: NEO4J_*, EMBEDDING_MODEL, optional
  LLM_BOOST_* block.
- Codify must-respect implementation rules (Task model for long ops,
  reasoning-output stripping, simulation IPC, subprocess cleanup,
  startup recovery, per-project group_id isolation, chat prefix
  injection).
- Note i18n (vue-i18n + /locales/) and Docker prerequisite for dev.

README.md / README-EN.md / README-ZH.md:
- Resolve unresolved merge-conflict markers in README.md left over from
  the feat/graphiti-neo4j-migration merge (file was broken Markdown).
- Lead with Docker as the recommended deployment path; keep source
  install as a documented alternative.
- Replace Zep env vars with NEO4J_URI / NEO4J_USER / NEO4J_PASSWORD /
  EMBEDDING_MODEL across all three READMEs.
- Add optional LLM_BOOST_* block with omit-if-unused note.
- Fix language-switcher links between the three READMEs.

.claude/onboarding/step1_codebase/:
- Document repo analysis, CLAUDE.md conventions decisions, and README
  resolution choices.
2026-05-06 17:38:44 +02:00
Dominik Seemann 44eb4588bf chore(claude): set up workspace rules and code conventions (Step 0)
Bootstrap Claude Code Spec-Driven Development:
- .claude/settings.json: allow safe bash (cd, ls, find, cat, mkdir),
  deny .env/secrets and destructive git/rm commands
- .claude/rules/: markdown, file-paths, commits, error-handling,
  dev-guidelines (mirrors Salestech Products Development Guidelines)
- .claude/onboarding/step0_preparation/01_code_conventions.md:
  document the configuration applied
- .gitignore: track project-level .claude/ config; keep
  settings.local.json and .codegraph/ ignored
2026-05-06 17:22:09 +02:00
stg 62648289d1 Merge remote-tracking branch 'abhiyadav2345/feat/graphiti-neo4j-migration' 2026-05-05 15:03:47 +02:00
666ghj fa0f6519b1 docs: rename README-EN.md to README.md as default English documentation 2026-04-02 16:52:29 +08:00
666ghj 0e9420e0f8 docs: rename README.md to README-ZH.md for Chinese documentation 2026-04-02 16:52:29 +08:00
BaiFu 7d07fb7f03
Merge pull request #440 from Ghostubborn/fix/security-deps
fix(security): 修复前端 3 个高危依赖漏洞
2026-04-02 15:17:46 +08:00
ghostubborn 223b283da7 fix(security): upgrade axios, rollup, picomatch to fix 3 high severity vulnerabilities 2026-04-02 15:00:33 +08:00
BaiFu af71244974
Merge pull request #428 from Ghostubborn/feat/i18n
feat(i18n): 添加多语言切换功能,支持中英文
2026-04-02 14:27:04 +08:00
ghostubborn ed465908db fix(i18n): set HTML lang attribute before Vue mounts via inline script 2026-04-02 14:21:09 +08:00
ghostubborn 65df257e19 chore(deps): upgrade vue-i18n from v9 to v11 2026-04-02 14:20:50 +08:00
ghostubborn f2404903d6 fix(i18n): validate Accept-Language header against registered locales 2026-04-02 14:20:15 +08:00
ghostubborn 2421010fe1 fix(i18n): fix English workflow desc font size with correct CSS selectors 2026-04-01 19:11:22 +08:00
ghostubborn 3929c3ade2 fix(i18n): further shorten English metrics and improve workflow layout 2026-04-01 19:07:19 +08:00
ghostubborn 21922da6cc fix(i18n): improve English layout for homepage left-pane and report title
- Add sans-serif font for English left-pane (status, workflow sections)
- Shorten English workflow step descriptions
- Reduce English report title font-size from 36px to 28px
2026-04-01 19:04:38 +08:00
ghostubborn c6cafdd532 fix(i18n): translate world1/world2 platform labels in interview tool display 2026-04-01 18:38:22 +08:00
ghostubborn 5072a2eaa8 feat(i18n): replace Chinese UI text in Step4Report.vue render functions
Only UI display text is replaced. Regex parsing patterns are kept as-is
since they match the backend output format.
2026-04-01 18:35:18 +08:00
ghostubborn 6db3f98a48 fix(i18n): fix English homepage layout with proper font and shorter copy
- Use sans-serif font for English titles, descriptions and navbar
- Shorten English hero text to avoid overflow
- Fix :global() scoped CSS issue that was setting root font-size to 3.5rem
- Use separate unscoped style block for html[lang] selectors
2026-04-01 18:04:05 +08:00
ghostubborn 24e9bee5be feat(i18n): replace all user-visible Chinese logger messages in zep_tools.py
These are shown to users via ConsoleLogger in the report page.
2026-04-01 17:46:39 +08:00
ghostubborn e79569ab4f feat(i18n): replace all user-visible Chinese in report_agent.py
Covers ReportLogger message fields and logger messages shown via ConsoleLogger.
2026-04-01 17:44:52 +08:00
ghostubborn 1d358fc492 feat(i18n): replace expand/collapse Chinese text in Step4Report.vue 2026-04-01 17:44:45 +08:00
666ghj e3350a919d fix(graph): enforce PascalCase for entity names and SCREAMING_SNAKE_CASE for edge names in ontology validation 2026-04-01 17:42:27 +08:00
ghostubborn 380e456d41 fix(i18n): replace hardcoded Chinese stage names in simulation prepare SSE 2026-04-01 17:31:00 +08:00
ghostubborn 3a8451c119 feat(i18n): replace remaining hardcoded Chinese in frontend addLog calls 2026-04-01 17:21:55 +08:00