Skip to content

feat: set up nabledge-1.x knowledge generation infrastructure (#189)#190

Open
kiyotis wants to merge 16 commits intomainfrom
189-setup-nabledge-1x-infra
Open

feat: set up nabledge-1.x knowledge generation infrastructure (#189)#190
kiyotis wants to merge 16 commits intomainfrom
189-setup-nabledge-1x-infra

Conversation

@kiyotis
Copy link
Contributor

@kiyotis kiyotis commented Mar 13, 2026

Closes #189

Approach

Document the symlink setup process for Nablarch 1.x documentation as the first step toward enabling kc.sh gen 1.4/1.3/1.2. Nablarch 1.x docs are not on GitHub, so developers must create symlinks from local directories into the expected paths under .lw/nab-official/.

Tasks

  • Add step 3 to README.md documenting the v1.x symlink setup process
  • Add step 10 to setup.sh checking for v1.x symlinks and printing setup instructions

Remaining work (same branch / follow-up commits)

  • Create symlinks: .lw/nab-official/v1.4/1.4_maintain, .lw/nab-official/v1.3/1.3_maintain, .lw/nab-official/v1.2/1.2_maintain
  • Extend knowledge-creator to accept --version 1.4, 1.3, 1.2 (run.py choices, kc.sh validation)
  • Create catalog files: .cache/v1.4/catalog.json, .cache/v1.3/catalog.json, .cache/v1.2/catalog.json
  • Create mapping files: mappings/v1.4.json, mappings/v1.3.json, mappings/v1.2.json
  • Create skill structures: .claude/skills/nabledge-1.4/, .claude/skills/nabledge-1.3/, .claude/skills/nabledge-1.2/
  • Add E2E tests for v1.4/v1.3/v1.2 (same assertions as v5/v6)
  • Verify kc.sh gen 1.4 --dry-run completes without error

Success Criteria Check

Criterion Status Evidence
Symlinks exist for v1.4/1.3/1.2 Not Met Pending manual symlink creation (blocked by /mnt/* permission)
knowledge-creator accepts --version 1.4/1.3/1.2 Not Met Pending implementation
kc.sh passes 1.x versions correctly Not Met Pending implementation
Catalog files created Not Met Pending implementation
Mapping files created Not Met Pending implementation
Skill structures created Not Met Pending implementation
E2E tests cover v1.4/v1.3/v1.2 Not Met Pending implementation
kc.sh gen 1.4 --dry-run passes Not Met Pending implementation
README and setup.sh document symlink process Met README.md step 3, setup.sh step 10

Generated with Claude Code

@kiyotis kiyotis force-pushed the 189-setup-nabledge-1x-infra branch from 99bd3c1 to c671380 Compare March 13, 2026 05:08
@kiyotis kiyotis force-pushed the 189-setup-nabledge-1x-infra branch from 566501f to c37a079 Compare March 13, 2026 07:24
kiyotis and others added 10 commits March 13, 2026 17:11
…on (#189)

- Add README section explaining manual symlink setup for v1.4/1.3/1.2 docs
- Add setup.sh step 10 to check and report 1.x symlink status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Security restrictions prevent Claude Code from creating symlinks outside
the repository, so the instructions now show direct shell commands for
the user to run rather than asking Claude Code to do it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add _rst_doc_root() helper so that v1.4/1.3/1.2 docs under
{version}_maintain/ are handled separately from v5/v6 which
use nablarch-document/ja/. Affects run.py (version choices),
step1_list_sources, step2_classify, and generate_expected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add expected/gen_state fixtures for v1.4, v1.3, v1.2 and extend
version_fixture params. Tests will pass once mapping files are
finalized.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add minimal .claude/skills/nabledge-1.{4,3,2}/ directory structures
and .cache/v1.{4,3,2}/catalog.json stubs for pipeline output targets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Survey all RST file counts per directory, identify gaps in current
v1.4.json mapping, and propose improvements with rationale.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add section 10 to 1.4-mappings.md listing all 338 RST files with
their type/category from current v1.4.json, including fallback
indicators and 7 unmapped files under sample/portal/src/source/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kiyotis kiyotis force-pushed the 189-setup-nabledge-1x-infra branch from c37a079 to 48e1f34 Compare March 13, 2026 08:14
{
"repo": "local",
"branch": "local",
"commit": ""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svnなんですがコミットハッシュのような値を取れますか?
svnコマンドが必要であればsetup.shにインストールを追加して私に教えてください。setup.shを実行します。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認しました。

v1.4 は SVN リポジトリです。svn コマンドがなくても、Python 標準ライブラリの sqlite3 を使って .svn/wc.db からリビジョン番号を取得できることを確認しました。現在のリビジョンは 29166 です。

import sqlite3
conn = sqlite3.connect(".svn/wc.db")
cursor = conn.cursor()
cursor.execute("SELECT revision FROM NODES WHERE local_relpath = '' LIMIT 1")
print(cursor.fetchone()[0])  # 29166

ただし、svn コマンドのインストールについては以下の点を確認させてください:

  1. SQLite 読み取り方式(追加インストール不要): Python sqlite3 で .svn/wc.db を読み取る方式は実装可能です。ただしこれは非公式の内部実装に依存するアプローチです
  2. svn コマンド方式: より正式な方法ですが、svn のインストールが必要です

v1.4 の catalog.json では現在 commit フィールドが空文字で、ソース変更検知(kc regen)には使用していません。SVN リビジョン取得の実装は今回の PR スコープ外になりますが、必要でしょうか?

Co-Authored-By: Claude (jp.anthropic.claude-sonnet-4-6) noreply@anthropic.com

Copy link
Contributor Author

@kiyotis kiyotis Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issueのスコープを確認してPRタイトル見直してください。

svnコマンドにしてください。WSL2だとsetup.shでの実現が難しいですか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

setup.shsubversion を追加しました(apt-get install の対象に追加)。

PR タイトルも見直しました。変更内容はドキュメントだけでなく setup.sh・catalog.json・mapping files・skill 構造・run.py・テストを含む infrastructure 全体のセットアップのため、docs: から feat: に変更しました:

feat: set up nabledge-1.x knowledge generation infrastructure (#189)

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

setup.sh の apt-get install に subversion を追加しました。WSL2 (Ubuntu) では apt-get install subversion で問題なくインストールできます。

PR タイトルを feat: set up nabledge-1.x knowledge generation infrastructure (#189) に変更しました。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `fw/introduction.rst` | about | about-nablarch | fallback: `fw/` |
| `fw/overview_of_NAF.rst` | about | about-nablarch | fallback: `fw/` |
| `fw/platform.rst` | about | about-nablarch | fallback: `fw/` |
| `fw/reader/DatabaseRecordReader.rst` | component | libraries | fallback: `fw/` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readerはv6/v5だとマッピングどうなってますか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認しました。

v5/v6 における reader 関連のマッピングは以下の通りです:

  • v5/v6 のカタログには reader ファイルが1件のみ存在します:
    • application_framework/batch/jsr352/feature_details/database_reader.rstprocessing-pattern | jakarta-batch
    • これは JSR352 バッチの処理パターンとして説明されているためこのマッピングになっています

一方、v1.4 の fw/reader/ ディレクトリは「データリーダリファレンス」として、DatabaseRecordReader、FileDataReader、MessageReader 等のコンポーネント仕様書を格納しています。

そのため、v1.4 の reader ファイルは v5/v6 の database_reader.rst(処理パターン文書)とは性質が異なります。

現在の最新マッピング表(855d01f5 以降)では fw/reader/ 配下を about | about-nablarch にマッピングしています。component | handlerscomponent | libraries の方が適切でしょうか?ご意見をお聞かせください。

Co-Authored-By: Claude (jp.anthropic.claude-sonnet-4-6) noreply@anthropic.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

component | readersとしましょう。カテゴリにreadersを追加ですね。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

fw/reader/ 配下をすべて component | readers に変更しました。readers カテゴリは新規追加です。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

fw/reader/ 配下をすべて component | readers に変更しました。readers は新規カテゴリです。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

kiyotis and others added 4 commits March 13, 2026 18:51
…sample/ui_dev

- Extend knowledge-creator to scan all 4 v1.4 sub-repos (document/,
  workflow/, biz_sample/, ui_dev/) instead of non-existent 1.4_maintain/
- Add mappings/v1.4.json with RST patterns for all sub-repos
- Update 1.4-mappings.md: add 119 RST files from 3 new repos (585 total),
  fix fw/01_SystemConstitution/ from setup/configuration to about/about-nablarch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- fw/reader/: libraries → handlers (same role as fw/handler/)
- guide/03_DevelopmentStep/, guide/04_Explanation/: guide-web → guide/web-application
- guide/04_Explanation_batch/: guide-batch → guide/nablarch-batch
- guide/04_Explanation_messaging/: guide-messaging → guide/mom-messaging or http-messaging
- guide/04_Explanation_other/mail/: guide-mail → guide/libraries
- fw/01_SystemConstitution/: setup/configuration → about/about-nablarch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added 173 Office/PDF files from document/, biz_sample/, ui_dev/, workflow/ repos
- Updated header to reflect full file listing (RST + non-RST)
- Assigned type/category where clearly applicable; marked × for unknown

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rewrite .pr/00189/1.4-mappings.md from scratch starting from v1.4-dist
(the built output) rather than the RST source files:

- 453 HTML content pages (excl. Javadoc/YUIDoc auto-generated API docs)
- 100 user-navigable non-HTML files (Office, ZIP, etc.)
- Each file mapped to its v1.4 source path
- Type/category assigned from v1.4.json patterns where clear; × where not

Source→dist path mappings established:
  document/FAQ/          → FAQ/
  document/TOP/          → about_nablarch/
  document/guide/        → nablarch/app_dev_guide/guide/development_guide/
  document/fw/           → nablarch/app_exe_env/fw_doc/doc/
  document/tool/         → nablarch/app_dev_env/toolbox/doc/
  document/mobile/       → nablarch/app_dev_env/mobile/doc/arch_doc/
  document/standard/     → nablarch/app_dev_guide/standard/
  workflow/              → nablarch/app_dev_env/workflow/
  biz_sample/            → nablarch/app_dev_env/app_lib/biz_sample/
  ui_dev/                → nablarch/app_dev_env/ui_dev/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| `nablarch/app_dev_env/app_lib/biz_sample/doc/index.html` | `biz_sample/doc/index.html` | guide | biz-samples |
| `nablarch/app_dev_env/app_lib/biz_sample/doc/search.html` | `biz_sample/doc/search.html` | guide | biz-samples |
| `nablarch/app_dev_env/app_lib/biz_sample/doc/useragent_sample.html` | `biz_sample/doc/useragent_sample.html` | guide | biz-samples |
| `nablarch/app_dev_env/app_lib/fw_integration_sample/db/doc/index.html` | `nablarch/app_dev_env/app_lib/fw_integration_sample/db/doc/index.html` | × | × |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/app_lib配下は| guide | biz-samples |にマッピングでよいかと

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

/app_lib 配下(fw_integration_sample, messaging_simulator_sample, operation_sample)の HTML ファイルをすべて guide | biz-samples に変更しました。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_dev_env/app_lib/messaging_simulator_sample/doc/index.html` | `nablarch/app_dev_env/app_lib/messaging_simulator_sample/doc/index.html` | × | × |
| `nablarch/app_dev_env/app_lib/operation_sample/log_statistics_sample/doc/contents/OnlineAccessLogStatistics.html` | `nablarch/app_dev_env/app_lib/operation_sample/log_statistics_sample/doc/contents/OnlineAccessLogStatistics.html` | × | × |
| `nablarch/app_dev_env/app_lib/operation_sample/log_statistics_sample/doc/index.html` | `nablarch/app_dev_env/app_lib/operation_sample/log_statistics_sample/doc/index.html` | × | × |
| `nablarch/app_dev_env/mobile/doc/arch_doc/01_iOS/00_Introduction.html` | `document/mobile/source/01_iOS/00_Introduction.rst` | component | libraries |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/mobile配下は| guide | biz-samples |にマッピングでよいかと

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

/mobile 配下をすべて guide | biz-samples に変更しました。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_dev_env/toolbox/doc/08_DefInfoGenerator/01_DefInfoGenerator.html` | `document/tool/08_DefInfoGenerator/01_DefInfoGenerator.rst` | development-tools | toolbox |
| `nablarch/app_dev_env/toolbox/doc/09_JspVerifier/01_JspVerifier.html` | `document/tool/09_JspVerifier/01_JspVerifier.rst` | development-tools | toolbox |
| `nablarch/app_dev_env/toolbox/doc/index.html` | `document/tool/index.rst` | development-tools | toolbox |
| `nablarch/app_dev_env/toolbox/src/main/script/jspgenerator/generator-test-utf8.html` | `×` | × | × |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このファイル、どのrstページからリンク張られてますか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認しました。

generator-test-utf8.htmltoolbox/src/main/script/jspgenerator/ ディレクトリ内に存在する JSP ジェネレータツールのテスト用サンプル HTML ファイルです。どの RST ページからも直接リンクされておらず、ツールのソースファイルとして dist に含まれています(jspgenerator/ ディレクトリ内の jspGen.sh 等と同梱)。

RST ソースが存在しないため × | × のままが適切です。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_dev_env/toolbox/doc/09_JspVerifier/01_JspVerifier.html` | `document/tool/09_JspVerifier/01_JspVerifier.rst` | development-tools | toolbox |
| `nablarch/app_dev_env/toolbox/doc/index.html` | `document/tool/index.rst` | development-tools | toolbox |
| `nablarch/app_dev_env/toolbox/src/main/script/jspgenerator/generator-test-utf8.html` | `×` | × | × |
| `nablarch/app_dev_env/ui_dev/doc/about_this_book.html` | `ui_dev/doc/about_this_book.rst` | component | ui-framework |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ui_dev配下はすべて| component | ui-framework |にしましょう。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

/ui_dev 配下をすべて component | ui-framework に統一しました(setup | configurationabout | about-nablarch だった entries を含む)。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_exe_env/fw_doc/doc/core_library/validation_advanced_validators.html` | `document/fw/core_library/validation_advanced_validators.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/core_library/validation_basic_validators.html` | `document/fw/core_library/validation_basic_validators.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/determining_stereotypes.html` | `document/fw/determining_stereotypes.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/handler/AsyncMessageReceiveAction.html` | `document/fw/handler/AsyncMessageReceiveAction.rst` | about | about-nablarch |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handler配下はすべて| component| handlers |では?間違い?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

おっしゃる通りです。fw_doc/doc/handler/ 配下がすべて about | about-nablarch になっていたのは誤りでした。component | handlers に修正しました(49 ファイル)。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_exe_env/fw_doc/doc/introduction.html` | `document/fw/introduction.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/overview_of_NAF.html` | `document/fw/overview_of_NAF.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/platform.html` | `document/fw/platform.rst` | about | about-nablarch |
| `nablarch/app_exe_env/fw_doc/doc/reader/DatabaseRecordReader.html` | `document/fw/reader/DatabaseRecordReader.rst` | about | about-nablarch |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reader配下はすべて| component| readers |にしましょう。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Commit: 764b3c54

fw_doc/doc/reader/ 配下をすべて component | readers に変更しました(8 ファイル)。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

| `nablarch/app_dev_env/app_lib/messaging_simulator_sample/doc/_downloads/利用手順.xlsx` | `nablarch/app_dev_env/app_lib/messaging_simulator_sample/doc/_downloads/利用手順.xlsx` | × | × |
| `nablarch/app_dev_env/workflow/design_guide/ワークフロー設計ガイド.doc` | `workflow/design_guide/ワークフロー設計ガイド.doc` | extension | workflow |
| `nablarch/app_dev_guide/guide/tutorial/Nablarch-tutorial-workspace.zip` | `document/guide/tutorial/Nablarch-tutorial-workspace.zip` | guide | web-application |
| `nablarch/app_dev_guide/standard/coding_rule/Objective-C/Objective-Cコーディング規約.doc` | `document/standard/03_CodingRule/Objective-C/Objective-Cコーディング規約.doc` | × | × |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/app_dev_guide/standard配下はすべて| × | × |にしましょう。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認しました。

/app_dev_guide/standard 配下はすでにすべて × | × になっています(83 ファイル)。変更不要です。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

@kiyotis kiyotis changed the title docs: document Nablarch 1.x symlink setup for knowledge generation (#189) feat: set up nabledge-1.x knowledge generation infrastructure (#189) Mar 13, 2026
kiyotis and others added 2 commits March 13, 2026 21:11
- handler/: about|about-nablarch → component|handlers
- reader/: about|about-nablarch → component|readers (new category)
- ui_dev/: setup|configuration and about|about-nablarch → component|ui-framework
- app_lib/fw_integration_sample, messaging_simulator_sample, operation_sample: ×|× → guide|biz-samples
- mobile/: component|libraries → guide|biz-samples
- setup.sh: add subversion to apt-get install for SVN revision support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- v1.4.json: prefix all document/ patterns with repo name; add sample/portal
  patterns to fix ID dedup; apply reviewer feedback (readers category,
  mobile/biz-samples, ui_dev categories)
- v1.3.json, v1.2.json: new single-repo mapping files
- step2_classify.py: for v1.4, keep repo marker in rel_path so patterns match
  (version-conditional to preserve v5/v6 backward compatibility)
- generate_expected.py: same fix for E2E test expected value generation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a developer, I want to set up nabledge-1.x knowledge generation infrastructure so that kc.sh gen 1.4/1.3/1.2 can run

1 participant