Agent Skillsluxury-yacht/app › object-map

object-map

GitHub

处理游艇对象映射的后端图数据、前端模型布局渲染及测试,涵盖资源类型、关系边、布局和调试快照。

.agents/skills/object-map/SKILL.md luxury-yacht/app

Trigger Scenarios

修改对象映射后端图数据或关系边 调整前端对象映射的布局或渲染行为 更新支持的资源类型列表 修复对象映射相关的测试

Install

npx skills add luxury-yacht/app --skill object-map -g -y
More Options

Non-standard path

npx skills add https://github.com/luxury-yacht/app/tree/main/.agents/skills/object-map -g -y

Use without installing

npx skills use luxury-yacht/app@object-map

指定 Agent (Claude Code)

npx skills add luxury-yacht/app --skill object-map -a claude-code -g -y

安装 repo 全部 skill

npx skills add luxury-yacht/app --all -g -y

预览 repo 内 skill

npx skills add luxury-yacht/app --list

SKILL.md

Frontmatter
{
    "name": "object-map",
    "description": "Work on Luxury Yacht object-map data, missing resource kinds, graph relationships, layout, renderer behavior, legend, debug snapshots, and tests"
}

Object Map

Use this when touching object-map backend graph data, supported kinds, relationship edges, frontend model/layout/rendering, legend/copy, debug snapshots, or object-map tests.

Core Model

Object map is a scoped refresh snapshot domain named object-map.

It is not a rich detail service and not an SSE/resource-stream path. The backend snapshot builds graph data; the frontend filters, annotates, lays out, and renders that graph.

Read:

  1. AGENTS.md
  2. backend/AGENTS.md for backend changes
  3. frontend/AGENTS.md for frontend changes
  4. docs/workflows/object-map.md
  5. docs/architecture/shared-resource-model.md when identity, status, facts, or relationships are involved
  6. docs/architecture/refresh-system.md when domain registration, scopes, or diagnostics are involved
  7. docs/frontend/live-age.md when changing card age text

Backend Entry Points

Start here for graph/data correctness:

  • backend/refresh/snapshot/object_map.go plus the per-kind collectors/edges in backend/resources/<kind>/objectmap*.go, dispatched via backend/refresh/snapshot/object_map_collector_registry.go and object_map_edge_registry.go
  • backend/refresh/system/registrations.go
  • backend/resourcemodel for shared facts, status, identity, and links
  • backend/refresh/snapshot/object_map_test.go or adjacent object-map tests

Backend object-map work often needs:

  • Typed collection for every supported kind.
  • Complete object references with clusterId, group, version, kind, and concrete namespace/name when openable.
  • Edges from shared-resource-model facts where possible.
  • Permission checks for newly collected resources.
  • Test fixtures that prove the graph includes nodes and edges, not just that no error occurred.

For Gateway API fake-client tests, explicit list reactors may be required. Use gatewayfake.NewClientset() rather than deprecated constructors.

Frontend Entry Points

Start here for visible behavior:

  • frontend/src/modules/object-panel/objectPanelRef.ts (MAP_SUPPORTED_KINDS, isObjectMapSupportedKind, and hasCompleteObjectMapReference)
  • frontend/src/modules/object-map/ObjectMap.tsx
  • frontend/src/modules/object-map/useObjectMapModel.ts
  • frontend/src/modules/object-map/objectMapLayout.ts
  • frontend/src/modules/object-map/objectMapVisibleState.ts
  • frontend/src/modules/object-map/ObjectMapG6Renderer.tsx
  • frontend/src/modules/object-map/objectMapEdgeStyle.ts
  • frontend/src/modules/object-map/objectMapDebugStore.ts
  • frontend/src/modules/object-map/ObjectMap.css

Frontend object-map work often needs:

  • Supported-kind allowlist updates.
  • Payload/type updates if backend graph shape changes.
  • Model/filter/collapse updates.
  • Layout and visible-state updates.
  • Renderer and apply-queue equality updates.
  • Legend/palette/status styling updates.
  • Targeted Vitest coverage for model/layout/renderer behavior.

Do not fix missing data by frontend-only labels or renderer patches when the backend graph is missing nodes, refs, or edges.

Sequencing

For missing kinds or missing links:

  1. Prove whether backend snapshot data contains the nodes and edges.
  2. If missing, fix backend collection/edge construction and tests first.
  3. Then update frontend support lists/types/model/rendering.
  4. Update docs/workflows/object-map.md if supported kinds, edge semantics, or user-facing behavior changed.

For visual-only renderer work:

  1. Confirm the data/model is already correct.
  2. Change frontend renderer/layout/styles only.
  3. Use browser or screenshot validation when visual behavior matters.

Checklist

  • Backend graph includes the intended nodes.
  • Backend graph includes the intended relationship edges.
  • Openable refs are complete and include cluster/GVK/object identity.
  • Permission checks cover newly listed resource types.
  • Frontend kind support matches backend support.
  • Payload types match backend shape.
  • Model, visible state, layout, and renderer agree on new fields.
  • Card age text is derived from timestamps through the live-age contract and does not change backend graph identity or layout inputs.
  • Legend/copy uses user-facing terms such as "Objects" and "Links".
  • Tests cover the changed graph or rendering behavior.

Validation

Use focused checks while iterating:

mise exec -- go test ./backend/refresh/snapshot -run ObjectMap
mise exec -- npm run test --prefix frontend -- object-map
mise exec -- npm run typecheck --prefix frontend

Then run the final gate for non-documentation work:

Then follow the root final validation gate.

Version History

  • ee846a6 Current 2026-08-20 13:02

Same Skill Collection

.agents/skills/add-resource/SKILL.md
.agents/skills/app-review/SKILL.md
.agents/skills/app-shell/SKILL.md
.agents/skills/branch-review/SKILL.md
.agents/skills/browse-tables/SKILL.md
.agents/skills/cluster-auth-lifecycle/SKILL.md
.agents/skills/draft-release-notes/SKILL.md
.agents/skills/improve-backend/SKILL.md
.agents/skills/improve-frontend/SKILL.md
.agents/skills/make-impossible-states-impossible/SKILL.md
.agents/skills/new-story/SKILL.md
.agents/skills/object-panel/SKILL.md
.agents/skills/operations-workflows/SKILL.md
.agents/skills/permissions-capabilities/SKILL.md
.agents/skills/refresh-subsystem/SKILL.md
.agents/skills/shared-resource-model/SKILL.md

Metadata

Files
0
Version
ee846a6
Hash
94744724
Indexed
2026-08-20 13:02

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 08:11
浙ICP备14020137号-1 $방문자$