/* ========================= * rid 受け取り * ========================= */ $rid = isset($_GET['rid']) ? sanitize_text_field(wp_unslash($_GET['rid'])) : ''; if (!$rid) { $fallback = home_url('/quinsel/'); echo '

QUINSEL|整理メモ

整理メモのIDが見つかりませんでした。トップページからもう一度お試しください。

QUINSELへ戻る

'; get_footer(); exit; } /* ========================= * DB読み込み * ========================= */ $db_file = get_stylesheet_directory() . '/quinsel/functions/db.php'; if (file_exists($db_file)) require_once $db_file; global $wpdb; $table = function_exists('quinsel_db_table') ? quinsel_db_table() : ($wpdb->prefix . 'quinsel_results'); /* ========================= * 取得 * ========================= */ $row = $wpdb->get_row( $wpdb->prepare("SELECT * FROM {$table} WHERE id = %s LIMIT 1", $rid), ARRAY_A ); if (!$row) { $fallback = home_url('/quinsel/'); echo '

QUINSEL|整理メモ

整理メモが見つかりませんでした(id: '.esc_html($rid).')。

QUINSELへ戻る

'; get_footer(); exit; } /* ========================= * user_data / l2_result * ========================= */ $user_data_raw = $row['user_data'] ?? ''; $l2_result_raw = $row['l2_result'] ?? ''; $user_data = json_decode($user_data_raw, true); if (!is_array($user_data)) $user_data = []; /* ========================= * zone/index_score/distance(GET優先→DB補完) * ========================= */ $zone_get = isset($_GET['zone']) ? sanitize_text_field(wp_unslash($_GET['zone'])) : ''; $index_score_get = isset($_GET['index_score']) ? intval($_GET['index_score']) : 0; $distance_get = isset($_GET['distance']) ? sanitize_text_field(wp_unslash($_GET['distance'])) : ''; $index_score_get = max(0, min(100, $index_score_get)); if (!in_array($distance_get, ['far','mid','near',''], true)) $distance_get = ''; $zone = $zone_get; $index_score = $index_score_get; $distance = $distance_get; // DBから拾えるなら拾う $l2_inputs = []; if (!empty($user_data['l2_inputs']) && is_array($user_data['l2_inputs'])) { $l2_inputs = $user_data['l2_inputs']; } $l1_bridge = []; if (!empty($user_data['l1_bridge']) && is_array($user_data['l1_bridge'])) { $l1_bridge = $user_data['l1_bridge']; } // ✅ DB値での復元は「未指定のときだけ」(0は正当値) if (!isset($_GET['index_score']) && isset($user_data['index_score'])) { $index_score = (int)$user_data['index_score']; } if (!isset($_GET['distance']) && isset($user_data['distance'])) { $distance = sanitize_text_field((string)$user_data['distance']); } if (!isset($_GET['zone']) && isset($user_data['zone'])) { $zone = sanitize_text_field((string)$user_data['zone']); } // zone推定 if (!in_array($zone, ['fit','offset','pause','mismatch','redesign'], true)) { if ($index_score <= 20) $zone = 'fit'; elseif ($index_score <= 40) $zone = 'offset'; elseif ($index_score <= 60) $zone = 'pause'; elseif ($index_score <= 80) $zone = 'mismatch'; else $zone = 'redesign'; } if (!in_array($distance, ['far','mid','near',''], true)) $distance = ''; $zone_map = [ 'fit' => ['jp'=>'適合', 'mode'=>'Fit Mode', 'display'=>'わりと噛み合っている'], 'offset' => ['jp'=>'違和感','mode'=>'Offset Mode', 'display'=>'しっくりきていない'], 'pause' => ['jp'=>'停止', 'mode'=>'Pause Mode', 'display'=>'一度立ち止まって考えたい'], 'mismatch' => ['jp'=>'不整合','mode'=>'Mismatch Mode', 'display'=>'合っていないかもしれない'], 'redesign' => ['jp'=>'再設計','mode'=>'Redesign Mode', 'display'=>'次のステージを考え始めている'], ]; $display_text = $zone_map[$zone]['display'] ?? 'しっくりきていない'; $mode_label = $zone_map[$zone]['mode'] ?? ''; $zone_jp = $zone_map[$zone]['jp'] ?? ''; $distance_label = ''; if ($distance === 'far') $distance_label = 'まだ確かめている段階'; if ($distance === 'mid') $distance_label = '意識に上がってきている'; if ($distance === 'near') $distance_label = '判断に近い'; // URLs $home_url = home_url('/quinsel/'); $l1_url = home_url('/quinsel/quinsel-result/'); $l2_url = home_url('/quinsel/l2/'); // ✅ Compass URL(rid引き継ぎ:URLは /quinsel/path/ のままでOK) $compass_base_url = home_url('/quinsel/path/'); $compass_url = $rid ? add_query_arg(['rid' => $rid], $compass_base_url) : $compass_base_url; // ドック(AIキャリアドック)ブリッジ表示 $l1_keywords = $l1_bridge['keywords'] ?? []; if (!is_array($l1_keywords)) $l1_keywords = []; $l1_free_word = trim((string)($l1_bridge['free_word'] ?? '')); // 本文 $l2_text_full = trim((string)$l2_result_raw); $has_report = ($l2_text_full !== ''); /* ===================================================== * ✅ Result統合:要約(超要約/読みごたえ要約) * ===================================================== */ $normalize_other_display = function(array $data, string $key) { $val = isset($data[$key]) ? trim((string)$data[$key]) : ''; $other_key = $key . '_other'; $other = isset($data[$other_key]) ? trim((string)$data[$other_key]) : ''; if ($val !== '' && mb_strpos($val, 'その他:') === 0) return $val; if ($val === 'その他' && $other !== '') return 'その他:' . $other; if ($val === '' && $other !== '') return 'その他:' . $other; return $val; }; $l2_inputs['current_job'] = $normalize_other_display($l2_inputs, 'current_job'); $l2_inputs['current_industry'] = $normalize_other_display($l2_inputs, 'current_industry'); $l2_inputs['desired_job'] = $normalize_other_display($l2_inputs, 'desired_job'); $l2_inputs['desired_industry'] = $normalize_other_display($l2_inputs, 'desired_industry'); // 年齢(あれば) $age = null; if (!empty($l2_inputs)) { $birth_parts = function_exists('quinsel_extract_birth_parts_from_user_data') ? quinsel_extract_birth_parts_from_user_data($l2_inputs) : null; if ($birth_parts && function_exists('quinsel_calc_age_from_birthdate')) { $age = !empty($birth_parts['birthdate']) ? quinsel_calc_age_from_birthdate($birth_parts['birthdate']) : quinsel_calc_age_from_birthdate($birth_parts); } } // タイミング文言 $timeline_map = [ 'just_organize' => '今は「結論」より整理が目的', '3m' => '〜3ヶ月を目安に考えたい', '6m' => '〜6ヶ月を目安に考えたい', '12m' => '〜12ヶ月を目安に考えたい', 'unknown' => 'まだ決めていない', ]; $timeline_text = ''; if (!empty($l2_inputs['timeline'])) { $timeline_text = $timeline_map[$l2_inputs['timeline']] ?? ''; } // 超要約(文言だけ整備) $summary_lines = []; $summary_lines[] = "今回のテーマは「{$display_text}」でした。"; if ($distance_label) $summary_lines[] = "距離感は {$distance_label}。"; if ($age) $summary_lines[] = "年齢:{$age}歳(※結論を急がず、順番を整えるのに向くタイミング)"; $current_job = trim((string)($l2_inputs['current_job'] ?? '')); $current_industry = trim((string)($l2_inputs['current_industry'] ?? '')); $desired_job = trim((string)($l2_inputs['desired_job'] ?? '')); $desired_industry = trim((string)($l2_inputs['desired_industry'] ?? '')); $constraints = trim((string)($l2_inputs['constraints'] ?? '')); if ($current_job !== '' || $current_industry !== '') { $line = "現在の仕事:"; if ($current_job !== '' && $current_industry !== '') $line .= "{$current_job} / {$current_industry}"; elseif ($current_job !== '') $line .= $current_job; else $line .= $current_industry; $summary_lines[] = $line; } if ($desired_job !== '' || $desired_industry !== '') { $line = "気になる方向:"; if ($desired_job !== '' && $desired_industry !== '') $line .= "{$desired_job} / {$desired_industry}"; elseif ($desired_job !== '') $line .= $desired_job; else $line .= $desired_industry; $summary_lines[] = $line; } if ($constraints !== '') $summary_lines[] = "外せない条件:{$constraints}"; if ($timeline_text !== '') $summary_lines[] = "タイミング感:{$timeline_text}"; $summary_lines[] = "詳細は、必要ならこの画面を見ながら一緒に読み解きます。"; $summary = implode("\n", array_values(array_filter($summary_lines))); // 読みごたえ要約(文言だけ整備) $pains = $l2_inputs['pain_points'] ?? []; if (!is_array($pains)) $pains = []; $pains = array_values(array_filter(array_map('strval', $pains))); $pain_top = !empty($pains) ? implode('/', array_slice($pains, 0, 3)) : ''; $zone_story_map = [ 'fit'=>'いまは大きく崩れているというより、納得感の中に小さな揺れが混ざっている状態です。', 'offset'=>'いまは「何が引っかかっているか」を言葉にする途中にあり、違和感が静かに続いている状態です。', 'pause'=>'いまは決める前に、一度立ち止まって整理したいというサインが強く出ています。', 'mismatch'=>'いまは努力不足ではなく、環境や役割との噛み合い方を見直すタイミングに入っています。', 'redesign'=>'いまは次の形を考え始める段階に入りつつあり、再設計のテーマが立ち上がっています。', ]; $zone_story = $zone_story_map[$zone] ?? $zone_story_map['offset']; $v = [ '探求'=>(int)($l2_inputs['v_explore'] ?? 0), '関係'=>(int)($l2_inputs['v_relationship'] ?? 0), '論理'=>(int)($l2_inputs['v_logic'] ?? 0), '共感'=>(int)($l2_inputs['v_empathy'] ?? 0), ]; arsort($v); $keys=array_keys($v); $top1=$keys[0]??''; $top2=$keys[1]??''; $values_line = ($top1 && $top2) ? "価値観の重心は「{$top1}」と「{$top2}」に寄っています。" : ''; $story_lines=[]; $story_lines[]="いまの全体像は、{$zone_story}"; if ($distance_label) $story_lines[]="距離感としては {$distance_label}。焦って決めるより、順番を整える方が進みやすい局面です。"; if ($age) $story_lines[]="{$age}歳という年齢は、正解探しより「自分に合う整え方」を選ぶのに向くタイミングでもあります。"; if ($pain_top) $story_lines[]="引っかかりの中心は「{$pain_top}」あたりにまとまっています。"; if ($values_line) $story_lines[]=$values_line; if ($current_job!==''||$current_industry!=='') $story_lines[]="現状は「{$current_job}/{$current_industry}」を軸にしていて、ここがいまの前提(仕事環境)になっています。"; if ($desired_job!==''||$desired_industry!=='') $story_lines[]="一方で、気になる方向として「{$desired_job}/{$desired_industry}」が挙がっています。これは“答え”というより、現状を照らす比較軸として扱えます。"; if ($constraints!=='') $story_lines[]="外せない条件として「{$constraints}」があり、ここは意思の弱さではなく“守るべき前提”です。"; if ($timeline_text!=='') $story_lines[]="タイミング感は「{$timeline_text}」。結論を急ぐ必要はありません。"; $story_lines[]="次は、必要なら「何が変えられて/何が変えにくいか」を分けながら、整理の順番を一緒に作っていきます。"; $story_lines[]="このページは“結論の提示”ではなく、誤解なく読み解くための整理メモとして置いています。"; $story_summary = implode("\n", array_values(array_filter($story_lines))); /* ========================= * カード抽出ロジック(変更なし) * ========================= */ $split_regex = '/\n?\s*(?:' . '(①|②|③|④|⑤)' . '|([1-5])\s*[\..\)]' . '|第\s*([1-5])\s*章' . '|【\s*([1-5])\s*】' . ')\s*/u'; $sections = []; // '1'..'5' $norm_text = str_replace(["\r\n", "\r"], "\n", $l2_text_full); if ($has_report) { $matches = []; if (preg_match_all($split_regex, "\n".$norm_text, $matches, PREG_OFFSET_CAPTURE)) { $hits = []; $count = count($matches[0]); for ($i=0; $i<$count; $i++) { $offset = $matches[0][$i][1]; $num = ''; if (!empty($matches[1][$i][0])) { $map = ['①'=>'1','②'=>'2','③'=>'3','④'=>'4','⑤'=>'5']; $num = $map[$matches[1][$i][0]] ?? ''; } elseif (!empty($matches[2][$i][0])) { $num = (string)$matches[2][$i][0]; } elseif (!empty($matches[3][$i][0])) { $num = (string)$matches[3][$i][0]; } elseif (!empty($matches[4][$i][0])) { $num = (string)$matches[4][$i][0]; } if ($num !== '' && (int)$num >= 1 && (int)$num <= 5) $hits[] = ['n'=>$num, 'pos'=>$offset]; } if (!empty($hits)) { usort($hits, function($a,$b){ return $a['pos'] <=> $b['pos']; }); $whole = "\n".$norm_text; $whole_len = strlen($whole); for ($i=0; $i 1) { array_shift($lines); $chunk = trim(implode("\n", $lines)); } else { $chunk = trim($chunk); } if ($chunk !== '') $sections[$n] = $chunk; } } } } // 表示制限(面談価値を残す)※文言の末尾だけ調整 $limit_chars = ['1'=>650,'3'=>650,'4'=>650,'5'=>420]; $cards = []; $market_section = ''; $copy_text_5 = ''; $extract_questions = function($text) { $text = str_replace(["\r\n","\r"], "\n", (string)$text); $lines = array_values(array_filter(array_map('trim', explode("\n", $text)))); $qs = []; foreach ($lines as $ln) { if (mb_strpos($ln, '?') !== false || mb_strpos($ln, '?') !== false || preg_match('/^(?:[・\-●■▶︎▷]|[0-9]+[\..\)]|\([0-9]+\))\s*/u', $ln)) { $qs[] = preg_replace('/^\s*(?:[・\-●■▶︎▷]|[0-9]+[\..\)]|\([0-9]+\))\s*/u', '', $ln); } if (count($qs) >= 3) break; } return $qs; }; if ($has_report && !empty($sections)) { if (!empty($sections['1'])) { $t = trim($sections['1']); $cards['1'] = mb_substr($t, 0, $limit_chars['1']) . ((mb_strlen($t) > $limit_chars['1']) ? "…\n(続きは読み解きで)" : ''); } if (!empty($sections['3'])) { $t = trim($sections['3']); $cards['3'] = mb_substr($t, 0, $limit_chars['3']) . ((mb_strlen($t) > $limit_chars['3']) ? "…\n(続きは読み解きで)" : ''); } if (!empty($sections['4'])) { $t = trim($sections['4']); $cards['4'] = mb_substr($t, 0, $limit_chars['4']) . ((mb_strlen($t) > $limit_chars['4']) ? "…\n(続きは読み解きで)" : ''); } if (!empty($sections['5'])) { $qs = $extract_questions($sections['5']); if (count($qs) >= 1) { $cards['5'] = "読み解きで深掘りする問い(抜粋)\n" . "・" . implode("\n・", array_slice($qs, 0, 3)); $copy_text_5 = $cards['5']; } else { $t = trim($sections['5']); $cards['5'] = mb_substr($t, 0, $limit_chars['5']) . ((mb_strlen($t) > $limit_chars['5']) ? "…\n(続きは読み解きで)" : ''); $copy_text_5 = $cards['5']; } } if (!empty($sections['2'])) { $t = trim($sections['2']); $market_section = mb_substr($t, 0, 800) . ((mb_strlen($t) > 800) ? "…\n(続きは読み解きで)" : ''); } } // フォールバック $fallback_teaser = ''; if ($has_report) { $fallback_teaser = mb_substr($l2_text_full, 0, 900); if (mb_strlen($l2_text_full) > 900) { $fallback_teaser .= "\n…\n(続きは、この画面を見ながら読み解きとしてご説明します)"; } } $use_cards = ($has_report && count($cards) >= 2); $copy_attr_5 = esc_attr($copy_text_5); // Jicooベース $jicoo_base = 'https://www.jicoo.com/t/umj_interview/e/quinsel_ye57mZOyP5vb'; ?>

QUINSEL|整理メモ

「」の背景を、
いまの状態として整理しました

これは“結論”ではなく、状況を言語化して「次の一手を選びやすくする」ための整理メモです。
ただ、ここは読み方で価値が変わります。独力だと「都合のいい解釈」や「重要ポイントの飛ばし」が起きやすいので、一度だけでも一緒に確認しませんか?

id:
AIキャリアドックで整理した内容(参考) ※この整理メモと合わせて読み解きます
フリーワード

※ 転職を促す場ではありません。
※ “何を保留にしていいか/何を決めなくていいか” を整理します。

今回の整理メモ(要点)

※この要約は「入口」です。背景や文脈は、読み解きで確認しながら整えます。

整理の流れ(文脈メモ)

※ここに書いてあるのは結論ではありません。誤解が起きないように、読み解きで文脈を合わせます。

整理メモ(抜粋)

いま、入力をもとに整理しています。
・現職 × 業界の市場感
・価値観と条件の噛み合い
・思考が止まりやすい地点
を整理しています(30〜60秒ほどかかる場合があります)

※ この整理メモは「正解」ではありません。状況が変われば、見え方も自然に変わります。

ほかにできること