Skip to content

feat: add Topic Memory prompt management and Dashboard support - #1536

Closed
frf12 wants to merge 4 commits into
masterfrom
agent/agent/24b90edf9231
Closed

feat: add Topic Memory prompt management and Dashboard support#1536
frf12 wants to merge 4 commits into
masterfrom
agent/agent/24b90edf9231

Conversation

@frf12

@frf12 frf12 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

Adds Scope-level Prompt management for Topic Memory generation stages and read-only Topic Memory/Profile Dashboard views.

Validation

  • Topic Memory processing tests: 40 passed
  • Dashboard self-test: Topic Memory/Profile pages, exact revision status, and paginated browsing
  • Generated API check, compileall, ruff, and diff check: passed

The prompt demonstration and stage-validation follow-ups remain with the prompt-management implementation owner.

@frf12
frf12 force-pushed the agent/agent/24b90edf9231 branch from 05e4327 to 92e0385 Compare September 9, 2026 19:22
@frf12 frf12 changed the title POWE-119: add Topic Memory prompt management POWE-119 / POWE-120: Topic Memory prompt and Dashboard support Sep 9, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

license-eye has checked 1434 files.

Valid Invalid Ignored Fixed
1014 1 419 0
Click to see the invalid file list
  • src/powercontext/server/dashboard/templates/topics.html
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,27 @@
{% from 'components/page-heading.html' import page_heading %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
{% from 'components/page-heading.html' import page_heading %}
<!--
~ Copyright (c) 2026 OceanBase.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
{% from 'components/page-heading.html' import page_heading %}

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

license-eye has checked 1435 files.

Valid Invalid Ignored Fixed
1014 2 419 0
Click to see the invalid file list
  • src/powercontext/server/dashboard/templates/profile.html
  • src/powercontext/server/dashboard/templates/topics.html
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,14 @@
{% from 'components/page-heading.html' import page_heading %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
{% from 'components/page-heading.html' import page_heading %}
<!--
~ Copyright (c) 2026 OceanBase.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
{% from 'components/page-heading.html' import page_heading %}

@frf12
frf12 force-pushed the agent/agent/24b90edf9231 branch 3 times, most recently from 7a60dc0 to 92e0385 Compare September 9, 2026 20:25
@frf12 frf12 changed the title POWE-119 / POWE-120: Topic Memory prompt and Dashboard support POWE-119 / POWE-120 / POWE-121: Topic Memory and Dashboard support Sep 10, 2026
@frf12
frf12 force-pushed the agent/agent/24b90edf9231 branch from 92e0385 to 7a60dc0 Compare September 10, 2026 03:53
("skill.generate", skill_generator, generated_skill),
("handoff.generate", handoff_pipeline, generated_handoff),
*(
(f"topic_memory.{stage}", None, object())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Register demonstration generators for the Topic Prompt keys

These seven keys are advertised as supported, but _register_prompt_demonstrators() still registers only the existing keys. With the same configured model, all seven Topic demonstration endpoints return 422 prompt_customization_unavailable, while memory.extract returns 200. Please register their demonstration generators as well so the newly exposed endpoints work.

)
output = self.output_type.model_validate_json(
json.dumps(demonstration.expected_output), strict=True, extra="forbid"
json.dumps(demonstration.expected_output), strict=strict, extra="forbid"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Validate Topic demonstrations against the stage's reference rules

validate_demonstration() has no branches for the new Topic types. I could save a Probe example citing an absent evidence ID, a Planner example referencing an absent probe, and a Reduce example with covered_indices: [99] for one input; all returned 201. These examples are then included in the model instructions even though the runtime rejects the corresponding outputs. Please validate the stage-specific reference and coverage rules before accepting demonstrations.

<section class="col-lg-7" aria-labelledby="topic-detail-heading"><div class="card"><div class="card-body">
{% if errors.get('topic_memory_selected') %}{{ read_error(errors.topic_memory_selected, t.topic_memory) }}
{% elif data.topic_memory_selected %}{% set topic = data.topic_memory_selected %}
<div class="d-flex justify-content-between gap-3"><div><h2 class="card-title mb-1" id="topic-detail-heading">{{ topic.title }}</h2><code>topic-memory/{{ topic.artifact.artifact_id }}@{{ topic.artifact.revision }}</code></div><span class="badge bg-green-lt">{{ t.current_revision }}</span></div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Show the selected revision's actual publication status

The badge always says "Current revision", including for historical links. After publishing revision 2, opening the revision-1 URL still shows the old content with this green badge, although the repository reports is_current=False. Please use the actual current-head status when rendering the badge so an old bookmark does not present superseded content as current.

}
for item in items
],
"next_cursor": None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Preserve a cursor for browsing more than 50 topics

This reads only the first 50 heads and always reports next_cursor=None; the page also has no pagination control. With 51 published topics, I could browse only the newest 50, with no way to reach the oldest through the list. Please pass through the repository's existing keyset cursor and add a next-page link.

@frf12
frf12 force-pushed the agent/agent/24b90edf9231 branch from 7a60dc0 to b2cf9d3 Compare September 10, 2026 06:33
@frf12 frf12 changed the title POWE-119 / POWE-120 / POWE-121: Topic Memory and Dashboard support feat: add Topic Memory prompt management and Dashboard support Sep 10, 2026
@frf12

frf12 commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Review follow-up:

  • The license-eye findings for the Topic Memory and Profile templates are fixed with the repository-compatible Apache headers.
  • The Dashboard review about historical revision status is fixed: the detail badge now reflects the actual current-head status.
  • The Dashboard review about browsing beyond the first 50 Topic Memory heads is fixed with the existing keyset cursor and previous/next pagination links.
  • The prompt demonstration registration and stage-specific validation comments are intentionally not changed in this Dashboard follow-up; they concern prompt-management runtime behavior and should be handled by the prompt implementation owner.

@frf12 frf12 closed this Sep 10, 2026
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.

2 participants