Skip to content

feat: simplified flow, push upstream, output-dir consistency#72

Open
teppohudsson wants to merge 13 commits intomainfrom
feat/simplified-flow
Open

feat: simplified flow, push upstream, output-dir consistency#72
teppohudsson wants to merge 13 commits intomainfrom
feat/simplified-flow

Conversation

@teppohudsson
Copy link
Copy Markdown
Contributor

@teppohudsson teppohudsson commented Apr 28, 2026

Summary

Two main themes on this branch:

1. User journey analysis (user-journey.yaml / TTV)

schema_analysis.ttv_journey_by_subject is now produced from schema + growth manifest only — you do not need engine.yaml to generate the journey graph used by the visualiser.

Input Role
schema.yaml Authoritative tables, columns, relationships
growth-manifest.json current_growth_features, growth_opportunities, and project metadata

Flow: one LLM call returns a single global Time-to-Value DAG (subjects, nodes, edges, valueProxies, lifecycleDataExplanation). The compiler validates it (non-empty subjects/nodes/edges, DAG acyclicity, dataChange on milestone edges, valueProxies linked to real nodes, default stateScope when missing), then groups by subject into the existing storage shape (ordered_nodes, value_nodes, ordered_edges) so the TUI keeps working unchanged.

Optional: if engine.yaml contains planned features, they are still compiled into compiled_features in a separate step.

CLI: skene analyse-user-journey — defaults follow ./skene-context/ (or configured output_dir).


2. Push: entire Skene bundle directory (e.g. skene-context/)

skene push uploads all files under the resolved bundle directory (configured output_dir / SKENE_OUTPUT_DIR, default ./skene-context/), not a hard-coded short list. The implementation walks the directory recursively and includes every file as { path, content } in the push payload, plus the latest Skene trigger migration under supabase/migrations/ (and the engine file if it lives outside the bundle).

Why: so Skene Cloud receives the full analysis bundle — schema, growth manifest, user-journey.yaml, feature registry, plans, and any other artifacts written under that folder — in one deploy.


Test plan

  • uv run pytest tests/ -x -q
  • uv run ruff check src/ tests/
  • cd tui && go test ./... && go build ./cmd/skene/

Checklist

  • Tests added or updated for behavioral changes where needed
  • Documentation / CLI help updated where behavior changed
  • Linting and tests pass locally

…dates

Push posts files[] with full skene bundle plus trigger migration; align API
base and success output with upstream artifact merge. Add journey compiler
and analyse user journey; extend plan/journey pipelines. TUI: outputdirs,
growth engine and views, visualizer HTML. Docs and tests for upstream.

Made-with: Cursor
Unify output_dir: skene-context as default bundle, resolveOutputDir in TUI.
Push uploads full bundle; prefer explicit output_dir; preflight engine,
trigger, registry warnings. Fix output_paths to match consistency tests.

Made-with: Cursor
Comment thread src/skene/cli/commands/push.py Fixed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4325c53d26

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

resolve_path=True,
),
schema: Path = typer.Option(
Path("./skene/schema.yaml"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use skene-context defaults for analyse-user-journey inputs

The new analyse-user-journey command still defaults to ./skene/..., while this commit changes the pipeline defaults to ./skene-context/...; as a result, running skene analyse-user-journey with no flags on a freshly generated project will fail to find schema.yaml/growth-manifest.json/engine.yaml unless users manually override paths. This breaks the zero-config default flow introduced elsewhere in the same change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/skene/config.py Outdated
Comment on lines +87 to +89
existing = resolve_bundle_dir(Path.cwd())
if existing is not None:
return f"./{existing.name}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve sticky output_dir against the target project root

The sticky legacy detection now uses Path.cwd() to pick ./skene vs ./skene-context, which is not the same as the project path passed to commands like skene push /some/project; if the caller’s current directory has a different bundle layout than the target project, config.output_dir can point to the wrong directory and downstream artifact resolution uses the wrong engine path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines +607 to +610
"\n\nIMPORTANT: Your previous response could not be parsed as JSON. "
"Return ONLY a single JSON object, no prose, no markdown fences, no trailing commas. "
"It must contain exactly the keys ``compiled_features`` and ``ttv_journey_by_subject``."
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align retry reminder with the actual prompt schema

After JSON parse failures, retries append a reminder demanding an object with exactly compiled_features and ttv_journey_by_subject, but both retry call sites expect single feature/subject objects instead; this contradictory instruction can make second-attempt outputs structurally wrong, leading to silently dropped or default-filled compiled entries rather than recovering valid data.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

…I lint

- Resolve bundle layout for Config.output_dir against CLI project_root via
  bundle_resolution_root and resolve_cli_config(project_root=...).
- Align user-journey LLM retry reminder with per-feature/subject JSON shape.
- Remove unused getOutputDir wrapper in TUI (golangci-lint unused).

Made-with: Cursor
Update configuration, index, llms.txt, python API, and troubleshooting
to stay consistent with the simplified flow.

Made-with: Cursor
…-journey

- Pipeline: journey stage only requires schema + growth manifest
- analyse-journey: skip plan but still run journey when growth runs
- analyse-user-journey: allow missing engine.yaml (empty engine)
- journey_compiler: remove empty-engine warning for TUI
- growth_from_schema: reduce MAX_HYPOTHESES 12 → 5

Made-with: Cursor
Single LLM call outputs the TTV DAG (subjects, nodes, edges, valueProxies);
validate, then group into ttv_journey_by_subject. Engine features are
optional and only fill compiled_features. Update analyse-user-journey help.

Made-with: Cursor
@teppohudsson
Copy link
Copy Markdown
Contributor Author

teppohudsson commented Apr 28, 2026

technically this works. test pass. I get to run and the CLI push command works. ready to merge

teppohudsson and others added 3 commits April 28, 2026 12:28
When output_dir is set in config or passed to collect_push_files, use that
path verbatim instead of falling back to resolve_bundle_dir when the
directory is missing. Sticky bundle discovery applies only when output_dir
is unset.

Made-with: Cursor
skene push no longer fails when engine.yaml is missing; upload whatever
bundle files exist. Engine metadata is only read when the file is present.
Removes the hard requirement for a trigger migration so journey-only
workflows can deploy without running build first.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@bmichele bmichele left a comment

Choose a reason for hiding this comment

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

After testing the analysis with several settings and projects and viewing the journey, pressing n for next steps shows "Deploy to Skene Cloud" greyed out and "not available". This blocks reaching skene push from the TUI entirely.

Steps to reproduce:

  1. cd tui && make clean run-local
  2. Analyse a project
  3. View Journey → press n
  4. "Deploy to Skene Cloud" is disabled

@bmichele
Copy link
Copy Markdown
Contributor

I have fixed the issue reported in #72 (review)

I end-to-end tested the user journey generation, i.e.

  1. analyze local project with TUI -> OK
  2. visualize user journey in browser from local files -> OK
  3. push to skene cloud from TUI -> OK
  4. Connect to cloud and "Compile skene engine" from workspace -> DOES NOTHING

The problem is now on the cloud side, so this is good to be merged for me.

@bmichele bmichele self-requested a review April 30, 2026 15:33
Copy link
Copy Markdown
Contributor

@bmichele bmichele left a comment

Choose a reason for hiding this comment

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

There is still an issue when compiling the engine on the cloud, but the CLI/TUI part is now fixed: all files that we expect are generated from the analysis and gets pushed to the cloud.

Good to be merged for me

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