giip
SES Proposal
7 min read

tKB Knowledge Base Management Guide

An admin screen for creating, listing, editing, and deleting knowledge base (tKB) entries scoped to a project (csn). tKB stores server troubleshooting notes, configuration details, and analysis results per project, and it also feeds the data behind the Graphify (knowledge graph) screen.

๐Ÿ—‚๏ธ Go to tKB Management โ†’

๐Ÿ“‹ Overview

The tKB Management page lists the knowledge base entries that belong to the currently selected project (csn), and lets you create new entries or edit/delete existing ones. Entries are classified by their reference target (server lssn, database mdb_id, or general GENERAL), and consist of a title, body content, and tags.

โš ๏ธ This screen is admin-only. Access requires admin level uLevel >= 70 (hardcoded prop mode, minLevel={70}, on the page). Users below this level are redirected to the home page.

๐Ÿ” Screen Layout

1. List screen (/admin/tkb)

ElementDescription
Refresh buttonReloads the current page's data
+ New tKB buttonNavigates to the create screen (/admin/tkb/new)
Per page selectorChanges items shown per page (25/50/100)
List itemShows title, refType badge, #kbSn, registration date (regDt), and tags in one row. Clicking the title or [Details] navigates to the detail screen
PaginationServer-side paging if the server returns totalCount, otherwise falls back to client-side slicing

If no project is selected, a "No Project Selected" notice is shown โ€” select a project from the top navigation first. The list is fetched based on the logged-in session's csn, and switching csn automatically resets to page 1.

2. Create screen (/admin/tkb/new)

FieldRequiredDescription
CSNโœ…Project number. Auto-filled from the session's csn (editable)
Reference Typeโœ…One of GENERAL / MANUAL / ERROR / ANALYSIS / GUIDE
Titleโœ…Title, also used as the graph node label
Tags-Comma-separated tags (e.g. backend, deploy, fix)
Content-Body content (markdown text)
LSSN-Server number, when the entry relates to a specific server
MDB_ID-Database number, when the entry relates to a specific database

Clicking "Create tKB" submits POST /api/giipKb; on success, you are returned to the list screen.

3. Detail/edit screen (/admin/tkb/[kbsn])

In addition to the same fields as the create screen, the bottom of the page shows read-only created/created-by/modified/modified-by timestamps (regDt/regBy/modDt/modBy). The Delete Entry button (top right) deletes the entry after a confirmation dialog and returns you to the list. "Save Changes" submits the edits via PUT /api/giipKb.

๐Ÿ› ๏ธ How to Create, Edit, and Delete tKB Entries

  1. Select the target project from the top navigation (the list is empty if none is selected).
  2. Click + New tKB, fill in CSN, Reference Type, and Title (Content/Tags/LSSN/MDB_ID are optional), then click Create tKB.
  3. From the list, click an entry's title or Details to open the detail screen.
  4. Edit the fields and click Save Changes โ€” the change applies immediately and a "Successfully updated." message appears.
  5. To remove an entry you no longer need, use Delete Entry on the detail screen (irreversible, confirmation required).
  6. Creating, editing, or deleting an entry does not automatically update the graph. To see the change reflected in the knowledge graph, go to /graphify and click [Rebuild] (login required, giip #2099). See Relationship with Graphify below for details.

๐ŸŒ Relationship with Graphify (Must Read)

tKB is the sole data source for the /graphify (knowledge graph) screen (verified per giip #2099). A backend stored procedure (pApiGraphifyRebuildbyAk) generates the graph's document (DOC) and tag (TAG) nodes from tKB WHERE csn=@csn entries.

  • Not auto-reflected: Creating, editing, or deleting a tKB entry from this screen does not immediately change the graph.
  • How to reflect changes: Click the [Rebuild] button (login required) in the /graphify page header to regenerate the graph from the latest tKB content. The graph refreshes automatically once rebuild completes.
  • Other data (e.g. giip issues) is not auto-included: Graphify does not automatically collect giip issues, server info, or other data. If a project has issues but nothing has been registered in tKB yet, the graph will be empty โ€” this is expected behavior.
  • Automation scripts (e.g. giipAgentWin) can populate tKB by calling the giipKb API directly instead of using this screen (see API Reference below).

๐Ÿค– K-Layer Wiki Daily Auto-Ingestion

If you see entries piling up in the tKB list that you never created yourself, they are most likely auto-generated entries tagged k-layer-wiki.

  • What it is: A Windows Task Scheduler task named GIIP_Daily_KLayerWiki (implemented per giip #2096, giipdb/mgmt/run_klayer_daily_wiki.ps1) runs once a day, collects giip issues (title + body + comments) newly registered "yesterday" for each csn, summarizes them with MiniMax AI, and automatically inserts the summary as a new tKB entry.
  • How to identify them (no dedicated filter on this screen yet): This screen does not have a tag/type filter UI. Instead, you can distinguish auto-generated entries by checking the following in each list row:
    • Reference Type badge: k-layer-daily
    • Tags: k-layer-wiki,daily
    • Title format: K-Layer Wiki <csn> - <yyyy-MM-dd> (e.g. K-Layer Wiki 47 - 2026-09-06)
  • Scope: Every csn that has at least one giip issue is covered (independent of any project allowlist). A csn with zero new issues that day is skipped entirely โ€” no AI call and no tKB insert.
  • Sensitive-data masking: Issue/comment content is masked twice via giipdb/mgmt/lib/Mask-SensitiveInfo.ps1 โ€” (1) before sending to MiniMax, and (2) before storing to tKB.
  • How it accumulates: The script loads the same csn's existing K-Layer Wiki (the most recent k-layer-wiki-tagged entry) as a checkpoint, adds/updates only genuinely new content from the day's issues in CLAIM format, and re-saves the entire document โ€” existing content is preserved as one cumulative document, not deleted.

โš ๏ธ Do not confuse with a different script: giipdb/mgmt/sync_klayer_to_tkb.ps1 is a separate script that also writes to tKB, but its source is local knowledge note files (.agent/k_layer/notes/*.md, targeting csn=47 by default) rather than giip issues, and it stores entries with refType='KNOWLEDGE', tags='sync, k-layer, ai-memory'. Both scripts share the "K-Layer" name but are distinct features with different source data and target csn scope โ€” tell them apart by the Tags value (k-layer-wiki,daily vs. sync, k-layer, ai-memory).

๐Ÿ’ก Notes

  • Tags are a free-form string; there is no enforced list or schema. Whatever you type (comma-separated) is stored as-is.
  • Reference Type can only be one of GENERAL/MANUAL/ERROR/ANALYSIS/GUIDE (per the screen's select options).
  • The list always uses the logged-in session's csn โ€” switch projects from the top navigation to see another project's tKB entries.
  • Deletion cannot be undone. Back up the content separately beforehand if you need to preserve it.

API Reference

The endpoint, payload, and authentication details for the giipKb API used by this screen are documented self-containedly in a separate API guide.

๐Ÿ“˜ KB Management API User Guide

For external scripts such as giipAgentWin that need to register/query tKB without an interactive login session, see the SK-based (giipApiSk3) calling method in the guide above.

Troubleshooting

SymptomCauseSolution
Redirected to home immediately on visituLevel is below 70Log in with an admin account (level 70+).
Only "No Project Selected" is shownNo project (csn) selected in the sessionSelect a project from the top navigation.
"Please login to continue" / 401 errorNo login session, or it has expiredLog in again and refresh.
Entry was created/edited but /graphify still shows the old graphRebuild has not been run yet โ€” tKB changes are not auto-reflected in the graphLog in on the /graphify page and click [Rebuild] (giip #2099).
CSN, Title, and RefType are required. errorRequired fields missing on the create screenFill in CSN, Title, and Reference Type, then submit again.
Delete button does nothingCancelled the confirmation dialog, or the auth token expiredClick OK in the confirmation dialog; if you get a 401, log in again and retry.

Version: 1.0 Last Updated: 2026-09-07 (giip #2122: new admin/tkb user guide) Source File: giipv3/public/help/tkb.en.md